From a2f8c1434ba06a5231c4f9f8bc9373402f4228f7 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 27 三月 2025 20:38:56 +0800 Subject: [PATCH] 优化数据库事务处理及收货单功能 --- Tiger.Business.WMS/ERP/WMS_U9C.cs | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.cs b/Tiger.Business.WMS/ERP/WMS_U9C.cs index 5e6ebce..6253d49 100644 --- a/Tiger.Business.WMS/ERP/WMS_U9C.cs +++ b/Tiger.Business.WMS/ERP/WMS_U9C.cs @@ -70,7 +70,7 @@ if (result.Success && result.Data[0].IsSucess) { action.Data = result.Data; - // Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曟帴鍙f彁浜son: {JsonConvert.SerializeObject(param)}锛岃繑鍥濲son: {response.Message}"); + Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曟帴鍙f彁浜son: {JsonConvert.SerializeObject(param)}锛岃繑鍥濲son: {response.Message}"); } else { @@ -155,11 +155,12 @@ var action = new ApiAction<List<U9CReturnData2>>(); try { - action = await SubmitLine(input); - if (action.IsSuccessed) { - input.IsLogin = false; - action = await ApproveLine(input); - } + //action = await SubmitLine(input); + //if (action.IsSuccessed) { + // input.IsLogin = false; + // action = await ApproveLine(input); + //} + action = await ApproveLine(input); } catch (System.Exception ex) { @@ -190,14 +191,16 @@ Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); } } - var response = await HttpHelper.PostAsync(SubmitLineUrl, JsonConvert.SerializeObject(input.param), new Dictionary<string, string>() { { "token", input.token } }); + var _params = new List<SubmitLineInputParam>(); + _params.Add(input.param); + var response = await HttpHelper.PostAsync(SubmitLineUrl, JsonConvert.SerializeObject(_params), 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(input.param)}锛岃繑鍥濲son: {response.Message}"); + Logger.Interface.Info($"鏀惰揣鍗�-琛屾彁浜ゆ帴鍙f彁浜son: {JsonConvert.SerializeObject(_params)}锛岃繑鍥濲son: {response.Message}"); } else { @@ -236,14 +239,16 @@ Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); } } - var response = await HttpHelper.PostAsync(ApproveLineUrl, JsonConvert.SerializeObject(input.param), new Dictionary<string, string>() { { "token", input.token } }); + var _params = new List<SubmitLineInputParam>(); + _params.Add(input.param); + var response = await HttpHelper.PostAsync(ApproveLineUrl, JsonConvert.SerializeObject(_params), 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(input.param)}锛岃繑鍥濲son: {response.Message}"); + Logger.Interface.Info($"鏀惰揣鍗�-琛屽鏍告帴鍙f彁浜son: {JsonConvert.SerializeObject(_params)}锛岃繑鍥濲son: {response.Message}"); } else { -- Gitblit v1.9.3