Junjie
2024-12-21 42f3380a98fff04674cf4ef95ea5e99f5c54f1fd
src/main/java/com/zy/core/thread/BarcodeThread.java
@@ -116,15 +116,17 @@
        connect();
        while (true) {
            try {
                byte[] read = read(14, 15000);
                byte[] read = read(14, 3 * 60 * 1000);
                if (null != read) {
                    String s = new String(read);
                    log.warn("ip:{},id:{},读取到条码:{}",slave.getIp(),slave.getId(),s);
                    if (!Cools.isEmpty(s)) {
                        setBarcode(new String(read));
                    }
                }
                Thread.sleep(50);
            }catch (Exception e) {
                log.warn("ip:{},id:{},读取条码异常:{}",slave.getIp(),slave.getId(),e);
                setBarcode("");
                log.error("run" + e);
//                e.printStackTrace();