| | |
| | | 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> |
| | |
| | | { |
| | | 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}"); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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($"新增收货单-无来源接口提交Json: {JsonConvert.SerializeObject(param)},返回Json: {response.Message}"); |
| | | Logger.Interface.Info($"新增收货单-无来源接口提交Json: {JsonConvert.SerializeObject(input.CreateReceivementParam)},返回Json: {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($"新增收货-单无来源失败,提交Json: {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($"/* 新增收货单-无来源接口结束 */\r\n"); //固定写法 |
| | | return action; |
| | |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"收货单 - 行审核接口失败:{result.Data[0].ErrorMsg}"); |
| | | Logger.Interface.Info($"收货单-行审核接口失败:{result.Data[0].ErrorMsg}"); |
| | | Logger.Interface.Info($"收货单-行审核接口提交Json: {JsonConvert.SerializeObject(_params)},失败:{result.Data[0].ErrorMsg}"); |
| | | } |
| | | } |
| | | } |