wanshenmean
2026-03-10 4cb31bfbc8483a78c85cc94e4a143a15bc46f5b2
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -8,6 +8,7 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Core;
using WIDESEA_DTO;
using WIDESEA_DTO.Task;
using WIDESEA_IBasicService;
@@ -209,6 +210,7 @@
                    var r when r.Contains("CW") => DateTime.Now.AddHours(1),
                    _ => DateTime.Now
                };
                stockInfo.StockStatus = StockStatusEmun.入库完成.GetHashCode();
                location.LocationStatus = LocationStatusEnum.InStock.GetHashCode();
@@ -492,8 +494,8 @@
                // 4. 获取配置的目标地址映射
                var targetAddressMap = _configuration.GetSection("AutoOutboundTask:TargetAddresses")
                    .Get<Dictionary<string, string>>()
                    ?? new Dictionary<string, string>();
                    .Get<Dictionary<string, List<string>>>()
                    ?? new Dictionary<string, List<string>>();
                // 5. 批量创建任务
                var taskList = new List<Dt_Task>();
@@ -517,7 +519,7 @@
                        TaskType = TaskTypeEnum.Outbound.GetHashCode(),
                        TaskStatus = TaskStatusEnum.New.GetHashCode(),
                        Grade = 1,
                        TaskNum = 0,  // 使用 0 让数据库自动生成任务号
                        TaskNum = await BaseDal.GetTaskNo(),
                        Creater = "system_auto"
                    };
                    taskList.Add(task);
@@ -538,7 +540,7 @@
                        {
                            var wmstaskDto = _mapper.Map<WMSTaskDTO>(task);
                            _httpClientHelper.Post<WebResponseContent>(
                                "http://logistics-service/api/logistics/notifyoutbound",
                                "http://localhost:9292/api/Task/ReceiveTask",
                                JsonSerializer.Serialize(wmstaskDto));
                        }
                        catch (Exception ex)