Admin
2026-01-28 c29940a5ff8b56d96d4fe0fee2076a278e52e9c5
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -504,6 +504,8 @@
                        MES_parameter mES_Parameter = AbnormalStorageLocation(task.PalletCode, task.SourceAddress, task.TargetAddress);
                        if (mES_Parameter.Result == "Y")
                        {
                            Dt_Task dtOutWit=BaseDal.QueryData(x=>x.PalletCode==task.PalletCode && x.TaskStatus== (int)OutTaskStatusEnum.OutWait).FirstOrDefault();
                            Dt_LocationInfo OriginalLocation = _locationInfoService.Repository.QueryData(x => x.LocationCode == task.SourceAddress).FirstOrDefault();
                            Dt_LocationInfo NewLocation = _locationInfoService.Repository.QueryData(x => x.LocationCode == task.TargetAddress).FirstOrDefault();
                            Dt_StockInfo dt_StockInfo = _stockInfoService.Repository.QueryData(x => x.LocationCode == task.SourceAddress).FirstOrDefault();
@@ -511,15 +513,22 @@
                            List<Dt_LocationInfo> dt_Locations = new List<Dt_LocationInfo>();
                            OriginalLocation.LocationStatus = (int)LocationStatusEnum.Free;
                            NewLocation.LocationStatus = (int)LocationStatusEnum.InStock;
                            NewLocation.LocationStatus = dtOutWit != null? (int)LocationStatusEnum.Lock:(int)LocationStatusEnum.InStock;
                            dt_StockInfo.LocationCode = NewLocation.LocationCode;
                            dt_StockInfo.StockStatus = (int)StockStatusEmun.已入库;
                            dt_StockInfo.StockStatus = dtOutWit != null? (int)StockStatusEmun.出库中:(int)StockStatusEmun.已入库;
                            task.TaskStatus = (int)RelocationTaskStatusEnum.RelocationFinish;
                            dtOutWit.TaskStatus = (int)OutTaskStatusEnum.OutNew;
                            dtOutWit.SourceAddress = NewLocation.LocationCode;
                            dtOutWit.CurrentAddress = NewLocation.LocationCode;
                            dt_Locations.Add(OriginalLocation);
                            dt_Locations.Add(NewLocation);
                            _unitOfWorkManage.BeginTran();
                            BaseDal.UpdateData(dtOutWit);
                            _locationInfoService.UpdateData(dt_Locations);
                            _stockInfoService.UpdateData(dt_StockInfo);
                            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.自动完成 : OperateTypeEnum.人工完成);