From f5eb6bd9e0f5011ec071a96e68872ada1840cbc6 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期五, 28 六月 2024 17:03:50 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/global/GlParse.java | 6
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeWaterType.java | 47 ++++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java | 6
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml | 2
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoClient.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java | 29 +++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml | 17 --
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java | 108 +++------------
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataCdC0Vo.java | 4
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeWaterTypeMapper.java | 26 +++
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java | 3
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWaterTypeMapper.xml | 67 +++++++++
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java | 43 ++++++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml | 17 --
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java | 6
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml | 2
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/SeClientToVoClient.java | 1
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml | 7 +
18 files changed, 252 insertions(+), 141 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
index 98d19eb..0116141 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
@@ -120,99 +120,39 @@
*/
if(hasWaterAmount){
//鐬椂娴侀噺锛�5瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~9999999.999锛屽崟浣嶄负m3/h銆�
- cdData.instantAmount = 0.0D ;
- int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.instantAmount += tpInt/1000.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.instantAmount += tpInt/10.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.instantAmount += tpInt * 10.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.instantAmount += tpInt * 1000.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.instantAmount += tpInt * 100000.0 ;
+ int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
+ cdData.instantAmount = tpInt/1000.0 ;
- //绱娴侀噺锛�5瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~9999999999锛屽崟浣嶄负m3銆�
- cdData.totalAmount = 0.0D ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.totalAmount += tpInt;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.totalAmount += tpInt * 100.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.totalAmount += tpInt * 10000.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.totalAmount += tpInt * 1000000.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.totalAmount += tpInt * 100000000.0 ;
+ index += 5 ;
+ //绱娴侀噺锛�5瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99999999.99锛屽崟浣嶄负m3銆�
+ tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
+ cdData.totalAmount = tpInt/100.0;
+ index += 5 ;
//鎹熷け娴侀噺锛�5瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~9999999999锛屽崟浣嶄负m3銆�
- cdData.lossAmount = 0.0D ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.lossAmount += tpInt;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.lossAmount += tpInt * 100.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.lossAmount += tpInt * 10000.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.lossAmount += tpInt * 1000000.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.lossAmount += tpInt * 100000000.0 ;
+ tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
+ cdData.lossAmount = tpInt/100.0;
+
+ index += 5 ;
}
if(hasWaterPress){
//姘村帇锛�4瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~999999.99锛屽崟浣嶄负KPa銆�
- cdData.waterPress = 0.0D ;
- int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.waterPress += tpInt/100.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.waterPress += tpInt;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.waterPress += tpInt * 100.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.waterPress += tpInt * 10000.0 ;
+ int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
+ cdData.waterPress = tpInt/100.0 ;
+ index += 4 ;
}
if(hasEleVolt){
//鐢垫睜鐢靛帇锛�2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
- cdData.batteryVolt = 0.0D ;//钃勭數姹犵數鍘�
- cdData.sunVolt = 0.0D ;//澶槼鑳界數鍘�
- int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.batteryVolt += tpInt/100.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.batteryVolt += tpInt;
-// //澶槼鑳界數鍘嬶細4瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
-// tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
-// index++ ;
-// cdData.sunVolt += tpInt/100.0 ;
-// tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
-// index++ ;
-// cdData.sunVolt += tpInt;
+ //钃勭數姹犵數鍘�
+ int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 1) ;
+ cdData.batteryVolt = tpInt/100.0 ;
+ index += 2 ;
}
if(hasSignal){
//淇″彿寮哄害锛�1瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99銆�
- cdData.signalValue = 0 ;
int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
+ cdData.signalValue = tpInt ;
index++ ;
- cdData.signalValue += tpInt ;
}
if(hasAlarmStatus){
//鎶ヨ鏁版嵁
@@ -224,14 +164,10 @@
}
//姘翠环锛�2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负鍏冦��
- cdData.waterPrice = 0.0D ;//姘翠环
- int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.waterPrice += tpInt/100.0 ;
- tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
- index++ ;
- cdData.waterPrice += tpInt;
+ int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 1) ;
+ cdData.waterPrice = tpInt/100.0 ;
+ index += 2 ;
cdData.rtuDt = GlParse.parseTp(bs, index) ;
}
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/global/GlParse.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/global/GlParse.java
index 2f087bc..5336505 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/global/GlParse.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/global/GlParse.java
@@ -20,11 +20,11 @@
闃�闂細鎶ヨ
*/
DataAlarmVo avo = new DataAlarmVo() ;
- byte b = bs[index + 1] ;
+ byte b = bs[index] ;
avo.batteryVolt = (byte)((b & 0x2) >> 1) ;
avo.meter = (byte)((b & 0x20) >> 5) ;
- b = bs[index] ;
+ b = bs[index + 1] ;
avo.loss = (byte)((b & 0x2) >> 1) ;
avo.valve = (byte)((b & 0x4) >> 2) ;
return avo ;
@@ -32,7 +32,7 @@
public static DataStateVo parseState(byte[] bs, short index){
DataStateVo avo = new DataStateVo() ;
- byte b = bs[index + 1] ;
+ byte b = bs[index] ;
avo.icCard = (byte)((b & 0x4) >> 2) ;
avo.working = (byte)((b & 0x10) >> 4) ;
avo.powerType = (byte)((b & 0x40) >> 6) ;
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataCdC0Vo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataCdC0Vo.java
index 4d7c8c7..deb5d32 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataCdC0Vo.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataCdC0Vo.java
@@ -12,7 +12,6 @@
public Double lossAmount; //鎹熷け娴侀噺(浠�0鏃跺埌褰撳墠鐨勬紡鎹熺疮璁℃祦閲忥紝24鏃朵竴涓懆鏈燂紝0鏃跺綊0)锛�5瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~9999999999锛屽崟浣嶄负m3銆�
public Double waterPress; //姘村帇锛�4瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~999999.99锛屽崟浣嶄负KPa銆�
public Double batteryVolt;//钃勭數姹犵數鍘�:2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
- public Double sunVolt ;//澶槼鑳界數鍘�:2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
public Integer signalValue; //淇″彿寮哄害锛�1瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99銆�
public Double waterPrice ;//姘翠环:2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
public String rtuDt ;//鎺у埗鍣ㄦ椂閽�
@@ -35,9 +34,6 @@
sb.append("\n");
sb.append(" 钃勭數姹犵數鍘嬶細");
sb.append(batteryVolt==null?"":batteryVolt);
- sb.append("\n");
- sb.append(" 澶槼鑳界數鍘嬶細");
- sb.append(sunVolt==null?"":sunVolt);
sb.append("\n");
sb.append(" 淇″彿寮哄害锛�");
sb.append(signalValue ==null?"": signalValue);
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeWaterTypeMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeWaterTypeMapper.java
new file mode 100644
index 0000000..8e663ae
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeWaterTypeMapper.java
@@ -0,0 +1,26 @@
+package com.dy.pipIrrGlobal.daoSe;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSe.SeWaterType;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/6/28 15:29
+ * @LastEditTime :2024/6/28 15:29
+ * @Description
+ */
+@Mapper
+public interface SeWaterTypeMapper extends BaseMapper<SeWaterType> {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(SeWaterType record);
+
+ int insertSelective(SeWaterType record);
+
+ SeWaterType selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(SeWaterType record);
+
+ int updateByPrimaryKey(SeWaterType record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java
index e5f3beb..7579c15 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java
@@ -96,11 +96,6 @@
public Double batteryVolt;
/**
- * 澶槼鑳界數鍘嬶紝鍗曚綅涓篤
- */
- public Double sunVolt;
-
- /**
* 淇″彿寮哄害锛屽彇鍊艰寖鍥�0~99
*/
public Integer signalValue;
@@ -117,7 +112,6 @@
this.lossAmount = cdData.lossAmount ;// 鎹熷け娴侀噺(浠�0鏃跺埌褰撳墠鐨勬紡鎹熺疮璁℃祦閲忥紝24鏃朵竴涓懆鏈燂紝0鏃跺綊0)鍗曚綅涓簃3銆�
this.waterPress = cdData.waterPress ;// 姘村帇,鍗曚綅涓篕Pa
this.batteryVolt = cdData.batteryVolt ;// 钃勭數姹犵數鍘嬶紝鍗曚綅涓篤
- this.sunVolt = cdData.sunVolt ;// 澶槼鑳界數鍘嬶紝鍗曚綅涓篤
this.signalValue = cdData.signalValue ;// 淇″彿寮哄害锛屽彇鍊艰寖鍥�0~99
this.waterPrice = cdData.waterPrice ;// 姘翠环锛屽崟浣嶄负鍏冦��
}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java
index dfcf02f..b025ceb 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java
@@ -96,11 +96,6 @@
public Double batteryVolt;
/**
- * 澶槼鑳界數鍘嬶紝鍗曚綅涓篤
- */
- public Double sunVolt;
-
- /**
* 淇″彿寮哄害锛屽彇鍊艰寖鍥�0~99
*/
public Integer signalValue;
@@ -119,7 +114,6 @@
this.lossAmount = cdData.lossAmount ;// 鎹熷け娴侀噺(浠�0鏃跺埌褰撳墠鐨勬紡鎹熺疮璁℃祦閲忥紝24鏃朵竴涓懆鏈燂紝0鏃跺綊0)鍗曚綅涓簃3銆�
this.waterPress = cdData.waterPress ;// 姘村帇,鍗曚綅涓篕Pa
this.batteryVolt = cdData.batteryVolt ;// 钃勭數姹犵數鍘嬶紝鍗曚綅涓篤
- this.sunVolt = cdData.sunVolt ;// 澶槼鑳界數鍘嬶紝鍗曚綅涓篤
this.signalValue = cdData.signalValue ;// 淇″彿寮哄害锛屽彇鍊艰寖鍥�0~99
this.waterPrice = cdData.waterPrice ;// 姘翠环锛屽崟浣嶄负鍏冦��
}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeWaterType.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeWaterType.java
new file mode 100644
index 0000000..80d6485
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeWaterType.java
@@ -0,0 +1,47 @@
+package com.dy.pipIrrGlobal.pojoSe;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/6/28 15:29
+ * @LastEditTime :2024/6/28 15:29
+ * @Description
+ */
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import org.apache.logging.log4j.core.config.plugins.validation.constraints.NotBlank;
+
+/**
+ * 鐢ㄦ按绫诲瀷琛�
+ */
+@TableName(value="se_water_type", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鐢ㄦ按绫诲瀷瀹炰綋")
+public class SeWaterType implements BaseEntity {
+ public static final long serialVersionUID = 202406281535001L;
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 鐢ㄦ按绫诲瀷
+ */
+ @Schema(description = "鐢ㄦ按绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotBlank(message = "鐢ㄦ按绫诲瀷涓嶈兘涓虹┖")
+ private String typename;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoClient.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoClient.java
index becefee..d86f58b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoClient.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoClient.java
@@ -20,8 +20,6 @@
public class VoClient implements BaseEntity {
private static final long serialVersionUID = 1L;
- @Schema(title = "ID")
- private Long id;
@Schema(title = "鍘縄D")
private String countyId;
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
index 01b83ee..edd5c60 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -79,6 +79,8 @@
actutorPort: 9070
idSuffix: 0
sso:
+ cacheMaximumSize: 10000 #鐧诲綍鐢ㄦ埛缂撳瓨鍙紦瀛樼敤鎴风殑鏈�澶у��
+ cacheDuration: 720 #缂撳瓨鐧诲綍鐢ㄦ埛鍙戝憜鏈�澶ф椂闀匡紙鍒嗛挓锛�
checkUrl: http://127.0.0.1:8079/sso/sso/ssoCheck
webPort: 8079
actutorPort: 9079
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml b/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
index c427921..f914f43 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
@@ -24,6 +24,13 @@
<item4 item_name="controllerType" item_value="57" remarks="鎺у埗鍣ㄧ被鍨�"/>
<item5 item_name="protocolName" item_value="p206V202404" remarks="鍗忚鍚嶇О"/>
</settings>
+ <waterTypes>
+ <item1 typeName="鐏屾簤鐢ㄦ按"/>
+ <item2 typeName="宸ヤ笟鐢ㄦ按"/>
+ <item3 typeName="鐢熸椿鐢ㄦ按"/>
+ <item4 typeName="鍏绘畺鐢ㄦ按"/>
+ <item5 typeName="缁垮寲鐢ㄦ按"/>
+ </waterTypes>
</org1>
</orgs>
</config>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml
index ec8521a..a06bd6d 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml
@@ -15,14 +15,13 @@
<result column="loss_amount" jdbcType="FLOAT" property="lossAmount" />
<result column="water_press" jdbcType="FLOAT" property="waterPress" />
<result column="battery_volt" jdbcType="FLOAT" property="batteryVolt" />
- <result column="sun_volt" jdbcType="FLOAT" property="sunVolt" />
<result column="signal_value" jdbcType="INTEGER" property="signalValue" />
<result column="water_price" jdbcType="FLOAT" property="waterPrice" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, controller_id, intake_id, rtu_addr, dt, rtu_dt, instant_amount, total_amount,
- loss_amount, water_press, battery_volt, sun_volt, signal_value, water_price
+ loss_amount, water_press, battery_volt, signal_value, water_price
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -41,12 +40,12 @@
insert into rm_on_hour_report_history (id, controller_id, intake_id,
rtu_addr, dt, rtu_dt,
instant_amount, total_amount, loss_amount,
- water_press, battery_volt, sun_volt,
+ water_press, battery_volt,
signal_value, water_price)
values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
#{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtuDt,jdbcType=TIMESTAMP},
#{instantAmount,jdbcType=FLOAT}, #{totalAmount,jdbcType=FLOAT}, #{lossAmount,jdbcType=FLOAT},
- #{waterPress,jdbcType=FLOAT}, #{batteryVolt,jdbcType=FLOAT}, #{sunVolt,jdbcType=FLOAT},
+ #{waterPress,jdbcType=FLOAT}, #{batteryVolt,jdbcType=FLOAT},
#{signalValue,jdbcType=INTEGER}, #{waterPrice,jdbcType=FLOAT})
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOnHourReportHistory">
@@ -85,9 +84,6 @@
</if>
<if test="batteryVolt != null">
battery_volt,
- </if>
- <if test="sunVolt != null">
- sun_volt,
</if>
<if test="signalValue != null">
signal_value,
@@ -129,9 +125,6 @@
</if>
<if test="batteryVolt != null">
#{batteryVolt,jdbcType=FLOAT},
- </if>
- <if test="sunVolt != null">
- #{sunVolt,jdbcType=FLOAT},
</if>
<if test="signalValue != null">
#{signalValue,jdbcType=INTEGER},
@@ -175,9 +168,6 @@
<if test="batteryVolt != null">
battery_volt = #{batteryVolt,jdbcType=FLOAT},
</if>
- <if test="sunVolt != null">
- sun_volt = #{sunVolt,jdbcType=FLOAT},
- </if>
<if test="signalValue != null">
signal_value = #{signalValue,jdbcType=INTEGER},
</if>
@@ -200,7 +190,6 @@
loss_amount = #{lossAmount,jdbcType=FLOAT},
water_press = #{waterPress,jdbcType=FLOAT},
battery_volt = #{batteryVolt,jdbcType=FLOAT},
- sun_volt = #{sunVolt,jdbcType=FLOAT},
signal_value = #{signalValue,jdbcType=INTEGER},
water_price = #{waterPrice,jdbcType=FLOAT}
where id = #{id,jdbcType=BIGINT}
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
index f7c0177..5fb6db3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
@@ -15,14 +15,13 @@
<result column="loss_amount" jdbcType="FLOAT" property="lossAmount" />
<result column="water_press" jdbcType="FLOAT" property="waterPress" />
<result column="battery_volt" jdbcType="FLOAT" property="batteryVolt" />
- <result column="sun_volt" jdbcType="FLOAT" property="sunVolt" />
<result column="signal_value" jdbcType="INTEGER" property="signalValue" />
<result column="water_price" jdbcType="FLOAT" property="waterPrice" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, controller_id, intake_id, rtu_addr, dt, rtu_dt, instant_amount, total_amount,
- loss_amount, water_press, battery_volt, sun_volt, signal_value, water_price
+ loss_amount, water_press, battery_volt, signal_value, water_price
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -41,12 +40,12 @@
insert into rm_on_hour_report_last (id, controller_id, intake_id,
rtu_addr, dt, rtu_dt,
instant_amount, total_amount, loss_amount,
- water_press, battery_volt, sun_volt,
+ water_press, battery_volt,
signal_value, water_price)
values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
#{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtuDt,jdbcType=TIMESTAMP},
#{instantAmount,jdbcType=FLOAT}, #{totalAmount,jdbcType=FLOAT}, #{lossAmount,jdbcType=FLOAT},
- #{waterPress,jdbcType=FLOAT}, #{batteryVolt,jdbcType=FLOAT}, #{sunVolt,jdbcType=FLOAT},
+ #{waterPress,jdbcType=FLOAT}, #{batteryVolt,jdbcType=FLOAT},
#{signalValue,jdbcType=INTEGER}, #{waterPrice,jdbcType=FLOAT})
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOnHourReportLast">
@@ -85,9 +84,6 @@
</if>
<if test="batteryVolt != null">
battery_volt,
- </if>
- <if test="sunVolt != null">
- sun_volt,
</if>
<if test="signalValue != null">
signal_value,
@@ -129,9 +125,6 @@
</if>
<if test="batteryVolt != null">
#{batteryVolt,jdbcType=FLOAT},
- </if>
- <if test="sunVolt != null">
- #{sunVolt,jdbcType=FLOAT},
</if>
<if test="signalValue != null">
#{signalValue,jdbcType=INTEGER},
@@ -175,9 +168,6 @@
<if test="batteryVolt != null">
battery_volt = #{batteryVolt,jdbcType=FLOAT},
</if>
- <if test="sunVolt != null">
- sun_volt = #{sunVolt,jdbcType=FLOAT},
- </if>
<if test="signalValue != null">
signal_value = #{signalValue,jdbcType=INTEGER},
</if>
@@ -200,7 +190,6 @@
loss_amount = #{lossAmount,jdbcType=FLOAT},
water_press = #{waterPress,jdbcType=FLOAT},
battery_volt = #{batteryVolt,jdbcType=FLOAT},
- sun_volt = #{sunVolt,jdbcType=FLOAT},
signal_value = #{signalValue,jdbcType=INTEGER},
water_price = #{waterPrice,jdbcType=FLOAT}
where id = #{id,jdbcType=BIGINT}
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml
index 8236c83..bb6d416 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml
@@ -333,7 +333,6 @@
<!--鏍规嵁鎸囧畾鏉′欢鑾峰彇鍐滄埛鏁版嵁-->
<select id="getClients" resultType="com.dy.pipIrrGlobal.voSe.VoClient">
SELECT
- (@i:=@i+1) AS id,
CAST(cli.countyId AS char) AS countyId,
dis_con.name AS countryName,
CAST(cli.townId AS char) AS townId,
@@ -363,7 +362,6 @@
LEFT JOIN ba_block blo ON cli.blockId = blo.id
LEFT JOIN pr_divide divi ON cli.divideId = divi.id
LEFT JOIN se_water_type wat ON cli.typeId = wat.id
- , (SELECT @i:=0) AS itable
<where>
AND cli.disabled = 0
AND cli.deleted = 0
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWaterTypeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWaterTypeMapper.xml
new file mode 100644
index 0000000..28b146d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWaterTypeMapper.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSe.SeWaterTypeMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeWaterType">
+ <!--@mbg.generated-->
+ <!--@Table se_water_type-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="typeName" jdbcType="VARCHAR" property="typename" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, typeName
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from se_water_type
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from se_water_type
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeWaterType">
+ <!--@mbg.generated-->
+ insert into se_water_type (id, typeName)
+ values (#{id,jdbcType=BIGINT}, #{typename,jdbcType=VARCHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeWaterType">
+ <!--@mbg.generated-->
+ insert into se_water_type
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="typename != null">
+ typeName,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="typename != null">
+ #{typename,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeWaterType">
+ <!--@mbg.generated-->
+ update se_water_type
+ <set>
+ <if test="typename != null">
+ typeName = #{typename,jdbcType=VARCHAR},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeWaterType">
+ <!--@mbg.generated-->
+ update se_water_type
+ set typeName = #{typename,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
index de48d21..d60bf3e 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
@@ -297,6 +297,7 @@
List<Map<String, Object>> list_towns = Optional.ofNullable(sv.getDistrictsBySupperId(countyId)).orElse(new ArrayList<>());
if (list_towns.size() > 0) {
array_towns = JSONArray.parseArray(JSON.toJSONString(list_towns));
+ job_county.put("children", array_towns);
// 閬嶅巻姣忎竴涓晣锛屽皢闀囦笅鏉戝垪琛ㄥ姞鍒伴晣鐨勫瓙闆�
for (int j = 0; j < array_towns.size(); j++) {
JSONObject job_town = array_towns.getJSONObject(j);
@@ -310,7 +311,7 @@
//System.out.println("----" + array_towns);
}
// 闀囨潙缁勮瀹屾瘯锛屽皢闀囨潙鍔犲埌鍘夸笅
- job_county.put("children", array_towns);
+// job_county.put("children", array_towns);
}
// 鍘跨粍瑁呭畬姣�
//String a = array_counties.toJSONString();
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
index 9779e1b..fd569a6 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
@@ -10,10 +10,12 @@
import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper;
import com.dy.pipIrrGlobal.daoBa.BaUserMapper;
import com.dy.pipIrrGlobal.daoSe.SePaymentMethodMapper;
+import com.dy.pipIrrGlobal.daoSe.SeWaterTypeMapper;
import com.dy.pipIrrGlobal.pojoBa.BaDistrict;
import com.dy.pipIrrGlobal.pojoBa.BaSettings;
import com.dy.pipIrrGlobal.pojoBa.BaUser;
import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod;
+import com.dy.pipIrrGlobal.pojoSe.SeWaterType;
import com.dy.pipIrrGlobal.util.DistrictLevel;
import org.jdom2.Document;
import org.springframework.beans.factory.annotation.Autowired;
@@ -37,6 +39,7 @@
private BaUserMapper userDao ;
private SePaymentMethodMapper paymentMethodDao ;
private BaSettingsMapper settingsDao ;
+ private SeWaterTypeMapper waterTypeDao ;
@Autowired
public void setDistriDao(BaDistrictMapper distriDao){
@@ -56,6 +59,11 @@
@Autowired
public void setSettingsDao(BaSettingsMapper settingsDao){
this.settingsDao = settingsDao ;
+ }
+
+ @Autowired
+ public void setWaterTypeDao(SeWaterTypeMapper waterTypeDao){
+ this.waterTypeDao = waterTypeDao ;
}
@@ -153,6 +161,18 @@
}
}
}
+ if(!this.existWaterTypes()){
+ if(configXml.existElement(doc, "config.orgs.org" + num + ".waterTypes")){
+ for(int i = 1 ; i < 10000; i++){
+ if(configXml.existElement(doc, "config.orgs.org" + num + ".waterTypes.item" + i)){
+ String typeName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".waterTypes.item" + i,"typeName", null, false, null) ;
+ this.saveWaterType(orgTag, typeName);
+ }else{
+ break ;
+ }
+ }
+ }
+ }
}else{
break ;
}
@@ -193,6 +213,15 @@
*/
private boolean existSettings(){
Long total = this.settingsDao.selectCount(null) ;
+ return (total != null && total > 0) ;
+ }
+
+ /**
+ * 鏁版嵁搴撲腑鏄惁瀛樺湪鐢ㄦ按绫诲瀷鏁版嵁
+ * @return 瀛樺湪鍚�
+ */
+ private boolean existWaterTypes(){
+ Long total = this.waterTypeDao.selectCount(null) ;
return (total != null && total > 0) ;
}
@@ -278,4 +307,18 @@
}
}
+
+ /**
+ * 淇濆瓨鐢ㄦ按绫诲瀷
+ * @param orgTag 鏈烘瀯鏍囩
+ * @param typeName 鍚嶇О
+ */
+ private void saveWaterType(String orgTag, String typeName) throws Exception{
+ if(typeName != null && !typeName.trim().equals("")){
+ SeWaterType po = new SeWaterType() ;
+ po.setTypename(typeName);
+ this.waterTypeDao.insert(po) ;
+ }
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/SeClientToVoClient.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/SeClientToVoClient.java
index dfd265e..8b20617 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/SeClientToVoClient.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/SeClientToVoClient.java
@@ -24,5 +24,6 @@
//@Mapping(target = "cardCount", source = "cardCount")
@Mapping(target = "address", source = "address")
@Mapping(target = "operateDt", source = "operatedt")
+ @Mapping(target = "waterTypeId", source = "typeid")
VoClient po2vo(SeClient po);
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java
index d50a4e1..1c85166 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java
@@ -1,7 +1,9 @@
package com.dy.sso.config;
+import com.dy.common.util.NumUtil;
import com.github.benmanes.caffeine.cache.Caffeine;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
@@ -10,6 +12,15 @@
@Configuration
public class CaffeineCacheConfiguration {
+ private static final int cacheInitialCapacityDefault = 10 ;
+ private static final int cacheMaximumSizeDefault = 10000 ;
+ private static final int cacheDurationDefault = 720 ;
+
+ @Value("${pipIrr.sso.cacheMaximumSize}")
+ private String cacheMaximumSize ;
+
+ @Value("${pipIrr.sso.cacheDuration}")
+ private String cacheDuration ;
/*
initialCapacity=[integer]: 鍒濆鐨勭紦瀛樼┖闂村ぇ灏�
maximumSize=[long]: 缂撳瓨鐨勬渶澶ф潯鏁�
@@ -28,11 +39,23 @@
*/
@Bean
public CacheManager cacheManager() {
+ int cacheMaximumSizeInt;
+ int cacheDurationInt;
+ if(NumUtil.isPlusIntNumber(cacheMaximumSize)){
+ cacheMaximumSizeInt = Integer.parseInt(cacheMaximumSize) ;
+ }else{
+ cacheMaximumSizeInt = cacheMaximumSizeDefault ;
+ }
+ if(NumUtil.isPlusIntNumber(cacheDuration)){
+ cacheDurationInt = Integer.parseInt(cacheDuration) ;
+ }else{
+ cacheDurationInt = cacheDurationDefault ;
+ }
CaffeineCacheManager cacheManager = new CaffeineCacheManager();
cacheManager.setCaffeine(Caffeine.newBuilder()
- .initialCapacity(10)
- .maximumSize(10000)
- .expireAfterAccess(30, TimeUnit.MINUTES));
+ .initialCapacity(cacheInitialCapacityDefault)
+ .maximumSize(cacheMaximumSizeInt)
+ .expireAfterAccess(cacheDurationInt, TimeUnit.MINUTES));
return cacheManager;
}
--
Gitblit v1.8.0