|  |  | 
 |  |  | import com.zy.asrs.entity.param.*; | 
 |  |  | import com.zy.asrs.entity.result.OpenOrderCompeteResult; | 
 |  |  | import com.zy.asrs.entity.result.StockVo; | 
 |  |  | import com.zy.asrs.entity.vo.JarMastTableVo; | 
 |  |  | import com.zy.asrs.mapper.TagMapper; | 
 |  |  | import com.zy.asrs.service.*; | 
 |  |  | import com.zy.asrs.task.core.ReturnT; | 
 |  |  | import com.zy.asrs.task.handler.BareBoardHandler; | 
 |  |  | import com.zy.asrs.utils.CodeDetectionUtil; | 
 |  |  | import com.zy.asrs.utils.MatUtils; | 
 |  |  | import com.zy.asrs.utils.PostMesDataUtils; | 
 |  |  | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  | import org.springframework.web.bind.annotation.RequestParam; | 
 |  |  |  | 
 |  |  | import java.util.ArrayList; | 
 |  |  | import java.util.Date; | 
 |  |  | 
 |  |  |     private LocMastService locMastService; | 
 |  |  |     @Autowired | 
 |  |  |     private WorkService workService; | 
 |  |  |     @Autowired | 
 |  |  |     private BareBoardHandler bareBoardHandler; | 
 |  |  |     @Autowired | 
 |  |  |     private BasJarMastService basJarMastService; | 
 |  |  |     @Autowired | 
 |  |  |     private BasCrnpService basCrnpService; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     @Transactional | 
 |  |  | 
 |  |  |             } | 
 |  |  |             WaitPakin waitPakin = new WaitPakin(); | 
 |  |  |             waitPakin.sync(mat); | 
 |  |  |             waitPakin.setBatch(matList.getBatch());       //木箱编码  //批次  唯一值  箱号 | 
 |  |  |             waitPakin.setBatch(matList.getBatch());       //木箱编码  //批次  唯一值  批次 | 
 |  |  |             waitPakin.setModel(matList.getModel());       //卷号  唯一值 | 
 |  |  |             waitPakin.setBrand(param.getBoxType());     //木箱类型 | 
 |  |  |             waitPakin.setZpallet(param.getBarcode());   //托盘码 | 
 |  |  | 
 |  |  |             waitPakin.setWeight(matList.getWeight());  //净重 | 
 |  |  |             waitPakin.setVolume(matList.getRoughWeight());  //毛重 | 
 |  |  |             waitPakin.setPrice(matList.getRollExtent());   //长度 | 
 |  |  |             waitPakin.setSpecs(String.valueOf(matList.getJoint()));   //接头 | 
 |  |  |             waitPakin.setSpecs(String.valueOf(matList.getJoint()));   //接头 MES订单号 | 
 |  |  |             waitPakin.setIoStatus("N");     // 入出状态 | 
 |  |  |             waitPakin.setAnfme(matList.getAnfme());  // 数量 | 
 |  |  |             waitPakin.setStatus("Y");    // 状态 | 
 |  |  | 
 |  |  |             } else if (param.getType()==3){//直供产线 | 
 |  |  |                 smallContainersSta(param); | 
 |  |  |             } | 
 |  |  | //            else if (param.getType()==99){//库内供产线  //出库  测试 | 
 |  |  | //                smallContainersBig99(param); | 
 |  |  | //            } | 
 |  |  |         } catch (Exception e){ | 
 |  |  |             throw new CoolException("失败!!!原因:"+e.getMessage()); | 
 |  |  |         } | 
 |  |  | 
 |  |  |             throw new CoolException("参数:物料编码 matnr为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getWeight())){ | 
 |  |  |             throw new CoolException("参数:物料重量 wright为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getColor())){ | 
 |  |  |             throw new CoolException("参数:物料颜色 color为空"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         Mat mat = matService.selectByMatnr(param.getMatnr()); | 
 |  |  | 
 |  |  |         if (Cools.isEmpty(basDevp.getBarcode())){ | 
 |  |  |             throw new CoolException("码垛位编号 palletizingNo="+param.getStaNo()+" 所处站点料箱码异常状态;料箱码==》为空"+basDevp.getBarcode()); | 
 |  |  |         } | 
 |  |  |         if (CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ | 
 |  |  |         if (!CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ | 
 |  |  |             throw new CoolException("码垛位编号 palletizingNo="+param.getStaNo()+" 所处站点料箱码异常状态;料箱码:"+basDevp.getBarcode()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |         WaitPakin waitPakin = new WaitPakin(); | 
 |  |  |         waitPakin.sync(mat); | 
 |  |  | //        waitPakin.setBatch(matList.getBatch());       //木箱编码  //批次  唯一值  箱号 | 
 |  |  | //        waitPakin.setModel(matList.getModel());       //卷号  唯一值 | 
 |  |  |         waitPakin.setBatch(param.getBatch());       //木箱编码  //批次  唯一值  箱号 | 
 |  |  |         waitPakin.setModel(param.getTaskNo());       //卷号  唯一值  工作号 | 
 |  |  | //        waitPakin.setBrand(param.getBoxType());     //木箱类型 | 
 |  |  |         waitPakin.setZpallet(basDevp.getBarcode());   //托盘码 | 
 |  |  | //        waitPakin.setOrigin(matList.getPosition()); //木箱在托盘上的位置 | 
 |  |  |         waitPakin.setWeight(param.getWeight());  //净重 | 
 |  |  | //        waitPakin.setVolume(matList.getRoughWeight());  //毛重 | 
 |  |  | //        waitPakin.setPrice(matList.getRollExtent());   //长度 | 
 |  |  | //        waitPakin.setSpecs(String.valueOf(matList.getJoint()));   //接头 | 
 |  |  |         waitPakin.setSpecs(param.getOrderNo());   //MES订单号  借用规格 | 
 |  |  | //        waitPakin.setIoStatus("N");     // 入出状态 | 
 |  |  | //        waitPakin.setAnfme(matList.getAnfme());  // 数量 | 
 |  |  |         waitPakin.setColor(param.getColor());  // 颜色 | 
 |  |  | 
 |  |  |             throw new CoolException("参数:品号 matnr为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getWeight())){ | 
 |  |  |             throw new CoolException("参数:物料重量 wright为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getColor())){ | 
 |  |  |             throw new CoolException("参数:物料颜色 color为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getBatchNum())){ | 
 |  |  |             throw new CoolException("参数:出库数量 batchNum为空"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()).eq("weight", param.getWeight()).eq("color", param.getColor())); | 
 |  |  |         Mat mat = matService.selectByMatnr(param.getMatnr()); | 
 |  |  |         if (Cools.isEmpty(mat)){ | 
 |  |  |             throw new CoolException("品号 matnr,请先下发基础档案!!!"); | 
 |  |  |         } | 
 |  |  |         if (Cools.isEmpty(mat.getUnits())){ | 
 |  |  |             throw new CoolException("品号 matnr,重量范围偏移值为空!!!,请先维护基础档案!!!"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         ArrayList<Integer> crns =new ArrayList<>(); | 
 |  |  |         ArrayList<Integer> crnList =new ArrayList<>(); | 
 |  |  |  | 
 |  |  |         crns.add(1);crns.add(2);crns.add(3);crns.add(4);crns.add(5);crns.add(6);crns.add(7); | 
 |  |  |  | 
 |  |  |         for (Integer crnNo : crns){ | 
 |  |  |             // 检测路径 | 
 |  |  |             Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() | 
 |  |  |                     .eq("type_no", 101) | 
 |  |  |                     .eq("stn_no", param.getDevNo()) | 
 |  |  |                     .eq("crn_no", crnNo); | 
 |  |  |             StaDesc staDesc = staDescService.selectOne(wrapper); | 
 |  |  |             if (Cools.isEmpty(staDesc)){ | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |             BasCrnp basCrnp = basCrnpService.selectById(crnNo); | 
 |  |  |             if (basCrnp.getCrnSts()!=3 || !basCrnp.getOutEnable().equals("Y")){ | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |             if (!basCrnpService.checkSiteError(crnNo, false)){ | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |             crnList.add(crnNo); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         if (crnList.isEmpty()){ | 
 |  |  |             throw new CoolException("无可用堆垛机"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         ArrayList<LocDetl> locDetlArrayList = new ArrayList<>(); | 
 |  |  |         Wrapper<LocDetl> wrapper = new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()).eq("weight", param.getWeight()); | 
 |  |  |         if (param.getDevNo() == 536) { | 
 |  |  |             wrapper.eq("model", param.getModel()) | 
 |  |  |                     .eq("specs", param.getOrderNo()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         List<LocDetl> locDetls = locDetlService.selectList(wrapper); | 
 |  |  |         if (locDetls.isEmpty()){ | 
 |  |  |             locDetls = new ArrayList<LocDetl>(); | 
 |  |  |         } | 
 |  |  |         if (locDetls.isEmpty()){ | 
 |  |  |             throw new CoolException("未找到符合条件的物料明细:品号==》matnr:"+param.getMatnr()+";重量==》wright:"+param.getWeight()+";颜色==》color:"+param.getColor()); | 
 |  |  |         for (LocDetl locDetl:locDetls){ | 
 |  |  |             LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo())); | 
 |  |  |             if (locMast.getLocSts().equals("F")){ | 
 |  |  |                 if (crnList.contains(locMast.getCrnNo())){ | 
 |  |  |                     if (locDetlArrayList.size()<param.getBatchNum()) {//下 | 
 |  |  |                         locDetlArrayList.add(locDetl); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         for (LocDetl locDetl : locDetls){ | 
 |  |  |             StockOutParam stockOutParam = new StockOutParam(param,locDetl); | 
 |  |  |  | 
 |  |  |         Integer batchNum = param.getBatchNum(); | 
 |  |  |         if (locDetlArrayList.size()<batchNum){//上 | 
 |  |  |             Wrapper<LocDetl> locDetlWrapper = new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()) | 
 |  |  |                     .lt("weight", param.getWeight() + mat.getUnits()) | 
 |  |  |                     .and() | 
 |  |  |                     .gt("weight", param.getWeight()) | 
 |  |  |                     .orderBy("weight", true); | 
 |  |  |             if (param.getDevNo() == 536){ | 
 |  |  |                 locDetlWrapper.eq("model", param.getModel()) | 
 |  |  |                         .eq("specs", param.getOrderNo()); | 
 |  |  |             } | 
 |  |  |             locDetls = locDetlService.selectList(locDetlWrapper); | 
 |  |  |             if (locDetls.isEmpty()){ | 
 |  |  |                 locDetls = new ArrayList<LocDetl>(); | 
 |  |  |             } | 
 |  |  |             for (LocDetl locDetl:locDetls){ | 
 |  |  |                 LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo())); | 
 |  |  |                 if (locMast.getLocSts().equals("F")){ | 
 |  |  |                     if (crnList.contains(locMast.getCrnNo())){ | 
 |  |  |                         if (locDetlArrayList.size()<batchNum) {//下 | 
 |  |  |                             locDetlArrayList.add(locDetl); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         if (locDetlArrayList.size()<batchNum){//下 | 
 |  |  |             Wrapper<LocDetl> locDetlWrapper = new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()) | 
 |  |  |                     .gt("weight", param.getWeight() - mat.getUnits()) | 
 |  |  |                     .and() | 
 |  |  |                     .lt("weight", param.getWeight()) | 
 |  |  |                     .orderBy("weight", false); | 
 |  |  |             if (param.getDevNo() == 536){ | 
 |  |  |                 locDetlWrapper.eq("model", param.getModel()) | 
 |  |  |                         .eq("specs", param.getOrderNo()); | 
 |  |  |             } | 
 |  |  |             locDetls = locDetlService.selectList(locDetlWrapper); | 
 |  |  |  | 
 |  |  |             if (locDetls.isEmpty()){ | 
 |  |  |                 locDetls = new ArrayList<LocDetl>(); | 
 |  |  |             } | 
 |  |  |             for (LocDetl locDetl:locDetls){ | 
 |  |  |                 LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo())); | 
 |  |  |                 if (locMast.getLocSts().equals("F")){ | 
 |  |  |                     if (crnList.contains(locMast.getCrnNo())){ | 
 |  |  |                         if (locDetlArrayList.size()<batchNum) {//下 | 
 |  |  |                             locDetlArrayList.add(locDetl); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         if (locDetlArrayList.isEmpty()){ | 
 |  |  |             throw new CoolException("未找到符合条件的物料明细:品号==》matnr:"+param.getMatnr()+";重量==》wright:"+param.getWeight()); | 
 |  |  |         } | 
 |  |  |         if (locDetlArrayList.size()<batchNum){ | 
 |  |  |             throw new CoolException("库存数量:"+locDetlArrayList.size()+";小于需求数量:"+param.getBatchNum()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         ArrayList<LocDetl> locDetlArraySou = new ArrayList<>(); | 
 |  |  |  | 
 |  |  |         for (LocDetl locDetl : locDetlArrayList){ | 
 |  |  |             if (batchNum <= 0){ | 
 |  |  |                 return; | 
 |  |  |             } | 
 |  |  |             locDetlArraySou.add(locDetl); | 
 |  |  |             batchNum --; | 
 |  |  |         } | 
 |  |  |         try{ | 
 |  |  |             StockOutParam stockOutParam = new StockOutParam(param,locDetlArraySou); | 
 |  |  |             workService.startupFullTakeStore(stockOutParam, userId); | 
 |  |  |         } catch (Exception e){ | 
 |  |  | //            throw new CoolException("生成出库任务失败:出库数量:"+locDetlArraySou.size()); | 
 |  |  |             throw new CoolException("生成出库任务失败:"+e.getMessage()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void smallContainersJar(SmallCompleteParam param) { | 
 |  |  |         Long userId = 7777L;//mes | 
 |  |  |         //判断param参数 | 
 |  |  | 
 |  |  |             throw new CoolException("参数:物料编码 matnr为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getWeight())){ | 
 |  |  |             throw new CoolException("参数:物料重量 wright为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getColor())){ | 
 |  |  |             throw new CoolException("参数:物料颜色 color为空"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         Mat mat = matService.selectByMatnr(param.getMatnr()); | 
 |  |  |         if (Cools.isEmpty(mat)) { | 
 |  |  | //            mat = new Mat(); | 
 |  |  | 
 |  |  |         if (Cools.isEmpty(basDevp.getBarcode())){ | 
 |  |  |             throw new CoolException("码垛位编号 palletizingNo="+param.getStaNo()+" 所处站点料箱码异常状态;料箱码==》为空"+basDevp.getBarcode()); | 
 |  |  |         } | 
 |  |  |         if (CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ | 
 |  |  |         if (!CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ | 
 |  |  |             throw new CoolException("码垛位编号 palletizingNo="+param.getStaNo()+" 所处站点料箱码异常状态;料箱码:"+basDevp.getBarcode()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |         WaitPakin waitPakin = new WaitPakin(); | 
 |  |  |         waitPakin.sync(mat); | 
 |  |  | //        waitPakin.setBatch(matList.getBatch());       //木箱编码  //批次  唯一值  箱号 | 
 |  |  | //        waitPakin.setModel(matList.getModel());       //卷号  唯一值 | 
 |  |  |         waitPakin.setBatch(param.getBatch());       //木箱编码  //批次  唯一值  箱号 | 
 |  |  |         waitPakin.setModel(param.getTaskNo());       //卷号  唯一值 | 
 |  |  | //        waitPakin.setBrand(param.getBoxType());     //木箱类型 | 
 |  |  |         waitPakin.setZpallet(basDevp.getBarcode());   //托盘码 | 
 |  |  | //        waitPakin.setOrigin(matList.getPosition()); //木箱在托盘上的位置 | 
 |  |  |         waitPakin.setWeight(param.getWeight());  //净重 | 
 |  |  | //        waitPakin.setVolume(matList.getRoughWeight());  //毛重 | 
 |  |  | //        waitPakin.setPrice(matList.getRollExtent());   //长度 | 
 |  |  | //        waitPakin.setSpecs(String.valueOf(matList.getJoint()));   //接头 | 
 |  |  |         waitPakin.setSpecs(param.getOrderNo());   //单号  借用 | 
 |  |  | //        waitPakin.setIoStatus("N");     // 入出状态 | 
 |  |  | //        waitPakin.setAnfme(matList.getAnfme());  // 数量 | 
 |  |  |         waitPakin.setColor(param.getColor());  // 颜色 | 
 |  |  | 
 |  |  |             throw new CoolException("参数:物料编码 matnr为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getWeight())){ | 
 |  |  |             throw new CoolException("参数:物料重量 wright为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getColor())){ | 
 |  |  |             throw new CoolException("参数:物料颜色 color为空"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         Mat mat = matService.selectByMatnr(param.getMatnr()); | 
 |  |  | 
 |  |  |         if (Cools.isEmpty(basDevp.getBarcode())){ | 
 |  |  |             throw new CoolException("码垛位编号 palletizingNo="+param.getStaNo()+" 所处站点料箱码异常状态;料箱码==》为空"+basDevp.getBarcode()); | 
 |  |  |         } | 
 |  |  |         if (CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ | 
 |  |  |         if (!CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ | 
 |  |  |             throw new CoolException("码垛位编号 palletizingNo="+param.getStaNo()+" 所处站点料箱码异常状态;料箱码:"+basDevp.getBarcode()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |         WrkMast wrkMast = new WrkMast(); | 
 |  |  |         wrkMast.setWrkNo(workNo); | 
 |  |  |         wrkMast.setIoTime(now); | 
 |  |  |         wrkMast.setWrkSts(51L); // 工作状态:生成入库ID | 
 |  |  |         wrkMast.setWrkSts(51L); // 工作状态:生成ID | 
 |  |  |         wrkMast.setIoType(202); // 入出库状态:202.直供产线 | 
 |  |  |         wrkMast.setIoPri(99D); // 优先级 | 
 |  |  |         wrkMast.setSourceStaNo(param.getStaNo()); | 
 |  |  |         wrkMast.setStaNo(param.getDevNo()); | 
 |  |  |         wrkMast.setBarcode(basDevp.getBarcode()); | 
 |  |  |         // 操作人员数据 | 
 |  |  |         wrkMast.setAppeUser(userId); | 
 |  |  |         wrkMast.setAppeTime(now); | 
 |  |  | 
 |  |  |         wrkDetl.setWrkNo(wrkMast.getWrkNo()); | 
 |  |  |         wrkDetl.setIoTime(wrkMast.getIoTime()); | 
 |  |  |         wrkDetl.setMatnr(param.getMatnr()); | 
 |  |  |         wrkDetl.setModel(param.getTaskNo()); | 
 |  |  |         wrkDetl.setBatch(param.getBatch()); | 
 |  |  |         wrkDetl.setSpecs(param.getOrderNo()); | 
 |  |  |         wrkDetl.setAnfme(1D); | 
 |  |  |         wrkDetl.setWeight(param.getWeight()); | 
 |  |  |         wrkDetl.setBarcode(basDevp.getBarcode()); | 
 |  |  |         wrkDetl.setZpallet(basDevp.getBarcode()); | 
 |  |  |         wrkDetl.setAppeTime(now); | 
 |  |  |         wrkDetl.setModiTime(now); | 
 |  |  |         if (!wrkDetlService.insert(wrkDetl)) { | 
 |  |  |             throw new CoolException("保存工作明细失败==》小料箱直供产线任务明细生成"); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public Integer getStaEnd(Integer staNo){ | 
 |  |  |         switch (staNo){ | 
 |  |  |             case 118: | 
 |  |  |             case 119: | 
 |  |  |                 return 131; | 
 |  |  |             case 120: | 
 |  |  |             case 121: | 
 |  |  |                 return 135; | 
 |  |  |             default: | 
 |  |  |                 return staNo; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /* | 
 |  |  |      * 出库 | 
 |  |  |      * 直供产线 | 
 |  |  |      * */ | 
 |  |  |     public void smallContainersBig99(SmallCompleteParam param) {//直供产线//出库 | 
 |  |  |         Long userId = 7777L;//mes | 
 |  |  |         //判断param参数 | 
 |  |  |         if (Cools.isEmpty(param.getType())){ | 
 |  |  |             throw new CoolException("参数:类型 type为空"); | 
 |  |  | //        }else if (Cools.isEmpty(param.getStaNo())){ | 
 |  |  | //            throw new CoolException("参数:投料点位 staNo为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getDevNo())){ | 
 |  |  |             throw new CoolException("参数:产线点位 devNo为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getMatnr())){ | 
 |  |  |             throw new CoolException("参数:品号 matnr为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getWeight())){ | 
 |  |  |             throw new CoolException("参数:物料重量 wright为空"); | 
 |  |  |         }else if (Cools.isEmpty(param.getBatchNum())){ | 
 |  |  |             throw new CoolException("参数:出库数量 batchNum为空"); | 
 |  |  |         } | 
 |  |  |         Integer devNo = param.getDevNo(); | 
 |  |  |         Integer batchNum = param.getBatchNum(); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         for (int i =0;i<batchNum;i++){ | 
 |  |  |             bareBoardHandler.startYx(devNo,99); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /* | 
 |  |  |      * 获取硫化罐任务信息  // | 
 |  |  |      * */ | 
 |  |  |     @Override | 
 |  |  |     @Transactional | 
 |  |  |     public List<JarMastTableVo> getJatIdList(Integer id) { | 
 |  |  |         List<BasJarMast> jarMasts = basJarMastService.selectList(new EntityWrapper<BasJarMast>().eq("jar_id", id)); | 
 |  |  |         if (Cools.isEmpty(jarMasts)){ | 
 |  |  |             return new ArrayList<JarMastTableVo>(); | 
 |  |  |         } | 
 |  |  |         ArrayList<JarMastTableVo> jarMastTableVos = new ArrayList<>(); | 
 |  |  |         for (BasJarMast jarMast : jarMasts) { | 
 |  |  |             JarMastTableVo jarMastTableVo = new JarMastTableVo(); | 
 |  |  |             WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", jarMast.getWrkNo())); | 
 |  |  |             List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", jarMast.getWrkNo())); | 
 |  |  |             if (wrkDetls.isEmpty()){ | 
 |  |  |                 WrkDetl wrkDetl = new WrkDetl(); | 
 |  |  |                 wrkDetls.add(wrkDetl); | 
 |  |  |             } | 
 |  |  |             if (Cools.isEmpty(wrkMast) || Cools.isEmpty(wrkDetls)){ | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |             jarMastTableVo.setJarId(jarMast.getJarId()); | 
 |  |  |             jarMastTableVo.setJarWrkNo(jarMast.getWrkNo().toString()); | 
 |  |  |             jarMastTableVo.setStatus(jarMast.getStatus()); | 
 |  |  |             jarMastTableVo.setStatus$(jarMast.getStatus$()); | 
 |  |  |             jarMastTableVo.setMatnr(wrkDetls.get(0).getMatnr()); | 
 |  |  |             jarMastTableVo.setMaktx(wrkDetls.get(0).getMaktx()); | 
 |  |  |             jarMastTableVo.setWeight(wrkDetls.get(0).getWeight()); | 
 |  |  |             jarMastTableVos.add(jarMastTableVo); | 
 |  |  |         } | 
 |  |  |         return jarMastTableVos; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /*...........................亳州煜星..............以上.............亳州煜星...........................*/ |