mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
update
This commit is contained in:
@@ -124,7 +124,7 @@ public class LoginRequestHandler extends AbstractHandler {
|
||||
// log.info("桩号:{}", pileSn);
|
||||
|
||||
// 保存时间
|
||||
saveLastTime(pileSn, channel);
|
||||
saveLastTimeAndCheckChannel(pileSn, channel);
|
||||
|
||||
// 桩类型 0 表示直流桩, 1 表示交流桩
|
||||
startIndex += length;
|
||||
@@ -194,10 +194,15 @@ public class LoginRequestHandler extends AbstractHandler {
|
||||
|
||||
if (pileInfoVO != null) {
|
||||
flag = Constants.zeroByteArray;
|
||||
// 登录成功,保存桩号和channel的关系
|
||||
// PileChannelEntity.checkChannel(pileSn, channel);
|
||||
// 更改桩和该桩下的枪口状态分别为 在线、空闲 公共方法修改状态
|
||||
pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(ykcDataProtocol.getFrameType()), pileSn, null, null, null);
|
||||
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
// 更改桩和该桩下的枪口状态分别为 在线、空闲 公共方法修改状态
|
||||
pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(ykcDataProtocol.getFrameType()), pileSn, null, null, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
@@ -233,12 +238,17 @@ public class LoginRequestHandler extends AbstractHandler {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 保存报文 TODO 没有登录认证通过还要不要保存报文?
|
||||
String jsonMsg = JSONObject.toJSONString(loginRequestData);
|
||||
pileMsgRecordService.save(pileSn, pileSn, type, jsonMsg, ykcDataProtocol.getHEXString());
|
||||
CompletableFuture.runAsync(() -> {
|
||||
// 保存报文 没有登录认证通过还要不要保存报文?
|
||||
try {
|
||||
String jsonMsg = JSONObject.toJSONString(loginRequestData);
|
||||
pileMsgRecordService.save(pileSn, pileSn, type, jsonMsg, ykcDataProtocol.getHEXString());
|
||||
} catch (Exception e) {
|
||||
log.error("保存报文失败pileSn:{}", pileSn, e);
|
||||
}
|
||||
});
|
||||
|
||||
// 消息体
|
||||
byte[] messageBody = Bytes.concat(pileSnByte, flag);
|
||||
|
||||
Reference in New Issue
Block a user