| | |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | //通过输送站点号获取提升机号 |
| | | public static Integer stnNoToLiftNo(Integer stnNo) { |
| | | //一号提升机 |
| | | ArrayList<Integer> one = new ArrayList<Integer>(){{ |
| | | add(100);add(101); |
| | | add(200);add(201); |
| | | add(300);add(301); |
| | | }}; |
| | | |
| | | //二号提升机 |
| | | ArrayList<Integer> two = new ArrayList<Integer>(){{ |
| | | add(102);add(103); |
| | | add(202);add(203); |
| | | add(340);add(341); |
| | | }}; |
| | | |
| | | //三号提升机 |
| | | ArrayList<Integer> three = new ArrayList<Integer>(){{ |
| | | add(104);add(105); |
| | | add(204);add(205); |
| | | add(345);add(346); |
| | | }}; |
| | | |
| | | if (one.contains(stnNo)) { |
| | | return 1; |
| | | } else if (two.contains(stnNo)) { |
| | | return 2; |
| | | } else if (three.contains(stnNo)) { |
| | | return 3; |
| | | } |
| | | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", staDescId) |
| | | .eq("stn_no", sourceStaNo) |
| | | .eq("crn_no",Utils.getLev(locNo));//借用堆垛机号字段充当楼层号 |
| | | .eq("crn_no",Utils.stnNoToLiftNo(sourceStaNo));//借用堆垛机号字段充当提升机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | log.error("入库路径不存在, staDescId={}, sourceStaNo={}", staDescId, sourceStaNo); |