From 90c02e0ad08c054e1f44476a3e9e16b947c1fd8c Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 14 七月 2025 11:49:14 +0800 Subject: [PATCH] 修改用水户年用水量统计查询中的bug --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java | 128 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 124 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java index f038514..ce4ba44 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java @@ -12,25 +12,145 @@ */ @Data public class ManureVo implements Vo4Up { + @JSONField(name = "flexem_message_id") + public Integer messageId ;//娑堟伅ID + + public Integer no ;//娴嬬珯缂栧彿锛屽叾涓嶅湪JSON鏁版嵁涓紝鍏跺湪涓婚涓� + + /** + * 鎼呮媽鏈�1鏄惁杩愯锛涳紙姘磋偉鏈鸿繕鍙瓨鍦ㄦ悈鎷屾満2銆佹悈鎷屾満3銆佹悈鎷屾満4 ......锛� 杩愯鏃�1锛屽仠姝�0. + */ + @JSONField(alternateNames = {"鎼呮媽杩愯1", "stirRunning1"}) + public Byte stirRunning1;//鎼呮媽1杩愯鐘舵�� + /** + * 鎼呮媽鏈�2鏄惁杩愯锛涳紙姘磋偉鏈鸿繕鍙瓨鍦ㄦ悈鎷屾満2銆佹悈鎷屾満3銆佹悈鎷屾満4 ......锛� 杩愯鏃�1锛屽仠姝�0. + * (褰撳墠澶х搴旂敤涓嶅瓨鍦�) + */ + @JSONField(alternateNames = {"鎼呮媽杩愯2", "stirRunning2"}) + public Byte stirRunning2;//鎼呮媽2杩愯鐘舵�� + /** + * 鎼呮媽鏈�3鏄惁杩愯锛涳紙姘磋偉鏈鸿繕鍙瓨鍦ㄦ悈鎷屾満2銆佹悈鎷屾満3銆佹悈鎷屾満4 ......锛� 杩愯鏃�1锛屽仠姝�0. + * (褰撳墠澶х搴旂敤涓嶅瓨鍦�) + */ + @JSONField(alternateNames = {"鎼呮媽杩愯3", "stirRunning3"}) + public Byte stirRunning3;//鎼呮媽3杩愯鐘舵�� + /** + * 鎼呮媽鏈�4鏄惁杩愯锛涳紙姘磋偉鏈鸿繕鍙瓨鍦ㄦ悈鎷屾満2銆佹悈鎷屾満3銆佹悈鎷屾満4 ......锛� 杩愯鏃�1锛屽仠姝�0. + * (褰撳墠澶х搴旂敤涓嶅瓨鍦�) + */ + @JSONField(alternateNames = {"鎼呮媽杩愯4", "stirRunning4"}) + public Byte stirRunning4;//鎼呮媽4杩愯鐘舵�� + + /** + * 涓�涓按鑲ユ満鍙湁涓�涓敞鑲ユ车 + */ + @JSONField(alternateNames = {"娉ㄨ偉杩愯", "injectRunning"}) + public Byte injectRunning ;//娉ㄨ偉杩愯鐘舵�� + + + @JSONField(alternateNames = {"鐏屾簤杩愯", "irrRunning"}) + public Byte irrRunning ;//鐏屾簤杩愯鐘舵�� + + /** + * 1:娉ㄨ偉娉垫湁鏁呴殰銆�0:娉ㄨ偉娉垫病鏈夋晠闅� + */ + @JSONField(alternateNames = {"鎶ヨ", "alarm"}) + public Byte alarm ;//娉ㄨ偉娉垫晠闅� + + /** + * 鑲ユ枡娴侀噺锛屽崟浣嶅崌 + */ + @JSONField(alternateNames = {"鑲ユ枡娴侀噺", "manureFlow"}) + public Float manureFlow ; + + /** + * 鍗曚綅绉� + */ + @JSONField(alternateNames = {"娉ㄨ偉缁忚繃鏃堕棿", "manureTime"}) + public Integer manureTime ; + + /** + * 鍗曚綅绉� + */ + @JSONField(alternateNames = {"鎼呮媽缁忚繃鏃堕棿", "stirTime"}) + public Integer stirTime ; + + /** + * 鍗曚綅绉� + */ + @JSONField(alternateNames = {"鎼呮媽璁惧畾鏃堕棿", "stirDuration"}) + public Integer stirDuration ; + + /** + * 鍗曚綅绉� + */ + @JSONField(alternateNames = {"娉ㄨ偉璁惧畾鏃堕棿", "injectDuration"}) + public Integer injectDuration ; + @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){ + if(devDt != null){ return DateTime.yyyy_MM_dd_HH_mm_ss(DateTime.getDate(devDt)) ; }else{ return "" ; } } + public boolean stateIsChanged(ManureVo compareVo){ + if(this.stirRunning1 != null && compareVo.stirRunning1 != null && this.stirRunning1.byteValue() != compareVo.stirRunning1.byteValue()){ + return true ; + } + if(this.stirRunning2 != null && compareVo.stirRunning2 != null && this.stirRunning2.byteValue() != compareVo.stirRunning2.byteValue()){ + return true ; + } + if(this.stirRunning3 != null && compareVo.stirRunning3 != null && this.stirRunning3.byteValue() != compareVo.stirRunning3.byteValue()){ + return true ; + } + if(this.stirRunning4 != null && compareVo.stirRunning4 != null && this.stirRunning4.byteValue() != compareVo.stirRunning4.byteValue()){ + return true ; + } + if(this.injectRunning != null && compareVo.injectRunning != null && this.injectRunning.byteValue() != compareVo.injectRunning.byteValue()){ + return true ; + } + if(this.irrRunning != null && compareVo.irrRunning != null && this.irrRunning.byteValue() != compareVo.irrRunning.byteValue()){ + return true ; + } + if(this.alarm != null && compareVo.alarm != null && this.alarm.byteValue() != compareVo.alarm.byteValue()){ + return true ; + } + return false ; + } + @Override public String toString(){ StringBuilder sb = new StringBuilder(); - sb.append("姘磋偉鏁版嵁锛�") ; - sb.append(" 璁惧鏃堕棿锛�"+devDt) ; - sb.append(" 璁惧鏃堕棿锛�"+ this.getDevDtStr()) ; + sb.append("姘磋偉鏁版嵁=>") ; + sb.append(" 娑堟伅ID锛�" + messageId + ", ") ; + sb.append(" 鎼呮媽杩愯1锛�" + stirRunning1 + ", ") ; + sb.append(" 鎼呮媽杩愯2锛�" + stirRunning2 + ", ") ; + sb.append(" 鎼呮媽杩愯3锛�" + stirRunning3 + ", ") ; + sb.append(" 鎼呮媽杩愯4锛�" + stirRunning4 + ", ") ; + sb.append(" 娉ㄨ偉杩愯锛�" + injectRunning + ", ") ; + sb.append(" 鐏屾簤杩愯锛�" + irrRunning + ", ") ; + sb.append(" 鎶ヨ锛�" + alarm + ", ") ; + sb.append(" 鑲ユ枡娴侀噺锛�" + manureFlow + ", ") ; + sb.append(" 娉ㄨ偉缁忚繃鏃堕棿锛�" + manureTime + ", ") ; + sb.append(" 鎼呮媽缁忚繃鏃堕棿锛�" + stirTime + ", ") ; + sb.append(" 娉ㄨ偉璁惧畾鏃堕棿锛�" + injectDuration + ", ") ; + sb.append(" 鎼呮媽璁惧畾鏃堕棿锛�" + stirDuration + ", ") ; + sb.append(" 璁惧鏃堕棿锛�" + devDt + ", ") ; + sb.append(" 璁惧鏃堕棿锛�" + this.getDevDtStr()) ; sb.append("\n") ; return sb.toString() ; } + } -- Gitblit v1.8.0