From aded48e0f32d28bf61479a3c50ac63946be6f469 Mon Sep 17 00:00:00 2001
From: xxyy <cathay_xy@163.com>
Date: 星期四, 06 三月 2025 17:28:46 +0800
Subject: [PATCH] 修复空指针异常的潜在问题

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
index 1632fd3..6aed71f 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -1,4 +1,5 @@
 锘縰sing LogLibrary.Log;
+using Masuit.Tools;
 using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
@@ -61,7 +62,7 @@
                     CreateDate = DateTime.Now,
                     Creater = "HK",
                     CurrentAddress = result.LocationID,
-                    Grade = 1,
+                    Grade = result.IsNG == 1 ? 1 : 2,
                     Dispatchertime = DateTime.Now,
                     PalletCode = result.PalletBarcode,
                     Roadway = location.RoadwayNo,
@@ -78,7 +79,7 @@
                 WMSTaskDTO taskDTO = new WMSTaskDTO()
                 {
                     TaskNum = task.TaskNum.Value,
-                    Grade = 1,
+                    Grade = result.IsNG == 1 ? 1 : 2,
                     PalletCode = task.PalletCode,
                     RoadWay = task.Roadway,
                     SourceAddress = task.SourceAddress,
@@ -104,6 +105,8 @@
                     if (respone.Status)
                     {
                         var taskId = _taskRepository.AddData(task);
+
+                        //_simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { taskDTO.PalletCode });
                     }
 
                     else
@@ -127,7 +130,7 @@
                 //    TaskState = (int)TaskOutStatusEnum.OutNew,
                 //};
                 LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, $"\r\r--------------------------------------");
-                LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, result);
+                LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, result.ToJsonString());
                 return content.OK();
             }
             catch (Exception ex)

--
Gitblit v1.9.3