| | |
| | | rcvDTO = new() |
| | | { |
| | | BusinessDate = DateTime.Now, |
| | | Supplier = new() { m_code = "C.9999" }, |
| | | Supplier = new() { m_code = input.Supplier }, |
| | | RcvDocType = new() { m_code = "RCV01" }, |
| | | RcvLines= new() { |
| | | |
| | | }, |
| | | IsRcvByChangeable =true, |
| | | IsPriceListChangeable = true, |
| | | IsConfirmTermChangeable = true, |
| | | IsPaymentTermChangeable = true, |
| | | IsLineApprove= true, |
| | | RcvLines= input.RcvLines, |
| | | }, |
| | | OtherID = "WMS" |
| | | }; |
| | |
| | | var action = new ApiAction<List<U9CReturnData2>>(); |
| | | try |
| | | { |
| | | //如果已经登录则不需要再次登录,直接使用传入的token |
| | | 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(ApproveLineUrl, JsonConvert.SerializeObject(input.param), new Dictionary<string, string>() { { "token", input.token } }); |
| | | var result = JsonConvert.DeserializeObject<U9CResult2>(response.Message); |
| | | if (result != null) |
| | | { |
| | | if (result.Success && result.Data[0].IsSucess) |
| | | { |
| | | Logger.Interface.Info($"收货单-行审核总入口接口提交Json: {JsonConvert.SerializeObject(input.param)},返回Json: {response.Message}"); |
| | | } |
| | | else |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}"); |
| | | Logger.Interface.Info($"收货单-行审核总入口接口失败:{result.Data[0].ErrorMsg}"); |
| | | } |
| | | } |
| | | |
| | | action = await SubmitLine(input); |
| | | if (action.IsSuccessed) { |
| | | action = await ApproveLine(input); |