update 校验channel

This commit is contained in:
2023-11-24 11:30:53 +08:00
parent 6de417c059
commit f2fac36715
30 changed files with 39 additions and 38 deletions

View File

@@ -8,16 +8,15 @@ import com.jsowell.common.core.domain.ykc.LoginRequestData;
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.ykc.PileChannelEntity;
import com.jsowell.common.util.BytesUtil;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
import com.jsowell.pile.domain.ykcCommond.ProofreadTimeCommand;
import com.jsowell.netty.factory.YKCOperateFactory;
import com.jsowell.pile.service.YKCPushCommandService;
import com.jsowell.pile.service.IPileBasicInfoService;
import com.jsowell.pile.service.IPileMsgRecordService;
import com.jsowell.pile.service.YKCPushCommandService;
import com.jsowell.pile.vo.base.PileInfoVO;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
@@ -125,7 +124,7 @@ public class LoginRequestHandler extends AbstractHandler {
// log.info("桩号:{}", pileSn);
// 保存时间
saveLastTime(pileSn);
saveLastTime(pileSn, channel);
// 桩类型 0 表示直流桩, 1 表示交流桩
startIndex += length;
@@ -196,7 +195,7 @@ public class LoginRequestHandler extends AbstractHandler {
if (pileInfoVO != null) {
flag = Constants.zeroByteArray;
// 登录成功保存桩号和channel的关系
PileChannelEntity.checkChannel(pileSn, channel);
// PileChannelEntity.checkChannel(pileSn, channel);
// 更改桩和该桩下的枪口状态分别为 在线、空闲 公共方法修改状态
pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(ykcDataProtocol.getFrameType()), pileSn, null, null, null);