高频入库,检测当前库位内侧其他库位是否为R或S(出入库预约状态)
| | |
| | | void updateLocSts(@Param("locNo") String locNo,@Param("locSts") String locSts); |
| | | |
| | | //找外侧空库位 |
| | | LocMast findOutMast(Short locType1, List<Integer> crnNos); |
| | | List<LocMast> findOutMast(Short locType1, List<Integer> crnNos); |
| | | |
| | | //找单品类型,最内侧空库位 |
| | | LocMast findInEmptyLocMast(Short locType1, @Param("rows") List<Integer> rows); |
| | |
| | | LocMast findEmptyLowFrequencyLocMast(Short locType1); |
| | | |
| | | List<LocMast> selectLocByLev(Integer lev); |
| | | |
| | | List<LocMast> selectByLocNos(@Param("locNos") List<String> locNos); |
| | | } |
| | |
| | | void updateLocSts(String locNo, String locSts); |
| | | |
| | | //找外侧空库位 |
| | | LocMast findOutMast(Short locType1, List<Integer> crnNos); |
| | | List<LocMast> findOutMast(Short locType1, List<Integer> crnNos); |
| | | |
| | | //找单品类型,最内侧空库位 |
| | | LocMast findInEmptyLocMast(Short locType1, List<Integer> rows); |
| | |
| | | |
| | | //查询指定楼层的库位数据 |
| | | List<LocMast> selectLocByLev(Integer lev); |
| | | |
| | | List<LocMast> selectByLocNos(List<String> locNos); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public LocMast findOutMast(Short locType1, List<Integer> crnNos) { |
| | | public List<LocMast> findOutMast(Short locType1, List<Integer> crnNos) { |
| | | return this.baseMapper.findOutMast(locType1, crnNos); |
| | | } |
| | | |
| | |
| | | public List<LocMast> selectLocByLev(Integer lev) { |
| | | return this.baseMapper.selectLocByLev(lev); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocMast> selectByLocNos(List<String> locNos) { |
| | | return this.baseMapper.selectByLocNos(locNos); |
| | | } |
| | | } |
| | |
| | | start = 12; |
| | | end = 21; |
| | | |
| | | //203站分配3,4堆垛机 |
| | | //203站分配2,3堆垛机 |
| | | crnNos.add(2); |
| | | crnNos.add(3); |
| | | crnNos.add(4); |
| | | |
| | | //分配14,15,21排 |
| | | rows.add(14); |
| | |
| | | private LocMast getLocNoStep3(LocTypeDto locTypeDto, List<Integer> crnNos) { |
| | | LocMast locMast = null; |
| | | //找最外侧空库位 |
| | | LocMast locMast0 = locMastService.findOutMast(locTypeDto.getLocType1(), crnNos); |
| | | if (locMast0 != null) { |
| | | List<LocMast> locMasts = locMastService.findOutMast(locTypeDto.getLocType1(), crnNos); |
| | | for (LocMast locMast0 : locMasts) { |
| | | //检测当前库位内侧其他库位是否为R或S(出入库预约状态) |
| | | List<String> insideLoc = Utils.getGroupInsideLoc(locMast0.getLocNo()); |
| | | List<LocMast> insideLocMast = locMastService.selectByLocNos(insideLoc); |
| | | for (LocMast mast : insideLocMast) { |
| | | if (mast.getLocSts().equals("R") || mast.getLocSts().equals("S")) { |
| | | //R或S(出入库预约状态,不能选定这个外侧库位) |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 浅库位符合尺寸检测 |
| | | if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { |
| | | // 浅库位对应堆垛机必须可用且无异常 |
| | |
| | | </select> |
| | | |
| | | <select id="findOutMast" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_loc_mast |
| | | select * from asr_loc_mast |
| | | where loc_type1 = #{locType1} |
| | | and loc_type2 = 2 |
| | | and crn_no in |
| | |
| | | <select id="selectLocByLev" resultMap="BaseResultMap"> |
| | | SELECT * FROM asr_loc_mast WHERE lev1 = #{lev} |
| | | </select> |
| | | |
| | | <select id="selectByLocNos" resultMap="BaseResultMap"> |
| | | select * from asr_loc_mast |
| | | where loc_no in |
| | | <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |