pan
2025-11-17 f5df33d51a8555d709a4e8369fa98ce70759ddfc
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -283,14 +283,45 @@
                }
            }
            catch (Exception ex) {
            catch (Exception ex)
            {
                _logger.LogInformation("InboundTaskCompleted å›žå†™MES失败:  " + ex.Message);
            }
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent OutboundTaskCompleted(Dt_Task task)
        {
            _logger.LogInformation($"TaskService  OutboundTaskCompleted: {task.TaskNum}");
            //查货位
            Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
            if (locationInfo == null)
            {
                return WebResponseContent.Instance.Error($"未找到对应的终点货位信息");
            }
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _locationInfoService.Repository.UpdateData(locationInfo);
            var outloks = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.TaskNum == task.TaskNum).ToList();
            outloks.ForEach(o =>
            {
                o.Status = OutLockStockStatusEnum.已出库.ObjToInt();
            });
            _outStockLockInfoService.Db.Updateable(outloks).ExecuteCommand();
            var locationCodes = outloks.Select(it => it.LocationCode).Distinct().ToList();
            //_stockRepository.Db.Updateable<Dt_StockInfo>()
            //  .SetColumns(it => new Dt_StockInfo { StockStatus = StockStatusEmun.})
            //  .Where(it => locationCodes.Contains(it.LocationCode))
            //  .ExecuteCommand();
            return WebResponseContent.Instance.OK();
        }
        public async Task<WebResponseContent> InEmptyTaskCompleted(Dt_Task task)
        {
@@ -344,8 +375,14 @@
            }
        }
        public  WebResponseContent InPickTaskCompleted(Dt_Task task)
        {
            _logger.LogInformation($"TaskService  InPickTaskCompleted: {task.TaskNum}");
            return WebResponseContent.Instance.OK();
        }
        public async Task<WebResponseContent> OutEmptyTaskCompleted(Dt_Task task)
        {
            WebResponseContent content = new WebResponseContent();