From 9357012ee7684579464a2d9b5b7c6859245ba283 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 28 六月 2024 11:22:15 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 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/parse/global/GlParse.java |    6 
 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/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/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java             |    6 -
 pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml                                    |    2 
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml                                 |    4 
 pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java  |   29 ++++++
 10 files changed, 61 insertions(+), 138 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/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/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/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 728c37c..bb6d416 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml
@@ -391,7 +391,7 @@
 
   <!--鏍规嵁鍐滄埛缂栧彿鑾峰彇5绾ц鏀垮尯鍒掍唬鐮�-->
   <select id="getAreaCodeByNum" resultType="java.lang.Long">
-    SELECT districtNum FROM se_client WHERE clientNum = ${clientNum}
+    SELECT districtNum FROM se_client WHERE clientNum = ${clientNum} LIMIT 0,1
   </select>
 
   <!--鏍规嵁鍐滄埛缂栧彿鑾峰彇5绾ц鏀垮尯鍒掍覆areaCode锛岃ˉ鍗¤繃绋嬩腑寮�鏂板崱浣跨敤-->
@@ -401,7 +401,7 @@
 
   <!--鏍规嵁鍐滄埛缂栧彿鑾峰彇鍐滄埛ID-->
   <select id="getClientIdByNum" resultType="java.lang.Long">
-    SELECT id FROM se_client WHERE clientNum = ${clientNum}
+    SELECT id FROM se_client WHERE clientNum = ${clientNum} LIMIT 0,1
   </select>
 
   <!--鏍规嵁鐢佃瘽鍙风爜鑾峰彇鍐滄埛ID-->
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