Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
zhaoxianglong 4 months ago
parent
commit
bc25b0c734
  1. 2
      zc-business/src/main/java/com/zc/business/domain/ComprehensiveIndexQuery.java
  2. 15
      zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
  3. 12
      zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
  4. 16
      zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml
  5. 4
      zc-business/src/main/resources/mapper/business/DcGantryStatisticsDataMapper.xml

2
zc-business/src/main/java/com/zc/business/domain/ComprehensiveIndexQuery.java

@ -34,4 +34,6 @@ public class ComprehensiveIndexQuery {
private Integer crowdingRate;
private Integer periodType;
private String startDate;
private String endDate;
}

15
zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java

@ -616,7 +616,6 @@ public class DeviceMessageHandler {
}
String content = direction + stakeMark + precipitationType;
Map<String, Object> contentMap = new HashMap<>();
JSONObject object = new JSONObject();
object.put("meteorologicalDetectorData", meteorologicalDetectorData);
@ -641,13 +640,10 @@ public class DeviceMessageHandler {
if (direction.equals(UniversalEnum.DIRECTION_OF_JINAN.getValue())) {
dcWarning.setDirection(UniversalEnum.THREE.getValue());
}
contentMap.put("content", content);
contentMap.put("event", dcWarning);
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap);
dcWarningService.insertDcWarning(dcWarning);
//待确认数量
dcEventService.getCountNum();
}
@ -664,10 +660,7 @@ public class DeviceMessageHandler {
}
String content = direction + stakeMark + precipitationType;
Map<String, Object> contentMap = new HashMap<>();
contentMap.put("content", content);
contentMap.put("event", meteorologicalDetectorData);
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap);
JSONObject object = new JSONObject();
object.put("meteorologicalDetectorData", meteorologicalDetectorData);
String string = object.toString();
@ -691,9 +684,7 @@ public class DeviceMessageHandler {
}
dcWarningService.insertDcWarning(dcWarning);
contentMap.put("content", content);
contentMap.put("event", dcWarning);
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap);
//待确认数量
dcEventService.getCountNum();

12
zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

@ -242,9 +242,17 @@ public class DcWarningServiceImpl implements IDcWarningService
break;
}
}
String content= direction+UniversalEnum.BLANK_SPACE.getValue() + dcWarning.getStakeMark()+UniversalEnum.BLANK_SPACE.getValue()+HAPPEN+EventSubclass+EVENT ;
Map<String,Object> contentMap = new HashMap<>();
contentMap.put("content",content);
if (dcWarning.getWarningSource() == 7) {
String remark = dcWarning.getRemark();
String[] split = remark.split(" ");
String s = split[split.length - 1];
contentMap.put("content",s);
}else {
String content= direction+UniversalEnum.BLANK_SPACE.getValue() + dcWarning.getStakeMark()+UniversalEnum.BLANK_SPACE.getValue()+HAPPEN+EventSubclass+EVENT ;
contentMap.put("content",content);
}
contentMap.put("event",dcWarning);
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap); //推送事件消息 0不是感知事件
dcEventService.getCountNum();

16
zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml

@ -199,18 +199,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ON ps.facility_code = dgsd.gantry_code
AND
<if test="periodType == 1">
YEAR(dgsd.statistical_date) = #{startDate}
YEAR(dgsd.statistical_date) = #{startDate} AND
</if>
<if test="periodType == 3">
DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate}
DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} AND
</if>
<if test="periodType == 4">
DATE(dgsd.statistical_date) = DATE(#{startDate})
<if test="periodType == 4 and startDate !=null and endDate !=null" >
dgsd.statistical_date BETWEEN DATE(#{startDate}) and DATE(#{endDate}) AND
</if>
<if test="periodType == 4 and startDate !=null and endDate ==null" >
DATE(dgsd.statistical_date) = DATE(#{startDate}) AND
</if>
<if test="periodType == 5">
DATE(dgsd.statistical_date) = DATE(#{startDate})
DATE(dgsd.statistical_date) = DATE(#{startDate}) AND
</if>
AND dgsd.period_type = #{periodType}
dgsd.period_type = #{periodType}
ORDER BY
dgsd.statistical_date DESC
</select>

4
zc-business/src/main/resources/mapper/business/DcGantryStatisticsDataMapper.xml

@ -328,7 +328,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
JOIN dc_gantry_statistics_data AS dgsd
ON ps.facility_code = dgsd.gantry_code
AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate}
<if test="startDate !=null">
AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate}
</if>
<if test="periodType != null">
AND dgsd.period_type = #{periodType}
</if>

Loading…
Cancel
Save