优化代码 控制器查询 最近未报数的取水口分页优化 取水口管理与测控一体阀合并
7个文件已修改
2个文件已添加
436 ■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-database(开发测试---单数据库).yml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-global(开发测试---166PC机).yml 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java
@@ -22,7 +22,7 @@
 */
@Data
@JsonPropertyOrder({ "intakeId", "intakeName", "divideId", "divideName", "blockId", "blockName", "isBind", "address", "lng", "lat", "operator", "operateDt", "remarks", "controllerId", "rtuAddr"})
@JsonPropertyOrder({ "intakeId", "intakeName", "divideId", "divideName", "blockId", "blockName", "isBind", "address", "lng", "lat", "operator", "operateDt", "remarks", "controllerId", "rtuAddr", "protocol", "findDt", "isOnLine", "bindNumber"})
@HeadRowHeight(30)
@ContentRowHeight(20)
public class VoIntake implements BaseEntity {
@@ -55,8 +55,8 @@
    @ColumnWidth(15)
    private String blockName;
    @Schema(title = "绑定设备")
    @ExcelProperty(value = {"${title}", "绑定设备"})
    @Schema(title = "是否绑定设备")
    @ExcelProperty(value = {"${title}", "是否绑定设备"})
    @ColumnWidth(10)
    private String isBind;
@@ -98,4 +98,27 @@
    @ExcelProperty(value = {"${title}", "控制器地址"})
    @ColumnWidth(15)
    private String rtuAddr;
    @Schema(title = "通讯协议")
    @ExcelIgnore
    private String protocol;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(title = "发现日期时间")
    @ExcelProperty(value = {"${title}", "发现时间"})
    @ColumnWidth(20)
    private Date findDt;
    /**
     * æ˜¯å¦åœ¨çº¿
     */
    @ExcelIgnore
    private Boolean isOnLine;
    @Schema(title = "绑定次数")
    @ExcelProperty(value = {"${title}", "绑定次数"})
    @ColumnWidth(10)
    private Integer bindNumber;
}
pipIrr-platform/pipIrr-global/src/main/resources/application-database(¿ª·¢²âÊÔ---µ¥Êý¾Ý¿â).yml
New file
@@ -0,0 +1,8 @@
# æ•°æ®æºé…ç½®
spring:
    #多数据源需要配置
    main:
        allow-bean-definition-overriding: true #设置为true时,后定义的bean会覆盖之前定义的相同名称的bean
    datasource: #配置数据源
        #多个数据源名称在此配置,要求与spring。datasource。[ym][pj]中的一致
        names: ym
pipIrr-platform/pipIrr-global/src/main/resources/application-global(¿ª·¢²âÊÔ---166PC»ú).yml
New file
@@ -0,0 +1,217 @@
logging:
    charset:
        console: UTF-8
    config:
        classpath: log4j2.yml
#禁用白标错误页面
server:
    error:
        whitelabel:
            enabled: false
    #servlet配置
    servlet:
        encoding:
            #取消默认的字符集编码
            enabled: true
            #设置强制使用指定字符编码集
            force: true
            #使用的字符编码
            charset: utf-8
# actuator配置,先include了全部,然后再exclude指定的endpoint
management:
    endpoints:
        web:
            exposure:
                include: '*'
                #exclude: beans
        .shutdown:
            enabled: true #是否开启/actuator/shutdown
