| | |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | |
| | | |
| | | if (staProtocol.isAutoing() //自动 |
| | | && !staProtocol.isLoading() //无物 |
| | | // && staProtocol.isOutEnable() //可出信号 |
| | |
| | | if(rgvProtocol.getStatusType1() == RgvStatusType.WORKING){ |
| | | rgvThread.setPaking(true); |
| | | } |
| | | |
| | | if(rgvProtocol.isLoaded1ing() && rgvProtocol.isLoaded2ing()){ |
| | | basRgv.setPakAll("1"); |
| | | basRgvService.updateById(basRgv); |
| | |
| | | if(rgvProtocol.getStatusType1() == RgvStatusType.IDLE && |
| | | rgvProtocol.getModeType() == RgvModeType.AUTO && rgvThread.isPakMk() |
| | | && rgvThread.isPaking() && basRgv.getPakAll().equals("1")){ |
| | | if(rgvProtocol.isLoaded1ing() || rgvProtocol.isLoaded2ing()){ |
| | | continue; |
| | | } |
| | | if(basRgv.getPakOut().equals("1") && basRgv.getPakIn().equals("1")){ |
| | | rgvPreSchedulingIn(rgv, rgvProtocol);//若暂无下发任务预调度提前到取货点 |
| | | if (rgvProtocol.getLastIo().equals("I")) { |
| | |
| | | //遍历rgv入库取货站点 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, rgvStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(rgvStn.getStaNo2()==1043?1044:1103); //倒数第二个 |
| | | StaProtocol staProtocol2 = null; //连续取货任务站点 |
| | | StaProtocol staProtocol1 = devpThread.getStation().get(rgvStn.getStaNo()); //第一个站点判断 |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, (int) rgvProtocol.getRgvNo()); |
| | | // WrkMastSta wrkMastSta3 = null;//连取两个 |
| | | // Integer staNo = null; //与调度 |
| | |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (staProtocol1 == null) { |
| | | News.infoNoLog( " - Rgv入库站信息(staProtocol!=null继续执行):staProtocol=" + staProtocol); |
| | | continue; |
| | | } else { |
| | | staProtocol1 = staProtocol1.clone(); |
| | | } |
| | | if(staProtocol1.isLoading() || staProtocol1.getWorkNo()!=0){ |
| | | continue; |
| | | } |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(rgvStn.getStaNo()); |
| | |
| | | } |
| | | if(!Cools.isEmpty(barcode)) { |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "0".equals(barcode) || barcode.length()<5) { |
| | | if(!staProtocol.isLoading()){ |
| | | continue; |
| | | } |
| | | armTaskAssignmentCallApiLogSave(staProtocol, "拆垛条码为空", staProtocol.getSiteId()+"码垛位置,===》托盘条码为空", false); |
| | | continue; |
| | | } |
| | | } else { |
| | | if(!staProtocol.isLoading()){ |
| | | continue; |
| | | } |
| | | armTaskAssignmentCallApiLogSave(staProtocol, "拆垛条码为空", staProtocol.getSiteId()+"码垛位置,===》托盘条码为空", false); |
| | | continue; |
| | | } |
| | |
| | | } |
| | | |
| | | if(barcode.length()!=6){ |
| | | armTaskAssignmentCallApiLogSave(staProtocol, "条码长度不是6位", staProtocol.getSiteId()+"码垛位置,条码长度不是6位===>>" + barcode, false); |
| | | armTaskAssignmentCallApiLogSave(staProtocol, "条码长度不是6位", staProtocol.getSiteId()+"码垛位置,条码长度不是6位===>>" + barcode, true); |
| | | continue; |
| | | } |
| | | |
| | |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",barcode)); |
| | | int countwait = waitPakinMapper.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",barcode)); |
| | | if (countLoc > 0 || countWrk > 0 || countwait > 0) { |
| | | armTaskAssignmentCallApiLogSave(staProtocol, "条码数据已存在", staProtocol.getSiteId()+"码垛位置,组托档/工作档/库存条码数据已存在===>>" + barcode, false); |
| | | armTaskAssignmentCallApiLogSave(staProtocol, "条码数据已存在", staProtocol.getSiteId()+"码垛位置,组托档/工作档/库存条码数据已存在===>>" + barcode, true); |
| | | continue; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if(barcode.length()!=6){ |
| | | armTaskAssignmentCallApiLogSave(locMastEnd, "条码长度不是6位", basArm.getStaNoSou()+"码垛位置,条码长度不是6位===>>" + barcode, false); |
| | | armTaskAssignmentCallApiLogSave(locMastEnd, "条码长度不是6位", basArm.getStaNoSou()+"码垛位置,条码长度不是6位===>>" + barcode, true); |
| | | continue; |
| | | } |
| | | |
| | |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",barcode)); |
| | | int countwait = waitPakinMapper.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",barcode)); |
| | | if (countLoc > 0 || countWrk > 0 || countwait > 0) { |
| | | armTaskAssignmentCallApiLogSave(locMastEnd, "条码数据已存在", basArm.getStaNoSou()+"码垛位置,组托档/工作档/库存条码数据已存在===>>" + barcode, false); |
| | | armTaskAssignmentCallApiLogSave(locMastEnd, "条码数据已存在", basArm.getStaNoSou()+"码垛位置,组托档/工作档/库存条码数据已存在===>>" + barcode, true); |
| | | continue; |
| | | } |
| | | |
| | |
| | | // 获取站点信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, basAgvMast.getFloorNo() !=1?2:1); |
| | | StaProtocol staProtocol = devpThread.getStation().get(basAgvMast.getStaNo()); |
| | | List<BasAgvMast> basAgvMastList1 = basAgvMastService.selectList(new EntityWrapper<BasAgvMast>().eq("status", 1).eq("sta_no", basAgvMast.getStaNo())); |
| | | if(basAgvMastList1.size()>0){ |
| | | continue; |
| | | } |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |