From b511ce686d438b202b73fc4f3b2d1abd5cf72dc4 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期六, 29 十一月 2025 09:51:40 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 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.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.cs"
index 3021a88..cdf54d8 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.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.cs"
@@ -51,6 +51,7 @@
 using WIDESEA_IStockService;
 using WIDESEA_ITaskInfoService;
 using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Outbound;
 
 namespace WIDESEA_TaskInfoService
 {
@@ -65,6 +66,7 @@
         private readonly IInboundOrderService _inboundOrderService;
         private readonly IInboundOrderDetailService _inboundOrderDetailService;
 
+        private readonly IRepository<Dt_OutboundBatch> _OutboundBatchRepository;
         private readonly IOutboundOrderService _outboundOrderService;
         private readonly IOutboundOrderDetailService _outboundOrderDetailService;
         private readonly IOutStockLockInfoService _outStockLockInfoService;
@@ -270,12 +272,12 @@
             {
                 foreach (var inboundOrder in inboundOrders)
                 {
-                    if (inboundOrder.OrderType == InOrderTypeEnum.Allocat.ObjToInt())//璋冩嫧鍏ュ簱
+                    if (inboundOrder.OrderType == InOrderTypeEnum.AllocatInbound.ObjToInt())//璋冩嫧鍏ュ簱
                     {
                         if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
                         {
                             var allocate = _allocateService.Repository.QueryData(x => x.OrderNo == inboundOrder.InboundOrderNo).First();
-                            var feedmodel = new AllocateDto
+                            var allocatefeedmodel = new AllocateDto
                             {
                                 ReqCode = Guid.NewGuid().ToString(),
                                 ReqTime = DateTime.Now.ToString(),
@@ -308,9 +310,9 @@
                                        Unit = row.Unit
                                    }).ToList()
                                }).ToList();
-                            feedmodel.Details = groupedData;
+                            allocatefeedmodel.Details = groupedData;
 
-                            var result = await _invokeMESService.FeedbackAllocate(feedmodel);
+                            var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
                             if (result != null && result.code == 200)
                             {
                                 _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 })
@@ -382,6 +384,13 @@
             return WebResponseContent.Instance.OK();
         }
 
+
+        public async Task<WebResponseContent> OutAllocateTaskCompleted(Dt_Task task)
+        {
+            _logger.LogInformation($"TaskService  OutAllocateTaskCompleted: {task.TaskNum}");
+
+           return  await OutboundTaskCompleted(task);          
+        }
         public async Task<WebResponseContent> OutboundTaskCompleted(Dt_Task task)
         {
             _logger.LogInformation($"TaskService  OutboundTaskCompleted: {task.TaskNum}");
@@ -607,7 +616,7 @@
                     if (outboundOrder.OrderType == OutOrderTypeEnum.Allocate.ObjToInt())
                     {
                         var allocate = _allocateService.Repository.QueryData(x => x.UpperOrderNo == outboundOrder.UpperOrderNo).First();
-                        var feedmodel = new AllocateDto
+                        var allocatefeedmodel = new AllocateDto
                         {
                             ReqCode = Guid.NewGuid().ToString(),
                             ReqTime = DateTime.Now.ToString(),
@@ -650,10 +659,10 @@
                                 }).ToList()
                             };
 
-                            feedmodel.Details.Add(detailModel);
+                            allocatefeedmodel.Details.Add(detailModel);
                         }
 
-                        var result = await _invokeMESService.FeedbackAllocate(feedmodel);
+                        var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
                         if (result != null && result.code == 200)
                         {
                             await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()

--
Gitblit v1.9.3