| | |
| | | |
| | | List<Integer> queryOutStaNosByLocNo(String locNo, Integer typeNo); |
| | | |
| | | StaDesc queryCrnStn(Integer typeNo, Integer crnNo, Integer stnNo); |
| | | StaDesc queryCrnStn(Integer typeNo, Integer crnNo, Integer stnNo, Integer row1); |
| | | |
| | | StaDesc queryCrnStnAuto(Integer typeNo, Integer crnNo, Integer stnNo); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public StaDesc queryCrnStn(Integer typeNo, Integer crnNo, Integer stnNo) { |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", typeNo) |
| | | .eq("stn_no", stnNo) |
| | | .eq("crn_no", crnNo); |
| | | StaDesc staDesc = this.selectOne(wrapper); |
| | | public StaDesc queryCrnStn(Integer typeNo, Integer crnNo, Integer stnNo, Integer row1) { |
| | | StaDesc staDesc = null; |
| | | if(crnNo==2){ |
| | | Integer sourceStaNo = 0; |
| | | switch (stnNo){ |
| | | case 100: |
| | | sourceStaNo = 104; |
| | | break; |
| | | case 200: |
| | | sourceStaNo = 204; |
| | | break; |
| | | case 300: |
| | | sourceStaNo = row1 < 12 ? 104 : 204; |
| | | break; |
| | | } |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", typeNo) |
| | | .eq("stn_no", stnNo) |
| | | .eq("crn_no", crnNo) |
| | | .eq("crn_stn", sourceStaNo); |
| | | staDesc = this.selectOne(wrapper); |
| | | } else { |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", typeNo) |
| | | .eq("stn_no", stnNo) |
| | | .eq("crn_no", crnNo); |
| | | staDesc = this.selectOne(wrapper); |
| | | } |
| | | if (staDesc == null) { |
| | | throw new CoolException("出库路径不存在"); |
| | | } |
| | |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | // 获取路径 |
| | | StaDesc staDesc = staDescService.queryCrnStn(ioType, locMast.getCrnNo(), staNo.getDevNo()); |
| | | StaDesc staDesc = staDescService.queryCrnStn(ioType, locMast.getCrnNo(), staNo.getDevNo(), locMast.getRow1()); |
| | | if(staDesc == null){ |
| | | throw new CoolException("出库路径不存在"); |
| | | } |
| | | |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | | // 生成工作档 |