|  |  | 
 |  |  |         return "出库结果上报成功"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private BasCrnpService basCrnpService; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     @Transactional | 
 |  |  |     public String emptyOutLoc(GhjtApiParam param) { | 
 |  |  | //        3102/3009/3008/3006/3003/3002→3047/3112 | 
 |  |  |         // 获取模式为电脑模式,无任务的堆垛机列表:防止分配到堆垛机不可用 | 
 |  |  |         List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("crn_sts",3) | 
 |  |  |                 .eq("wrk_no",0)); | 
 |  |  |         if (basCrnps.isEmpty()) { | 
 |  |  |             // 都有任务则获取电脑模式的堆垛机列表 | 
 |  |  |             basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("crn_sts",3)); | 
 |  |  |         } | 
 |  |  |         if (basCrnps.isEmpty()) { | 
 |  |  |             throw new CoolException("没有可用堆垛机,堆垛机停止或异常"); | 
 |  |  |         } | 
 |  |  |         // 可用堆垛机列表 | 
 |  |  |         List<Integer> crnNoList = basCrnps.stream().map(BasCrnp::getCrnNo).collect(Collectors.toList()); | 
 |  |  |         // 寻找空托盘库位,先找浅库位 | 
 |  |  |         List<LocMast> locMasts; | 
 |  |  |             locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts","D") | 
 |  |  |                     .orderAsc(Arrays.asList("row1","lev1","bay1")).in("row1",3,4,6,7,10,11,14,15,18,19,22,23)); | 
 |  |  |                     .orderAsc(Arrays.asList("row1","lev1","bay1")).in("crn_no",crnNoList).in("row1",3,4,6,7,10,11,14,15,18,19,22,23)); | 
 |  |  |             if (locMasts.isEmpty()) { | 
 |  |  |                 locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts","D") | 
 |  |  |                         .orderAsc(Arrays.asList("row1","lev1","bay1")).in("row1",1,4,5,8,9,12,13,16,17,20,21,24)); | 
 |  |  |                         .orderAsc(Arrays.asList("row1","lev1","bay1")).in("crn_no",crnNoList).in("row1",1,4,5,8,9,12,13,16,17,20,21,24)); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |         if (locMasts.isEmpty()) { |