Administrator
2024-07-03 dc8008be8836c212f17fa29df7eac52a8fe716c4
2024-07-03 朱宝民 小程序远程开阀支持扫码开阀
9个文件已修改
59 ■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/dto/DtoBase.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/dto/ValveOpen.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/result/WechatResultCode.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java
@@ -132,4 +132,11 @@
     * @return
     */
    List<VoOnLineIntake> getUsedIntakes(@Param("onLineMap") String onLineMap, @Param("operator") Long operator);
    /**
     * 取水口名称换取水口ID,扫码开阀使用
     * @param intakeName
     * @return
     */
    Long getIntakeIdByName(String intakeName);
}
pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml
@@ -5,9 +5,9 @@
            #name: ym
            type: com.alibaba.druid.pool.DruidDataSource
            driverClassName: com.mysql.cj.jdbc.Driver
            url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
#            url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
#            url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
#            url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
            url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
            username: root
            password: dysql,;.abc!@#
            druid:
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -437,4 +437,9 @@
      </if>
    </where>
  </select>
  <!--取水口名称换取水口ID,扫码开阀使用-->
  <select id="getIntakeIdByName" resultType="java.lang.Long">
    SELECT id AS intakeId FROM pr_intake WHERE `name` = #{intakeName}
  </select>
</mapper>
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
@@ -3,9 +3,9 @@
    datasource: #配置数据源
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
#        url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
#        url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
#        url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
        url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
        username: root
        password: dysql,;.abc!@#
        druid:
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java
@@ -136,5 +136,13 @@
        return rmCommandHistoryMapper.updateByPrimaryKeySelective(po);
    }
    /**
     * 取水口名称换取水口ID,扫码开阀使用
     * @param intakeName
     * @return
     */
    public Long getIntakeIdByName(String intakeName) {
        return prIntakeMapper.getIntakeIdByName(intakeName);
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -70,10 +70,23 @@
        }
        Long intakeId = valve.getIntakeId();
        String intakeName = valve.getIntakeName();
        Long vcId = valve.getVcId();
        Long operator = valve.getOperator();
        Long comId = idLongGenerator.generate();
        if(intakeId == null && intakeName == null) {
            return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_INTAKE.getMessage());
        }
        // intakeName换intakeId
        if(intakeId == null) {
            intakeId = commandSv.getIntakeIdByName(intakeName);
            if(intakeId == null) {
                return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_INTAKE.getMessage());
            }
        }
        /**
         * 如果农户选择了虚拟卡,则使用该虚拟卡
         * 如果农户未选择虚拟卡,则根据取水口ID获取与之绑定的虚拟卡
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/dto/DtoBase.java
@@ -17,10 +17,14 @@
    /**
     * 取水口ID
     */
    @NotNull(message = "取水口不能为空")
    private Long intakeId;
    /**
     * 取水口名称
     */
    private String intakeName;
    /**
     * 操作人
     */
    @NotNull(message = "操作人不能为空")
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/dto/ValveOpen.java
@@ -20,9 +20,4 @@
     */
    private Long vcId;
    /**
     * 用户类型 1-平台,2-APP
     */
    //@NotNull(message = "操作类型不能为空")
    //private Integer userType;
}
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/result/WechatResultCode.java
@@ -19,9 +19,10 @@
     */
    GET_RESULT_IN_ONE_MINUTE(10001,"1分钟后去查看结果"),
    GET_RESULT_ERROR(10002, "获取结果异常"),
    PLEASE_SELECT_A_VC(10002, "请选择一张虚拟卡"),
    IN_USE_VC_CANNOT_OPEN_VALVE(10002, "使用中虚拟卡不能用来开阀"),
    THE_DEVICE_DOES_NOT_HAVE_THIS_FUNCTION(10003, "该设备无此同能"),
    PLEASE_SELECT_A_VC(10003, "请选择一张虚拟卡"),
    PLEASE_SELECT_A_INTAKE(10004, "请选择一个取水口"),
    IN_USE_VC_CANNOT_OPEN_VALVE(10005, "使用中虚拟卡不能用来开阀"),
    THE_DEVICE_DOES_NOT_HAVE_THIS_FUNCTION(10006, "该设备无此同能"),
    /**
     * RTU