1
huangxiaoqiang
2025-12-18 c1c941eb5768afb2e53afdb48c5b9af23fc31da5
1
已修改1个文件
32 ■■■■ 文件已修改
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -502,28 +502,26 @@
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _locationInfoService.Repository.UpdateData(locationInfo);
            var outloks = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.TaskNum == task.TaskNum).ToListAsync();
            var stock = _stockService.StockInfoService.Db.Queryable<Dt_StockInfo>()
                                  .Includes(x => x.Details)
                                  .Where(x => x.PalletCode == task.PalletCode)
                                  .First();
            var stockids = outloks.Select(x => x.StockId).ToList();
            _stockService.StockInfoService.Db.Updateable<Dt_StockInfo>()
                                  .SetColumns(it => new Dt_StockInfo
            stock.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
            stock.Details.ForEach(x =>
                                  {
                                      StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt(),
                                      LocationCode = ""
                                  })
                                  .Where(it => stockids.Contains(it.Id))
                                  .ExecuteCommand();
                x.Status = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
            });
            _stockService.StockInfoDetailService.Db.Updateable<Dt_StockInfoDetail>()
                                  .SetColumns(it => new Dt_StockInfoDetail
            _stockService.StockInfoService.Db.UpdateNav(stock).IncludesAllFirstLayer().ExecuteCommand();
            var result = _task_HtyService.DeleteAndMoveIntoHty(task, OperateTypeEnum.鑷姩瀹屾垚);
            if (!result)
                                  {
                                      Status = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt()
                                  })
                                  .Where(it => stockids.Contains(it.StockId))
                                  .ExecuteCommand();
                await Db.Deleteable(task).ExecuteCommandAsync();
            }
            return WebResponseContent.Instance.OK();