| | |
| | | // 1. 查询到期库存 |
| | | var expiredStocks = await _stockInfoService.Repository |
| | | .QueryDataNavAsync(s => s.OutboundDate <= DateTime.Now |
| | | && s.StockStatus == StockStatusEmun.入库完成.GetHashCode()); |
| | | && s.StockStatus == StockStatusEmun.入库完成.GetHashCode() && s.WarehouseId != 3); |
| | | |
| | | if (expiredStocks == null || !expiredStocks.Any()) |
| | | { |
| | |
| | | // 过滤有位置且位置有库存的记录 |
| | | expiredStocks = expiredStocks |
| | | .Where(s => s.LocationDetails != null |
| | | && s.LocationDetails.LocationStatus == LocationStatusEnum.InStock.GetHashCode()) |
| | | && s.LocationDetails.LocationStatus == LocationStatusEnum.InStock.GetHashCode() |
| | | && s.LocationDetails.EnableStatus != EnableStatusEnum.Disable.GetHashCode()) |
| | | .ToList(); |
| | | |
| | | if (!expiredStocks.Any()) |