From ff008cf08816776a6d9b08166def76721626618c Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期日, 04 一月 2026 13:45:51 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs |    2 +-
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs                    |   26 +++++++-------------------
 2 files changed, 8 insertions(+), 20 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 6b2cf80..d521c7f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -5,6 +5,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_BasicService;
 using WIDESEA_Common.CommonEnum;
 using WIDESEA_Common.LocationEnum;
 using WIDESEA_Common.OrderEnum;
@@ -68,7 +69,6 @@
                     return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
                 }
 
-
                 var newTask = new Dt_Task()
                 {                    
                     CurrentAddress = stations.GetValueOrDefault(stationCode) ?? "",
@@ -82,28 +82,18 @@
                     TaskStatus = TaskStatusEnum.New.ObjToInt(),
                     WarehouseId = stockInfo.WarehouseId,
                     PalletType = stockInfo.PalletType,
-                    OrderNo= stockInfo.Details.FirstOrDefault()?.OrderNo
+                    OrderNo= stockInfo.Details.FirstOrDefault()?.OrderNo,
                 };
                 //绌虹
-                if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt())
+                if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()|| stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
                 {
                     _unitOfWorkManage.BeginTran();
                     newTask.TaskType = TaskTypeEnum.InEmpty.ObjToInt();
-                    int taskId = BaseDal.AddData(newTask);
-                    newTask.TaskId = taskId;
 
-                    locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
-                    _locationInfoService.UpdateData(locationInfo);
-                    stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
-
-                    _stockRepository.UpdateData(stockInfo);
-                    _unitOfWorkManage.CommitTran();
-                }
-                //鏅轰粨鍏ユ櫤浠�
-                if (stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
-                {
-                    _unitOfWorkManage.BeginTran();
-                    newTask.TaskType = TaskTypeEnum.AllocateInWarehouse.ObjToInt();
+                    if (stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
+                    {
+                        newTask.TaskType = TaskTypeEnum.AllocateInWarehouse.ObjToInt();
+                    }
                     int taskId = BaseDal.AddData(newTask);
                     newTask.TaskId = taskId;
 
@@ -124,8 +114,6 @@
                         inboundOrder = _inboundOrderService.Repository.QueryFirst(x => x.InboundOrderNo == orderNo && x.OrderStatus < InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt());
                     
                     }
-
-
                     stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
 
                     LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs"
index ac3c3e1..ba9350e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs"
@@ -82,7 +82,7 @@
                             MaterielCode = detailDto.MaterialCode,
                             MaterielName = materialName,
                             LineNo = detailDto.LineNo,
-                            OrderQuantity = detailDto.Qty,
+                            OrderQuantity = barcodeDto.Qty,
                             SupplyCode = barcodeDto.SupplyCode,
                             Unit = detailDto.Unit,
                             Barcode = barcodeDto.Barcode,

--
Gitblit v1.9.3