| | |
| | | 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(); |
| | | |