| | |
| | | "when 11 then 0 when 12 then 1 when 13 then 1 when 14 then 0 when 15 then 0 when 16 then 1 end desc,newid()") |
| | | List<Integer> queryDistinctRow(@Param("crnNo")Integer crnNo); |
| | | |
| | | LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1); |
| | | LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1, @Param("locType2") Short locType2); |
| | | |
| | | @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | List<String> queryGroupEmptyStock(Integer crnNo); |
| | |
| | | /** |
| | | * 检索可用库位 |
| | | */ |
| | | LocMast queryFreeLocMast(Integer row, Short locType1); |
| | | LocMast queryFreeLocMast(Integer row, Short locType1,Short locType2); |
| | | |
| | | /** |
| | | * 获取同组货架的空库位 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public LocMast queryFreeLocMast(Integer row, Short locType1) { |
| | | return this.baseMapper.queryFreeLocMast(row, locType1); |
| | | public LocMast queryFreeLocMast(Integer row, Short locType1, Short locType2) { |
| | | return this.baseMapper.queryFreeLocMast(row, locType1, locType2); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | |
| | | private Short getWorkMode(Integer bay) { |
| | | if (bay == 2 || bay == 7) { |
| | | return (short) 3; |
| | | } else if (bay == 3) { |
| | | return (short) 1; |
| | | } else if (bay == 4) { |
| | | return (short) 2; |
| | | } else if (bay == 5) { |
| | | return (short) 1; |
| | | }else { |
| | | return (short) 0; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 组托 |
| | | * 入库站,根据条码扫描生成入库工作档,工作状态 2 |
| | |
| | | + "能入信号(wms设置).equals(\"Y\")" + staDetl.getCanining()); |
| | | continue; |
| | | } |
| | | System.out.println("wrkMast:" + slave.getId() + "-" + staProtocol.getWorkNo().intValue() + "-" + crnStn.getStaNo() ); |
| | | System.out.println("wrkMast:" + slave.getId() + "-" + staProtocol.getWorkNo().intValue() + "-" + crnStn.getStaNo()); |
| | | // 获取工作状态为2(设备上走)的入库工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue(), crnStn.getStaNo()); |
| | | System.out.println("wrkMast:" + wrkMast); |
| | |
| | | LocMast loc = null; |
| | | for (Integer row : rows) { |
| | | if (Utils.isDeepLoc(slaveProperties, row)) { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(), shallowLoc.getLocType2()); |
| | | |
| | | if (loc != null) { |
| | | if (Utils.isDeepLoc(slaveProperties, loc.getLocNo())) { |
| | |
| | | if (null == loc) { |
| | | for (Integer row : rows) { |
| | | if (Utils.isShallowLoc(slaveProperties, row)) { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(), shallowLoc.getLocType2()); |
| | | |
| | | if (null != loc) {//对应深库位非在库状态,不能移库 |
| | | String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo()); |
| | |
| | | if (locMast == null) { |
| | | if (Utils.isShallowLoc(slaveProperties, curRow)) { |
| | | Integer deepRow = Utils.getDeepRow(slaveProperties, curRow); |
| | | locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1()); |
| | | locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1(), locTypeDto.getLocType2()); |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | if (Cools.isEmpty(locMast)) { |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1(), locTypeDto.getLocType2()); |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | <if test="locType2 != null"> |
| | | and loc_type2 = #{locType2} |
| | | </if> |
| | | order by NEWID(),lev1 asc,bay1 asc |
| | | </select> |
| | | |