Administrator
2024-06-28 f5eb6bd9e0f5011ec071a96e68872ada1840cbc6
Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
15个文件已修改
3个文件已添加
393 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/global/GlParse.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataCdC0Vo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeWaterTypeMapper.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeWaterType.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoClient.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWaterTypeMapper.xml 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/SeClientToVoClient.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/config/CaffeineCacheConfiguration.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) ;
    }
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) ;
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);
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeWaterTypeMapper.java
New file
@@ -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);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportHistory.java
@@ -96,11 +96,6 @@
    public Double batteryVolt;
    /**
     * 太阳能电压,单位为V
     */
    public Double sunVolt;
    /**
     * 信号强度,取值范围0~99
     */
    public Integer signalValue;
@@ -117,7 +112,6 @@
        this.lossAmount = cdData.lossAmount ;// 损失流量(从0时到当前的漏损累计流量,24时一个周期,0时归0)单位为m3。
        this.waterPress = cdData.waterPress ;// 水压,单位为KPa
        this.batteryVolt = cdData.batteryVolt ;// 蓄电池电压,单位为V
        this.sunVolt = cdData.sunVolt ;//  太阳能电压,单位为V
        this.signalValue = cdData.signalValue ;//  信号强度,取值范围0~99
        this.waterPrice = cdData.waterPrice ;//  水价,单位为元。
    }
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOnHourReportLast.java
@@ -96,11 +96,6 @@
    public Double batteryVolt;
    /**
    * 太阳能电压,单位为V
    */
    public Double sunVolt;
    /**
    * 信号强度,取值范围0~99
    */
    public Integer signalValue;
@@ -119,7 +114,6 @@
        this.lossAmount = cdData.lossAmount ;// 损失流量(从0时到当前的漏损累计流量,24时一个周期,0时归0)单位为m3。
        this.waterPress = cdData.waterPress ;// 水压,单位为KPa
        this.batteryVolt = cdData.batteryVolt ;// 蓄电池电压,单位为V
        this.sunVolt = cdData.sunVolt ;//  太阳能电压,单位为V
        this.signalValue = cdData.signalValue ;//  信号强度,取值范围0~99
        this.waterPrice = cdData.waterPrice ;//  水价,单位为元。
    }
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeWaterType.java
New file
@@ -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;
}
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 = "县ID")
    private String countyId;
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
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>
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}
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}
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
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWaterTypeMapper.xml
New file
@@ -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>
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();
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) ;
        }
    }
}
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);
}
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;
    }