From bea5e8a7d4d764ec0eb35e766a879e85a1424ca4 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 03 十一月 2025 09:36:05 +0800
Subject: [PATCH] 优化盘点流程

---
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs              |    5 +++++
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs                       |    7 ++-----
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs                 |    5 +++++
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs    |    2 ++
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs |    2 ++
 5 files changed, 16 insertions(+), 5 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
index 6a764ee..c910893 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
@@ -557,11 +557,13 @@
                             }
                             #endregion
                             inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                            inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                             inventoryInfo.SupplyQuantity = 0;
                             inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                         }
                         infosUp.AddRange(inventoryInfos);
                         inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
+                        inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                         inventory_Batch.SupplyQuantity = 0;
                         batchesUp.Add(inventory_Batch);
                         //_inventoryInfoService.UpdateData(inventoryInfos);
@@ -655,12 +657,14 @@
                                 }
                                 #endregion
                                 inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                 inventoryInfo.SupplyQuantity = 0;
                                 inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                             }
                             //_inventoryInfoService.UpdateData(inventoryInfos);
                             infosUp.AddRange(inventoryInfos);
                             inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
+                            inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                             inventory_Batch.SupplyQuantity = 0;
                             //_inventory_BatchServices.UpdateData(inventory_Batch);
                             batchesUp.Add(inventory_Batch);
@@ -726,6 +730,7 @@
                                 }
                                 #endregion
                                 inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                 inventoryInfo.SupplyQuantity = 0;
                                 inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                             }
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
index 6c73c84..d5157af 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
@@ -555,10 +555,12 @@
                             }
                             #endregion
                             inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                            inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                             inventoryInfo.SupplyQuantity = 0;
                             inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                         }
                         inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
+                        inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                         inventory_Batch.SupplyQuantity = 0;
                         infosUp.AddRange(inventoryInfos);
                         batchesUp.Add(inventory_Batch);
@@ -652,11 +654,13 @@
                                 }
                                 #endregion
                                 inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                 inventoryInfo.SupplyQuantity = 0;
                                 inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                             }
                             //_inventoryInfoService.UpdateData(inventoryInfos);
                             inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
+                            inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                             inventory_Batch.SupplyQuantity = 0;
                             //_inventory_BatchServices.UpdateData(inventory_Batch);
                             infosUp.AddRange(inventoryInfos);
@@ -723,6 +727,7 @@
                                 }
                                 #endregion
                                 inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                 inventoryInfo.SupplyQuantity = 0;
                                 inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                             }
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs"
index 1392201..c0a4b66 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs"
@@ -49,11 +49,13 @@
                         if (orderQty != qty)
                             throw new Exception($"鐩樼泩鍏ュ簱鏁伴噺涓嶄竴鑷�,涓婁紶鏁伴噺銆恵orderQty}銆�,搴撳瓨鐩樼泩鏁伴噺銆恵qty}銆�");
                         inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                        inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                         inventoryInfo.SupplyQuantity = 0;
                         inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                         infosUp.Add(inventoryInfo);
                         Dt_Inventory_Batch inventory_Batch = inventory_Batches.First(x => x.MaterielCode == inventoryInfo.MaterielCode && x.BatchNo == inventoryInfo.BatchNo);
                         inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
+                        inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                         inventory_Batch.SupplyQuantity = 0;
                         batchesUp.Add(inventory_Batch);
                         orderDetail.OrderDetailStatus = "宸插畬鎴�";
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs"
index a806578..3c120d4 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs"
@@ -43,11 +43,13 @@
                             if (orderQty != qty)
                                 throw new Exception($"鐩樹簭鍑哄簱鏁伴噺涓嶄竴鑷�,涓婁紶鏁伴噺銆恵orderQty}銆�,搴撳瓨鐩樹簭鏁伴噺銆恵qty}銆�");
                             inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
+                            inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                             inventoryInfo.SupplyQuantity = 0;
                             inventoryInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
                             infosUp.Add(inventoryInfo);
                             Dt_Inventory_Batch inventory_Batch = inventory_Batches.First(x => x.MaterielCode == inventoryInfo.MaterielCode && x.BatchNo == inventoryInfo.BatchNo);
                             inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
+                            inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                             inventory_Batch.SupplyQuantity = 0;
                             batchesUp.Add(inventory_Batch);
                             orderDetail.OotDetailStatus = "宸插畬鎴�";
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs"
index 996a1fc..72fd66b 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs"
@@ -317,11 +317,8 @@
                 #endregion
                 _inventoryInfoService.UpdateData(inventoryInfo);
                 _supplyTaskService.Repository.DeleteAndMoveIntoHty(supplyTask, OperateTypeEnum.鑷姩瀹屾垚);
-                if (inventoryInfos.Count >= 1)
-                {
-                    _inventoryInfoService.UpdateData(inventoryInfos);
-                    _inventory_BatchServices.UpdateData(inventory_Batch);
-                }
+                _inventoryInfoService.UpdateData(inventoryInfos);
+                _inventory_BatchServices.UpdateData(inventory_Batch);
                 _unitOfWorkManage.CommitTran();
                 #endregion
                 content.OK();

--
Gitblit v1.9.3