luxiaotao1123
2021-01-28 ee31bca5de8694a848cbfa71a9fd6ab11a5f6c14
src/main/java/com/zy/core/thread/BarcodeThread.java
@@ -41,7 +41,10 @@
//                write("T".getBytes(), "T".length());
                byte[] read = read(11, 200);
                if (null != read) {
                    barcode = new String(read);
                    String s = new String(read);
                    if (!Cools.isEmpty(s)) {
                        barcode = new String(read);
                    }
                }
                Thread.sleep(100);
            } catch (SocketTimeoutException ignore) {
@@ -125,16 +128,6 @@
            return false;
        }
        return true;
    }
    public String getBarcode() {
        if (Cools.isEmpty(barcode)) {
            return null;
        } else if("NG".endsWith(barcode)) {
            return null;
        } else  {
            return barcode.trim();
        }
    }
    public static void main(String[] args) throws Exception {