|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.service.*; | 
|---|
|  |  |  | import com.zy.asrs.task.AbstractHandler; | 
|---|
|  |  |  | import com.zy.asrs.task.core.ReturnT; | 
|---|
|  |  |  | import com.zy.asrs.utils.CodeDetectionUtil; | 
|---|
|  |  |  | import com.zy.asrs.utils.Utils; | 
|---|
|  |  |  | import com.zy.common.model.enums.WorkNoType; | 
|---|
|  |  |  | import com.zy.common.service.CommonService; | 
|---|
|  |  |  | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ArrayList<Integer> crns =new ArrayList<>(); | 
|---|
|  |  |  | ArrayList<Integer> crnList =new ArrayList<>(); | 
|---|
|  |  |  | int[] crnCount = new int[7]; | 
|---|
|  |  |  | crns.add(1); | 
|---|
|  |  |  | crns.add(2); | 
|---|
|  |  |  | crns.add(3); | 
|---|
|  |  |  | 
|---|
|  |  |  | crns.add(7); | 
|---|
|  |  |  | boolean sign = true; | 
|---|
|  |  |  | for (Integer crnNo : crns){ | 
|---|
|  |  |  | int crnCountD = locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("crn_no", crnNo)); | 
|---|
|  |  |  | crnCount[crnNo-1] = crnCountD; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | crnList.add(CodeDetectionUtil.crnCodeDetectionMax(new int[]{crnCount[0],crnCount[1]})[0]+1); | 
|---|
|  |  |  | crnList.add(CodeDetectionUtil.crnCodeDetectionMax(new int[]{crnCount[2],crnCount[3],crnCount[4]})[0]+3); | 
|---|
|  |  |  | crnList.add(CodeDetectionUtil.crnCodeDetectionMaxT(new int[]{crnCount[2],crnCount[3],crnCount[4]},crnList.get(1)-3)[0]+3); | 
|---|
|  |  |  | crnList.add(CodeDetectionUtil.crnCodeDetectionMax(new int[]{crnCount[5],crnCount[6]})[0]+6); | 
|---|
|  |  |  | crnList.add(1); | 
|---|
|  |  |  | crnList.add(2); | 
|---|
|  |  |  | crnList.add(3); | 
|---|
|  |  |  | crnList.add(4); | 
|---|
|  |  |  | crnList.add(5); | 
|---|
|  |  |  | crnList.add(6); | 
|---|
|  |  |  | crnList.add(7); | 
|---|
|  |  |  | for (Integer crnNo : crnList){ | 
|---|
|  |  |  | // 检测路径 | 
|---|
|  |  |  | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() | 
|---|
|  |  |  | .eq("type_no", 110) | 
|---|
|  |  |  | 
|---|
|  |  |  | if (basCrnp.getCrnSts()!=3 || !basCrnp.getOutEnable().equals("Y")){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!basCrnpService.checkSiteError(crnNo, false)){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 获取库位 | 
|---|
|  |  |  | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("crn_no", crnNo)); | 
|---|
|  |  |  | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("crn_no", crnNo).orderBy("lev1",true).orderBy("bay1",true)); | 
|---|
|  |  |  | for (LocMast locMastS : locMasts){ | 
|---|
|  |  |  | List<String> locNoList = new ArrayList<>(); | 
|---|
|  |  |  | sign = true; | 
|---|
|  |  |  | 
|---|
|  |  |  | sign=false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ArrayList<String> locArrayList = new ArrayList<>(); | 
|---|
|  |  |  | for (String locNo : locNoList){ | 
|---|
|  |  |  | if (!locArrayList.contains(locNo)){ | 
|---|
|  |  |  | locArrayList.add(locNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (sign) { | 
|---|
|  |  |  | EmptyPlateOutParam param = new EmptyPlateOutParam(); | 
|---|
|  |  |  | param.setOutSite(staNo); | 
|---|
|  |  |  | param.setLocNos(locNoList); | 
|---|
|  |  |  | param.setLocNos(locArrayList); | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | workService.emptyPlateOut(param, 9999L); | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  | log.error("二楼小料箱自动补空板失败!!异常原因:"+e); | 
|---|
|  |  |  | log.error(staNo+"自动补空板失败!!异常原因:"+e); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return SUCCESS; | 
|---|
|  |  |  | } | 
|---|