wangxinhui
2024-12-23 942e47f8987bd8c266e58863bed3895d9cb4ded0
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -57,6 +57,7 @@
        private readonly IRecordService _recordService;
        private readonly IOutboundService _outboundService;
        private readonly IStockService _stockService;
        private readonly IBasicRepository _basicRepository;
        public ITaskRepository Repository => BaseDal;
@@ -66,11 +67,11 @@
                {nameof(Dt_Task.CreateDate),OrderByType.Asc},
            };
        public List<int> TaskInboundTypes => typeof(TaskInboundTypeEnum).GetEnumIndexList();
        public List<int> TaskTypes => typeof(TaskTypeEnum).GetEnumIndexList();
        public List<int> TaskOutboundTypes => typeof(TaskOutboundTypeEnum).GetEnumIndexList();
        public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList();
        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService) : base(BaseDal)
        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository) : base(BaseDal)
        {
            _mapper = mapper;
            _unitOfWorkManage = unitOfWorkManage;
@@ -79,6 +80,7 @@
            _recordService = recordService;
            _outboundService = outboundService;
            _stockService = stockService;
            _basicRepository = basicRepository;
        }
        /// <summary>
@@ -89,8 +91,7 @@
        {
            try
            {
                List<Dt_Task> tasks = BaseDal.QueryData(x => (TaskInboundTypes.Contains(x.TaskType) && x.TaskStatus == (int)TaskInStatusEnum.InNew || TaskOutboundTypes.Contains(x.TaskType) && x.TaskStatus == (int)TaskOutStatusEnum.OutNew));
                List<Dt_Task> tasks = BaseDal.QueryData(x => (TaskTypes.Contains(x.TaskType) && x.TaskStatus == (int)TaskStatusEnum.New));
                List<WMSTaskDTO> taskDTOs = _mapper.Map<List<WMSTaskDTO>>(tasks);
                string response = HttpHelper.Post("http://127.0.0.1:9291/api/Task/ReceiveTask", taskDTOs.Serialize());
@@ -118,7 +119,7 @@
                    return WebResponseContent.Instance.Error($"未找到该任务信息");
                }
                if (task.TaskType != TaskInboundTypeEnum.Inbound.ObjToInt())
                if (task.TaskType != TaskTypeEnum.Inbound.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"任务类型错误");
                }
@@ -154,7 +155,7 @@
                locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
                //测试架入库库存状态
                if (task.TaskType == TaskInboundTypeEnum.TestInbound.ObjToInt())
                if (task.TaskType == TaskTypeEnum.TestInbound.ObjToInt())
                {
                    stockInfo.StockStatus = StockStatusEmun.入库完成未建出库单.ObjToInt();
                }