| | |
| | | { |
| | | ids = item.LinId; |
| | | var postContent = new MultipartFormDataContent(); |
| | | postContent.Headers.Add("ContentType", $"multipart/form-data"); |
| | | postContent.Add(new StringContent(ids), "ids"); |
| | | string result = string.Empty; |
| | | HttpClient client = null; |
| | |
| | | { |
| | | using (client = new HttpClient()) |
| | | { |
| | | HttpResponseMessage response = client.PostAsync(ToCancelOutFeedbackERP, postContent) |
| | | .ConfigureAwait(false).GetAwaiter().GetResult(); |
| | | // 2. 发送请求 |
| | | var response = HttpHelper.Post<WebResponseContent>(ToCancelOutFeedbackERP, postContent, "出库明细取消回传ERP"); |
| | | |
| | | // 确保响应成功 |
| | | response.EnsureSuccessStatusCode(); |
| | | result = response.Content.ReadAsStringAsync() |
| | | .ConfigureAwait(false).GetAwaiter().GetResult(); |
| | | if (response.Code !=0) |
| | | { |
| | | throw new Exception($"操作失败: {response.msg ?? "未提供错误信息"}"); |
| | | } |
| | | } |
| | | _unitOfWorkManage.BeginTran(); |
| | | _outboundRepository.OutboundOrderDetailRepository.DeleteAndMoveIntoHty(outboundOrderDetails, OperateType.人工取消); |