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 00c5efe9..5bc3adaa 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 @@ -142,10 +142,10 @@ public class DcTrafficSectionData { } /** - * 根据设备ID、上报时间、方向、时段类型、桩号生成一个唯一ID + * 根据设备ID、统计时间、方向、时段类型、桩号生成一个唯一ID */ public void generateUniqueId() { - String combinedAttributes = deviceId + "_" + DateUtil.format(reportTime, "yyyyMMdd_HHmmss") + "_" + direction + "_" + periodType + "_" + stakeMark; + String combinedAttributes = deviceId + "_" + DateUtil.format(statisticalDate, "yyyyMMdd_HHmmss") + "_" + direction + "_" + periodType + "_" + stakeMark; this.id = DigestUtils.md5Hex(combinedAttributes); } diff --git a/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java b/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java index 2499377b..5e449a50 100644 --- a/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java @@ -22,7 +22,7 @@ public enum IotProductEnum { // 设备箱 EQUIPMENT_BOX("zc-shebeixiang-1883"), - // 一站式情况调查产品 + // 一类交通量调查产品 ONE_STOP_PRODUCT("zc-yzsqkdc-3131") ; diff --git a/zc-business/src/main/java/com/zc/business/enums/IotProductPropertiesEnum.java b/zc-business/src/main/java/com/zc/business/enums/IotProductPropertiesEnum.java index 73658394..27c7b214 100644 --- a/zc-business/src/main/java/com/zc/business/enums/IotProductPropertiesEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/IotProductPropertiesEnum.java @@ -7,7 +7,7 @@ package com.zc.business.enums; public enum IotProductPropertiesEnum { /** - * 一站式产品属性01 + * 一类交通量调查站产品属性01 */ ONE_STOP_PRODUCT_01("01"), diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java index 82021398..6015f22b 100644 --- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java +++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java @@ -330,7 +330,7 @@ public class DeviceMessageHandler { } /** - * 一站式情况调查站设备消息处理入口 + * 一类交通量调查站设备消息处理入口 * * @param msg 设备消息 */ diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSectionDataServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSectionDataServiceImpl.java index a6791a4d..5be5983d 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSectionDataServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSectionDataServiceImpl.java @@ -116,7 +116,7 @@ public class DcTrafficSectionDataServiceImpl // 检查获取的设备信息是否为空 if (oneStopDeviceMap == null || oneStopDeviceMap.get("data") == null) { - logger.error("获取一站式设备数据失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); + logger.error("获取一类交通量调查站设备数据失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); return; } @@ -144,7 +144,7 @@ public class DcTrafficSectionDataServiceImpl // 检查设备ID的有效性 if (deviceId == null || deviceId.isEmpty()) { - logger.error("获取一站式设备id失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); + logger.error("获取一类交通量调查站设备id失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); return; } @@ -203,7 +203,7 @@ public class DcTrafficSectionDataServiceImpl private void processDeviceProperties(Map deviceProperties) { // 检查传入的设备属性映射是否为空,或者其中的"data"键对应的值是否为空 if (deviceProperties == null || deviceProperties.get("data") == null) { - logger.error("获取一站式属性数据失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); + logger.error("获取一类交通量调查站属性数据失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); return; } @@ -212,7 +212,7 @@ public class DcTrafficSectionDataServiceImpl // 检查解析出的JSON对象是否包含"data"键 if (propertiesObject.get("data") == null) { - logger.error("获取一站式属性数据失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); + logger.error("获取一类交通量调查站属性数据失败,产品id:{}", IotProductEnum.ONE_STOP_PRODUCT.value()); return; } @@ -295,7 +295,7 @@ public class DcTrafficSectionDataServiceImpl // 属性数据 if (properties == null) { - logger.error("接收实时属性数据,属性数据不存在,请检查物联网一站式设备数据是否正常"); + logger.error("接收实时属性数据,属性数据不存在,请检查物联网一类交通量调查站设备数据是否正常"); return null; } @@ -307,7 +307,7 @@ public class DcTrafficSectionDataServiceImpl // 判断是否属性01的数据 if (property == null) { - logger.error("非属性01的数据,无法处理,请检查物联网一站式设备数据是否正常"); + logger.error("非属性01的数据,无法处理,请检查物联网一类交通量调查站设备数据是否正常"); return null; } @@ -315,7 +315,7 @@ public class DcTrafficSectionDataServiceImpl String iotDeviceId = msg.getString("deviceId"); if (iotDeviceId == null || iotDeviceId.isEmpty()) { - logger.error("设备id为空,无法处理,请检查物联网平台一站式设备数据是否正常"); + logger.error("设备id为空,无法处理,请检查物联网平台一类交通量调查站设备数据是否正常"); return null; } @@ -323,7 +323,7 @@ public class DcTrafficSectionDataServiceImpl Long timestamp = msg.getLong("timestamp"); if (timestamp == null || timestamp == 0L) { - logger.error("上报时间为空,无法处理,请检查物联网平台一站式设备数据是否正常"); + logger.error("上报时间为空,无法处理,请检查物联网平台一类交通量调查站设备数据是否正常"); return null; } @@ -342,7 +342,7 @@ public class DcTrafficSectionDataServiceImpl JSONArray lanes = property.getJSONArray("lanes"); if (lanes == null || lanes.isEmpty()) { - logger.error("车道信息为空,无法处理,请检查物联网平台一站式设备数据是否正常"); + logger.error("车道信息为空,无法处理,请检查物联网平台一类交通量调查站设备数据是否正常"); return null; }