| | |
| | | |
| | | LocMast queryDemoLoc(@Param("crnNo") Integer crnNo); |
| | | |
| | | @Select("select count(*) as count from asr_loc_mast where 1=1 and loc_sts = 'O' and loc_type1 = #{locType1} and crn_no = #{crnNo}") |
| | | Integer selectEmptyLocCount(@Param("locType1") Short locType1, @Param("crnNo") Integer crnNo); |
| | | |
| | | } |
| | |
| | | */ |
| | | LocMast queryDemoLoc(Integer crn); |
| | | |
| | | /** |
| | | * 检查当前库位所属巷道的空库位数量 |
| | | * @param locMast |
| | | * @return |
| | | */ |
| | | Boolean checkEmptyCount(LocMast locMast); |
| | | |
| | | |
| | | } |
| | |
| | | return this.baseMapper.queryDemoLoc(crn); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkEmptyCount(LocMast locMast) { |
| | | if (locMast == null) { |
| | | return false; |
| | | } |
| | | return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo()) > 1; |
| | | } |
| | | |
| | | } |
| | |
| | | if (Utils.isShallowLoc(slaveProperties, curRow)) { |
| | | Integer deepRow = Utils.getDeepRow(slaveProperties, curRow); |
| | | locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | if (Cools.isEmpty(locMast)) { |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | } |
| | | if (Cools.isEmpty(locMast)) { |