This commit is contained in:
xy
2024-08-02 15:57:05 +08:00
parent 08c8e4374d
commit 32a6b5c52e

View File

@@ -94,8 +94,7 @@ public class StatServiceImpl implements IStatService {
} }
//直连设备 //直连设备
else if (Objects.equals(DicDataEnum.CONNECT_DEV.getCode(),code)) { else if (Objects.equals(DicDataEnum.CONNECT_DEV.getCode(),code)) {
if (Objects.equals(appAutoDataMessage.getDid(),1)){ if (Objects.equals(appAutoDataMessage.getDid(),1)){lineId = new Gson().fromJson(String.valueOf(redisUtil.getObjectByKey(AppRedisKey.LINE_POSITION+appAutoDataMessage.getId())), Map.class).get("0").toString();
lineId = new Gson().fromJson(String.valueOf(redisUtil.getObjectByKey(AppRedisKey.LINE_POSITION+appAutoDataMessage.getId())), Map.class).get("0").toString();
} else if (Objects.equals(appAutoDataMessage.getDid(),2)){ } else if (Objects.equals(appAutoDataMessage.getDid(),2)){
lineId = new Gson().fromJson(String.valueOf(redisUtil.getObjectByKey(AppRedisKey.LINE_POSITION+appAutoDataMessage.getId())), Map.class).get(appAutoDataMessage.getMsg().getClDid().toString()).toString(); lineId = new Gson().fromJson(String.valueOf(redisUtil.getObjectByKey(AppRedisKey.LINE_POSITION+appAutoDataMessage.getId())), Map.class).get(appAutoDataMessage.getMsg().getClDid().toString()).toString();
} }
@@ -111,19 +110,19 @@ public class StatServiceImpl implements IStatService {
for (AppAutoDataMessage.DataArray item : list) { for (AppAutoDataMessage.DataArray item : list) {
switch (item.getDataAttr()) { switch (item.getDataAttr()) {
case 1: case 1:
log.info("处理最大值"); log.info("{}-->处理最大值", po.getNdid());
dataArrayParam.setStatMethod("max"); dataArrayParam.setStatMethod("max");
break; break;
case 2: case 2:
log.info("处理最小值"); log.info("{}-->处理最小值", po.getNdid());
dataArrayParam.setStatMethod("min"); dataArrayParam.setStatMethod("min");
break; break;
case 3: case 3:
log.info("处理avg"); log.info("{}-->处理avg", po.getNdid());
dataArrayParam.setStatMethod("avg"); dataArrayParam.setStatMethod("avg");
break; break;
case 4: case 4:
log.info("处理cp95"); log.info("{}-->处理cp95", po.getNdid());
dataArrayParam.setStatMethod("cp95"); dataArrayParam.setStatMethod("cp95");
break; break;
default: default: