Browse Source

气象检测器 推送 桩号修改

develop
王兴琳 5 months ago
parent
commit
402cd6a968
  1. 19
      zc-business/src/main/java/com/zc/business/domain/DcTollStationStatisticsDataMap.java
  2. 5
      zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
  3. 55
      zc-business/src/main/resources/mapper/business/DcTollStationStatisticsDataMapper.xml

19
zc-business/src/main/java/com/zc/business/domain/DcTollStationStatisticsDataMap.java

@ -0,0 +1,19 @@
package com.zc.business.domain;
import lombok.Data;
/**
*
*/
@Data
public class DcTollStationStatisticsDataMap {
private String tollStationCode;
private String stakMark;
private String statisticalDate;
private String facilityName;
private String id;
private Integer trafficVolume;
private Integer accessType;
private Integer periodType;
}

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

@ -619,7 +619,7 @@ if (meteorologicalDetectorData.getPrecipitationType().equals("1")){
String string = object.toString(); String string = object.toString();
DcWarning dcWarning = new DcWarning(); DcWarning dcWarning = new DcWarning();
dcWarning.setStakeMark(meteorologicalDetectorData.getStakeMark()); dcWarning.setStakeMark(stakeMark);
dcWarning.setWarningSource(7);//气象检测器 dcWarning.setWarningSource(7);//气象检测器
dcWarning.setOtherConfig(string); dcWarning.setOtherConfig(string);
@ -630,6 +630,7 @@ if (meteorologicalDetectorData.getPrecipitationType().equals("1")){
if (direction.equals("济南方向")){ if (direction.equals("济南方向")){
dcWarning.setDirection("3"); dcWarning.setDirection("3");
} }
dcWarningService.insertDcWarning(dcWarning); dcWarningService.insertDcWarning(dcWarning);
//待确认数量 //待确认数量
@ -654,7 +655,7 @@ if (meteorologicalDetectorData.getPrecipitationType().equals("1")){
object.put("meteorologicalDetectorData", meteorologicalDetectorData); object.put("meteorologicalDetectorData", meteorologicalDetectorData);
String string = object.toString(); String string = object.toString();
DcWarning dcWarning = new DcWarning(); DcWarning dcWarning = new DcWarning();
dcWarning.setStakeMark(meteorologicalDetectorData.getStakeMark()); dcWarning.setStakeMark(stakeMark);
dcWarning.setWarningSource(7);//气象检测器 dcWarning.setWarningSource(7);//气象检测器
dcWarning.setOtherConfig(string); dcWarning.setOtherConfig(string);
dcWarning.setWarningTitle("气象预警"); dcWarning.setWarningTitle("气象预警");

55
zc-business/src/main/resources/mapper/business/DcTollStationStatisticsDataMapper.xml

@ -3,14 +3,15 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zc.business.mapper.DcTollStationStatisticsDataMapper"> <mapper namespace="com.zc.business.mapper.DcTollStationStatisticsDataMapper">
<resultMap type="map" id="countMap"> <resultMap type="com.zc.business.domain.DcTollStationStatisticsDataMap" id="DcTollStationStatisticsDataMap">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="facilityName" column="facility_name"/> <result property="facilityName" column="facility_name"/>
<result property="toll_station_code" column="toll_station_code"/> <result property="tollStationCode" column="toll_station_code"/>
<result property="traffic_volume" column="traffic_volume"/> <result property="trafficVolume" column="traffic_volume"/>
<result property="period_type" column="period_type"/> <result property="periodType" column="period_type"/>
<result property="access_type" column="access_type"/> <result property="accessType" column="access_type"/>
<result property="statisticalDate" column="statisticalDate"/> <result property="statisticalDate" column="statistical_date"/>
<result property="stakMark" column="stake_mark"/>
</resultMap> </resultMap>
<!-- 插入或更新交通路段数据 --> <!-- 插入或更新交通路段数据 -->
<insert id="insertOrUpdate" parameterType="com.zc.business.domain.DcTollStationStatisticsData"> <insert id="insertOrUpdate" parameterType="com.zc.business.domain.DcTollStationStatisticsData">
@ -100,26 +101,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="TollBoothStatistics" resultMap="countMap" resultType="map" > <select id="TollBoothStatistics" parameterType="string" resultType="DcTollStationStatisticsDataMap" >
SELECT SELECT
fa.facility_name, fa.facility_name,
fa.stake_mark, fa.stake_mark,
dt.id, dt.id,
dt.access_type, dt.access_type,
dt.period_type, dt.period_type,
dt.traffic_volume, dt.traffic_volume,
dt.toll_station_code, dt.toll_station_code,
dt.statistical_date dt.statistical_date
FROM FROM
dc_facility AS fa dc_facility AS fa
LEFT JOIN LEFT JOIN
dc_toll_station_statistics_data AS dt dc_toll_station_statistics_data AS dt
ON ON
fa.facility_code = dt.toll_station_code fa.facility_code = dt.toll_station_code
AND DATE(dt.statistical_date) = DATE(#{startDate}) AND DATE(dt.statistical_date) = DATE(#{startDate})
AND dt.period_type = #{periodType} AND dt.period_type = #{periodType}
AND dt.access_type = #{accessType} AND dt.access_type = #{accessType}
WHERE fa.facility_type = 1 WHERE fa.facility_type = 1
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save