| | |
| | | { |
| | | 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; |