diff --git a/zc-business/src/main/java/com/zc/business/domain/DcTrafficSectionData.java b/zc-business/src/main/java/com/zc/business/domain/DcTrafficSectionData.java index 3444312b..860bcf6a 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcTrafficSectionData.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcTrafficSectionData.java @@ -72,6 +72,11 @@ public class DcTrafficSectionData { */ private Integer stakeMark; + /** + * 设备类型 + */ + private Integer deviceType; + /** 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") diff --git a/zc-business/src/main/java/com/zc/business/request/DcTrafficMetricsDataRequest.java b/zc-business/src/main/java/com/zc/business/request/DcTrafficMetricsDataRequest.java index bd882e7a..0e60621e 100644 --- a/zc-business/src/main/java/com/zc/business/request/DcTrafficMetricsDataRequest.java +++ b/zc-business/src/main/java/com/zc/business/request/DcTrafficMetricsDataRequest.java @@ -41,4 +41,9 @@ public class DcTrafficMetricsDataRequest { * 是否分路段统计 */ private boolean segmented; + + /** + * 设备类型 + */ + private Integer deviceType; } diff --git a/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficStatistics.java b/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficStatistics.java index dbc9a939..50a07c3e 100644 --- a/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficStatistics.java +++ b/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficStatistics.java @@ -321,6 +321,8 @@ public class TrafficStatistics { data.setPeriodType(TrafficDataPeriodTypeEnum.DAY); // 将设备的桩号转换为整数后设置 data.setStakeMark(dcDevice.stakeMarkToInt()); + // 设置设备类型 + data.setDeviceType(Integer.valueOf(dcDevice.getDeviceType())); } @@ -459,6 +461,8 @@ public class TrafficStatistics { aggregatedData.setDirection(firstDcTrafficSectionData.getDirection()); // 上报时间 aggregatedData.setReportTime(firstDcTrafficSectionData.getReportTime()); + // 设备类型 + aggregatedData.setDeviceType(firstDcTrafficSectionData.getDeviceType()); // 计算平均车速并设置到汇总统计对象中 if (trafficVolume != 0) {