From fd2001b97e071c9a34e100793128c1ed02b07bb3 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期六, 28 十二月 2024 13:51:09 +0800 Subject: [PATCH] 1 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs index 340e770..9ec1468 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json; +锘縰sing Masuit.Tools; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -16,7 +17,7 @@ /// </summary> /// <param name="json"></param> /// <returns></returns> - public WebResponseContent RequsetCellInfo(object json) + public object RequsetCellInfo(object json) { WebResponseContent content = new WebResponseContent(); try @@ -25,14 +26,23 @@ var result = JsonConvert.DeserializeObject<RequsetCellInfo>(json.ToString()); - //_stockInfoRepository.QueryFirst(x=>x.LocationCode == result.LocationID && x) + var info = _stockInfoRepository.QueryFirst(x => x.LocationCode == result.LocationID); //todo + if (info != null) + { + LogFactory.GetLog("鍒嗗鑾峰彇搴撲綅鎵樼洏").Info(true, $"\r\r--------------------------------------"); + LogFactory.GetLog("鍒嗗鑾峰彇搴撲綅鎵樼洏").Info(true, result.ToJsonString()); + return new { code = 1, palletBarcode = info.PalletCode }; + } + else + { + return new { code = 0, palletBarcode = "",message="搴撲綅鏃犲簱瀛樿褰�" }; + } - return content.OK(); } catch (Exception ex) { - return content.Error(ex.Message); + return new { code = 0, palletBarcode = "", message = ex.Message }; } } } -- Gitblit v1.9.3