1、暂态-电压幅值单位问题
2、脚本与ICD校验时10500错误码 3、前端断开WebSocket连接后,后台服务没有关闭和源、设备的Socket连接问题
This commit is contained in:
@@ -948,6 +948,10 @@ public class SocketDevResponseService {
|
||||
WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(socketDataMsg));
|
||||
CnSocketUtil.quitSend(param);
|
||||
break;
|
||||
case ICD_NOT_FOUND:
|
||||
WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(socketDataMsg));
|
||||
CnSocketUtil.quitSend(param);
|
||||
break;
|
||||
default:
|
||||
CnSocketUtil.sendUnSocket(param.getUserPageId());
|
||||
break;
|
||||
|
||||
@@ -13,6 +13,7 @@ public enum SourceResponseCodeEnum {
|
||||
SUCCESS(10200, "请求成功"),
|
||||
UNPROCESSED_BUSINESS(10201, "立即响应,业务还未处理,类似肯定应答"),
|
||||
NORMAL_RESPONSE(10202, "正常响应中间状态码"),
|
||||
ICD_NOT_FOUND(10500, "未找到对应ICD"),
|
||||
MESSAGE_PARSING_ERROR(10520, "报文解析有误"),
|
||||
CONTROLLED_SOURCE_ERROR(10521, "程控源参数有误"),
|
||||
TEST_ITEM_PARSING_ERROR(10522, "测试项解析有误"),
|
||||
|
||||
@@ -133,6 +133,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
|
||||
|
||||
|
||||
private void sendYtxSocket(PreDetectionParam param) {
|
||||
WebServiceManager.addPreDetectionParam(param);
|
||||
AdPlan plan = iAdPlanService.getById(param.getPlanId());
|
||||
AdPlanSource planSource = adPlanSourceService.getOne(new LambdaQueryWrapper<AdPlanSource>().eq(AdPlanSource::getPlanId, param.getPlanId()));
|
||||
param.setSourceId(planSource.getSourceId());
|
||||
|
||||
@@ -25,6 +25,7 @@ public class CnSocketUtil {
|
||||
socketMsg.setRequestId(SourceOperateCodeEnum.QUITE.getValue());
|
||||
socketMsg.setOperateCode(SourceOperateCodeEnum.QUIT_INIT_03.getValue());
|
||||
SocketManager.sendMsg(param.getUserPageId() + devTag, JSON.toJSONString(socketMsg));
|
||||
WebServiceManager.removePreDetectionParam();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,7 @@ public class CnSocketUtil {
|
||||
jsonObject.put("sourceId", param.getSourceId());
|
||||
socketMsg.setData(jsonObject.toJSONString());
|
||||
SocketManager.sendMsg(param.getUserPageId() + sourceTag, JSON.toJSONString(socketMsg));
|
||||
WebServiceManager.removePreDetectionParam();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,6 +55,9 @@ public class WebServiceManager {
|
||||
channel.writeAndFlush(wd);
|
||||
}else {
|
||||
log.error("{}-websocket推送消息失败;当前用户-{}-客户端已经断开连接", LocalDateTime.now(),userId);
|
||||
PreDetectionParam param = preDetectionParamMap.get("preDetectionParam");
|
||||
CnSocketUtil.quitSend(param);
|
||||
CnSocketUtil.quitSendSource(param);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ public class AdNonHarmonicServiceImpl extends ServiceImpl<AdNonHarmonicMapper, A
|
||||
* 暂态-电压幅值
|
||||
*/
|
||||
case "MAG":
|
||||
unit = "V";
|
||||
unit = "%";
|
||||
break;
|
||||
/**
|
||||
* 暂态-持续时间
|
||||
|
||||
Reference in New Issue
Block a user