From 2abf4959b71e7dd6ee6ee8a349ecc5c2f7b20fce Mon Sep 17 00:00:00 2001 From: YangYuGang <1378265336@qq.com> Date: 星期日, 20 四月 2025 20:28:56 +0800 Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024 --- Tiger.Business.WMS/ERP/WMS_U9C.cs | 34 +++++++--------------------------- 1 files changed, 7 insertions(+), 27 deletions(-) diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.cs b/Tiger.Business.WMS/ERP/WMS_U9C.cs index 09e150f..cb5c19d 100644 --- a/Tiger.Business.WMS/ERP/WMS_U9C.cs +++ b/Tiger.Business.WMS/ERP/WMS_U9C.cs @@ -31,20 +31,10 @@ public static string ApproveLineUrl { get; set; } = "http://172.16.80.20/u9c/webapi/Receivement/ApproveLine"; // ApiConfig.IsTestServer ? Cache.SysParam["ApproveLineUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["ApproveLineUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/Receivement/ApproveLine; 娴嬭瘯 /// <summary> - /// 鍒涘缓鐢熶骇棰嗘枡鍗� - /// </summary> - public static string CreateProdMaterialReqUrl - { get; set; } = "http://172.16.80.20/u9c/webapi/IssueDoc/Create"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/IssueDoc/Create - /// <summary> /// 鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂� /// </summary> public static string CreateProdReturnOrderNewUrl { get; set; } = "http://172.16.80.20/u9c/webapi/IssueDoc/CreateRecedeIssueDocNew"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateProdReturnOrderUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateProdReturnOrderUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/IssueDoc/CreateRecedeIssueDocNew - /// <summary> - /// 鍒涘缓濮斿鐢熶骇棰嗘枡鍗� - /// </summary> - public static string CreateOutProdMaterialReqUrl - { get; set; } = "http://172.16.80.20/u9c/webapi/PMIssueDoc/Create"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/Create /// <summary> /// 鍒涘缓濮斿鐢熶骇閫�鏂欏崟 /// </summary> @@ -95,7 +85,7 @@ { action.IsSuccessed = false; action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}"); - Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曞け璐�:{result.Data[0].ErrorMsg}"); + Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曞け璐ワ紝鎻愪氦Json: {JsonConvert.SerializeObject(param)}锛岄敊璇俊鎭�:{result.Data[0].ErrorMsg}"); } } } @@ -128,37 +118,27 @@ Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); } } - CreateReceivementParam param = new() - { - rcvDTO = new() - { - BusinessDate = DateTime.Now, - Supplier = new() { m_code = input.Supplier }, - RcvDocType = new() { m_code = input.RcvDocType }, - RcvLines= input.RcvLines, - }, - OtherID = "WMS" - }; - var response = await HttpHelper.PostAsync(CreateReceivementUrl, JsonConvert.SerializeObject(param), new Dictionary<string, string>() { { "token", input.token } }); + + var response = await HttpHelper.PostAsync(CreateReceivementUrl, JsonConvert.SerializeObject(input.CreateReceivementParam), new Dictionary<string, string>() { { "token", input.token } }); var result = JsonConvert.DeserializeObject<U9CResult2>(response.Message); if (result != null) { if (result.Success && result.Data[0].IsSucess) { action.Data = result.Data; - Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏃犳潵婧愭帴鍙f彁浜son: {JsonConvert.SerializeObject(param)}锛岃繑鍥濲son: {response.Message}"); + Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏃犳潵婧愭帴鍙f彁浜son: {JsonConvert.SerializeObject(input.CreateReceivementParam)}锛岃繑鍥濲son: {response.Message}"); } else { action.IsSuccessed = false; action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}"); - Logger.Interface.Info($"鏂板鏀惰揣-鍗曟棤鏉ユ簮澶辫触:{result.Data[0].ErrorMsg}"); + Logger.Interface.Info($"鏂板鏀惰揣-鍗曟棤鏉ユ簮澶辫触锛屾彁浜son: {JsonConvert.SerializeObject(input.CreateReceivementParam)}锛岄敊璇俊鎭�:{result.Data[0].ErrorMsg}"); } } } catch (System.Exception ex) { - action.CatchExceptionWithLog(ex, "鏂板鏀惰揣鍗�-鏃犳潵婧愬紓甯�"); + action.CatchExceptionWithLog(ex, $"鏂板鏀惰揣鍗�-鏃犳潵婧愬紓甯革紝鎻愪氦Json: {JsonConvert.SerializeObject(input.CreateReceivementParam)}"); } Logger.Interface.Info($"/* 鏂板鏀惰揣鍗�-鏃犳潵婧愭帴鍙g粨鏉� */\r\n"); //鍥哄畾鍐欐硶 return action; @@ -273,7 +253,7 @@ { action.IsSuccessed = false; action.LocaleMsg = new($"鏀惰揣鍗� - 琛屽鏍告帴鍙eけ璐�:{result.Data[0].ErrorMsg}"); - Logger.Interface.Info($"鏀惰揣鍗�-琛屽鏍告帴鍙eけ璐�:{result.Data[0].ErrorMsg}"); + Logger.Interface.Info($"鏀惰揣鍗�-琛屽鏍告帴鍙f彁浜son: {JsonConvert.SerializeObject(_params)}锛屽け璐�:{result.Data[0].ErrorMsg}"); } } } -- Gitblit v1.9.3