#
whycq
2024-01-18 78b52c20a27a02466c8af9c0c8222b9f2f3ff20c
src/main/java/com/zy/core/thread/BarcodeThread.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONObject;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.zy.common.utils.News;
import com.zy.core.Slave;
import com.zy.core.ThreadHandler;
import com.zy.core.cache.OutputQueue;
@@ -31,10 +32,12 @@
    }
    public void setBarcode(String barcode) {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        this.barcode.delete(0, this.barcode.length());
        this.barcode.append(barcode);
        if(!Cools.isEmpty(barcode)) {
            log.info("{}号条码器,检索数据:{}", slave.getId(), this.barcode);
//            News.info(methodName + ":{}号条码器,检索数据:{}", slave.getId(), this.barcode);
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("time", DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss_F));
            jsonObject.put("barcode", barcode);