From f2392d984123a1402d6c9bab9e5452c7becc8d22 Mon Sep 17 00:00:00 2001
From: 雷神教育集团 <2244205553@qq.com>
Date: 星期五, 06 三月 2026 09:10:48 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Completed.cs |   64 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Completed.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Completed.cs"
index bf050aa..4fd6cc8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Completed.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Completed.cs"
@@ -13,6 +13,7 @@
 using WIDESEA_Core;
 using WIDESEA_Core.Helper;
 using WIDESEA_DTO.Task;
+using WIDESEA_External.Model;
 using WIDESEA_Model.Models;
 
 namespace WIDESEA_TaskInfoService
@@ -27,6 +28,14 @@
                 if (task == null)
                 {
                     return await Task.FromResult(WebResponseContent.Instance.Error($"鏈壘鍒颁换鍔′俊鎭�"));
+                }
+                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+                {
+                    return await Task.FromResult(InboundTaskCompleted(task));
+                }
+                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+                {
+                    return await Task.FromResult(OutboundTaskCompleted(task));
                 }
                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
                 {
@@ -88,13 +97,66 @@
             try
             {
                 Dt_Task wmsTask = BaseDal.QueryFirst(x=>x.TaskNum == task.TaskNum);
+                string oldPalletCode = wmsTask.PalletCode;
                 if (wmsTask != null)
                 {
+                    wmsTask.PalletCode= task.PalletCode;
+                    wmsTask.Roadway = task.Roadway;
                     wmsTask.TaskStatus = task.TaskState;
                     wmsTask.CurrentAddress = task.CurrentAddress;
                     wmsTask.NextAddress = task.NextAddress;
                     wmsTask.Dispatchertime = task.Dispatchertime;
+                    wmsTask.TaskType = task.TaskType;
+                    wmsTask.TargetAddress = task.TargetAddress;
+                    ////鎴愬搧鍏ュ簱鏇存柊鎵樼洏鏉$爜
+                    //if (wmsTask.TaskType == TaskTypeEnum.InProduct.ObjToInt() && oldPalletCode != task.PalletCode)
+                    //{
+                    //    Dt_ProStockInfo stockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == oldPalletCode);
+                    //    //鍒ゆ柇閲嶅鎵樼洏
+                    //    stockInfo.PalletCode = task.PalletCode;
+                    //    _stockRepository.ProStockInfoRepository.UpdateData(stockInfo);
+                    //}
                     BaseDal.UpdateData(wmsTask);
+                    //鎺ㄩ�丮ES鎺ラ┏鎴愬姛鎺ュ彛
+                    if (wmsTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup && !wmsTask.WorkCentreCode.IsNullOrEmpty() && wmsTask.TaskStatus == TaskStatusEnum.AGV_TakeFinish.ObjToInt())
+                    {
+                        Dt_AGVStationInfo? aGVStationInfo = null;
+                        
+                        aGVStationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==wmsTask.CurrentAddress || x.MESPointCode == wmsTask.CurrentAddress);
+                        
+                        MESRecepNoticeModel mESRecepNoticeModel = new MESRecepNoticeModel()
+                        {
+                            WorkCentreEmptyPalletNotice = new List<RecepNotice>()
+                            {
+                                new RecepNotice()
+                                {
+                                    LocationCode = aGVStationInfo.MESPointCode,
+                                    CompleteFlag=true
+                                }
+                            }
+                        };
+                        //鎺ㄩ�丮ES鎺ラ┏
+                        //_invokeMESService.MESRecepNotice(mESRecepNoticeModel);
+                    }
+                    //鎺ㄩ�丒RP鍗婃垚鍝佸叆搴�
+                    //if (wmsTask.TaskType>=TaskTypeEnum.WFBYLInbound.ObjToInt() && wmsTask.TaskType <= TaskTypeEnum.PrintYLInbound.ObjToInt() && wmsTask.TaskStatus==TaskStatusEnum.AGV_TakeFinish.ObjToInt())
+                    //{
+                    //    Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x=>x.PalletCode== wmsTask.PalletCode);
+                    //    string request = _invokeERPService.ERPSemiProInUp(
+                    //        new ERPProInUpModel()
+                    //        {
+                    //            PB_INV_PRODUCT_IN = new List<PB_INV_PRODUCT_INItem>()
+                    //            {
+                    //                new PB_INV_PRODUCT_INItem()
+                    //                {
+                    //                    WP_ID = 0,
+                    //                    INV_BARCODE = wmsTask.PalletCode,
+                    //                    REMARK = "鍗婃垚鍝佸叆搴�",
+                    //                    QTY=(int)stockInfo.StockLength
+                    //                }
+                    //            }
+                    //        }) ?? throw new Exception("鍗婃垚鍝佸叆搴撴帴鍙h姹傚け璐�");
+                    //}
                 }
                 return WebResponseContent.Instance.OK();
             }
@@ -112,7 +174,7 @@
         {
             try
             {
-                Dt_ApiInfo? url = _apiInfoRepository.QueryData(x => x.ApiCode == APIEnum.FeedBackWCSTaskCompleted.ToString()).First();
+                Dt_ApiInfo? url = _basicRepository.ApiInfoRepository.QueryData(x => x.ApiCode == APIEnum.FeedBackWCSTaskCompleted.ToString()).First();
                 string? apiAddress = url.ApiAddress;
                 if (string.IsNullOrEmpty(apiAddress))
                 {

--
Gitblit v1.9.3