#
lsh
2023-01-08 dc8b768fea06b56b8c5bb0971970cfea048bd1d9
#
1个文件已修改
40 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -105,14 +105,6 @@
                    continue;
                }
                String barcode = barcodeThread.getBarcode();
                if (!Cools.isEmpty(barcode)) {
                    log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode);
                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
                        continue;
                    }
                } else {
                    continue;
                }
                // 获取入库站信息
                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
@@ -123,6 +115,38 @@
                    staProtocol = staProtocol.clone();
                }
                if (!Cools.isEmpty(barcode)) {
                    log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode);
                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
                        if (inSta.getStaNo()==101 || inSta.getStaNo()==109 || inSta.getStaNo()==117){
                            staProtocol.setWorkNo((short)9999);
                            staProtocol.setStaNo((short)100);
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
                                throw new CoolException("更新plc站点信息失败");
                            }
                        }else if (inSta.getStaNo()==201 || inSta.getStaNo()==207 || inSta.getStaNo()==213){
                            staProtocol.setWorkNo((short)9999);
                            if (inSta.getStaNo()==201){
                                staProtocol.setStaNo((short)200);
                            }else if (inSta.getStaNo()==207){
                                staProtocol.setStaNo((short)206);
                            }else if (inSta.getStaNo()==213){
                                staProtocol.setStaNo((short)212);
                            }
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
                                throw new CoolException("更新plc站点信息失败");
                            }
                        }
                        continue;
                    }
                } else {
                    continue;
                }
                // 入出库模式判断
//                if ( inSta.getStaNo()==203 && devpThread.ioModeOf2F != IoModeType.PAKIN_MODE) { continue; }
                if (inSta.getStaNo() == 203 && devpThread.ioModeOf2F == IoModeType.PAKOUT_MODE) {