| | |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() |
| | | && staProtocol.getWorkNo() == 9999 |
| | | && staProtocol.isPakMk()) { |
| | | && staProtocol.isPakMk() && (staProtocol.getEmptyInType() != 1 && staProtocol.getEmptyInType() != 2)) { |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行"); |
| | | |
| | | String barcode = barcodeThread.getBarcode(); |
| | |
| | | if (!MessageQueue.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(2, staProtocol))) { |
| | | continue; |
| | | } |
| | | News.info(""+mark+" - 1"+" - 出库任务写入输送线数据成功!!! [工作号:{}]", wrkMast.getWrkNo()); |
| | | |
| | | // 更新工作档状态为14失败 |
| | | wrkMast.setWrkSts(14L); |
| | |
| | | if (Utils.getLaneByLocNo(wrkMast.getLocNo()) != crnProtocol.getCrnLane()) { |
| | | //判断堆垛机所在巷道是否存在其他任务,如存在则优先执行 |
| | | List<WrkMast> currentWrkMasts = wrkMastService.selectLaneWrkMast(crnProtocol.getCrnLane(), false); |
| | | if (!currentWrkMasts.isEmpty()) { |
| | | continue;//当前堆垛机所在巷道存在任务 |
| | | } |
| | | // if (!currentWrkMasts.isEmpty()) { |
| | | // continue;//当前堆垛机所在巷道存在任务 |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | if(config != null) { |
| | | devpTaskStackOver = Integer.parseInt(config.getValue()); |
| | | } |
| | | int devpCheckTaskStackOver = 2; |
| | | Config config2 = configService.selectOne(new EntityWrapper<Config>() |
| | | .eq("code", "devpCheckTaskStackOver")); |
| | | if (config2 != null) { |
| | | devpCheckTaskStackOver = Integer.parseInt(config2.getValue()); |
| | | } |
| | | |
| | | |
| | | Integer devpWorkingCount = commonService.queryDevpWorkingCount(); |
| | | if (devpWorkingCount > devpTaskStackOver) { |
| | |
| | | if (!inWrkMasts.isEmpty()) { |
| | | News.error("" + mark + " - 2" + " - 检测存在入库任务,等待入库任务执行完成再出库,工作号={}" + wrkMast.getWrkNo()); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | //zhangc |
| | | if (wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107) { |
| | | if (wrkMast.getStaNo() == 1058) { |
| | | List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .in("wrk_sts", 12, 14) |
| | | .eq("sta_no", 1058) |
| | | ); |
| | | if (!Cools.isEmpty(inWrkMasts) && inWrkMasts.size() >= devpCheckTaskStackOver) { |
| | | News.error("" + mark + " - 2" + " - 检测存在1058站点,存在两笔工作中的任务,工作号={}" + wrkMast.getWrkNo()); |
| | | continue; |
| | | } |
| | | } else if (wrkMast.getStaNo() == 1062) { |
| | | List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .in("wrk_sts", 12, 14) |
| | | .eq("sta_no", 1062) |
| | | ); |
| | | if (!Cools.isEmpty(inWrkMasts) && inWrkMasts.size() >= devpCheckTaskStackOver) { |
| | | News.error("" + mark + " - 2" + " - 检测存在1062站点,存在两笔工作中的任务,工作号={}" + wrkMast.getWrkNo()); |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | // 修改成功后复位堆垛机 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | // 堆垛机复位 |
| | | News.info(""+mark+" - 2"+" - 上位机确认堆垛机成功 : 堆垛机号={}",crnThread.getCrnProtocol().getCrnNo()); |
| | | News.warnNoLog("" + mark + " - 2" + " - 修改成功后复位堆垛机 : 堆垛机号={}", crnThread.getCrnProtocol().getCrnNo()); |
| | | crnThread.setResetFlag(true); |
| | | } |
| | | } |
| | |
| | | |
| | | // RGV ===>> 执行对RGV操作 |
| | | public synchronized void rgvExecute(Integer mark) { |
| | | ArrayList<Integer> list = new ArrayList<Integer>(){{add(2003);add(2002);}}; |
| | | ArrayList<Integer> list = new ArrayList<Integer>() {{ |
| | | add(2003); |
| | | add(2002); |
| | | }}; |
| | | for (Integer staNo : list) { |
| | | Integer devpId = null; |
| | | Integer rgvStaNoDevpId = null; |