#
lsh
2024-07-13 e597bd9ea3fb7b51e6abacd02b2ccbf409503d7b
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -133,7 +133,7 @@
    /**
     * 条码数量
     */
    private int barcodeSize = 5;
    private int barcodeSize = 9;
    /**
     * 入出库模式
@@ -310,9 +310,7 @@
                    Integer siteId = staNosRgv[i]; // 站点编号
                    StaProtocol staProtocol = station.get(siteId);
                    if (null == staProtocol) {
                        staProtocol = new StaProtocol();
                        staProtocol.setSiteId(siteId);
                        station.put(siteId, staProtocol);
                        continue;
                    }
                    try{
                        staProtocol.setEndRow(siemensS7Net.getByteTransform().TransInt16(resultRgv2.Content, 0));     // 小车目标位
@@ -353,7 +351,7 @@
        Thread.sleep(200);
        OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.2440",(short)(barcodeSize*8));
        if (result2.IsSuccess) {
            int[] staNosRgv = {281,292,173,214,120};
            int[] staNosRgv = {281,292,173,214,120,100,101,102,103};
            for (int i = 0; i < barcodeSize; i++) {  //1:281  2:292  3:174(173) 4:214  5:120
                String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8");
@@ -362,9 +360,7 @@
                    Integer siteId = staNosRgv[i]; // 站点编号
                    StaProtocol staProtocol = station.get(siteId);
                    if (null == staProtocol) {
                        staProtocol = new StaProtocol();
                        staProtocol.setSiteId(siteId);
                        station.put(siteId, staProtocol);
                        continue;
                    }
                    staProtocol.setBarcode(barcode);
                    barcodeThread.setBarcode(barcode);