dengjunjie
2025-03-13 90a0c4e0ab42a3574cfb6f9fd3b031dac9e7fb0d
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs
@@ -74,16 +74,19 @@
                        Dispatchertime = DateTime.Now,
                    };
                    Db.Ado.BeginTran();
                    _stockService.StockInfoService.AddStockEmpty(barcode);
                    WebResponseContent content = _stockService.StockInfoService.AddStockEmpty(barcode);
                    if (!content.Status) throw new Exception(content.Message);
                    _taskRepository.AddData(task);
                    List<WMSTaskDTO> wMSTaskDTOs = _mapper.Map<List<WMSTaskDTO>>(new List<Dt_Task> { task });
                    var ResultData = HttpHelper.PostAsync(WCSInterfaceAddress.ReceiveTask, wMSTaskDTOs.ToJson(), headers: new Dictionary<string, string>());
                    if (ResultData.Result == null) throw new Exception($"向WCS下发空托入库任务超时");
                    WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
                    content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
                    if (content == null) throw new Exception($"下发空托入库任务WCS无响应");
                    if (!content.Status) throw new Exception(content.Message);
                    Db.Ado.CommitTran();
                }
                else
                    throw new Exception($"托盘号【{barcode}】已存在任务");
                #endregion
                return WebResponseContent.Instance.OK();
            }