| | |
| | | @Autowired |
| | | private LocDirectionService locDirectionService; |
| | | |
| | | private Long WHS_TYPE = 0L;//默认立库 |
| | | |
| | | /** |
| | | * 生成工作号 |
| | | * |
| | |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, List<String> matnrs, String batch, Long hostId, LocTypeDto locTypeDto, int times) { |
| | | if (sourceStaNo==999){//平库内置判断站点(临时解决方案) |
| | | WHS_TYPE = 1L;//平库 |
| | | } else { |
| | | WHS_TYPE = 0L;//立库 |
| | | } |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | |
| | | continue; |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1(), locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd(), hostId); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1(), locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd(), hostId,WHS_TYPE); |
| | | for (LocMast locMast0 : locMasts) { |
| | | //预留空库位 |
| | | if (locMastService.checkEmptyCount(locMast0, 10, hostId)) { |
| | |
| | | .eq(LocMast::getLocSts, "D") |
| | | .eq(LocMast::getLocType1, locTypeDto.getLocType1()) |
| | | .eq(LocMast::getCrnNo, staDesc.getDeviceNo()) |
| | | .eq(LocMast::getWhsType, WHS_TYPE) |
| | | .eq(LocMast::getHostId, hostId); |
| | | |
| | | LambdaQueryWrapper<LocMast> wrapper1 = new LambdaQueryWrapper<LocMast>() |
| | | .eq(LocMast::getLocSts, "O") |
| | | .eq(LocMast::getLocType1, locTypeDto.getLocType1()) |
| | | .eq(LocMast::getCrnNo, staDesc.getDeviceNo()) |
| | | .eq(LocMast::getWhsType, WHS_TYPE) |
| | | .eq(LocMast::getHostId, hostId); |
| | | |
| | | //库位搜索范围 |
| | |
| | | .eq(LocMast::getLocSts, "O") |
| | | .eq(LocMast::getHostId, hostId) |
| | | .in(LocMast::getRow1, curRow) |
| | | .orderByAsc(LocMast::getLev1); |
| | | .orderByAsc(LocMast::getLev1) |
| | | .orderByAsc(LocMast::getBay1); |
| | | |
| | | |
| | | //库位搜索范围 |
| | | LocRangeDto locRangeDto = locTypeDto.getLocRangeDto(); |
| | | if (locRangeDto != null) { |