From 18d1f45193e34e00fc1b6f65b8596ddb29c5267d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 24 十二月 2024 15:32:43 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 00206f2..bc617ce 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -92,13 +92,15 @@
         /// 浠诲姟淇℃伅鎺ㄩ�佽嚦WCS
         /// </summary>
         /// <returns></returns>
-        public WebResponseContent PushTasksToWCS()
+        public WebResponseContent PushTasksToWCS(List<Dt_Task> tasks, string agvDescription = "")
         {
             try
             {
-                List<Dt_Task> tasks = BaseDal.QueryData(x => (TaskTypes.Contains(x.TaskType) && x.TaskStatus == (int)TaskStatusEnum.New));
                 List<WMSTaskDTO> taskDTOs = _mapper.Map<List<WMSTaskDTO>>(tasks);
-
+                taskDTOs.ForEach(x =>
+                {
+                    x.AGVArea = agvDescription;
+                });
                 string response = HttpHelper.Post("http://127.0.0.1:9291/api/Task/ReceiveTask", taskDTOs.Serialize());
 
                 return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
@@ -160,7 +162,7 @@
                 locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
 
                 //娴嬭瘯鏋跺叆搴撳簱瀛樼姸鎬�
-                if (task.TaskType == TaskTypeEnum.TestInbound.ObjToInt())
+                if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
                 {
                     stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚鏈缓鍑哄簱鍗�.ObjToInt();
                     stockInfo.Details.ForEach(x =>
@@ -177,7 +179,7 @@
                 _unitOfWorkManage.BeginTran();
                 BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
 
-                _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
+                _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
 
                 _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                 _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details);
@@ -250,7 +252,7 @@
 
                 int beforeStatus = locationInfo.LocationStatus;
                 locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
-                _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
+                _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
                 BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
 
                 _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);

--
Gitblit v1.9.3