From a259e40ee315f068bd9b96f857f1f80ea137e89d Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期六, 08 三月 2025 21:27:42 +0800 Subject: [PATCH] 雅达-新增生产领料单和退料单接口 --- Tiger.IBusiness.WMS/iERP/IWMS_U9C.cs | 8 Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdReturnOrder.cs | 75 +++++++++ Tiger.Model.Net/Entitys/MES/ParameterEntity/U9CParameter.cs | 102 ++++++++++++ Tiger.Business.WMS/ERP/WMS_U9C.CreateProdMaterialReq.cs | 75 +++++++++ Tiger.Business.WMS/ERP/WMS_U9C.CreateProdReturnOrder.cs | 75 +++++++++ Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdMaterialReq.cs | 75 +++++++++ Tiger.Business.WMS/ERP/WMS_U9C.cs | 38 +++- 7 files changed, 435 insertions(+), 13 deletions(-) diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdMaterialReq.cs b/Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdMaterialReq.cs new file mode 100644 index 0000000..c947968 --- /dev/null +++ b/Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdMaterialReq.cs @@ -0,0 +1,75 @@ +锘縰sing Tiger.Model; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Rhea.Common; +using System.Net; +using System.Linq; +using Newtonsoft.Json; +using Tiger.IBusiness; +using Microsoft.AspNetCore.Http; +using Tiger.Model.Minsun; +using Org.BouncyCastle.Asn1.Tsp; +using Tiger.Model.Entitys.MES.Position; +using Apache.NMS.ActiveMQ.Commands; +using System.Security.Cryptography; +using System.Diagnostics; +using Tiger.Model.Entitys.MES.U9C; +using Newtonsoft.Json.Linq; +using System.Security.Policy; +using NetTaste; + +namespace Tiger.Business.WMS +{ + public partial class WMS_U9C + { + /// <summary> + /// 鍒涘缓濮斿鐢熶骇棰嗘枡鍗曟帴鍙� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public async Task<ApiAction<List<U9CReturnData>>> CreateOutProdMaterialReq(CreateOutProdMaterialReqInput input) { + Logger.Interface.Info($"/**\r\n *杩涘叆鍒涘缓濮斿鐢熶骇棰嗘枡鍗曟帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 + var action = new ApiAction<List<U9CReturnData>>(); + try + { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken + if (input.IsLogin) + { + var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); + if (u9CLoginResult.Success) + { + input.token = u9CLoginResult.Data; + Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); + } + } + + var response = await HttpHelper.PostAsync(CreateOutProdMaterialReqUrl, JsonConvert.SerializeObject(input.CreateOutProdMaterialReqParam), new Dictionary<string, string>() { { "token", input.token } }); + var result = JsonConvert.DeserializeObject<U9CResult>(response.Message); + if (result != null) + { + if (result.Success && result.Data[0].m_isSucess) + { + action.Data = result.Data; + Logger.Interface.Info($"鍒涘缓濮斿鐢熶骇棰嗘枡鍗曟帴鍙f彁浜son: {JsonConvert.SerializeObject(input.CreateOutProdMaterialReqParam)}锛岃繑鍥濲son: {response.Message}"); + } + else + { + action.IsSuccessed = false; + action.LocaleMsg = new($"{action.Message}; {result.Data[0].m_errorMsg}"); + Logger.Interface.Info($"鍒涘缓濮斿鐢熶骇棰嗘枡鍗曟帴鍙eけ璐�:{result.Data[0].m_errorMsg}"); + } + } + } + catch (System.Exception ex) + { + action.CatchExceptionWithLog(ex, "鍒涘缓濮斿鐢熶骇棰嗘枡鍗曞紓甯�"); + } + Logger.Interface.Info($"/* 鍒涘缓濮斿鐢熶骇棰嗘枡鍗曟帴鍙g粨鏉� */\r\n"); //鍥哄畾鍐欐硶 + return action; + } + } +} diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdReturnOrder.cs b/Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdReturnOrder.cs new file mode 100644 index 0000000..a701463 --- /dev/null +++ b/Tiger.Business.WMS/ERP/WMS_U9C.CreateOutProdReturnOrder.cs @@ -0,0 +1,75 @@ +锘縰sing Tiger.Model; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Rhea.Common; +using System.Net; +using System.Linq; +using Newtonsoft.Json; +using Tiger.IBusiness; +using Microsoft.AspNetCore.Http; +using Tiger.Model.Minsun; +using Org.BouncyCastle.Asn1.Tsp; +using Tiger.Model.Entitys.MES.Position; +using Apache.NMS.ActiveMQ.Commands; +using System.Security.Cryptography; +using System.Diagnostics; +using Tiger.Model.Entitys.MES.U9C; +using Newtonsoft.Json.Linq; +using System.Security.Policy; +using NetTaste; + +namespace Tiger.Business.WMS +{ + public partial class WMS_U9C + { + /// <summary> + /// 鍒涘缓濮斿鐢熶骇閫�鏂欏崟鎺ュ彛 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public async Task<ApiAction<List<U9CReturnData>>> CreateOutProdReturnOrder(CreateOutProdReturnOrderInput input) { + Logger.Interface.Info($"/**\r\n *杩涘叆鍒涘缓濮斿鐢熶骇閫�鏂欏崟鎺ュ彛....\r\n */\r\n"); //鍥哄畾鍐欐硶 + var action = new ApiAction<List<U9CReturnData>>(); + try + { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken + if (input.IsLogin) + { + var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); + if (u9CLoginResult.Success) + { + input.token = u9CLoginResult.Data; + Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); + } + } + + var response = await HttpHelper.PostAsync(CreateOutProdReturnOrderUrl, JsonConvert.SerializeObject(input.CreateOutProdReturnOrderParam), new Dictionary<string, string>() { { "token", input.token } }); + var result = JsonConvert.DeserializeObject<U9CResult>(response.Message); + if (result != null) + { + if (result.Success && result.Data[0].m_isSucess) + { + action.Data = result.Data; + Logger.Interface.Info($"鍒涘缓濮斿鐢熶骇閫�鏂欏崟鎺ュ彛鎻愪氦Json: {JsonConvert.SerializeObject(input.CreateOutProdReturnOrderParam)}锛岃繑鍥濲son: {response.Message}"); + } + else + { + action.IsSuccessed = false; + action.LocaleMsg = new($"{action.Message}; {result.Data[0].m_errorMsg}"); + Logger.Interface.Info($"鍒涘缓濮斿鐢熶骇閫�鏂欏崟鎺ュ彛澶辫触:{result.Data[0].m_errorMsg}"); + } + } + } + catch (System.Exception ex) + { + action.CatchExceptionWithLog(ex, "鍒涘缓濮斿鐢熶骇閫�鏂欏崟寮傚父"); + } + Logger.Interface.Info($"/* 鍒涘缓濮斿鐢熶骇閫�鏂欏崟鎺ュ彛缁撴潫 */\r\n"); //鍥哄畾鍐欐硶 + return action; + } + } +} diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.CreateProdMaterialReq.cs b/Tiger.Business.WMS/ERP/WMS_U9C.CreateProdMaterialReq.cs new file mode 100644 index 0000000..945326c --- /dev/null +++ b/Tiger.Business.WMS/ERP/WMS_U9C.CreateProdMaterialReq.cs @@ -0,0 +1,75 @@ +锘縰sing Tiger.Model; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Rhea.Common; +using System.Net; +using System.Linq; +using Newtonsoft.Json; +using Tiger.IBusiness; +using Microsoft.AspNetCore.Http; +using Tiger.Model.Minsun; +using Org.BouncyCastle.Asn1.Tsp; +using Tiger.Model.Entitys.MES.Position; +using Apache.NMS.ActiveMQ.Commands; +using System.Security.Cryptography; +using System.Diagnostics; +using Tiger.Model.Entitys.MES.U9C; +using Newtonsoft.Json.Linq; +using System.Security.Policy; +using NetTaste; + +namespace Tiger.Business.WMS +{ + public partial class WMS_U9C + { + /// <summary> + /// 鍒涘缓鐢熶骇棰嗘枡鍗曟帴鍙� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public async Task<ApiAction<List<U9CReturnData>>> CreateProdMaterialReq(CreateProdMaterialReqInput input) { + Logger.Interface.Info($"/**\r\n *杩涘叆鍒涘缓鐢熶骇棰嗘枡鍗曟帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 + var action = new ApiAction<List<U9CReturnData>>(); + try + { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken + if (input.IsLogin) + { + var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); + if (u9CLoginResult.Success) + { + input.token = u9CLoginResult.Data; + Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); + } + } + + var response = await HttpHelper.PostAsync(CreateProdMaterialReqUrl, JsonConvert.SerializeObject(input.CreateProdMaterialReqParam), new Dictionary<string, string>() { { "token", input.token } }); + var result = JsonConvert.DeserializeObject<U9CResult>(response.Message); + if (result != null) + { + if (result.Success && result.Data[0].m_isSucess) + { + action.Data = result.Data; + Logger.Interface.Info($"鍒涘缓鐢熶骇棰嗘枡鍗曟帴鍙f彁浜son: {JsonConvert.SerializeObject(input.CreateProdMaterialReqParam)}锛岃繑鍥濲son: {response.Message}"); + } + else + { + action.IsSuccessed = false; + action.LocaleMsg = new($"{action.Message}; {result.Data[0].m_errorMsg}"); + Logger.Interface.Info($"鍒涘缓鐢熶骇棰嗘枡鍗曟帴鍙eけ璐�:{result.Data[0].m_errorMsg}"); + } + } + } + catch (System.Exception ex) + { + action.CatchExceptionWithLog(ex, "鍒涘缓鐢熶骇棰嗘枡鍗曞紓甯�"); + } + Logger.Interface.Info($"/* 鍒涘缓鐢熶骇棰嗘枡鍗曟帴鍙g粨鏉� */\r\n"); //鍥哄畾鍐欐硶 + return action; + } + } +} diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.CreateProdReturnOrder.cs b/Tiger.Business.WMS/ERP/WMS_U9C.CreateProdReturnOrder.cs new file mode 100644 index 0000000..135be19 --- /dev/null +++ b/Tiger.Business.WMS/ERP/WMS_U9C.CreateProdReturnOrder.cs @@ -0,0 +1,75 @@ +锘縰sing Tiger.Model; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Rhea.Common; +using System.Net; +using System.Linq; +using Newtonsoft.Json; +using Tiger.IBusiness; +using Microsoft.AspNetCore.Http; +using Tiger.Model.Minsun; +using Org.BouncyCastle.Asn1.Tsp; +using Tiger.Model.Entitys.MES.Position; +using Apache.NMS.ActiveMQ.Commands; +using System.Security.Cryptography; +using System.Diagnostics; +using Tiger.Model.Entitys.MES.U9C; +using Newtonsoft.Json.Linq; +using System.Security.Policy; +using NetTaste; + +namespace Tiger.Business.WMS +{ + public partial class WMS_U9C + { + /// <summary> + /// 鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欐帴鍙� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public async Task<ApiAction<List<U9CReturnData>>> CreateProdReturnOrder(CreateProdReturnOrderInput input) { + Logger.Interface.Info($"/**\r\n *杩涘叆鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欐帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 + var action = new ApiAction<List<U9CReturnData>>(); + try + { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken + if (input.IsLogin) + { + var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); + if (u9CLoginResult.Success) + { + input.token = u9CLoginResult.Data; + Logger.Interface.Info($"U9C鐧诲綍token: {input.token}"); + } + } + + var response = await HttpHelper.PostAsync(CreateProdReturnOrderUrl, JsonConvert.SerializeObject(input.CreateProdReturnOrderParam), new Dictionary<string, string>() { { "token", input.token } }); + var result = JsonConvert.DeserializeObject<U9CResult>(response.Message); + if (result != null) + { + if (result.Success && result.Data[0].m_isSucess) + { + action.Data = result.Data; + Logger.Interface.Info($"鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欐帴鍙f彁浜son: {JsonConvert.SerializeObject(input.CreateProdReturnOrderParam)}锛岃繑鍥濲son: {response.Message}"); + } + else + { + action.IsSuccessed = false; + action.LocaleMsg = new($"{action.Message}; {result.Data[0].m_errorMsg}"); + Logger.Interface.Info($"鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欐帴鍙eけ璐�:{result.Data[0].m_errorMsg}"); + } + } + } + catch (System.Exception ex) + { + action.CatchExceptionWithLog(ex, "鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欏紓甯�"); + } + Logger.Interface.Info($"/* 鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欐帴鍙g粨鏉� */\r\n"); //鍥哄畾鍐欐硶 + return action; + } + } +} diff --git a/Tiger.Business.WMS/ERP/WMS_U9C.cs b/Tiger.Business.WMS/ERP/WMS_U9C.cs index 365856b..a8b02ee 100644 --- a/Tiger.Business.WMS/ERP/WMS_U9C.cs +++ b/Tiger.Business.WMS/ERP/WMS_U9C.cs @@ -37,19 +37,27 @@ { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["SubmitLineUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["SubmitLineUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/Receivement/SubmitLine; 娴嬭瘯 public static string ApproveLineUrl { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["ApproveLineUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["ApproveLineUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/Receivement/ApproveLine; 娴嬭瘯 - + public static string CreateProdMaterialReqUrl + { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/IssueDoc/Create + public static string CreateProdReturnOrderUrl + { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateProdReturnOrderUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateProdReturnOrderUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/IssueDoc/CreateRecedeIssueDocNew + public static string CreateOutProdMaterialReqUrl + { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/Create + public static string CreateOutProdReturnOrderUrl + { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdReturnOrderUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdReturnOrderUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/CreateRecedeIssueDoc /// <summary> /// 鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曟帴鍙� /// </summary> /// <param name="input"></param> /// <returns></returns> - public async Task<ApiAction<CreateRcvBySrcASNInput>> CreateRcvBySrcASN(CreateRcvBySrcASNInput input) + public async Task<ApiAction<List<U9CReturnData2>>> CreateRcvBySrcASN(CreateRcvBySrcASNInput input) { Logger.Interface.Info($"/**\r\n *杩涘叆鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曟帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 - var action = new ApiAction<CreateRcvBySrcASNInput>(); + var action = new ApiAction<List<U9CReturnData2>>(); try { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken if (input.IsLogin) { var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); @@ -86,6 +94,7 @@ { if (result.Success && result.Data[0].IsSucess) { + action.Data = result.Data; Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏉ユ簮ASN鍗曟帴鍙f彁浜son: {JsonConvert.SerializeObject(param)}锛岃繑鍥濲son: {response.Message}"); } else @@ -109,12 +118,13 @@ /// </summary> /// <param name="input"></param> /// <returns></returns> - public async Task<ApiAction<CreateReceivementInput>> CreateReceivement(CreateReceivementInput input) + public async Task<ApiAction<List<U9CReturnData2>>> CreateReceivement(CreateReceivementInput input) { Logger.Interface.Info($"/**\r\n *杩涘叆鏂板鏀惰揣鍗�-鏃犳潵婧愭帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 - var action = new ApiAction<CreateReceivementInput>(); + var action = new ApiAction<List<U9CReturnData2>>(); try { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken if (input.IsLogin) { var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); @@ -148,6 +158,7 @@ { if (result.Success && result.Data[0].IsSucess) { + action.Data = result.Data; Logger.Interface.Info($"鏂板鏀惰揣鍗�-鏃犳潵婧愭帴鍙f彁浜son: {JsonConvert.SerializeObject(param)}锛岃繑鍥濲son: {response.Message}"); } else @@ -171,11 +182,12 @@ /// </summary> /// <param name="input"></param> /// <returns></returns> - public async Task<ApiAction<SubmitLineInput>> ReceivementApproveLine(SubmitLineInput input) { + public async Task<ApiAction<List<U9CReturnData2>>> ReceivementApproveLine(SubmitLineInput input) { Logger.Interface.Info($"/**\r\n *杩涘叆鏀惰揣鍗�-琛屽鏍告�诲叆鍙f帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 - var action = new ApiAction<SubmitLineInput>(); + var action = new ApiAction<List<U9CReturnData2>>(); try { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken if (input.IsLogin) { var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); @@ -219,12 +231,13 @@ /// </summary> /// <param name="input"></param> /// <returns></returns> - private async Task<ApiAction<SubmitLineInput>> SubmitLine(SubmitLineInput input) + private async Task<ApiAction<List<U9CReturnData2>>> SubmitLine(SubmitLineInput input) { Logger.Interface.Info($"/**\r\n *杩涘叆鏀惰揣鍗�-琛屾彁浜ゆ帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 - var action = new ApiAction<SubmitLineInput>(); + var action = new ApiAction<List<U9CReturnData2>>(); try { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken if (input.IsLogin) { var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); @@ -240,6 +253,7 @@ { if (result.Success && result.Data[0].IsSucess) { + action.Data = result.Data; Logger.Interface.Info($"鏀惰揣鍗�-琛屾彁浜ゆ帴鍙f彁浜son: {JsonConvert.SerializeObject(input.param)}锛岃繑鍥濲son: {response.Message}"); } else @@ -263,12 +277,13 @@ /// </summary> /// <param name="input"></param> /// <returns></returns> - private async Task<ApiAction<SubmitLineInput>> ApproveLine(SubmitLineInput input) + private async Task<ApiAction<List<U9CReturnData2>>> ApproveLine(SubmitLineInput input) { Logger.Interface.Info($"/**\r\n *杩涘叆鏀惰揣鍗�-琛屽鏍告帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶 - var action = new ApiAction<SubmitLineInput>(); + var action = new ApiAction<List<U9CReturnData2>>(); try { + //濡傛灉宸茬粡鐧诲綍鍒欎笉闇�瑕佸啀娆$櫥褰曪紝鐩存帴浣跨敤浼犲叆鐨則oken if (input.IsLogin) { var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); @@ -284,6 +299,7 @@ { if (result.Success && result.Data[0].IsSucess) { + action.Data = result.Data; Logger.Interface.Info($"鏀惰揣鍗�-琛屽鏍告帴鍙f彁浜son: {JsonConvert.SerializeObject(input.param)}锛岃繑鍥濲son: {response.Message}"); } else diff --git a/Tiger.IBusiness.WMS/iERP/IWMS_U9C.cs b/Tiger.IBusiness.WMS/iERP/IWMS_U9C.cs index 5bdbb12..6a9d3f6 100644 --- a/Tiger.IBusiness.WMS/iERP/IWMS_U9C.cs +++ b/Tiger.IBusiness.WMS/iERP/IWMS_U9C.cs @@ -12,7 +12,11 @@ { public interface IWMS_U9C { - public Task<ApiAction<CreateRcvBySrcASNInput>> CreateRcvBySrcASN(CreateRcvBySrcASNInput input); - public Task<ApiAction<SubmitLineInput>> ReceivementApproveLine(SubmitLineInput input); + public Task<ApiAction<List<U9CReturnData2>>> CreateRcvBySrcASN(CreateRcvBySrcASNInput input); + public Task<ApiAction<List<U9CReturnData2>>> ReceivementApproveLine(SubmitLineInput input); + public Task<ApiAction<List<U9CReturnData>>> CreateProdMaterialReq(CreateProdMaterialReqInput input); + public Task<ApiAction<List<U9CReturnData>>> CreateProdReturnOrder(CreateProdReturnOrderInput input); + public Task<ApiAction<List<U9CReturnData>>> CreateOutProdMaterialReq(CreateOutProdMaterialReqInput input); + public Task<ApiAction<List<U9CReturnData>>> CreateOutProdReturnOrder(CreateOutProdReturnOrderInput input); } } diff --git a/Tiger.Model.Net/Entitys/MES/ParameterEntity/U9CParameter.cs b/Tiger.Model.Net/Entitys/MES/ParameterEntity/U9CParameter.cs index 19eac82..9f4be92 100644 --- a/Tiger.Model.Net/Entitys/MES/ParameterEntity/U9CParameter.cs +++ b/Tiger.Model.Net/Entitys/MES/ParameterEntity/U9CParameter.cs @@ -50,6 +50,7 @@ { public string userId { get; set; } public string token { get; set; } + public string Data { get; set; } public bool IsLogin { get; set; } } @@ -339,4 +340,105 @@ } #endregion + + #region 鍒涘缓鐢熶骇棰嗘枡鍗曟帴鍙� + public class CreateProdMaterialReqInput : U9CBaseInput + { + public List<CreateProdMaterialReqParam> CreateProdMaterialReqParam { get; set; } + } + + public class CreateProdMaterialReqParam + { + public List<object> MOs { get; set; } + public List<PickListDTOs> PickListDTOs { get; set; } + public int BusinessType { get; set; } + public int IssueType { get; set; } + public int DocStatus { get; set; } + public string OtherID { get; set; } = "WMS"; + } + + public class PickListDTOs + { + public List<object> MOs { get; set; } + public List<object> Item { get; set; } + public List<object> IssueWh { get; set; } + public List<object> IssueBin { get; set; } + public double IssuedQty { get; set; } + public double IssueQty { get; set; } + public List<object> IssueUOM { get; set; } + public string MOPickList { get; set; } + public List<object> Lot { get; set; } + public int StorageType { get; set; } + } + #endregion + + #region 鍒涘缓鐢熶骇閫�鏂欏崟-鎸夎閫�鏂欐帴鍙� + public class CreateProdReturnOrderInput : U9CBaseInput + { + public List<CreateProdReturnOrderParam> CreateProdReturnOrderParam { get; set; } + } + + public class CreateProdReturnOrderParam + { + public List<RecedeItemAndSnDTOList> RecedeItemAndSnDTOList { get; set; } + public bool IsAutoIssued { get; set; } + public string OtherID { get; set; } = "WMS"; + } + + public class RecedeItemAndSnDTOList + { + public string ItemCode { get; set; } + public string IssueDocNo { get; set; } + public double RecedeQty { get; set; } + public double IssueLineNum { get; set; } + } + + #endregion + + #region 鍒涘缓濮斿鐢熶骇棰嗘枡鍗� + public class CreateOutProdMaterialReqInput : U9CBaseInput + { + public List<CreateOutProdMaterialReqParam> CreateOutProdMaterialReqParam { get; set; } + } + public class CreateOutProdMaterialReqParam + { + public List<object> POLine { get; set; } + public DateTime BusinessDate { get; set; } + public List<PickListDTOs2> PickListDTOs { get; set; } + public int BusinessType { get; set; } + public string BusinessCreatedOn { get; set; } + public int DocStatus { get; set; } + public string OtherID { get; set; } = "WMS"; + } + + public class PickListDTOs2 + { + public List<object> Item { get; set; } + public List<object> IssueWh { get; set; } + public List<object> IssueBin { get; set; } + public double IssuedQty { get; set; } + public double IssueQty { get; set; } + public List<object> IssueUOM { get; set; } + public string SCMOPickList { get; set; } + public List<object> Lot { get; set; } + } + #endregion + + #region 鍒涘缓濮斿鐢熶骇閫�鏂欏崟鎺ュ彛 + public class CreateOutProdReturnOrderInput : U9CBaseInput + { + public List<CreateOutProdReturnOrderParam> CreateOutProdReturnOrderParam { get; set; } + } + public class CreateOutProdReturnOrderParam + { + public List<object> POLine { get; set; } + public DateTime BusinessDate { get; set; } + public List<PickListDTOs2> PickListDTOs { get; set; } + public int BusinessType { get; set; } + public string BusinessCreatedOn { get; set; } + public int DocStatus { get; set; } + public string OtherID { get; set; } = "WMS"; + } + + #endregion } -- Gitblit v1.9.3