From 296c704ea6f9d970f462f7e8b8cab28c91d3271d Mon Sep 17 00:00:00 2001 From: xiepufeng <1072271977@qq.com> Date: Tue, 2 Apr 2024 11:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=AD=E9=9D=A2=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/domain/DcTrafficSectionData.java | 5 +++++ .../com/zc/business/request/DcTrafficMetricsDataRequest.java | 5 +++++ .../zc/business/statistics/handler/TrafficStatistics.java | 4 ++++ 3 files changed, 14 insertions(+) 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) {