# SpringDoc-OpenApi é…ç½®
springdoc:
    swagger-ui:
        #应用actuator时,访问: http://[IP]:[port]/actuator/swagger-ui/index.html ä¾‹å¦‚http://127.0.0.1:9080/actuator/swagger-ui/index.html
        #未用actuator时,访问: http://[IP]:[port]/[context]/swagger-ui/index.html ä¾‹å¦‚http://127.0.0.1:8080/[子系统上下文(base)]/swagger-ui/index.html
        path: /swagger-ui
        operationsSorter: method # HTTP æ–¹æ³•排序
        tagsSorter: alpha # API æŽ’序
    api-docs:
        path: /v3/apiDocs
        groups:
            enabled: true
    show-actuator: true #在actuator配置的端口及上下文中访问 SpringDoc-OpenApi
    use-management-port: true #应用actuator配置的端口,但上面的swagger-ui:path只会采用默认值swagger-ui
    packages-to-scan: com.dy
    #paths-to-match: /sys/**, /demo/**, /**
    paths-to-match:  /**
    web:
        title: å¤§ç¦¹èŠ‚æ°´ç®¡çŒç›‘æŽ§ç³»ç»ŸAPI
        description: å¤§ç¦¹èŠ‚æ°´ç®¡çŒç›‘æŽ§ç³»ç»ŸæœåŠ¡ç«¯ Restfull API
        version: v1.0.0
        license-name: å¤§ç¦¹èŠ‚æ°´ç ”ç©¶é™¢
#MybatisPlus é…ç½®æ—¥å¿—显示执行SQL
mybatis-plus:
    #匹配sql语句的映射文件的位置,classpath代表在resources下
    mapper-locations: classpath:mapper/*.xml
    #以下两个配置可以省略,在mapper映射文件中配置“@Mapper”也是可以的。
    #使用type-aliases-package中指定entity扫描包路径,让mybatis自动扫描自定义的entity
    #type-aliases-package: com.dy.pipIrrGlobal.daoBa
    configuration:
        #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #时而输出日志,时而不输出日志
        log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
        #开启驼峰uName自动映射到u_name
        #2023-10-24经实验,下面配置true或false,都能从u_name映射到uName
        #map-underscore-to-camel-case: true
        lazyLoadingEnabled: true # å¼€å¯å»¶æ—¶åŠ è½½å¼€å…³
        aggressiveLazyLoading: false # å°†ç§¯æžåŠ è½½æ”¹ä¸ºæ¶ˆæžåŠ è½½ï¼ˆå³æŒ‰éœ€åŠ è½½ï¼‰ï¼Œé»˜è®¤å€¼æ˜¯false
        lazy-load-trigger-methods: ""  # é˜»æŒ¡ä¸ç›¸å¹²çš„æ“ä½œè§¦å‘,实现懒加载
        cache-enabled: true  #打开全局缓存开关(二级环境),默认值是true
        default-enum-type-handler: com.dy.common.mybatis.envm.EnumCodeTypeHandler
pipIrr:
    global:
        dev: true  #是否开发阶段,true或false
        dsName: ym  #开发阶段,设置临时的数据库名称
    mw:
        webPort: 8070
        actutorPort: 9070
        idSuffix: 0
    sso:
        cacheMaximumSize: 10000 #登录用户缓存可缓存用户的最大值
        cacheDuration: 720  #缓存登录用户发呆最大时长(分钟)
        checkUrl: http://127.0.0.1:8079/sso/sso/ssoCheck
        webPort: 8079
        actutorPort: 9079
        idSuffix: 1
    base:
        webPort: 8080
        actutorPort: 9080
        idSuffix: 2
    remote:
        webPort: 8081
        actutorPort: 9081
        idSuffix: 3
    statistics:
        webPort: 8082
        actutorPort: 9082
        idSuffix: 4
    gis:
        webPort: 8083
        actutorPort: 9083
        idSuffix: 5
    demo:
        webPort: 8000
        actutorPort: 9000
        idSuffix: 99
    sell:
        webPort: 8084
        actutorPort: 9084
        idSuffix: 6
    project:
        webPort: 8085
        actutorPort: 9085
        idSuffix: 7
    irrigate:
        webPort: 8086
        actutorPort: 9086
        idSuffix: 8
    wechat:
        webPort: 8087
        actutorPort: 9087
        idSuffix: 9
    app:
        webPort: 8088
        actutorPort: 9088
        idSuffix: 10
    operation:
        webPort: 8089
        actutorPort: 9089
        idSuffix: 11
#项目编号
#projectCode:
#    ym: 100
#    pj: 101
#项目配置
project:
    #项目编码
    projectNo: 10
    #控制器类型
    controllerType: 57
    #默认行政区划编码(天津-天津市-武清区-京滨工业园-大禹节水)
    divisionCode: 120114403100
#通讯中间件相关配置
#protocol: DYJS_2023,DYJS_2024
mw:
    #命令发送地址(中缀是机构tag,其也是数据源后缀名称)
    ym:
        comSendUrl: "http://192.168.40.166:8070/rtuMw/com/send"
        rtuLogFileUrl: "http://127.0.0.1:8070/rtuMw/com/rtuLogFile"
        rtuLogTextUrl: "http://127.0.0.1:8070/rtuMw/com/rtuLogText"
    pj:
        comSendUrl: "http://127.0.0.1:8071/rtuMw/com/send"
        rtuLogFileUrl: "http://127.0.0.1:8071/rtuMw/com/rtuLogFile"
        rtuLogTextUrl: "http://127.0.0.1:8071/rtuMw/com/rtuLogText"
    test:
        comSendUrl: "http://127.0.0.1:8072/rtuMw/com/send"
        rtuLogFileUrl: "http://127.0.0.1:8072/rtuMw/com/rtuLogFile"
        rtuLogTextUrl: "http://127.0.0.1:8072/rtuMw/com/rtuLogText"
    #监测控制模块回调地址
    rtuCallbackUrl_rm: "http://127.0.0.1:8081/remote/comRes/receive"
    #微信小程序回调地址
    rtuCallbackUrl_wx: "http://127.0.0.1:8087/wx/comRes/receive"
#不进行userToken过滤的URL,@ConfigurationProperties要求tokennofilter中所有字母都小写
tokennofilter:
    urls:
        - /sso/sso
        - /remote/comRes/receive
        - /wx/comRes/receive
        - /app/captcha/get
#自动统计配置,自动统计定时任务会每天定时进行
auto-statistics:
    startHour: 0 #开始小时 0
    startMinute: 5 #开始分钟 5
#钉钉消息推送
dingtalk:
    ym:
        enable: true #是否启用
        robot:
            url: https://oapi.dingtalk.com/robot/send
            access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f
            secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7
        at-all: true
        mobile: 18602657034
    pj:
        enable: true #是否启用
        robot:
            url: https://oapi.dingtalk.com/robot/send
            access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f
            secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7
        at-all: true
        mobile: 18602657034
    test:
        enable: true #是否启用
        robot:
            url: https://oapi.dingtalk.com/robot/send
            access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f
            secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7
        at-all: true
        mobile: 18602657034
#阀控器参数
rtu:
    batteryVolt: 17
    signalIntensity:
        weak: 10
        ordinary: 20
#        strong: 20
#虚拟卡配置参数
vc:
    #虚拟卡最低余额报警值
    alarmValue: 10
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -143,7 +143,7 @@
    divisionCode: 120114403100
#通讯协议
#通讯中间件相关配置
#protocol: DYJS_2023,DYJS_2024
mw:
    #命令发送地址(中缀是机构tag,其也是数据源后缀名称)
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml
@@ -243,7 +243,7 @@
        AND rtus.isOnLine = #{isOnLine}
      </if>
      <if test = "bindNumber != null and bindNumber > 0">
        AND (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) = ${bindNumber}
        AND (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND operateType = 1) = ${bindNumber}
      </if>
    </where>
    ORDER BY con.operateDt DESC
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -225,16 +225,25 @@
    <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
        SELECT COUNT(*) AS recordCount
        FROM pr_intake ge
                 INNER JOIN pr_divide divi ON ge.divideId = divi.id
                 INNER JOIN ba_block blo ON divi.blockId = blo.id
                 LEFT JOIN ba_district country ON ge.countyId = country.id
                 LEFT JOIN ba_district town ON ge.townId = town.id
                 LEFT JOIN ba_district village ON ge.villageId = village.id
                 LEFT JOIN pr_controller cont ON ge.id = cont.intakeId
        INNER JOIN pr_divide divi ON ge.divideId = divi.id
        INNER JOIN ba_block blo ON divi.blockId = blo.id
        LEFT JOIN ba_district country ON ge.countyId = country.id
        LEFT JOIN ba_district town ON ge.townId = town.id
        LEFT JOIN ba_district village ON ge.villageId = village.id
        LEFT JOIN pr_controller cont ON ge.id = cont.intakeId
        left JOIN JSON_TABLE(
        <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
        #{onLineMap},
        '$[*]' COLUMNS(
        rtuAddr VARCHAR(20) PATH '$.rtuAddr',
        isOnLine BOOLEAN PATH '$.isOnLine'
        )
        ) rtus ON cont.rtuAddr = rtus.rtuAddr
        <where>
            ge.deleted = 0
              AND divi.deleted = 0
              and blo.deleted = 0
            AND divi.deleted = 0
            AND blo.deleted = 0
            AND cont.deleted = 0
            <if test="intakeName != null and intakeName != ''">
                AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
            </if>
@@ -257,6 +266,18 @@
            </if>
            <if test="address != null and address != ''">
                AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%')
            </if>
            <if test = "rtuAddr != null and rtuAddr !=''">
                AND cont.rtuAddr like CONCAT('%',#{rtuAddr},'%')
            </if>
            <if test="isOnLine != null and isOnLine !='' ">
                AND rtus.isOnLine = #{isOnLine}
            </if>
            <if test="protocol != null and protocol !='' ">
                AND cont.protocol = #{protocol}
            </if>
            <if test = "bindNumber != null and bindNumber > 0">
                AND (SELECT COUNT(*) FROM pr_intake_controller WHERE intakeId = ge.id AND operateType = 1) = ${bindNumber}
            </if>
        </where>
    </select>
@@ -271,6 +292,10 @@
               blo.`name`                                          AS blockName,
               CAST(cont.id AS char)                               AS controllerId,
               cont.rtuAddr                                        AS rtuAddr,
                cont.protocol                                       AS protocol,
                cont.findDt                                         AS findDt,
                rtus.isOnLine                                       AS isOnLine,
                (SELECT COUNT(*) FROM pr_intake_controller WHERE intakeId = ge.id AND operateType = 1) AS bindNumber,
               ge.lng,
               ge.lat,
               ge.remarks,
@@ -282,16 +307,25 @@
                   END)                                            AS isBind,
               CONCAT(country.`name`, town.`name`, village.`name`) AS address
        FROM pr_intake ge
                 INNER JOIN pr_divide divi ON ge.divideId = divi.id
                 INNER JOIN ba_block blo ON divi.blockId = blo.id
                 LEFT JOIN ba_district country ON ge.countyId = country.id
                 LEFT JOIN ba_district town ON ge.townId = town.id
                 LEFT JOIN ba_district village ON ge.villageId = village.id
                 LEFT JOIN pr_controller cont ON ge.id = cont.intakeId
                INNER JOIN pr_divide divi ON ge.divideId = divi.id
                INNER JOIN ba_block blo ON divi.blockId = blo.id
                LEFT JOIN ba_district country ON ge.countyId = country.id
                LEFT JOIN ba_district town ON ge.townId = town.id
                LEFT JOIN ba_district village ON ge.villageId = village.id
                LEFT JOIN pr_controller cont ON ge.id = cont.intakeId
                left JOIN JSON_TABLE(
                <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
                #{onLineMap},
                '$[*]' COLUMNS(
                rtuAddr VARCHAR(20) PATH '$.rtuAddr',
                isOnLine BOOLEAN PATH '$.isOnLine'
                )
                ) rtus ON cont.rtuAddr = rtus.rtuAddr
        <where>
            ge.deleted = 0
              AND divi.deleted = 0
              and blo.deleted = 0
            AND divi.deleted = 0
            AND blo.deleted = 0
            AND cont.deleted = 0
            <if test="intakeName != null and intakeName != ''">
                AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
            </if>
@@ -315,6 +349,18 @@
            <if test="address != null and address != ''">
                AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%')
            </if>
            <if test = "rtuAddr != null and rtuAddr !=''">
                AND cont.rtuAddr like CONCAT('%',#{rtuAddr},'%')
            </if>
            <if test="isOnLine != null and isOnLine !='' ">
                AND rtus.isOnLine = #{isOnLine}
            </if>
            <if test="protocol != null and protocol !='' ">
                AND cont.protocol = #{protocol}
            </if>
            <if test = "bindNumber != null and bindNumber > 0">
                AND (SELECT COUNT(*) FROM pr_intake_controller WHERE intakeId = ge.id AND operateType = 1) = ${bindNumber}
            </if>
        </where>
        ORDER BY ge.operateDt DESC
        <trim prefix="limit ">
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
@@ -450,5 +450,10 @@
<!--            OR rohrl.rtu_dt &gt; #{timeStop}-->
<!--        </if>-->
        ORDER BY rtu_dt ASC
        <trim prefix="limit ">
            <if test="start != null and count != null">
                #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
            </if>
        </trim>
    </select>
</mapper>
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -58,6 +58,7 @@
    private Environment env = null;
    private String pro_mw = "mw";
    private String key_mw = "comSendUrl";
    @Autowired
    public IntakeSv(Environment env) {
        this.env = env;
@@ -85,7 +86,7 @@
    Integer addIntake(PrIntake po) {
        Long villageId = Optional.ofNullable(po.getVillageId()).orElse(0L);
        if (villageId != 0){
        if (villageId != 0) {
            if (po.getTownId() == null || po.getTownId() == 0) {
                Long townId = getSupperByVillageId(po.getVillageId());
                po.setTownId(townId);
@@ -133,21 +134,41 @@
     * @return å–水口记录列表
     */
    public QueryResultVo<List<VoIntake>> getIntakes(QueryVo queryVo) {
//        String isBinded = queryVo.getIsBinded();
//
//        if(isBinded == null || isBinded.length() <= 0) {
//
//        }
        Command com = new Command();
        com.id = Command.defaultId;
        com.code = "LCD0001";
        com.type = "innerCommand";
        comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw);
        BaseResponse baseResponse = sendCom2Mw(com);
        JSONObject response = (JSONObject) JSON.toJSON(baseResponse);
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        Long itemTotal = prIntakeMapper.getRecordCount(params);
        if (response != null && response.getString("code").equals("0001")) {
            JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap");
            HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class);
        QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>();
        rsVo.pageSize = queryVo.pageSize;
        rsVo.pageCurr = queryVo.pageCurr;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = prIntakeMapper.getIntakes(params);
        return rsVo;
            JSONArray jsonArray = new JSONArray();
            for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("rtuAddr", entry.getKey());
                jsonObject.put("isOnLine", entry.getValue());
                jsonArray.add(jsonObject);
            }
            queryVo.setOnLineMap(jsonArray.toJSONString());
            Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
            Long itemTotal = prIntakeMapper.getRecordCount(params);
            QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>();
            rsVo.pageSize = queryVo.pageSize;
            rsVo.pageCurr = queryVo.pageCurr;
            rsVo.calculateAndSet(itemTotal, params);
            rsVo.obj = prIntakeMapper.getIntakes(params);
            return rsVo;
        } else {
            QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>();
            return rsVo;
        }
    }
    /**
@@ -226,17 +247,18 @@
    /**
     * èŽ·å–å–æ°´å£åˆ—è¡¨
     *
     * @return
     */
    public QueryResultVo<List<VoOnLineIntake>> selectOnLineIntakes(OnLineIntakesQO qo) {
        Command com = new Command() ;
        Command com = new Command();
        com.id = Command.defaultId;
        com.code = "LCD0001";
        com.type = "innerCommand";
        comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw);
        JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com));
        if(response != null && response.getString("code").equals("0001")) {
        if (response != null && response.getString("code").equals("0001")) {
            JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap");
            HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class);
@@ -249,12 +271,12 @@
            }
            qo.setOnLineMap(jsonArray.toJSONString());
            Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
            Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
            Long itemTotal = prIntakeMapper.getOnLineIntakesCount(params);
            QueryResultVo<List<VoOnLineIntake>> rsVo = new QueryResultVo<>() ;
            rsVo.pageSize = qo.pageSize ;
            rsVo.pageCurr = qo.pageCurr ;
            QueryResultVo<List<VoOnLineIntake>> rsVo = new QueryResultVo<>();
            rsVo.pageSize = qo.pageSize;
            rsVo.pageCurr = qo.pageCurr;
            rsVo.calculateAndSet(itemTotal, params);
            rsVo.obj = prIntakeMapper.getOnLineIntakes(params);
            return rsVo;
