2024-07-03 朱宝民 小程序远程开阀支持扫码开阀
| | |
| | | * @return |
| | | */ |
| | | List<VoOnLineIntake> getUsedIntakes(@Param("onLineMap") String onLineMap, @Param("operator") Long operator); |
| | | |
| | | /** |
| | | * 取水口名称换取水口ID,扫码开阀使用 |
| | | * @param intakeName |
| | | * @return |
| | | */ |
| | | Long getIntakeIdByName(String intakeName); |
| | | } |
| | |
| | | #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: |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--取水口名称换取水口ID,扫码开阀使用--> |
| | | <select id="getIntakeIdByName" resultType="java.lang.Long"> |
| | | SELECT id AS intakeId FROM pr_intake WHERE `name` = #{intakeName} |
| | | </select> |
| | | </mapper> |
| | |
| | | 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: |
| | |
| | | return rmCommandHistoryMapper.updateByPrimaryKeySelective(po); |
| | | } |
| | | |
| | | /** |
| | | * 取水口名称换取水口ID,扫码开阀使用 |
| | | * @param intakeName |
| | | * @return |
| | | */ |
| | | public Long getIntakeIdByName(String intakeName) { |
| | | return prIntakeMapper.getIntakeIdByName(intakeName); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | 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获取与之绑定的虚拟卡 |
| | |
| | | /** |
| | | * 取水口ID |
| | | */ |
| | | @NotNull(message = "取水口不能为空") |
| | | private Long intakeId; |
| | | |
| | | /** |
| | | * 取水口名称 |
| | | */ |
| | | private String intakeName; |
| | | |
| | | /** |
| | | * 操作人 |
| | | */ |
| | | @NotNull(message = "操作人不能为空") |
| | |
| | | */ |
| | | private Long vcId; |
| | | |
| | | /** |
| | | * 用户类型 1-平台,2-APP |
| | | */ |
| | | //@NotNull(message = "操作类型不能为空") |
| | | //private Integer userType; |
| | | } |
| | |
| | | */ |
| | | 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 |