| | |
| | | } |
| | | return (true, "æå"); |
| | | } |
| | | public (List<Dt_StockInfo>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_OutboundOrder outboundOrder, List<StockSelectViewDTO> stockSelectViews) |
| | | { |
| | | var PalletCodes = string.Join("", stockSelectViews.Select(x => x.PalletCode).ToList()); |
| | | List<Dt_StockInfo> outStocks = _stockService.StockInfoService.Repository.QueryData(x => PalletCodes.Contains(x.PalletCode)); |
| | | |
| | | outStocks.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºä¸.ObjToInt(); |
| | | }); |
| | | |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | foreach (var item in stockSelectViews) |
| | | { |
| | | var outstocks = outStocks.Where(x => item.PalletCode.Contains(x.PalletCode)).ToList(); |
| | | outStockLockInfos.AddRange(_outStockLockInfoService.GetOutStockLockInfo(outboundOrder, outboundOrder.Details.First(), outstocks, BatchNo: item.BatchNo)); |
| | | } |
| | | |
| | | List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(stockSelectViews.Select(x => x.LocationCode).ToList()); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.LocationStatus = LocationStatusEnum.Outbounding.ObjToInt(); |
| | | }); |
| | | return (outStocks, outStockLockInfos, locationInfos); |
| | | } |
| | | /// <summary> |
| | | /// åé
åºåºåºå |
| | | /// </summary> |
| | |
| | | /// <param name="locationStatus"></param> |
| | | /// <param name="tasks"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutboundOrderDetail> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null) |
| | | public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutboundOrderDetail> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.OutLock, List<Dt_Task>? tasks = null) |
| | | { |
| | | try |
| | | { |