From e9d04864135236c8b39b06f62d001631524197e6 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期五, 20 六月 2025 17:02:58 +0800 Subject: [PATCH] 1、协议细化,处理小数; 2、水肥机、气象站、墒情站实体增加属性fboxId(FBox序列号); --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java | 60 ++++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 22 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java index 62ba401..2891399 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java @@ -16,32 +16,46 @@ @JSONField(name = "flexem_message_id") public Integer messageId ;//娑堟伅ID - @JSONField(name = "浜屾哀鍖栫⒊") - public Integer carbonDioxide ;//浜屾哀鍖栫⒊ + public Integer no ;//娴嬬珯缂栧彿锛屽叾涓嶅湪JSON鏁版嵁涓紝鍏跺湪涓婚涓� - @JSONField(name = "鍏夌収寮哄害") - public Integer lightIntensity ;//鍏夌収寮哄害 + //@JSONField(name = "浜屾哀鍖栫⒊") + //public Integer carbonDioxide ; - @JSONField(name = "澶ф皵鍘嬪姏") - public Integer atmosphericPressure ;//澶ф皵鍘嬪姏 + //@JSONField(name = "澶ф皵鍘嬪姏") + //public Integer atmosphericPressure ; @JSONField(name = "绌烘皵娓╁害") - public Integer airTemperature ;//绌烘皵娓╁害 + public Float airTemperature ; @JSONField(name = "绌烘皵婀垮害") - public Integer airHumidity ;//绌烘皵婀垮害 + public Float airHumidity ; - @JSONField(name = "PM2.5") - public Integer pm25 ;//PM2.5 + @JSONField(name = "绱绾�") + public Integer ultraviolet ; - @JSONField(name = "PM10") - public Integer pm10 ;//PM10 + @JSONField(name = "鍏夌収寮哄害") + public Integer lightIntensity ; + + @JSONField(name = "闆ㄩ噺") + public Float rainfall ; + + @JSONField(name = "椋庨��") + public Float windSpeed ; + + @JSONField(name = "椋庡悜") + public Integer windDirection ; @JSONField(name = "flexem_timestamp") public Long devDt ;//璁惧鏃堕棿 public String devDtStr ;//璁惧鏃堕棿 + + @Override + public void setNo(Integer no ){ + this.no = no ; + } + public String getDevDtStr() { if(devDt != null){ return DateTime.yyyy_MM_dd_HH_mm_ss(DateTime.getDate(devDt)) ; @@ -54,16 +68,18 @@ public String toString(){ StringBuilder sb = new StringBuilder(); sb.append("姘旇薄鏁版嵁=>") ; - sb.append(" 娑堟伅ID锛�"+messageId + ", ") ; - sb.append(" 浜屾哀鍖栫⒊锛�"+carbonDioxide + ", ") ; - sb.append(" 鍏夌収寮哄害锛�"+lightIntensity + ", ") ; - sb.append(" 澶ф皵鍘嬪姏锛�"+atmosphericPressure + ", ") ; - sb.append(" 绌烘皵娓╁害锛�"+airTemperature + ", ") ; - sb.append(" 绌烘皵婀垮害锛�"+airHumidity + ", ") ; - sb.append(" PM2.5锛�"+pm25 + ", ") ; - sb.append(" PM10锛�"+pm10 + ", ") ; - sb.append(" 璁惧鏃堕棿锛�"+devDt + ", ") ; - sb.append(" 璁惧鏃堕棿锛�"+ this.getDevDtStr() + ", ") ; + //sb.append(" 浜屾哀鍖栫⒊锛�" + carbonDioxide + ", ") ; + //sb.append(" 澶ф皵鍘嬪姏锛�" + atmosphericPressure + ", ") ; + sb.append(" 娑堟伅ID锛�" + messageId + ", ") ; + sb.append(" 绌烘皵娓╁害锛�" + airTemperature + ", ") ; + sb.append(" 绌烘皵婀垮害锛�" + airHumidity + ", ") ; + sb.append(" 绱绾匡細" + ultraviolet + ", ") ; + sb.append(" 鍏夌収寮哄害锛�" + lightIntensity + ", ") ; + sb.append(" 闆ㄩ噺锛�" + rainfall + ", ") ; + sb.append(" 椋庨�燂細" + windSpeed + ", ") ; + sb.append(" 椋庡悜锛�" + windDirection + ", ") ; + sb.append(" 璁惧鏃堕棿锛�" + devDt + ", ") ; + sb.append(" 璁惧鏃堕棿锛�" + this.getDevDtStr() + ", ") ; sb.append("\n") ; return sb.toString() ; } -- Gitblit v1.8.0