#
whycq
2025-05-28 78489da7e2185f53faaec9356fa1a8997cedab70
src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
@@ -1,6 +1,7 @@
package com.zy.core.netty.handle;
import com.core.common.Cools;
import com.zy.common.utils.News;
import com.zy.core.Slave;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.SlaveType;
@@ -33,7 +34,7 @@
    @Override
    protected boolean channelRead0(ChannelHandlerContext ctx, ChPackage pac) {
//        log.info("读码器【IP:{}】 上行数据 ===>> {}", pac.getIp(), pac.getAscii());
//        News.info("读码器【IP:{}】 上行数据 ===>> {}", pac.getIp(), pac.getAscii());
//        //扫码上传数据格式必须2个#开头,如:##12345678
//        String msg = pac.getAscii().replaceAll("#", "");
//        if(!Cools.isEmpty(msg) && msg.length()>=tcpProperties.getBarcodeLen()){
@@ -59,7 +60,7 @@
        String uuid = chPackage.getUuid();
        Channel channel = ChannelCache.getChannel(uuid);
        if (null == channel){
            log.warn("通道uuid={} 不在线", uuid);
            News.warn("通道uuid={} 不在线", uuid);
            return;
        }
        channel.writeAndFlush(chPackage);