From a4254c45c86d19a76147cbf375cba7f1a7aff5d6 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期五, 29 十一月 2024 13:54:28 +0800
Subject: [PATCH] 忽略项

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 980ddb5..69b11ac 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -98,7 +98,12 @@
                 {
                     var agingOutputDto = MapToAgingOutputDto(stock);
                     content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto);
-                    ValidateResponse(content);
+                    //ValidateResponse(content);
+                    var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
+                    if (!result.Success)
+                    {
+                        task.Remark = "NG";
+                    }
                 }
             }
 
@@ -111,11 +116,11 @@
                 await UpdateLocationAsync(loc);
                 await DeleteStockInfoAsync(stock.Id);
                 await DeleteStockInfoDetailsAsync(stock.StockInfoDetails);
-                if (task.Roadway.Contains("FR"))   //濡傛灉鏄垎瀹� 灏嗕换鍔″垹闄�
+                if (task.Roadway.Contains("FR") || task.Roadway.Contains("GW"))   //濡傛灉鏄垎瀹规垨楂樻俯鍑哄簱 灏嗕换鍔″垹闄�
                     await DeleteTaskAsync(task.TaskId);
             });
 
-            return content.OK("浠诲姟瀹屾垚鎴愬姛");
+            return content.OK("浠诲姟瀹屾垚鎴愬姛", task.Remark);
         }
         catch (Exception err)
         {
@@ -138,7 +143,8 @@
 
         var outHours = (DateTime.Now - stock.OutboundTime.Value).TotalHours;
         var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble() && outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
-
+        var defectCode = string.Empty;
+        if (!isNG) defectCode = "TQCK";
         return new AgingOutputDto
         {
             OpFlag = 1,
@@ -159,6 +165,7 @@
                         TargetValue = parameterInfo.TargetValue,
                         LowerLomit = parameterInfo.LowerSpecificationsLimit,
                         UpperLimit = parameterInfo.UpperSpecificationsLimit,
+                        DefectCode = defectCode
                     }
                 }
             }).ToList()
@@ -167,11 +174,7 @@
 
     private void ValidateResponse(WebResponseContent content)
     {
-        var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
-        if (!result.Success)
-        {
-            throw new Exception(result.MOMMessage);
-        }
+
     }
 
     private (DtLocationInfo, Dt_Task) UpdateStockAndTaskStatus(DtStockInfo stock, Dt_Task task)
@@ -296,7 +299,7 @@
 
             // 鑾峰彇瑁呯淇℃伅鍜岀洰鏍囦綅缃俊鎭�
             var boxing = await _boxingInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode);
-            var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress);
+            var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress && x.RoadwayNo == task.Roadway);
 
             // 鏇存柊鐩爣浣嶇疆鐘舵�佷负搴撳瓨涓�
             locationInf.LocationStatus = (int)LocationEnum.InStock;

--
Gitblit v1.9.3