zjj
2024-01-07 bdf490f12fa38c99593fdace907fa5379cc04413
src/main/java/com/zy/core/thread/LedThread.java
@@ -4,6 +4,7 @@
import com.core.common.Cools;
import com.zy.common.entity.Parameter;
import com.zy.common.model.MatDto;
import com.zy.common.utils.News;
import com.zy.core.Slave;
import com.zy.core.ThreadHandler;
import com.zy.core.cache.MessageQueue;
@@ -56,7 +57,7 @@
//            screen = new Bx5GScreenClient("my");
        } catch (Exception e) {
            e.printStackTrace();
            log.info("led连接构造器错误 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
            News.info("led连接构造器错误 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
        }
    }
@@ -145,7 +146,7 @@
        area.addPage(page);
        pf.addArea(area);
        if (pf.validate() != null) {
            log.info("pf out of range");
            News.info("pf out of range");
        } else {
            // 更新节目
            screen.writeProgram(pf);
@@ -195,7 +196,7 @@
        pf.addArea(area);
        // 更新节目
        if (pf.validate() != null) {
            log.info("pf out of range");
            News.info("pf out of range");
        } else {
            // 更新节目
            screen.writeProgram(pf);
@@ -245,6 +246,8 @@
    @Override
    public boolean connect() {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        boolean connRes = false;
        try {
            connRes = screen.connect(slave.getIp(),slave.getPort());
@@ -252,9 +255,9 @@
        } catch (Exception ignore) {
        }
        if (connRes) {
            log.info("led连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
            News.info(methodName + ":led连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
        } else {
            log.error("led连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
            News.error(methodName + ":led连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
        }
        return connRes;
    }
@@ -309,7 +312,7 @@
            // 更新节目
            if (pf.validate() != null) {
                System.out.println("pf out of range");
                log.info("pf out of range");
                News.info("pf out of range");
            } else {
                // 更新节目
                screen.writeProgram(pf);