@@ -266,17 +288,18 @@
    /**
     * æ ¹æ®æ“ä½œå‘˜èŽ·å–å¸¸ç”¨å–æ°´å£
     *
     * @param operator
     * @return
     */
    public List<VoOnLineIntake> getUsedIntakes(Long operator) {
        Command com = new Command() ;
        Command com = new Command();
        com.id = Command.defaultId;
        com.code = "LCD0001";
        com.type = "innerCommand";
        JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com));
        if(response != null && response.getString("code").equals("0001")) {
        if (response != null && response.getString("code").equals("0001")) {
            JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap");
            HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class);
@@ -295,9 +318,10 @@
    /**
     * å‘送命令
     *
     * @return
     */
    protected BaseResponse sendCom2Mw(Command com){
    protected BaseResponse sendCom2Mw(Command com) {
        String url = UriComponentsBuilder.fromUriString(comSendUrl)
                .build()
                .toUriString();
@@ -316,6 +340,7 @@
    /**
     * å–水口名称换取水口ID,验证是否重复名称使用
     *
     * @param intakeName
     * @return
     */
@@ -325,6 +350,7 @@
    /**
     * å–水口名称换取水口ID,验证是否重复名称使用
     *
     * @param intakeName
     * @return
     */
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java
@@ -2,6 +2,8 @@
import com.dy.common.webUtil.QueryConditionVo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.*;
/**
@@ -34,4 +36,25 @@
    @Schema(description = "地址")
    public String address;
    @Schema(description = "控制器地址")
    private String rtuAddr;
    /**
     * ä¸­é—´ä»¶è¿”回的RTU在线情况对象数组
     */
    private String onLineMap;
    /**
     * æ˜¯å¦åœ¨çº¿
     */
    @Max(value = 1,message = "是否在线仅允许为真或假")
    @Min(value = 0,message = "是否在线仅允许为真或假")
    private Boolean isOnLine;
    @Schema(description = "通信协议")
    private String protocol;
    @Schema(description = "绑定次数")
    public Integer bindNumber;
}