|
@@ -10,6 +10,7 @@ import com.sckj.common.eventbus.EventListener;
|
|
|
import com.sckj.common.manager.ScheduledTaskManager;
|
|
|
import com.sckj.common.socketio.SocketUtil;
|
|
|
import com.sckj.common.util.RedisUtils;
|
|
|
+import com.sckj.iron.constant.ExpressionConstants;
|
|
|
import com.sckj.iron.constant.ParamsConstants;
|
|
|
import com.sckj.iron.constant.SubscribeTagConstants;
|
|
|
import com.sckj.iron.constant.TaskNameConstants;
|
|
@@ -17,17 +18,13 @@ import com.sckj.iron.dto.IronStepDTO;
|
|
|
import com.sckj.iron.dto.IronTimeNoDTO;
|
|
|
import com.sckj.iron.dto.RealtimeData;
|
|
|
import com.sckj.iron.dto.WarnData;
|
|
|
-import com.sckj.iron.entity.TIronModel;
|
|
|
-import com.sckj.iron.entity.TIronParam;
|
|
|
-import com.sckj.iron.entity.TIronSchedule;
|
|
|
-import com.sckj.iron.entity.TIronStepLog;
|
|
|
+import com.sckj.iron.entity.*;
|
|
|
import com.sckj.iron.service.impl.*;
|
|
|
import com.sckj.iron.util.LocalDateUtils;
|
|
|
import com.sckj.iron.vo.IronStepVO;
|
|
|
import com.sckj.l2.entity.TL2Data;
|
|
|
import com.sckj.l2.service.impl.L2DataServiceImpl;
|
|
|
import com.sckj.l2.service.impl.TL2DataServiceImpl;
|
|
|
-import com.sckj.l2.service.impl.TL2MaterialServiceImpl;
|
|
|
import com.sckj.opc.dataservice.HDServiceImpl;
|
|
|
import com.sckj.opc.entity.OPCData;
|
|
|
import com.sckj.opc.service.OPCDataServiceImpl;
|
|
@@ -92,10 +89,6 @@ public class DeviceEventListener extends EventListener { //
|
|
|
@Resource
|
|
|
TL2DataServiceImpl tl2DataService;
|
|
|
|
|
|
- //参数
|
|
|
- @Resource
|
|
|
- TL2MaterialServiceImpl tl2MaterialService;
|
|
|
-
|
|
|
@Resource
|
|
|
L2DataServiceImpl l2DataServiceImpl;
|
|
|
|
|
@@ -108,9 +101,6 @@ public class DeviceEventListener extends EventListener { //
|
|
|
@Resource
|
|
|
TAudioServiceImpl audioService;
|
|
|
|
|
|
-// @Resource
|
|
|
-// OPCDAServiceImpl opcdaService;
|
|
|
-
|
|
|
@Resource
|
|
|
TIronModelServiceImpl ironModelService;
|
|
|
|
|
@@ -127,6 +117,10 @@ public class DeviceEventListener extends EventListener { //
|
|
|
@Resource
|
|
|
HDServiceImpl hdService;
|
|
|
|
|
|
+ //异常诊断
|
|
|
+ @Resource
|
|
|
+ TIronTestServiceImpl iTIronTestService;
|
|
|
+
|
|
|
//炉前申请出铁
|
|
|
private static final String STEP_LQSQCT = "lqsqct";
|
|
|
|
|
@@ -146,8 +140,6 @@ public class DeviceEventListener extends EventListener { //
|
|
|
private static final String IRON_WEIGHT = "ironWeight";
|
|
|
//出铁状态
|
|
|
private static final String IRON_STATUS = "ironStatus";
|
|
|
- //总干量
|
|
|
- private static final String IRON_TOTAL_DRY = "ironTotalDry";
|
|
|
|
|
|
//鱼雷罐车
|
|
|
private static final String CAR_STATUS = "ylgc";
|
|
@@ -159,7 +151,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
private static final String FLUSH_STATUS = "flushStatus";
|
|
|
|
|
|
// 1.创建表达式解析器
|
|
|
- private SpelExpressionParser parser = new SpelExpressionParser();
|
|
|
+ private static final SpelExpressionParser mParser = new SpelExpressionParser();
|
|
|
|
|
|
// 2.创建变量上下文,设置变量
|
|
|
private StandardEvaluationContext mContext = new StandardEvaluationContext();
|
|
@@ -177,13 +169,13 @@ public class DeviceEventListener extends EventListener { //
|
|
|
|
|
|
//铁口出铁状态
|
|
|
//1 出铁中 0 出铁结束
|
|
|
- private AtomicInteger ironLoading1 = new AtomicInteger(0);
|
|
|
+ private AtomicDouble ironLoading1 = new AtomicDouble(0);
|
|
|
//
|
|
|
- private AtomicInteger ironLoading2 = new AtomicInteger(0);
|
|
|
+ private AtomicDouble ironLoading2 = new AtomicDouble(0);
|
|
|
//
|
|
|
- private AtomicInteger ironLoading3 = new AtomicInteger(0);
|
|
|
+ private AtomicDouble ironLoading3 = new AtomicDouble(0);
|
|
|
//
|
|
|
- private AtomicInteger ironLoading4 = new AtomicInteger(0);
|
|
|
+ private AtomicDouble ironLoading4 = new AtomicDouble(0);
|
|
|
|
|
|
//出铁步骤
|
|
|
private List<IronStepVO> mSteps;
|
|
@@ -212,11 +204,20 @@ public class DeviceEventListener extends EventListener { //
|
|
|
//标准流速
|
|
|
private AtomicDouble STANDARD_SPEED = new AtomicDouble(0);
|
|
|
|
|
|
- //压差阈值
|
|
|
- private AtomicDouble PRESSURE_DIFF_VALUE = new AtomicDouble(0);
|
|
|
+ //标准压差阈值
|
|
|
+ private AtomicDouble STANDARD_PRESSURE_DIFF = new AtomicDouble(0);
|
|
|
+
|
|
|
+ //标准出铁时间
|
|
|
+ private AtomicDouble STANDARD_IRON_TIME = new AtomicDouble(0);
|
|
|
+
|
|
|
+ //标准温差阈值
|
|
|
+ private AtomicInteger STANDARD_TEMP_DIFF = new AtomicInteger(0);
|
|
|
+
|
|
|
+ //标准开口耗时
|
|
|
+ private AtomicDouble STANDARD_OPEN_HOUR = new AtomicDouble(0);
|
|
|
+
|
|
|
+ private AtomicDouble STANDARD_IRON_WEIGHT = new AtomicDouble(0);
|
|
|
|
|
|
- //出铁时间
|
|
|
- private AtomicDouble IRON_TIME = new AtomicDouble(0);
|
|
|
|
|
|
//实时温度最大值
|
|
|
private AtomicDouble tempMax = new AtomicDouble(0);
|
|
@@ -224,13 +225,11 @@ public class DeviceEventListener extends EventListener { //
|
|
|
//实时温度最小值
|
|
|
private AtomicDouble tempMin = new AtomicDouble(0);
|
|
|
|
|
|
-
|
|
|
private String SERVER_URL = "";
|
|
|
|
|
|
//实时出铁总重量/总流量
|
|
|
private BigDecimal mTotalWeight = BigDecimal.ZERO;
|
|
|
- //总干量
|
|
|
-// private BigDecimal mTotalDry = BigDecimal.ZERO;
|
|
|
+
|
|
|
//出铁耗时(单位:秒)
|
|
|
private AtomicInteger mSecondsElapsed = new AtomicInteger(0);
|
|
|
|
|
@@ -271,17 +270,20 @@ public class DeviceEventListener extends EventListener { //
|
|
|
}
|
|
|
|
|
|
|
|
|
- //打泥量选择公式
|
|
|
+ //打泥量选择公式模型
|
|
|
private TIronModel modelHitMud;
|
|
|
|
|
|
- /// 堵口预警
|
|
|
+ // 堵口预警模型
|
|
|
private TIronModel modelClosureWarn1;
|
|
|
private TIronModel modelClosureWarn2;
|
|
|
private TIronModel modelClosureWarn3;
|
|
|
|
|
|
- //出铁诊断
|
|
|
+ //出铁诊断模型
|
|
|
private TIronModel modelTappingTest;
|
|
|
|
|
|
+ //预警出铁模型
|
|
|
+ private TIronModel modelTappingWarn;
|
|
|
+
|
|
|
|
|
|
/***
|
|
|
* 更新模型
|
|
@@ -292,6 +294,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
modelClosureWarn2 = ironModelService.lambdaQuery().eq(TIronModel::getModelName, "closure_warn2").one();
|
|
|
modelClosureWarn3 = ironModelService.lambdaQuery().eq(TIronModel::getModelName, "closure_warn3").one();
|
|
|
modelTappingTest = ironModelService.lambdaQuery().eq(TIronModel::getModelName, "tapping_test").one();
|
|
|
+ modelTappingWarn = ironModelService.lambdaQuery().eq(TIronModel::getModelName, "tapping_warn").one();
|
|
|
}
|
|
|
|
|
|
private void getAudios() {
|
|
@@ -318,21 +321,35 @@ public class DeviceEventListener extends EventListener { //
|
|
|
* 更新参数
|
|
|
*/
|
|
|
private void getIronParams() {
|
|
|
- List<TIronParam> mIronParams = ironParamService.lambdaQuery().eq(TIronParam::getStatus, "1").in(TIronParam::getParamType, "iron_judge", "iron_judge_extra", "scheduledtime", "server_info").orderByAsc(TIronParam::getSort).list();
|
|
|
+ List<TIronParam> mIronParams = ironParamService.lambdaQuery().eq(TIronParam::getStatus, "1").in(TIronParam::getParamType, "iron_judge", "iron_judge_extra", "server_info").orderByAsc(TIronParam::getSort).list();
|
|
|
if (ObjectUtils.isNotEmpty(mIronParams)) {
|
|
|
for (TIronParam mIronParam : mIronParams) {
|
|
|
if (Objects.equals(mIronParam.getParamName(), ParamsConstants.iron_speed)) {
|
|
|
STANDARD_SPEED = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
} else if (Objects.equals(mIronParam.getParamName(), ParamsConstants.pressure_diff_value)) {
|
|
|
- PRESSURE_DIFF_VALUE = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
+ STANDARD_PRESSURE_DIFF = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
} else if (Objects.equals(mIronParam.getParamName(), ParamsConstants.iron_time)) {
|
|
|
- IRON_TIME = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
+ STANDARD_IRON_TIME = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
} else if (Objects.equals(mIronParam.getParamName(), ParamsConstants.server_url)) {
|
|
|
SERVER_URL = mIronParam.getParamValue();
|
|
|
+ } else if (Objects.equals(mIronParam.getParamName(), ParamsConstants.ironwater_temp)) {
|
|
|
+ STANDARD_TEMP_DIFF = new AtomicInteger(Integer.parseInt(mIronParam.getParamValue()));
|
|
|
+ } else if (Objects.equals(mIronParam.getParamName(), ParamsConstants.open_hour)) {
|
|
|
+ STANDARD_OPEN_HOUR = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
+ } else if (Objects.equals(mIronParam.getParamName(), ParamsConstants.iron_weight)) {
|
|
|
+ STANDARD_IRON_WEIGHT = new AtomicDouble(Double.parseDouble(mIronParam.getParamValue()));
|
|
|
}
|
|
|
+
|
|
|
+ mContext.setVariable(ExpressionConstants.stdSpeed, STANDARD_SPEED.get());
|
|
|
+ mContext.setVariable(ExpressionConstants.stdPressureDiff, STANDARD_PRESSURE_DIFF.get());
|
|
|
+ mContext.setVariable(ExpressionConstants.stdIronTime, STANDARD_IRON_TIME.get());
|
|
|
+ mContext.setVariable(ExpressionConstants.stdServerUrl, SERVER_URL);
|
|
|
+ mContext.setVariable(ExpressionConstants.stdTempDiff, STANDARD_TEMP_DIFF);
|
|
|
+ mContext.setVariable(ExpressionConstants.stdOpenHour, STANDARD_OPEN_HOUR);
|
|
|
+ mContext.setVariable(ExpressionConstants.stdIronWeight, STANDARD_IRON_WEIGHT);
|
|
|
}
|
|
|
- log.info("STANDARD_SPEED: {},PRESSURE_DIFF_VALUE:{}", STANDARD_SPEED, PRESSURE_DIFF_VALUE);
|
|
|
- log.info("IRON_TIME: {},SERVER_URL:{}", IRON_TIME, SERVER_URL);
|
|
|
+ log.info("STANDARD_SPEED: {},PRESSURE_DIFF_VALUE:{}", STANDARD_SPEED, STANDARD_PRESSURE_DIFF);
|
|
|
+ log.info("IRON_TIME: {},SERVER_URL:{}", STANDARD_IRON_TIME, SERVER_URL);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -389,6 +406,14 @@ public class DeviceEventListener extends EventListener { //
|
|
|
*/
|
|
|
@Subscribe
|
|
|
public void onMessageEvent(OPCData opcData) {
|
|
|
+ Object obj = opcData.getData();
|
|
|
+ if (obj.toString().contains(".")) {
|
|
|
+ String s = obj.toString().split("\\.")[0];
|
|
|
+// double value = ((Number) obj).doubleValue();
|
|
|
+ //String formattedValue = String.format("%.2f", value);
|
|
|
+ opcData.setData(Double.parseDouble(s));
|
|
|
+ }
|
|
|
+
|
|
|
//异步保存OPC数据
|
|
|
taskExecutor.submit(() -> {
|
|
|
opcDataService.save(opcData);
|
|
@@ -398,9 +423,9 @@ public class DeviceEventListener extends EventListener { //
|
|
|
|
|
|
//实时数据
|
|
|
taskExecutor.submit(() -> {
|
|
|
-
|
|
|
+ setRealtimeDataAndStatus(opcData, null);
|
|
|
});
|
|
|
- setRealtimeDataAndStatus(opcData, null);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//出铁次数编号
|
|
@@ -439,7 +464,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
if (ObjectUtils.isNotEmpty(latestData)) {
|
|
|
ironTimeNoDTO.setIronNo(latestData.getIronNo());
|
|
|
}
|
|
|
- ironTimeNoDTO.setDesc(String.format("%s第%s次出铁", dateString, ironTimeNoDTO.getIronNo()));
|
|
|
+ ironTimeNoDTO.setDesc(String.format("第%s次出铁", ironTimeNoDTO.getIronNo()));
|
|
|
PushData.send2IronTimeNo(ironTimeNoDTO);
|
|
|
}
|
|
|
|
|
@@ -545,6 +570,10 @@ public class DeviceEventListener extends EventListener { //
|
|
|
//关闭定时任务:出铁预警、开口预警
|
|
|
//开启定时任务:出铁超时报警、堵口预警、打泥量选择计算、
|
|
|
|
|
|
+ //清空出铁总量、出铁计时
|
|
|
+ mTotalWeight = BigDecimal.ZERO;
|
|
|
+ mSecondsElapsed.set(0);
|
|
|
+
|
|
|
scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_TAPPING_WARN);
|
|
|
scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_TAPPING_TIMEOUT_WARN);
|
|
|
|
|
@@ -557,27 +586,27 @@ public class DeviceEventListener extends EventListener { //
|
|
|
|
|
|
}
|
|
|
|
|
|
+ //模型四:堵口模型
|
|
|
if ("1".equals(scheduleClosureWarn.getStatus())) {
|
|
|
//堵口预警
|
|
|
scheduledTaskManager.addTask(scheduleClosureWarn.getName(), scheduleClosureWarn.getDelay(), scheduleClosureWarn.getPeriod(), TimeUnit.SECONDS, () -> {
|
|
|
//堵口预警
|
|
|
String modelExpression1 = modelClosureWarn1.getModelExpression();
|
|
|
|
|
|
- SpelExpressionParser parser = new SpelExpressionParser();
|
|
|
- Expression expression1 = parser.parseExpression(modelExpression1);
|
|
|
+ Expression expression1 = mParser.parseExpression(modelExpression1);
|
|
|
|
|
|
StandardEvaluationContext context = new StandardEvaluationContext();
|
|
|
// 设置占位符对应的值
|
|
|
- context.setVariable("ironSpeed", speed1.get() > speed2.get() ? speed1.get() : speed2.get());
|
|
|
- context.setVariable("iron01State", ironLoading1);
|
|
|
- context.setVariable("iron02State", ironLoading2);
|
|
|
- context.setVariable("iron03State", ironLoading3);
|
|
|
- context.setVariable("iron04State", ironLoading4);
|
|
|
- context.setVariable("standardSpeed", STANDARD_SPEED.get());
|
|
|
- //计算打泥量
|
|
|
- //计算理论铁量= 矿批 × 综合品位 × 1.06,其中矿批是指L2中的干量
|
|
|
boolean result1 = expression1.getValue(context, Boolean.class);
|
|
|
|
|
|
+ log.info("1号车受铁速度:{}", speed1.get());
|
|
|
+ log.info("2号车受铁速度:{}", speed2.get());
|
|
|
+ log.info("标准受铁速度:{},", STANDARD_SPEED.get());
|
|
|
+ log.info("1号铁口出铁状态:{}", ironLoading1.get());
|
|
|
+ log.info("2号铁口出铁状态:{}", ironLoading2.get());
|
|
|
+ log.info("3号铁口出铁状态:{}", ironLoading3.get());
|
|
|
+ log.info("4号铁口出铁状态:{}", ironLoading4.get());
|
|
|
+
|
|
|
if (result1) {
|
|
|
//流速过大可能是由于铁口深度不足或发生跑大流问题,则提示将当前铁口堵口
|
|
|
PushData.send2Warn(WarnData.warnClose("流速过快,请将当前铁口堵口", closureAlarmUrl));
|
|
@@ -588,81 +617,56 @@ public class DeviceEventListener extends EventListener { //
|
|
|
}
|
|
|
|
|
|
String modelExpression2 = modelClosureWarn2.getModelExpression();
|
|
|
- Expression expression2 = parser.parseExpression(modelExpression2);
|
|
|
+ Expression expression2 = mParser.parseExpression(modelExpression2);
|
|
|
boolean result2 = expression2.getValue(context, Boolean.class);
|
|
|
if (result2) {
|
|
|
-
|
|
|
+ //若流速过小,但其它铁口正在出铁,则提示将当前铁口堵口
|
|
|
+ PushData.send2Warn(WarnData.warnClose("流速过小,请将当前铁口堵口", closureAlarmUrl));
|
|
|
+ taskExecutor.submit(() -> {
|
|
|
+ exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("流速过小,请将当前铁口堵口").build());
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
String modelExpression3 = modelClosureWarn3.getModelExpression();
|
|
|
- Expression expression3 = parser.parseExpression(modelExpression3);
|
|
|
+ Expression expression3 = mParser.parseExpression(modelExpression3);
|
|
|
boolean result3 = expression3.getValue(context, Boolean.class);
|
|
|
|
|
|
if (result3) {
|
|
|
-
|
|
|
+ PushData.send2Warn(WarnData.warnClose("流速过小且其他铁口均未出铁,请先将其它铁口打开,再进行堵口", closureAlarmUrl));
|
|
|
+ taskExecutor.submit(() -> {
|
|
|
+ exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("流速过小且其他铁口均未出铁,请先将其它铁口打开,再进行堵口").build());
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-// if (speed1.get() > STANDARD_SPEED.get() || speed2.get() > STANDARD_SPEED.get()) {
|
|
|
-// log.info("堵口预警:【speed1】:{},【speed2】:{},【standard_speed】:{},", speed1.get(), speed2.get(), STANDARD_SPEED.get());
|
|
|
-//
|
|
|
-// //流速过大可能是由于铁口深度不足或发生跑大流问题,则提示将当前铁口堵口
|
|
|
-// PushData.send2Warn(WarnData.warnClose("流速过快,请将当前铁口堵口", closureAlarmUrl));
|
|
|
-// taskExecutor.submit(() -> {
|
|
|
-// exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("流速过快,请将当前铁口堵口").build());
|
|
|
-// });
|
|
|
-// } else if ((speed1.get() < STANDARD_SPEED.get() || speed2.get() < STANDARD_SPEED.get()) && (ironLoading2.get() || ironLoading3.get() || ironLoading4.get())) {
|
|
|
-// log.info("堵口预警一:【speed1】:{},【speed2】:{},【standard_speed】:{},", speed1.get(), speed2.get(), STANDARD_SPEED.get());
|
|
|
-// log.info("堵口预警一:【ironLoading1】:{},【ironLoading2】:{},【ironLoading3】:{},【ironLoading4】:{}", ironLoading1.get(), ironLoading2.get(), ironLoading3.get(), ironLoading4.get());
|
|
|
-//
|
|
|
-//
|
|
|
-// //若流速过小,但其它铁口正在出铁,则提示将当前铁口堵口
|
|
|
-// PushData.send2Warn(WarnData.warnClose("流速过小,请将当前铁口堵口", closureAlarmUrl));
|
|
|
-// taskExecutor.submit(() -> {
|
|
|
-// exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("流速过小,请将当前铁口堵口").build());
|
|
|
-// });
|
|
|
-// } else if ((speed1.get() < STANDARD_SPEED.get() || speed2.get() < STANDARD_SPEED.get()) && (!ironLoading2.get() && !ironLoading3.get() && !ironLoading4.get())) {
|
|
|
-// log.info("堵口预警二:【speed1】:{},【speed2】:{},【standard_speed】:{},", speed1.get(), speed2.get(), STANDARD_SPEED.get());
|
|
|
-// log.info("堵口预警二:【ironLoading1】:{},【ironLoading2】:{},【ironLoading3】:{},【ironLoading4】:{}", ironLoading1.get(), ironLoading2.get(), ironLoading3.get(), ironLoading4.get());
|
|
|
-//
|
|
|
-//
|
|
|
-// //若流速过小且其他铁口均未出铁,则提示先将其它铁口打开,再进行堵口
|
|
|
-// PushData.send2Warn(WarnData.warnClose("请先打开其它铁口,再堵口", closureAlarmUrl));
|
|
|
-// taskExecutor.submit(() -> {
|
|
|
-// exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("请先打开其它铁口,再堵口").build());
|
|
|
-// });
|
|
|
-// }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //模型二:打泥量选择模型
|
|
|
if ("1".equals(scheduleHitMud.getStatus())) {
|
|
|
//xxx分钟出铁后开始计算打泥量,通过打泥量公式
|
|
|
- //打泥量公式关联因素:铁口深度、钻杆直径、
|
|
|
- //调用打泥量模型,计算预计使用多少打泥量进行堵口
|
|
|
+ //打泥量公式关联因素:铁口深度、钻杆直径、调用打泥量模型,计算预计使用多少打泥量进行堵口
|
|
|
scheduledTaskManager.addTask(scheduleHitMud.getName(), scheduleHitMud.getDelay(), scheduleHitMud.getPeriod(), TimeUnit.SECONDS, () -> {
|
|
|
log.info("打泥量预计:{}", modelHitMud);
|
|
|
- TL2Data tappingData = tl2DataService.getTappingData();
|
|
|
+ TL2Data tappingData = tl2DataService.getLatestData();
|
|
|
if (ObjectUtils.isNotEmpty(tappingData) && ObjectUtils.isNotEmpty(modelHitMud)) {
|
|
|
log.info("开口深度openDepth(mm):{}", tappingData.getOpenDepth());
|
|
|
- log.info("Tap对应铁水估计铁量ironWeight(t): {}", tappingData.getCalcWeight());
|
|
|
- log.info("出铁时间ironCosttime(min): {}", getIronElapsedMinute());
|
|
|
- log.info("平均流速ironSpeed(t/s): {}", speed1.get() > speed2.get() ? speed1.get() : speed2.get());
|
|
|
+ log.info("Tap对应铁水估计铁量rtIronWeight(t): {}", mTotalWeight.doubleValue());
|
|
|
+ log.info("出铁时间rtIronCosttime(min): {}", getIronElapsedMinute());
|
|
|
+ log.info("平均流速rtIronSpeed(t/s): {}", speed1.get() > speed2.get() ? speed1.get() : speed2.get());
|
|
|
|
|
|
try {
|
|
|
String modelExpression = modelHitMud.getModelExpression();
|
|
|
- log.info("打泥量计算公式:{}", modelExpression);
|
|
|
- SpelExpressionParser parser = new SpelExpressionParser();
|
|
|
- Expression expression = parser.parseExpression(modelExpression);
|
|
|
- StandardEvaluationContext context = new StandardEvaluationContext();
|
|
|
+
|
|
|
+ Expression expression = mParser.parseExpression(modelExpression);
|
|
|
// 设置占位符对应的值
|
|
|
- context.setVariable("openDepth", tappingData.getOpenDepth());
|
|
|
- context.setVariable("ironWeight", tappingData.getCalcWeight());
|
|
|
- context.setVariable("ironCosttime", getIronElapsedMinute());
|
|
|
- context.setVariable("ironSpeed", speed1.get() > speed2.get() ? speed1.get() : speed2.get());
|
|
|
+ mContext.setVariable(ExpressionConstants.openDepth, tappingData.getOpenDepth());
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronWeight, mTotalWeight.doubleValue());
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronCosttime, getIronElapsedMinute());
|
|
|
//计算打泥量
|
|
|
- //计算理论铁量= 矿批 × 综合品位 × 1.06,其中矿批是指L2中的干量
|
|
|
- int result = (int) ((double) expression.getValue(context));
|
|
|
+ int result = (int) ((double) expression.getValue(mContext));
|
|
|
// 使用 DecimalFormat 保留两位小数
|
|
|
// DecimalFormat decimalFormat = new DecimalFormat("#.00");
|
|
|
// String formattedResult = decimalFormat.format(result);
|
|
@@ -672,19 +676,17 @@ public class DeviceEventListener extends EventListener { //
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_HIT_MUD);
|
|
|
+ scheduledTaskManager.cancelTask(scheduleHitMud.getName());
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //出铁超时报警
|
|
|
if ("1".equals(scheduleTappingTimeoutWarn.getStatus())) {
|
|
|
- //出铁超时报警
|
|
|
scheduledTaskManager.addTask(scheduleTappingTimeoutWarn.getName(), scheduleTappingTimeoutWarn.getDelay(), scheduleTappingTimeoutWarn.getPeriod(), TimeUnit.SECONDS, () -> {
|
|
|
int seconds = mSecondsElapsed.get();
|
|
|
- log.info("已出铁时间min:{},标准出铁时间IRON_TIME:{}", seconds, IRON_TIME.get());
|
|
|
- if (seconds > IRON_TIME.get() * 60) {
|
|
|
+ // log.info("已出铁时间(秒):{},标准出铁时间(秒):{}", seconds, STANDARD_IRON_TIME.get());
|
|
|
+ if (seconds > STANDARD_IRON_TIME.get()) {
|
|
|
PushData.send2Warn(WarnData.warnTappingTimeout("出铁时间超时", tappingTimeoutAlramUrl));
|
|
|
taskExecutor.submit(() -> {
|
|
|
exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("2").exceptionDesc("出铁时间超过设定时间").build());
|
|
@@ -699,16 +701,14 @@ public class DeviceEventListener extends EventListener { //
|
|
|
//1号铁口结束出铁的操作项目
|
|
|
private void taphole1End() {
|
|
|
//由 1-> 0 表明1号铁口结束出铁
|
|
|
- mTotalWeight = BigDecimal.ZERO;
|
|
|
-// mTotalDry = BigDecimal.ZERO;
|
|
|
-// scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_OPEN_WARN);
|
|
|
- scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_CLOSURE_WARN);
|
|
|
|
|
|
+ scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_CLOSURE_WARN);
|
|
|
scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_HIT_MUD);
|
|
|
scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_TAPPING_CONSTTIME);
|
|
|
scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_TAPPING_TIMEOUT_WARN);
|
|
|
- mSecondsElapsed.set(0);
|
|
|
+
|
|
|
getIronTime();
|
|
|
+ getIronTimeNo();
|
|
|
mSteps = ironStepService.getTreeSteps();
|
|
|
|
|
|
//开口
|
|
@@ -717,69 +717,92 @@ public class DeviceEventListener extends EventListener { //
|
|
|
PushData.send2CancelWarn(WarnData.warnClose("出铁结束", ""));
|
|
|
//出铁预警
|
|
|
PushData.send2CancelWarn(WarnData.warnTapping("出铁结束", ""));
|
|
|
+ //清空打泥量
|
|
|
+ PushData.send2IronHitMud("");
|
|
|
|
|
|
// recordAfter();
|
|
|
// recordBlock();
|
|
|
|
|
|
+ //模型一 : 出铁工作诊断模型
|
|
|
if ("1".equals(scheduleTappingTest.getStatus())) {
|
|
|
- //开始出铁诊断
|
|
|
//获取开口耗时、出铁时间、实际出铁量、平均铁水流速、平均铁水温度等数据,进行阈值判定,诊断出铁是否正常
|
|
|
- //xxx分钟延迟
|
|
|
+ //结束后xxx秒后诊断
|
|
|
scheduledTaskManager.addTask(scheduleTappingTest.getName(), scheduleTappingTest.getDelay(), scheduleTappingTest.getPeriod(), TimeUnit.SECONDS, () -> {
|
|
|
//堵口预警
|
|
|
log.info("出铁结束,定时任务:{},出铁诊断", TaskNameConstants.TASKNAME_TAPPING_TEST);
|
|
|
TL2Data fixedLatestElement = (TL2Data) RedisUtils.getFixedLatestElement(IRON_ELEMENT);
|
|
|
- //平均温度
|
|
|
- Double mudWeight = fixedLatestElement.getAvgTemp();
|
|
|
- //出铁时间
|
|
|
- //String ironCosttime = fixedLatestElement.getI
|
|
|
- //实际出铁量
|
|
|
- Double ironWeight = fixedLatestElement.getIronWeight();
|
|
|
-
|
|
|
-// TIronData ironData = new TIronData();
|
|
|
-// BeanUtils.copyProperties(ironData, fixedLatestElement);
|
|
|
-//
|
|
|
-// ironDataService.save(ironData);
|
|
|
|
|
|
try {
|
|
|
String modelExpression = modelTappingTest.getModelExpression();
|
|
|
if (ObjectUtils.isNotEmpty(modelExpression)) {
|
|
|
log.info("出铁诊断计算公式:{}", modelExpression);
|
|
|
- SpelExpressionParser parser = new SpelExpressionParser();
|
|
|
- Expression expression = parser.parseExpression(modelExpression);
|
|
|
- StandardEvaluationContext context = new StandardEvaluationContext();
|
|
|
// 设置占位符对应的值
|
|
|
- context.setVariable("ironTime", getIronElapsedMinute());
|
|
|
- context.setVariable("ironWeight", mTotalWeight.doubleValue());
|
|
|
- context.setVariable("ironSpeed", mTotalWeight.doubleValue() / (getIronElapsedMinute() == 0 ? 1 : getIronElapsedMinute()));
|
|
|
- context.setVariable("ironTempChange", tempMax.get() - tempMin.get());
|
|
|
- String result = expression.getValue(context, String.class);
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronCosttime, getIronElapsedMinute());
|
|
|
+ mContext.setVariable(ExpressionConstants.avgIronSpeed, mTotalWeight.doubleValue() / (getIronElapsedMinute() == 0 ? 1 : getIronElapsedMinute()));
|
|
|
// 使用 DecimalFormat 保留两位小数
|
|
|
// DecimalFormat decimalFormat = new DecimalFormat("#.00");
|
|
|
// String formattedResult = decimalFormat.format(result);
|
|
|
- log.info("出铁诊断结果:{}", result);
|
|
|
+ String testResultStr = "";
|
|
|
+
|
|
|
+ String[] split = modelExpression.split("&&");
|
|
|
+ boolean ironTimeBool = mParser.parseExpression(split[0]).getValue(mContext, Boolean.class);
|
|
|
+
|
|
|
+ if (ironTimeBool) {
|
|
|
+ testResultStr += "出铁时间正常,";
|
|
|
+ } else {
|
|
|
+ testResultStr += "出铁时间异常,";
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean ironWeightBool = mParser.parseExpression(split[1]).getValue(mContext, Boolean.class);
|
|
|
+ if (ironWeightBool) {
|
|
|
+ testResultStr += "出铁量正常,";
|
|
|
+ } else {
|
|
|
+ testResultStr += "出铁量异常,";
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean ironSpeedBool = mParser.parseExpression(split[2]).getValue(mContext, Boolean.class);
|
|
|
+ if (ironSpeedBool) {
|
|
|
+ testResultStr += "出铁流速正常,";
|
|
|
+ } else {
|
|
|
+ testResultStr += "出铁流速异常,";
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean ironTempChangeBool = mParser.parseExpression(split[3]).getValue(mContext, Boolean.class);
|
|
|
+ if (ironTempChangeBool) {
|
|
|
+ testResultStr += "铁水温度变化正常。";
|
|
|
+ } else {
|
|
|
+ testResultStr += "铁水温度变化异常。";
|
|
|
+ }
|
|
|
+ TIronTest ironTest = new TIronTest();
|
|
|
+ String testStatus = (ironTimeBool && ironWeightBool && ironSpeedBool && ironTempChangeBool) ? "1" : "0";
|
|
|
+ ironTest.setTestStatus(testStatus);
|
|
|
+ ironTest.setTestDesc(testResultStr);
|
|
|
+ iTIronTestService.save(ironTest);
|
|
|
+ log.info("出铁诊断结果:{}", testResultStr);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ } finally {
|
|
|
+ scheduledTaskManager.cancelTask(scheduleTappingTest.getName());
|
|
|
}
|
|
|
|
|
|
- scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_TAPPING_TEST);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ //模型三:预警出铁模型
|
|
|
if ("1".equals(scheduleTappingWarn.getStatus())) {
|
|
|
scheduledTaskManager.addTask(scheduleTappingWarn.getName(), scheduleTappingWarn.getDelay(), scheduleTappingWarn.getPeriod(), TimeUnit.SECONDS, () -> {
|
|
|
- double sfyl = Double.parseDouble(ObjectUtils.defaultIfNull(mContext.lookupVariable("sfyl"), "0").toString());
|
|
|
- double ldyl = Double.parseDouble(ObjectUtils.defaultIfNull(mContext.lookupVariable("ldyl"), "0").toString());
|
|
|
- double yc = sfyl - ldyl;
|
|
|
- log.info("出铁预警:压差:{},标准压差:{},L1出铁状态:{}", yc, PRESSURE_DIFF_VALUE.get(), ironLoading1.get());
|
|
|
- if (PRESSURE_DIFF_VALUE.get() < yc && ironLoading1.get() == 0) {
|
|
|
- PushData.send2Warn(WarnData.warnTapping("压差超过阈值,请出铁", tappingAlramUrl));
|
|
|
- exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("压差超过阈值,请出铁").build());
|
|
|
- } else {
|
|
|
-// scheduledTaskManager.cancelTask(TaskNameConstants.TASKNAME_TAPPING_WARN);
|
|
|
- PushData.send2CancelWarn(WarnData.warnTapping("压差正常", ""));
|
|
|
+ String modelExpression = modelTappingWarn.getModelExpression();
|
|
|
+ if (ObjectUtils.isNotEmpty(modelExpression)) {
|
|
|
+ Expression expression = mParser.parseExpression(modelExpression);
|
|
|
+ // 设置占位符对应的值
|
|
|
+ Boolean result = expression.getValue(mContext, Boolean.class);
|
|
|
+ if (result) {
|
|
|
+ PushData.send2Warn(WarnData.warnTapping("压差超过阈值,请出铁", tappingAlramUrl));
|
|
|
+ exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("4").exceptionDesc("压差超过阈值,请出铁").build());
|
|
|
+ } else {
|
|
|
+ PushData.send2CancelWarn(WarnData.warnTapping("压差正常", ""));
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -818,14 +841,16 @@ public class DeviceEventListener extends EventListener { //
|
|
|
|
|
|
double tempNow = Double.parseDouble(opcData.getData().toString());
|
|
|
|
|
|
- if (tempMax.get() == 0 || tempNow > tempMax.get()) {
|
|
|
+ if (tempMax.get() <= 0 || tempNow > tempMax.get()) {
|
|
|
tempMax.set(tempNow);
|
|
|
}
|
|
|
|
|
|
- if (tempMin.get() == 0 || tempNow < tempMin.get()) {
|
|
|
+ if (tempMin.get() <= 0 || tempNow < tempMin.get()) {
|
|
|
tempMin.set(tempNow);
|
|
|
}
|
|
|
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronTemp, opcData.getData());
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronTempDiff, tempMax.get() - tempMin.get());
|
|
|
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_CAR11(opcData.getServerType())) || opcData.getPointName().contains(SubscribeTagConstants.TAG_CAR12(opcData.getServerType()))) {
|
|
|
//1TH-1号车受铁速度
|
|
@@ -854,6 +879,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
speeds[1] = realtimeData;
|
|
|
speed2 = new AtomicDouble(Double.parseDouble(opcData.getData().toString()));
|
|
|
}
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronSpeed, speed1.get() > speed2.get() ? speed1.get() : speed2.get());
|
|
|
|
|
|
//只在两个都有数据的时候才添加
|
|
|
if (ObjectUtils.isNotEmpty(speeds)
|
|
@@ -861,7 +887,6 @@ public class DeviceEventListener extends EventListener { //
|
|
|
&& ObjectUtils.isNotEmpty(speeds[1]) && ObjectUtils.isNotEmpty(speeds[1].getValue())
|
|
|
) {
|
|
|
ironSpeed.setTime(LocalDateUtils.formatDate(opcData.getServerTime()));
|
|
|
-
|
|
|
}
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_TAPHOLE1_STATUS(opcData.getServerType()))) {
|
|
|
RealtimeData realtimeData = new RealtimeData();
|
|
@@ -869,23 +894,24 @@ public class DeviceEventListener extends EventListener { //
|
|
|
realtimeData.setDesc("出铁状态");
|
|
|
mRealtimeStatus.put(IRON_STATUS, realtimeData);
|
|
|
|
|
|
- ironLoading1.set(Integer.parseInt(opcData.getData().toString()));
|
|
|
+ ironLoading1.set(Double.parseDouble(opcData.getData().toString()));
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIron01State, ironLoading1.get());
|
|
|
|
|
|
- if (ironLoading1.get() == 1) {
|
|
|
+ if (ironLoading1.get() > 0) {
|
|
|
taphole1Start();
|
|
|
} else {
|
|
|
taphole1End();
|
|
|
}
|
|
|
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_TAPHOLE2_STATUS(opcData.getServerType()))) {
|
|
|
- ironLoading2.set(Integer.parseInt(opcData.getData().toString()));
|
|
|
-
|
|
|
+ ironLoading2.set(Double.parseDouble(opcData.getData().toString()));
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIron02State, ironLoading2.get());
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_TAPHOLE3_STATUS(opcData.getServerType()))) {
|
|
|
- ironLoading3.set(Integer.parseInt(opcData.getData().toString()));
|
|
|
-
|
|
|
+ ironLoading3.set(Double.parseDouble(opcData.getData().toString()));
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIron03State, ironLoading3.get());
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_TAPHOLE4_STATUS(opcData.getServerType()))) {
|
|
|
- ironLoading4.set(Integer.parseInt(opcData.getData().toString()));
|
|
|
-
|
|
|
+ ironLoading4.set(Double.parseDouble(opcData.getData().toString()));
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIron04State, ironLoading4.get());
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_IRON_WEIGHT11(opcData.getServerType())) || opcData.getPointName().contains(SubscribeTagConstants.TAG_IRON_WEIGHT12(opcData.getServerType()))) {
|
|
|
//铁水流量
|
|
|
RealtimeData ironWeight = new RealtimeData();
|
|
@@ -897,6 +923,9 @@ public class DeviceEventListener extends EventListener { //
|
|
|
mRealtimeData.put(IRON_WEIGHT, ironWeight);
|
|
|
// log.info(">>>>>>>>>>>>>{}:{},total:{}", opcData.getPointName(), opcData.getData(), totalWeight.toPlainString());
|
|
|
ironWeight.setTime(LocalDateUtils.formatDate(opcData.getServerTime()));
|
|
|
+
|
|
|
+ mContext.setVariable(ExpressionConstants.rtIronWeight, mTotalWeight.doubleValue());
|
|
|
+
|
|
|
} else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_FLUSH_STATUS(opcData.getServerType()))) {
|
|
|
RealtimeData realtimeData = new RealtimeData();
|
|
|
realtimeData.setValue(opcData.getData());
|
|
@@ -906,7 +935,16 @@ public class DeviceEventListener extends EventListener { //
|
|
|
|
|
|
}
|
|
|
|
|
|
- TL2Data fixedLatestElement = (TL2Data) RedisUtils.getFixedLatestElement(IRON_ELEMENT);
|
|
|
+ TL2Data fixedLatestElement = null;
|
|
|
+ try {
|
|
|
+ fixedLatestElement = (TL2Data) RedisUtils.getFixedLatestElement(IRON_ELEMENT);
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ObjectUtils.isEmpty(fixedLatestElement)) {
|
|
|
+ fixedLatestElement = tl2DataService.getLatestData();
|
|
|
+ }
|
|
|
|
|
|
if (ObjectUtils.isNotEmpty(fixedLatestElement)) {
|
|
|
//铁水成分
|
|
@@ -915,12 +953,12 @@ public class DeviceEventListener extends EventListener { //
|
|
|
String elementS = fixedLatestElement.getElementS();
|
|
|
|
|
|
RealtimeData realtimeData = new RealtimeData();
|
|
|
- realtimeData.setValue(elementSi);
|
|
|
+ realtimeData.setValue(new BigDecimal(elementSi).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
realtimeData.setUnit("%");
|
|
|
realtimeData.setDesc("硅");
|
|
|
|
|
|
RealtimeData realtimeData2 = new RealtimeData();
|
|
|
- realtimeData2.setValue(elementS);
|
|
|
+ realtimeData2.setValue(new BigDecimal(elementS).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
realtimeData2.setUnit("%");
|
|
|
realtimeData2.setDesc("硫");
|
|
|
|
|
@@ -958,7 +996,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
if (ObjectUtils.isEmpty(newPointName)) {
|
|
|
continue;
|
|
|
}
|
|
|
- newPointName = CustomUtil.createNewPointName(newPointName, activeProfiles,mOPCData.getServerType());
|
|
|
+ newPointName = CustomUtil.createNewPointName(newPointName, activeProfiles, mOPCData.getServerType());
|
|
|
if (Objects.equals(newPointName, pointName)) {
|
|
|
//3.创建变量上下文,设置变量
|
|
|
childchild.setData(data);
|
|
@@ -968,7 +1006,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
if (ObjectUtils.isEmpty(newPointName)) {
|
|
|
continue;
|
|
|
}
|
|
|
- newPointName = CustomUtil.createNewPointName(newPointName, activeProfiles,mOPCData.getServerType());
|
|
|
+ newPointName = CustomUtil.createNewPointName(newPointName, activeProfiles, mOPCData.getServerType());
|
|
|
if (Objects.equals(newPointName, pointName)) {
|
|
|
child.setData(data);
|
|
|
}
|
|
@@ -1052,10 +1090,10 @@ public class DeviceEventListener extends EventListener { //
|
|
|
try {
|
|
|
if ("calc".equalsIgnoreCase(stepVO.getNodeType())) {
|
|
|
//含有表达式文字
|
|
|
- flowName = parser.parseExpression(stepVO.getStepNameExpression()).getValue(mContext, String.class);
|
|
|
+ flowName = mParser.parseExpression(stepVO.getStepNameExpression()).getValue(mContext, String.class);
|
|
|
} else {
|
|
|
//纯文字
|
|
|
- flowName = parser.parseExpression("'" + stepVO.getStepName() + "'").getValue(mContext, String.class);
|
|
|
+ flowName = mParser.parseExpression("'" + stepVO.getStepName() + "'").getValue(mContext, String.class);
|
|
|
}
|
|
|
stepVO.setStepName(flowName);
|
|
|
} catch (Exception e) {
|
|
@@ -1072,7 +1110,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
if (ObjectUtils.isNotEmpty(stepVO.getStepCondition())) {
|
|
|
boolean result = false;
|
|
|
try {
|
|
|
- result = parser.parseExpression(stepVO.getStepCondition()).getValue(mContext, Boolean.class);
|
|
|
+ result = mParser.parseExpression(stepVO.getStepCondition()).getValue(mContext, Boolean.class);
|
|
|
} catch (Exception e) {
|
|
|
result = false;
|
|
|
}
|
|
@@ -1090,7 +1128,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
String userId;
|
|
|
if (ObjectUtils.isEmpty(client) || ObjectUtils.isEmpty(userId = SocketUtil.clientUserIds.get(client))) {
|
|
|
log.info("该客户已下线");
|
|
|
- PushData.send2Operation("该客户已下线", 0);
|
|
|
+ PushData.send2Operation("该客户已下线", 0.0);
|
|
|
return null;
|
|
|
}
|
|
|
return userId;
|
|
@@ -1111,7 +1149,7 @@ public class DeviceEventListener extends EventListener { //
|
|
|
|
|
|
if (ObjectUtils.isEmpty(message)) {
|
|
|
log.info("请求数据为空");
|
|
|
- PushData.send2Operation("请求数据为空", 0);
|
|
|
+ PushData.send2Operation("请求数据为空", 0.0);
|
|
|
return;
|
|
|
}
|
|
|
|