| | |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.CollectionUtils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.News; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | |
| | | //101站有3个扫码器,当0扫码器没有数据时,获取9、10两个扫码器数据 |
| | | if(inSta.getStaNo().equals(101) && !Cools.isEmpty(barcode)){ |
| | | BarcodeThread barcodeThread1 = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode1()); |
| | | if (barcodeThread1 != null) { |
| | | barcode = barcodeThread1.getBarcode(); |
| | | } |
| | | |
| | | if(!Cools.isEmpty(barcode)) { |
| | | BarcodeThread barcodeThread2 = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode2()); |
| | | if (barcodeThread2 != null) { |
| | | barcode = barcodeThread2.getBarcode(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(barcode)) { |
| | | log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | |
| | | } |
| | | |
| | | // // 入出库模式判断 |
| | | if (inSta.getStaNo() == 101 && devpThread.ioModeOf1F1 != IoModeType.PAKOUT_MODE) { |
| | | if (inSta.getStaNo() == 104 && devpThread.ioModeOf1F1 != IoModeType.PAKOUT_MODE) { |
| | | continue; |
| | | } |
| | | if (inSta.getStaNo() == 104 && devpThread.ioModeOf1F2 != IoModeType.PAKOUT_MODE) { |
| | | if (inSta.getStaNo() == 101 && devpThread.ioModeOf1F2 != IoModeType.PAKOUT_MODE) { |
| | | continue; |
| | | } |
| | | if (inSta.getStaNo() == 111 && devpThread.ioModeOf1F3 != IoModeType.PAKOUT_MODE) { |
| | | if (inSta.getStaNo() == 114 && devpThread.ioModeOf1F3 != IoModeType.PAKOUT_MODE) { |
| | | continue; |
| | | } |
| | | if (inSta.getStaNo() == 114 && devpThread.ioModeOf1F4 != IoModeType.PAKOUT_MODE) { |
| | | if (inSta.getStaNo() == 111 && devpThread.ioModeOf1F4 != IoModeType.PAKOUT_MODE) { |
| | | continue; |
| | | } |
| | | if (inSta.getStaNo() == 201 && devpThread.ioModeOf2F1 != IoModeType.PAKOUT_MODE) { |
| | | if (inSta.getStaNo() == 204 && devpThread.ioModeOf2F1 != IoModeType.PAKOUT_MODE) { |
| | | continue; |
| | | } |
| | | if (inSta.getStaNo() == 204 && devpThread.ioModeOf2F2 != IoModeType.PAKOUT_MODE) { |
| | | if (inSta.getStaNo() == 201 && devpThread.ioModeOf2F2 != IoModeType.PAKOUT_MODE) { |
| | | continue; |
| | | } |
| | | if (inSta.getStaNo() == 301 && devpThread.ioModeOf3F1 != IoModeType.PAKOUT_MODE) { |
| | |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历拣料入库口 |
| | | for (DevpSlave.Sta pickSta : devp.getPickSta()) { |
| | | // // 获取条码扫描仪信息 |
| | | // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | // if (barcodeThread == null) { |
| | | // continue; |
| | | // } |
| | | // String barcode = barcodeThread.getBarcode(); |
| | | // if(!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | // if("NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | | // continue; |
| | | // } |
| | | // } else { |
| | | // continue; |
| | | // } |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | | continue; |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | | |
| | | // 获取拣料入库站信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()) { |
| | | // WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode); |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep3(staProtocol.getWorkNo().intValue()); |
| | | if (wrkMast == null) { |
| | | wrkMast = wrkMastMapper.selectPickStep(barcode); |
| | | } |
| | | if (wrkMast == null) { |
| | | // 无拣料数据 |
| | | continue; |
| | |
| | | public synchronized void storeEmptyPlt() { |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历空板入库口 |
| | | for (DevpSlave.Sta emptyInSta : devp.getEmptyInSta()) { |
| | | for (DevpSlave.Sta emptyInSta : devp.getEmptyInSta()) { |
| | | // 获取空板入库站信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(emptyInSta.getStaNo()); |
| | |
| | | |
| | | // 站点条件判断 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() |
| | | && staProtocol.isEmptyMk() && (staProtocol.getWorkNo() > 9990 && staProtocol.getWorkNo() <= 9999) && staProtocol.isPakMk()) { |
| | | && staProtocol.isEmptyMk() && (staProtocol.getWorkNo() > 9990 |
| | | && staProtocol.getWorkNo() <= 9999) && staProtocol.isPakMk()) { |
| | | |
| | | try { |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | |
| | | } |
| | | // 获取工作档数据 |
| | | WrkMast wrkMast = wrkMastMapper.selectById(staProtocol.getWorkNo()); |
| | | // if (null == wrkMast || wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { continue; } |
| | | if (null == wrkMast) { |
| | | continue; |
| | | } |
| | | if (null == wrkMast || wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { continue; } |
| | | wrkMasts.add(wrkMast); |
| | | // 组装命令 |
| | | LedCommand ledCommand = new LedCommand(); |
| | |
| | | ledCommand.setIoType(wrkMast.getIoType()); |
| | | // 出库模式 |
| | | switch (wrkMast.getIoType()) { |
| | | case 1: |
| | | ledCommand.setTitle("全板入库"); |
| | | break; |
| | | case 10: |
| | | ledCommand.setTitle("空板入库"); |
| | | break; |
| | | case 101: |
| | | ledCommand.setTitle("全板出库"); |
| | | break; |
| | |
| | | ledCommand.setEmptyMk(true); |
| | | break; |
| | | default: |
| | | log.error("任务入出库类型错误!!![工作号:{}] [入出库类型:{}]", wrkMast.getWrkNo(), wrkMast.getIoType()); |
| | | News.error("任务入出库类型错误!!![工作号:{}] [入出库类型:{}]", wrkMast.getWrkNo(), wrkMast.getIoType()); |
| | | break; |
| | | } |
| | | ledCommand.setSourceLocNo(wrkMast.getSourceLocNo()); |
| | | ledCommand.setLocNo(wrkMast.getLocNo()); |
| | | ledCommand.setStaNo(wrkMast.getStaNo()); |
| | | // ledCommand.setSourceStaNo(wrkMast.getSourceStaNo()); |
| | | if (wrkMast.getIoType() != 110 && wrkMast.getIoType() != 10) { |
| | | if (wrkMast.getIoType() != 110) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo()); |
| | | wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme()))); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | if (wrkMast.getIoType() == 101) { |
| | | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme())); |
| | | } |
| | | if (wrkMast.getIoType() == 103 && (null == wrkDetl.getInspect() || 0 == wrkDetl.getInspect())) { |
| | | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme())); |
| | | } |
| | | if (wrkMast.getIoType() == 107) { |
| | | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme())); |
| | | } |
| | | }); |
| | | } |
| | | commands.add(ledCommand); |
| | | } |
| | |
| | | } |
| | | // 命令下发 ------------------------------------------------------------------------------- |
| | | if (!commands.isEmpty()) { |
| | | if (led.getId() == 7) { |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(3, commands))) { |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | continue; |
| | | } else { |
| | | ledThread.setLedMk(false); |
| | | } |
| | | } else { |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) { |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | continue; |
| | | } else { |
| | | ledThread.setLedMk(false); |
| | | } |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) { |
| | | News.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | continue; |
| | | } |
| | | |
| | | } |
| | | |
| | | try { |
| | |
| | | * 其他 ===>> LED显示器复位,显示默认信息 |
| | | */ |
| | | public synchronized void ledReset() { |
| | | // for (LedSlave led : slaveProperties.getLed()) { |
| | | // // 获取输送线plc线程 |
| | | // DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); |
| | | // // 命令集合 |
| | | // boolean reset = true; |
| | | // for (Integer staNo : led.getStaArr()) { |
| | | // // 获取叉车站点 |
| | | // StaProtocol staProtocol = devpThread.getStation().get(staNo); |
| | | // if (staProtocol == null) { |
| | | // continue; |
| | | // } else { |
| | | // staProtocol = staProtocol.clone(); |
| | | // } |
| | | // if (staProtocol.getWorkNo() != 0) { |
| | | // reset = false; |
| | | // break; |
| | | // } |
| | | // } |
| | | // // 获取led线程 |
| | | // LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getDevpPlcId()); |
| | | // // led显示默认内容 |
| | | // if (reset) { |
| | | // if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) { |
| | | // log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | // } |
| | | // } |
| | | // } |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | // 获取输送线plc线程 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); |
| | |
| | | for (Integer staNo : led.getStaArr()) { |
| | | // 获取叉车站点 |
| | | StaProtocol staProtocol = devpThread.getStation().get(staNo); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } |
| | | if (staProtocol.getWorkNo() != 0 && staProtocol.isLoading()) { |
| | | if (staProtocol == null) { continue; } |
| | | if (staProtocol.getWorkNo() != 0) { |
| | | reset = false; |
| | | break; |
| | | } |
| | | } |
| | | // 获取led线程 |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId()); |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getDevpPlcId()); |
| | | // led显示默认内容 |
| | | if (reset && !ledThread.isLedMk()) { |
| | | if (led.getId() == 7) { |
| | | ledThread.setLedMk(true); |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) { |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | } else { |
| | | |
| | | } |
| | | } else { |
| | | ledThread.setLedMk(true); |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) { |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | } else { |
| | | |
| | | } |
| | | if (reset) { |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) { |
| | | News.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | } |
| | | } |
| | | } |
| | |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | if (inSta.getStaNo() == 2) { |
| | | continue; |
| | | // if (inSta.getStaNo() == 2) { |
| | | // continue; |
| | | // } |
| | | Integer staNo = 0; |
| | | switch (inSta.getStaNo()){ |
| | | case 101: |
| | | staNo = 102; |
| | | break; |
| | | case 104: |
| | | staNo = 106; |
| | | break; |
| | | case 111: |
| | | staNo = 112; |
| | | break; |
| | | case 114: |
| | | staNo = 116; |
| | | break; |
| | | case 201: |
| | | staNo = 202; |
| | | break; |
| | | case 204: |
| | | staNo = 205; |
| | | break; |
| | | case 301: |
| | | staNo = 302; |
| | | break; |
| | | case 304: |
| | | staNo = 305; |
| | | break; |
| | | } |
| | | WrkMast pakout = wrkMastMapper.selectWorkingPakout(inSta.getStaNo()); |
| | | WrkMast pakout = wrkMastMapper.selectWorkingPakout(staNo); |
| | | switch (inSta.getStaNo()) { |
| | | case 102: // 1F1 |
| | | case 101: // 1F1 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf1F1 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf1F1 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf1F1 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf1F1 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 106: // 1F2 |
| | | case 104: // 1F2 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf1F2 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf1F2 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf1F2 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf1F2 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 112: // 1F3 |
| | | case 111: // 1F3 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf1F3 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf1F3 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf1F3 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf1F3 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 116: // 1F4 |
| | | case 114: // 1F4 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf1F4 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf1F4 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf1F4 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf1F4 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 202: // 2F1 |
| | | case 201: // 2F1 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf2F1 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf2F1 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf2F1 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf2F1 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 205: // 2F2 |
| | | case 204: // 2F2 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf2F2 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf2F2 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf2F2 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf2F2 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 302: // 3F1 |
| | | case 301: // 3F1 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf3F1 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf3F1 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf3F1 = IoModeType.PAKOUT_MODE; |
| | | } |
| | |
| | | devpThread.ioModeOf3F1 = IoModeType.PAKIN_MODE; |
| | | } |
| | | break; |
| | | case 305: // 3F2 |
| | | case 304: // 3F2 |
| | | if (pakout != null) { |
| | | if (devpThread.ioModeOf3F2 != IoModeType.PAKOUT_MODE) { |
| | | // 出库切换中 |
| | | devpThread.ioModeOf3F2 = IoModeType.PAKOUT_BOOTING; |
| | | WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo()); |
| | | if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading() |
| | | && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) { |
| | | && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading() |
| | | && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) { |
| | | // 出库模式 |
| | | devpThread.ioModeOf3F2 = IoModeType.PAKOUT_MODE; |
| | | } |