*
lsh
2025-09-09 bf8895d798f6308717f83b2bdb413ff5f304b3e4
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -56,23 +56,22 @@
        add(108);add(109);add(110);add(111);
        add(112);add(113);add(114);add(115);
        add(116);add(117);add(118);add(119);
        add(120);add(121);add(122);add(123);
        add(124);add(125);add(126);add(127);
        add(128);add(129);add(130);add(131);
        add(132);add(133);add(134);add(135);
        add(136);add(137);add(138);add(139);
        add(140);add(141);add(142);add(143);
        add(144);add(145);add(146);add(147);
        add(148);add(149);add(150);add(151);
        add(152);add(153);add(154);add(155);
        add(156);add(157);add(158);add(159);
        add(160);add(161);
        add(1);
//        add(200);add(201);add(202);
    }};
    public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{
        add(100);add(101);add(102);add(103);
        add(104);add(105);add(106);add(107);
        add(108);add(109);add(110);add(111);
    }};
    public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{
        add(0); add(1); add(2);
    }};
    public static final ArrayList<Integer> BarcodeListMat = new ArrayList<Integer>() {{
        add(3); add(4);
    }};
    public static final ArrayList<Integer> staNosErrList = new ArrayList<Integer>() {{
        add(106); add(107); add(159);
@@ -106,6 +105,8 @@
        switch (slave.getId()) {
            case 1:
                return staNos1;
            case 2:
                return staNos2;
            default:
                throw new CoolException("服务器异常");
        }
@@ -268,23 +269,23 @@
            }
        }
        //RGV小车3
//        Thread.sleep(100);
        OperateResultExOne<byte[]> result5 = siemensS7Net.Read("DB50.224",(short)10);
        if (result5.IsSuccess) {
            BasRgvMap basRgvMap = basRgvMapService.selectByRgvNo((int) siemensS7Net.getByteTransform().TransInt16(result5.Content, 0));
            if (!Cools.isEmpty(basRgvMap)){
                Integer siteId = 3;
                StaProtocol staProtocol = station.get(siteId);
                if (null == staProtocol) {
                    staProtocol = new StaProtocol();
                    staProtocol.setSiteId(siteId);
                    station.put(siteId, staProtocol);
                }
                staProtocol.setAutoing(true);
                staProtocol.setNearbySta(String.valueOf(siemensS7Net.getByteTransform().TransInt16(result5.Content, 8)));
            }
        }
//        //RGV小车3
////        Thread.sleep(100);
//        OperateResultExOne<byte[]> result5 = siemensS7Net.Read("DB50.224",(short)10);
//        if (result5.IsSuccess) {
//            BasRgvMap basRgvMap = basRgvMapService.selectByRgvNo((int) siemensS7Net.getByteTransform().TransInt16(result5.Content, 0));
//            if (!Cools.isEmpty(basRgvMap)){
//                Integer siteId = 3;
//                StaProtocol staProtocol = station.get(siteId);
//                if (null == staProtocol) {
//                    staProtocol = new StaProtocol();
//                    staProtocol.setSiteId(siteId);
//                    station.put(siteId, staProtocol);
//                }
//                staProtocol.setAutoing(true);
//                staProtocol.setNearbySta(String.valueOf(siemensS7Net.getByteTransform().TransInt16(result5.Content, 8)));
//            }
//        }
        //条码扫描器
        ArrayList<Integer> barcodeList = BarcodeList;
@@ -299,6 +300,19 @@
                }
            }
        }
        //条码扫描器
        ArrayList<Integer> barcodeListMat = BarcodeListMat;
        OperateResultExOne<byte[]> result2Mat = siemensS7Net.Read("DB103.0", (short) (barcodeListMat.size() * 30));
        if (result2Mat.IsSuccess) {
            for (int i = 0; i < barcodeListMat.size(); i++) {
                Integer barcodeId = barcodeListMat.get(i);
                String barcode = siemensS7Net.getByteTransform().TransString(result2Mat.Content,i*30,30, "UTF-8");
                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId + 1);
                if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) {
                    barcodeThread.setBarcode(barcode);
                }
            }
        }
        //外形检测
        ArrayList<Integer> staNoErrs = staNosErrList;
        int staNoErrsSize = staNoErrs.size();