| | |
| | | //查询仓库托盘货物类型 |
| | | 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 3; |
| | | else |
| | | { |
| | | Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2)); |
| | | if (palletTypeInfo == null) |
| | | { |
| | | throw new Exception($"托盘号错误"); |
| | | } |
| | | return palletTypeInfo.PalletType; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |