| | |
| | | public partial class TaskService |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// 仅申请任务,让WCS根据路由确定下一地址 |
| | | /// </summary> |
| | |
| | | } |
| | | ///判断是否存在回库单,进行回原库位逻辑 |
| | | string returnOrderNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.OrderNo; |
| | | Dt_ReturnOrder returnOrder = _returnOrderRepository.QueryFirst(x => x.OrderNo == returnOrderNo && x.OrderStatus == InOrderStatusEnum.未开始.ObjToInt()); |
| | | Dt_ReturnOrder returnOrder = _returnOrderRepository.QueryFirst(x => (x.OrderNo == returnOrderNo || x.LPNNo == palletCode) && x.OrderStatus == InOrderStatusEnum.未开始.ObjToInt()); |
| | | if (returnOrder != null && !string.IsNullOrEmpty(returnOrder.LocationCode)) |
| | | { |
| | | Dt_LocationInfo locationInfo1 = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == returnOrder.LocationCode); |
| | |
| | | //查询仓库托盘货物类型 |
| | | public int GetPalletType(Dt_Warehouse warehouse, string palletCode) |
| | | { |
| | | if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ObjToString() || warehouse.WarehouseCode == WarehouseEnum.SC02_BC.ObjToString()) |
| | | if (warehouse.WarehouseCode.Contains("BC")) |
| | | { |
| | | |
| | | Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3)); |
| | | if (palletTypeInfo == null) |
| | | { |
| | |
| | | } |
| | | return palletTypeInfo.PalletType; |
| | | } |
| | | //else if (warehouse.WarehouseCode == WarehouseEnum.HA152.ObjToString()) |
| | | //{ |
| | | // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2)); |
| | | // if (palletTypeInfo == null) |
| | | // { |
| | | // throw new Exception($"托盘号错误"); |
| | | // } |
| | | // return palletTypeInfo.PalletType; |
| | | //} |
| | | //else if (warehouse.WarehouseCode == WarehouseEnum.HA57.ObjToString()) |
| | | //{ |
| | | // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3)); |
| | | // if (palletTypeInfo == null) |
| | | // { |
| | | // throw new Exception($"托盘号错误"); |
| | | // } |
| | | // return palletTypeInfo.PalletType; |
| | | //} |
| | | return -1; |
| | | else |
| | | { |
| | | Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2)); |
| | | if (palletTypeInfo == null) |
| | | { |
| | | throw new Exception($"托盘号错误"); |
| | | } |
| | | return palletTypeInfo.PalletType; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |