|  |  | 
 |  |  |     @Autowired | 
 |  |  |     private BasCrnpService basCrnpService; | 
 |  |  |  | 
 |  |  |     public static final List<Integer> rows1 = new ArrayList<Integer>() {{ | 
 |  |  |         add(1);add(5);add(9);add(13);add(17);add(21); | 
 |  |  |     }}; | 
 |  |  |  | 
 |  |  |     public static final List<Integer> rows2 = new ArrayList<Integer>() {{ | 
 |  |  |         add(4);add(8);add(12);add(16);add(20);add(24); | 
 |  |  |     }}; | 
 |  |  |  | 
 |  |  |     public ReturnT<String> start(Integer staNo) { | 
 |  |  |         try { | 
 |  |  |             if (!Cools.isEmpty(wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", staNo)))){ | 
 |  |  | 
 |  |  |                 sign = true; | 
 |  |  |                 // 获取库位 | 
 |  |  |                 LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts","D").eq("crn_no",crnNo)); | 
 |  |  |  | 
 |  |  |                 if (Cools.isEmpty(locMast)) { | 
 |  |  | //                    throw new CoolException("库中无空板!!!"); | 
 |  |  |                     sign=false; | 
 |  |  |                 } | 
 |  |  |                 if (sign){ | 
 |  |  |                     if (rows1.contains(locMast.getRow1())){ | 
 |  |  |                         LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("row1", locMast.getRow1() + 1) | 
 |  |  |                                 .eq("bay1", locMast.getBay1()).eq("lev1", locMast.getLev1())); | 
 |  |  |                         if (!Cools.isEmpty(locMast1)) { | 
 |  |  |                             locMast = locMast1; | 
 |  |  |                         } | 
 |  |  |                     }else if (rows2.contains(locMast.getRow1())){ | 
 |  |  |                         LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("row1", locMast.getRow1() - 1) | 
 |  |  |                                 .eq("bay1", locMast.getBay1()).eq("lev1", locMast.getLev1())); | 
 |  |  |                         if (!Cools.isEmpty(locMast1)) { | 
 |  |  |                             locMast = locMast1; | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 if (sign && Cools.isEmpty(locMast)) { | 
 |  |  | //                    throw new CoolException("库中无空板!!!"); | 
 |  |  |                     sign=false; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (sign && !locMast.getLocSts().equals("D")){ | 
 |  |  | //                    throw new CoolException("所选库位存在状态不为D的库位,库位号:"+locMast.getLocNo()+" 、当前状态:"+locMast.getLocSts()+"-"+locMast.getLocSts$()); | 
 |  |  |                     sign=false; | 
 |  |  | 
 |  |  |                             .eq("stn_no", staNo) | 
 |  |  |                             .eq("crn_no", locMast.getCrnNo()); | 
 |  |  |                     StaDesc staDesc = staDescService.selectOne(wrapper); | 
 |  |  |                     Integer sourceStaNo = staDesc.getCrnStn(); | 
 |  |  |                     if (Cools.isEmpty(sourceStaNo)) { | 
 |  |  |                     if (Cools.isEmpty(staDesc)) { | 
 |  |  | //                    throw new CoolException("检索源站失败"); | 
 |  |  |                         sign = false; | 
 |  |  |                     } | 
 |  |  |                     Integer sourceStaNo = null; | 
 |  |  |                     if (sign){ | 
 |  |  |                         sourceStaNo = staDesc.getCrnStn(); | 
 |  |  |                         if (Cools.isEmpty(sourceStaNo)) { | 
 |  |  | //                    throw new CoolException("检索源站失败"); | 
 |  |  |                             sign = false; | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                     if (sign){ | 
 |  |  |                         Date now = new Date(); | 
 |  |  |                         // 保存工作档 |