Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRole; |
| | | import com.dy.pipIrrGlobal.voBa.VoRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | int updateByPrimaryKey(BaRole record); |
| | | |
| | | /** |
| | | * 查询某个用户所隶属于的角色 |
| | | * @param userId 用户ID |
| | | * @return List<BaRole> |
| | | */ |
| | | List<BaRole> selectByUserId(@Param("userId") Long userId) ; |
| | | |
| | | /** |
| | | * 根据角色名称查询记录数量 |
| | | * @param roleName |
| | | * @return |
| | | */ |
| | | Integer getRecordCountByName(@Param("roleName") String roleName); |
| | | |
| | | /** |
| | | * 根据指定条件获取角色记录数 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Long getRecordCount(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据指定条件获取角色记录 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoRole> getRoles(Map<?, ?> params); |
| | | ///** |
| | | // * 根据指定条件获取角色记录数 |
| | | // * @param params |
| | | // * @return |
| | | // */ |
| | | //Long getRecordCount(Map<?, ?> params); |
| | | // |
| | | ///** |
| | | // * 根据指定条件获取角色记录 |
| | | // * @param params |
| | | // * @return |
| | | // */ |
| | | //List<VoRole> getRoles(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据roleId逻辑删除角色对象 |
| | |
| | | package com.dy.pipIrrGlobal.daoBa; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions; |
| | | import com.dy.pipIrrGlobal.voBa.VoRole; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @return |
| | | */ |
| | | int delPermissionsByRoleId(@Param("roleId") Long roleId); |
| | | |
| | | /** |
| | | * 根据指定条件获取角色记录数 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Long getRecordCount(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据指定条件获取角色记录 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoRole> getRoles(Map<?, ?> params); |
| | | } |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 9:59 |
| | | * @LastEditTime 2024-01-02 16:22 |
| | | * @date 2024-01-15 16:51 |
| | | * @LastEditTime 2024-01-15 16:51 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | |
| | | /** |
| | | * 根据控制器编号获取控制器列表 |
| | | * @param controllerCode |
| | | * @param rtuAddr |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getControllersByCode(@Param("controllerCode") String controllerCode); |
| | | List<Map<String, Object>> getControllersByCode(@Param("rtuAddr") String rtuAddr); |
| | | |
| | | /** |
| | | * 根据控制器编号逻辑删除控制 |
| | |
| | | package com.dy.pipIrrGlobal.daoPr; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrIntake; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.voPr.VoIntake; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | |
| | | /** |
| | | * 根据监测站编号删除监测站 |
| | | * |
| | | * @param flowMonitoringId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据监测站编号获取未删除的监测站数量 |
| | | * |
| | | * @param flowMonitoringId |
| | | * @return |
| | | */ |
| | | Integer getRecordCountOfFlowMonitoring(@Param("flowMonitoringId") Long flowMonitoringId); |
| | | Integer getRecordCountOfFlowMonitoringByFlowMonitoringId(@Param("flowMonitoringId") Long flowMonitoringId); |
| | | |
| | | /** |
| | | * 根据监测站 名称 绑定状态 获取未删除的监测站数量 |
| | | * |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Integer getRecordCountOfFlowMonitoring(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据指定条件获取流量监测站实体记录 |
| | | * |
| | | * @param params |
| | | * @return 实体集合 |
| | | */ |
| | | List<VoFlowMonitoring> getPrFlowMonitoring(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 查询全部流量监测站实体记录 |
| | | * |
| | | * @return 实体集合 |
| | | */ |
| | | List<PrFlowMonitoring> selectAll(); |
| | | |
| | | |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.daoPr; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @param flowmeterId |
| | | * @return |
| | | */ |
| | | Integer getRecordCountOfFlowmeter(@Param("flowmeterId") Long flowmeterId); |
| | | Integer getRecordCountOfFlowmeterByCode(@Param("flowmeterId") Long flowmeterId); |
| | | |
| | | /** |
| | | * 根据流量计 编号 在线状态 获取未删除的流量计数量 |
| | | * |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Integer getRecordCountOfFlowMeterByOthers(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据指定条件获取流量计实体记录 |
| | | * |
| | | * @param params |
| | | * @return 实体集合 |
| | | */ |
| | | List<VoFlowMeter> getFlowMeters(Map<?, ?> params); |
| | | } |
| | |
| | | import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-01-05 10:18 |
| | |
| | | * @return 符合条件记录数量 |
| | | */ |
| | | Integer getBindRecordCount(@Param("monitoringId") Long monitoringId, @Param("flowmeterId") Long flowmeterId, @Param("operateType") Byte operateType); |
| | | |
| | | /** |
| | | * 根据 流量监测站编号 获取 绑定记录 按操作时间降序 |
| | | * @param monitoringId 监测站编号 |
| | | * @return 绑定记录 |
| | | */ |
| | | List<Map<String, Object>> getBingRecordsByMonitoringId(Long monitoringId); |
| | | } |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "角色实体") |
| | | public class BaRole implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151511001L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String name; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | * @Description |
| | | */ |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import jakarta.validation.constraints.Size; |
| | | import lombok.*; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "角色权限实体") |
| | | public class BaRolePermissions implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151612001L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private Long roleid; |
| | | |
| | | /** |
| | | * 角色名称 |
| | | */ |
| | | @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Size(max = 20) |
| | | private String roleName; |
| | | |
| | | /** |
| | | * 权限列表 |
| | | */ |
| | | @Schema(description = "权限列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "权限列表不能为空") |
| | | private String permissions; |
| | | @TableField(typeHandler = JacksonTypeHandler.class) |
| | | private JSONArray permissions; |
| | | } |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 9:59 |
| | | * @LastEditTime 2023-12-29 9:59 |
| | | * @date 2024-01-15 16:51 |
| | | * @LastEditTime 2024-01-15 16:51 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "控制器实体") |
| | | public class PrController implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151517001L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | * 控制器地址 |
| | | */ |
| | | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "控制器编号不能为空") |
| | | @Length(message = "控制器编号不大于{max}字",max = 25) |
| | | private String code; |
| | | @Schema(description = "控制器地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "控制器地址不能为空") |
| | | @Length(message = "控制器地址不大于{max}字",max = 11) |
| | | private String rtuaddr; |
| | | |
| | | /** |
| | | * 通讯协议 |
| | |
| | | private Byte addways; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "分水房实体") |
| | | public class PrDivide implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151517002L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人编号不能为空") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人ID不能为空") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "流量监测站实体") |
| | | public class PrFlowMonitoring implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151517004L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人编号不能为空") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人ID不能为空") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "流量计实体") |
| | | public class PrFlowmeter implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151517003L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private Byte addways; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "取水口实体") |
| | | public class PrIntake implements BaseEntity { |
| | | public static final long serialVersionUID = 202312260931001L; |
| | | public static final long serialVersionUID = 202401151517005L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人编号不能为空") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人ID不能为空") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "取水口捆绑实体") |
| | | public class PrIntakeController implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151517006L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "监测站流量计关联实体") |
| | | public class PrMonitoringFlowmeter implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151517007L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "开卡/补卡实体") |
| | | public class SeActiveCard implements BaseEntity { |
| | | public static final long serialVersionUID = 202312071927001L; |
| | | public static final long serialVersionUID = 202401151518001L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡注销实体") |
| | | public class SeCancel implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151518002L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "农户实体") |
| | | public class SeClient implements BaseEntity { |
| | | public static final long serialVersionUID = 202311141539001L; |
| | | public static final long serialVersionUID = 202401151518003L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人编号不能为空") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人ID不能为空") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "农户水卡实体") |
| | | public class SeClientCard implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151518004L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | @Schema(name = "挂失实体") |
| | | |
| | | public class SeLoss implements BaseEntity { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | public static final long serialVersionUID = 202401151518005L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "付款方式实体") |
| | | public class SePaymentMethod implements BaseEntity { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | public static final long serialVersionUID = 202401151518006L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | @Schema(name = "水卡充值实体") |
| | | public class SeRecharge implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | public static final long serialVersionUID = 202401151519001L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡充值历史实体") |
| | | public class SeRechargeHistory implements BaseEntity { |
| | | public static final long serialVersionUID = 202312080812001L; |
| | | public static final long serialVersionUID = 202401151519002L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡冲正实体") |
| | | public class SeReversal implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151519003L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡解锁实体") |
| | | public class SeUnlock implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151519004L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | * 操作人ID |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人ID必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "电子钱包表实体") |
| | | public class SeWallet implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | public static final long serialVersionUID = 202401151519005L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | */ |
| | | private String remarks; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getWalletid() { |
| | | return walletid; |
| | | } |
| | | |
| | | public void setWalletid(Long walletid) { |
| | | this.walletid = walletid; |
| | | } |
| | | |
| | | public Long getClientid() { |
| | | return clientid; |
| | | } |
| | | |
| | | public void setClientid(Long clientid) { |
| | | this.clientid = clientid; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(Double money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public Double getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(Double amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public Double getAfterrecharge() { |
| | | return afterrecharge; |
| | | } |
| | | |
| | | public void setAfterrecharge(Double afterrecharge) { |
| | | this.afterrecharge = afterrecharge; |
| | | } |
| | | |
| | | public Date getRechargedt() { |
| | | return rechargedt; |
| | | } |
| | | |
| | | public void setRechargedt(Date rechargedt) { |
| | | this.rechargedt = rechargedt; |
| | | } |
| | | |
| | | public String getRemarks() { |
| | | return remarks; |
| | | } |
| | | |
| | | public void setRemarks(String remarks) { |
| | | this.remarks = remarks; |
| | | } |
| | | } |
| | |
| | | * 备注信息 |
| | | */ |
| | | private String remarks; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getWalletid() { |
| | | return walletid; |
| | | } |
| | | |
| | | public void setWalletid(Long walletid) { |
| | | this.walletid = walletid; |
| | | } |
| | | |
| | | public Long getClientid() { |
| | | return clientid; |
| | | } |
| | | |
| | | public void setClientid(Long clientid) { |
| | | this.clientid = clientid; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(Double money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public Double getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(Double amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public Double getAfterrecharge() { |
| | | return afterrecharge; |
| | | } |
| | | |
| | | public void setAfterrecharge(Double afterrecharge) { |
| | | this.afterrecharge = afterrecharge; |
| | | } |
| | | |
| | | public Date getRechargedt() { |
| | | return rechargedt; |
| | | } |
| | | |
| | | public void setRechargedt(Date rechargedt) { |
| | | this.rechargedt = rechargedt; |
| | | } |
| | | |
| | | public String getRemarks() { |
| | | return remarks; |
| | | } |
| | | |
| | | public void setRemarks(String remarks) { |
| | | this.remarks = remarks; |
| | | } |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.voBa; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | |
| | | public class VoRole implements BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(title = "ID") |
| | | private Long id; |
| | | |
| | | @Schema(title = "角色编号") |
| | | private Long roleId; |
| | | private String roleId; |
| | | |
| | | @Schema(title = "角色名称") |
| | | private String roleName; |
| | | |
| | | @Schema(title = "权限ID") |
| | | private Long perId; |
| | | |
| | | @Schema(title = "权限列表") |
| | | private String permissions; |
| | | private JSONArray permissions; |
| | | |
| | | @Schema(title = "操作人") |
| | | private String operator; |
| | |
| | | @ColumnWidth(10) |
| | | private Long id; |
| | | |
| | | @Schema(title = "控制器编号") |
| | | @ExcelProperty("控制器编号") |
| | | @Schema(title = "控制器地址") |
| | | @ExcelProperty("控制器地址") |
| | | @ColumnWidth(15) |
| | | private String controllerCode; |
| | | private String rtuAddr; |
| | | |
| | | @Schema(title = "在线状态") |
| | | @ExcelProperty("在线状态") |
| | |
| | | @Schema(title = "分水房编号") |
| | | @ExcelProperty("分水房编号") |
| | | @ColumnWidth(15) |
| | | private Long divideId; |
| | | private String divideId; |
| | | |
| | | @Schema(title = "分水房名称") |
| | | @ExcelProperty("分水房名称") |
| New file |
| | |
| | | package com.dy.pipIrrGlobal.voPr; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :WuZeYu |
| | | * @Date :2024/1/15 10:58 |
| | | * @LastEditTime :2024/1/15 10:58 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @Schema(title = "流量计视图对象") |
| | | public class VoFlowMeter implements BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(title = "ID") |
| | | @ExcelProperty("ID") |
| | | @ColumnWidth(10) |
| | | private Long id; |
| | | |
| | | @Schema(title = "管网流量计编号") |
| | | @ExcelProperty("管网流量计编号") |
| | | @ColumnWidth(15) |
| | | private String code; |
| | | |
| | | @Schema(title = "在线状态") |
| | | @ExcelProperty("在线状态") |
| | | @ColumnWidth(1) |
| | | private Integer onlineState; |
| | | |
| | | @Schema(title = "管网流量监测站名称") |
| | | @ExcelProperty("管网流量监测站名称") |
| | | @ColumnWidth(15) |
| | | private String name; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "操作时间") |
| | | @ExcelProperty("操作时间") |
| | | @ColumnWidth(30) |
| | | private Date operateDt; |
| | | } |
| | |
| | | lazy-load-trigger-methods: "" # 阻挡不相干的操作触发,实现懒加载 |
| | | cache-enabled: true #打开全局缓存开关(二级环境),默认值是true |
| | | default-enum-type-handler: com.dy.common.mybatis.envm.EnumCodeTypeHandler |
| | | type-handlers-package: com.dy.pipIrrGlobal.pojoBa.MySqlJsonHandler |
| | | |
| | | pipIrr: |
| | | global: |
| | |
| | | <?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.daoBa.BaRoleMapper"> |
| | | <!-- <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaRole">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- <!–@Table ba_role–>--> |
| | | <!-- <id column="id" jdbcType="BIGINT" property="id" />--> |
| | | <!-- <result column="name" jdbcType="VARCHAR" property="name" />--> |
| | | <!-- <result column="operator" jdbcType="BIGINT" property="operator" />--> |
| | | <!-- <result column="operate_dt" jdbcType="TIMESTAMP" property="operateDt" />--> |
| | | <!-- <result column="deleted" jdbcType="TINYINT" property="deleted" />--> |
| | | <!-- </resultMap>--> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaRole"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ba_role--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operate_dt" jdbcType="TIMESTAMP" property="operateDt" /> |
| | | <result column="deleted" jdbcType="TINYINT" property="deleted" /> |
| | | <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.envm.EnumCodeTypeHandler" javaType="com.dy.common.mybatis.envm.Deleted"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="partResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaRole"> |
| | | <result column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operate_dt" jdbcType="TIMESTAMP" property="operateDt" /> |
| | | </resultMap> |
| | | |
| | | <!-- <resultMap id="someResultMap" extends="partResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaRole">--> |
| | | <!-- <collection property="priviList" fetchType="eager" column="{roleId=id}" select="com.dy.pipIrrGlobal.daoBa.BaPrivilegeMapper.selectPrivilegeByRoleId" />--> |
| | | <!-- </resultMap>--> |
| | | |
| | | <sql id="part_Column_List"> |
| | | id, name, operator, operate_dt, deleted |
| | | </sql> |
| | | |
| | | <select id="selectByUserId" resultMap="partResultMap"> |
| | | select <include refid="part_Column_List" /> |
| | | from ba_role r |
| | | inner join ba_user_role ur on r.id = ur.roleId |
| | | where r.deleted != 1 |
| | | <if test="userId != null"> |
| | | and ur.userId = #{userId,jdbcType=BIGINT} |
| | | </if> |
| | | </select> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, `name`, `operator`, operate_dt, deleted |
| | |
| | | from ba_role |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ba_role |
| | |
| | | WHERE name = #{roleName} |
| | | </select> |
| | | |
| | | <!--根据指定条件获取角色记录数--> |
| | | <select id="getRecordCount" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM ba_role role |
| | | LEFT JOIN ba_role_permissions per ON per.roleId = role.id |
| | | <where> |
| | | AND role.deleted = 0 |
| | | <!-- <!–根据指定条件获取角色记录数–>--> |
| | | <!-- <select id="getRecordCount" resultType="java.lang.Long">--> |
| | | <!-- SELECT--> |
| | | <!-- COUNT(*) AS recordCount--> |
| | | <!-- FROM ba_role role--> |
| | | <!-- LEFT JOIN ba_role_permissions per ON per.roleId = role.id--> |
| | | <!-- <where>--> |
| | | <!-- AND role.deleted = 0--> |
| | | |
| | | <if test = "roleId != null and roleId > 0"> |
| | | AND role.id = ${roleId} |
| | | </if> |
| | | <!-- <if test = "roleId != null and roleId > 0">--> |
| | | <!-- AND role.id = ${roleId}--> |
| | | <!-- </if>--> |
| | | |
| | | <if test = "roleName != null and roleName !=''"> |
| | | AND role.name LIKE CONCAT('%',#{roleName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <!-- <if test = "roleName != null and roleName !=''">--> |
| | | <!-- AND role.name LIKE CONCAT('%',#{roleName},'%')--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <!-- </select>--> |
| | | |
| | | <!--根据指定条件获取角色记录--> |
| | | <select id="getRoles" resultType="com.dy.pipIrrGlobal.voBa.VoRole"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | t.* FROM |
| | | ( |
| | | SELECT |
| | | role.id AS roleId, |
| | | role.name AS roleName, |
| | | per.permissions, |
| | | (SELECT `name` FROM ba_user WHERE id = role.operator) AS operator, |
| | | role.operate_dt AS operateDt |
| | | FROM ba_role role |
| | | LEFT JOIN ba_role_permissions per ON per.roleId = role.id |
| | | <where> |
| | | AND role.deleted = 0 |
| | | <!-- <!–根据指定条件获取角色记录–>--> |
| | | <!-- <select id="getRoles" resultType="com.dy.pipIrrGlobal.voBa.VoRole">--> |
| | | <!-- SELECT--> |
| | | <!-- (@i:=@i+1) AS id,--> |
| | | <!-- t.* FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- role.id AS roleId,--> |
| | | <!-- role.name AS roleName,--> |
| | | <!-- per.permissions,--> |
| | | <!-- (SELECT `name` FROM ba_user WHERE id = role.operator) AS operator,--> |
| | | <!-- role.operate_dt AS operateDt--> |
| | | <!-- FROM ba_role role--> |
| | | <!-- LEFT JOIN ba_role_permissions per ON per.roleId = role.id--> |
| | | <!-- <where>--> |
| | | <!-- AND role.deleted = 0--> |
| | | |
| | | <if test = "roleId != null and roleId > 0"> |
| | | AND role.id = ${roleId} |
| | | </if> |
| | | <!-- <if test = "roleId != null and roleId > 0">--> |
| | | <!-- AND role.id = ${roleId}--> |
| | | <!-- </if>--> |
| | | |
| | | <if test = "roleName != null and roleName !=''"> |
| | | AND role.name LIKE CONCAT('%',#{roleName},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY role.operate_dt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | ) t |
| | | , (SELECT @i:=0) AS itable |
| | | </select> |
| | | <!-- <if test = "roleName != null and roleName !=''">--> |
| | | <!-- AND role.name LIKE CONCAT('%',#{roleName},'%')--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <!-- ORDER BY role.operate_dt DESC--> |
| | | <!-- <if test="pageCurr != null and pageSize != null">--> |
| | | <!-- LIMIT ${pageCurr}, ${pageSize}--> |
| | | <!-- </if>--> |
| | | <!-- ) t--> |
| | | <!-- , (SELECT @i:=0) AS itable--> |
| | | <!-- </select>--> |
| | | |
| | | <!--根据roleId逻辑删除角色对象--> |
| | | <update id="deleteRoleById"> |
| | |
| | | <!--@Table ba_role_permissions--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="roleId" jdbcType="BIGINT" property="roleid" /> |
| | | <result column="permissions" jdbcType="VARCHAR" property="permissions" /> |
| | | <!-- <result column="permissions" jdbcType="VARCHAR" property="permissions" />--> |
| | | <result column="permissions" property="permissions" jdbcType="JAVA_OBJECT" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, roleId, permissions |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | |
| | | <!--@mbg.generated--> |
| | | insert into ba_role_permissions (id, roleId, permissions |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{roleid,jdbcType=BIGINT}, #{permissions,jdbcType=VARCHAR} |
| | | values (#{id,jdbcType=BIGINT}, #{roleid,jdbcType=BIGINT}, #{permissions,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | #{roleid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="permissions != null"> |
| | | #{permissions,jdbcType=VARCHAR}, |
| | | #{permissions,jdbcType=JAVA_OBJECT,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | roleId = #{roleid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="permissions != null"> |
| | | permissions = #{permissions,jdbcType=VARCHAR}, |
| | | permissions = #{permissions,jdbcType=JAVA_OBJECT,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | <!--@mbg.generated--> |
| | | update ba_role_permissions |
| | | set roleId = #{roleid,jdbcType=BIGINT}, |
| | | permissions = #{permissions,jdbcType=VARCHAR} |
| | | permissions = #{permissions,jdbcType=JAVA_OBJECT,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据指定条件获取角色记录数--> |
| | | <select id="getRecordCount" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM ba_role role |
| | | LEFT JOIN ba_role_permissions per ON per.roleId = role.id |
| | | <where> |
| | | AND role.deleted = 0 |
| | | |
| | | <if test = "roleId != null and roleId > 0"> |
| | | AND role.id = ${roleId} |
| | | </if> |
| | | |
| | | <if test = "roleName != null and roleName !=''"> |
| | | AND role.name LIKE CONCAT('%',#{roleName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取角色记录--> |
| | | <select id="getRoles" resultType="com.dy.pipIrrGlobal.voBa.VoRole"> |
| | | SELECT |
| | | |
| | | CAST(role.id AS char) AS roleId, |
| | | role.name AS roleName, |
| | | per.id AS perId, |
| | | (SELECT `name` FROM ba_user WHERE id = role.operator) AS operator, |
| | | role.operate_dt AS operateDt |
| | | FROM ba_role role |
| | | LEFT JOIN ba_role_permissions per ON per.roleId = role.id |
| | | <where> |
| | | AND role.deleted = 0 |
| | | |
| | | <if test = "roleId != null and roleId > 0"> |
| | | AND role.id = ${roleId} |
| | | </if> |
| | | |
| | | <if test = "roleName != null and roleName !=''"> |
| | | AND role.name LIKE CONCAT('%',#{roleName},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY role.operate_dt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table pr_controller--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="code" jdbcType="VARCHAR" property="code" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="protocol" jdbcType="VARCHAR" property="protocol" /> |
| | | <result column="onlineState" jdbcType="TINYINT" property="onlinestate" /> |
| | | <result column="reportTime" jdbcType="TIMESTAMP" property="reporttime" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, code, protocol, onlineState, reportTime, addWays, `operator`, operateDt, deleted |
| | | id, rtuAddr, protocol, onlineState, reportTime, addWays, `operator`, operateDt, deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | delete from pr_controller |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_controller (id, code, protocol, |
| | | insert into pr_controller (id, rtuAddr, protocol, |
| | | onlineState, reportTime, addWays, |
| | | `operator`, operateDt, deleted |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, |
| | | values (#{id,jdbcType=BIGINT}, #{rtuaddr,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, |
| | | #{onlinestate,jdbcType=TINYINT}, #{reporttime,jdbcType=TIMESTAMP}, #{addways,jdbcType=TINYINT}, |
| | | #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_controller |
| | |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="code != null"> |
| | | code, |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | protocol, |
| | |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="code != null"> |
| | | #{code,jdbcType=VARCHAR}, |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | #{protocol,jdbcType=VARCHAR}, |
| | |
| | | <!--@mbg.generated--> |
| | | update pr_controller |
| | | <set> |
| | | <if test="code != null"> |
| | | code = #{code,jdbcType=VARCHAR}, |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | update pr_controller |
| | | set code = #{code,jdbcType=VARCHAR}, |
| | | set rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | onlineState = #{onlinestate,jdbcType=TINYINT}, |
| | | reportTime = #{reporttime,jdbcType=TIMESTAMP}, |
| | |
| | | <!--根据指定获取控制器记录数--> |
| | | <select id="getRecordCount" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | COUNT(*) AS recordCount |
| | | FROM pr_controller con |
| | | INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id |
| | | INNER JOIN pr_intake inta ON ic.intakeId = inta.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | AND ic.operateType = 1 |
| | | |
| | |
| | | AND con.id = ${id} |
| | | </if> |
| | | |
| | | <if test = "controllerCode != null and controllerCode !=''"> |
| | | AND con.code like CONCAT('%',#{controllerCode},'%') |
| | | <if test = "rtuAddr != null and rtuAddr !=''"> |
| | | AND con.rtuAddr like CONCAT('%',#{rtuAddr},'%') |
| | | </if> |
| | | |
| | | <if test = "onlineState != null and onlineState > 0"> |
| | |
| | | <!--根据指定获取控制器记录--> |
| | | <select id="getControllers" resultType="com.dy.pipIrrGlobal.voPr.VoController"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | t.* FROM( |
| | | SELECT |
| | | con.code AS controllerCode, |
| | | (CASE |
| | | WHEN con.onlineState = 1 THEN "在线" |
| | | WHEN con.onlineState = 2 THEN "离线" |
| | | END) AS onlineState, |
| | | inta.name AS intakeName, |
| | | (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) AS bindNumber, |
| | | con.reportTime |
| | | FROM pr_controller con |
| | | INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id |
| | | INNER JOIN pr_intake inta ON ic.intakeId = inta.id |
| | | <where> |
| | | AND ic.operateType = 1 |
| | | con.rtuAddr AS rtuAddr, |
| | | (CASE |
| | | WHEN con.onlineState = 1 THEN "在线" |
| | | WHEN con.onlineState = 2 THEN "离线" |
| | | END) AS onlineState, |
| | | inta.name AS intakeName, |
| | | (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) AS bindNumber, |
| | | con.reportTime |
| | | FROM pr_controller con |
| | | INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id |
| | | INNER JOIN pr_intake inta ON ic.intakeId = inta.id |
| | | <where> |
| | | AND ic.operateType = 1 |
| | | |
| | | <if test = "id != null and id > 0"> |
| | | AND con.id = ${id} |
| | | </if> |
| | | <if test = "id != null and id > 0"> |
| | | AND con.id = ${id} |
| | | </if> |
| | | |
| | | <if test = "controllerCode != null and controllerCode !=''"> |
| | | AND con.code like CONCAT('%',#{controllerCode},'%') |
| | | </if> |
| | | <if test = "rtuAddr != null and rtuAddr !=''"> |
| | | AND con.rtuAddr like CONCAT('%',#{rtuAddr},'%') |
| | | </if> |
| | | |
| | | <if test = "onlineState != null and onlineState > 0"> |
| | | AND con.onlineState = ${onlineState} |
| | | </if> |
| | | <if test = "onlineState != null and onlineState > 0"> |
| | | AND con.onlineState = ${onlineState} |
| | | </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} |
| | | </if> |
| | | </where> |
| | | ORDER BY con.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | ) t |
| | | , (SELECT @i:=0) AS itable |
| | | <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} |
| | | </if> |
| | | </where> |
| | | ORDER BY con.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!--根据控制器编号获取控制器列表--> |
| | | <select id="getControllersByCode" resultType="java.util.Map"> |
| | | SELECT id, code FROM pr_controller WHERE code LIKE CONCAT('%',#{controllerCode},'%') |
| | | SELECT id, rtuAddr FROM pr_controller WHERE rtuAddr LIKE CONCAT('%',#{rtuAddr},'%') |
| | | </select> |
| | | |
| | | <!--根据控制器编号逻辑删除控制--> |
| | |
| | | <select id="getDivides" resultType="com.dy.pipIrrGlobal.voPr.VoDivide"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | divi.id AS divideId, |
| | | CAST(divi.id AS char) AS divideId, |
| | | divi.name AS divideName, |
| | | blo.`name` AS blockName, |
| | | divi.header, |
| | |
| | | <?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.daoPr.PrFlowMonitoringMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table pr_flow_monitoring--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="countyId" jdbcType="BIGINT" property="countyid" /> |
| | | <result column="townId" jdbcType="BIGINT" property="townid" /> |
| | | <result column="villageId" jdbcType="BIGINT" property="villageid" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="lng" jdbcType="DOUBLE" property="lng" /> |
| | | <result column="lat" jdbcType="DOUBLE" property="lat" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" /> |
| | | <result column="deleted" jdbcType="TINYINT" property="deleted" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, countyId, townId, villageId, `name`, lng, lat, remarks, `operator`, operateDt, |
| | | deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pr_flow_monitoring |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from pr_flow_monitoring |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_flow_monitoring (id, countyId, townId, |
| | | villageId, `name`, lng, |
| | | lat, remarks, `operator`, |
| | | operateDt, deleted) |
| | | values (#{id,jdbcType=BIGINT}, #{countyid,jdbcType=BIGINT}, #{townid,jdbcType=BIGINT}, |
| | | #{villageid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, |
| | | #{lat,jdbcType=DOUBLE}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_flow_monitoring |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table pr_flow_monitoring--> |
| | | <id column="id" jdbcType="BIGINT" property="id"/> |
| | | <result column="countyId" jdbcType="BIGINT" property="countyid"/> |
| | | <result column="townId" jdbcType="BIGINT" property="townid"/> |
| | | <result column="villageId" jdbcType="BIGINT" property="villageid"/> |
| | | <result column="name" jdbcType="VARCHAR" property="name"/> |
| | | <result column="lng" jdbcType="DOUBLE" property="lng"/> |
| | | <result column="lat" jdbcType="DOUBLE" property="lat"/> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks"/> |
| | | <result column="operator" jdbcType="BIGINT" property="operator"/> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt"/> |
| | | <result column="deleted" jdbcType="TINYINT" property="deleted"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, |
| | | </if> |
| | | <if test="countyid != null"> |
| | | countyId, |
| | | </if> |
| | | <if test="townid != null"> |
| | | townId, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | villageId, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name`, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator`, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="countyid != null"> |
| | | #{countyid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="townid != null"> |
| | | #{townid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | #{villageid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | update pr_flow_monitoring |
| | | <set> |
| | | <if test="countyid != null"> |
| | | countyId = #{countyid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="townid != null"> |
| | | townId = #{townid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | villageId = #{villageid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted = #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | update pr_flow_monitoring |
| | | set countyId = #{countyid,jdbcType=BIGINT}, |
| | | townId = #{townid,jdbcType=BIGINT}, |
| | | villageId = #{villageid,jdbcType=BIGINT}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from pr_flow_monitoring |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete |
| | | from pr_flow_monitoring |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--根据监测站编号删除监测站--> |
| | | <update id="deleteFlowMonitoringById"> |
| | | UPDATE pr_flow_monitoring SET deleted = 1 WHERE id = ${flowMonitoringId} |
| | | </update> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_flow_monitoring (id, countyId, townId, |
| | | villageId, `name`, lng, |
| | | lat, remarks, `operator`, |
| | | operateDt, deleted) |
| | | values (#{id,jdbcType=BIGINT}, #{countyid,jdbcType=BIGINT}, #{townid,jdbcType=BIGINT}, |
| | | #{villageid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, |
| | | #{lat,jdbcType=DOUBLE}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}) |
| | | </insert> |
| | | |
| | | <!--根据监测站编号获取未删除的监测站数量--> |
| | | <select id="getRecordCountOfFlowMonitoring" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) AS recordCountOfFlowMonitoring FROM pr_flow_monitoring WHERE deleted = 0 AND id = ${flowMonitoringId} |
| | | </select> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_flow_monitoring |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="countyid != null"> |
| | | countyId, |
| | | </if> |
| | | <if test="townid != null"> |
| | | townId, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | villageId, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name`, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator`, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="countyid != null"> |
| | | #{countyid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="townid != null"> |
| | | #{townid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | #{villageid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | update pr_flow_monitoring |
| | | <set> |
| | | <if test="countyid != null"> |
| | | countyId = #{countyid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="townid != null"> |
| | | townId = #{townid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | villageId = #{villageid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted = #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | <!--@mbg.generated--> |
| | | update pr_flow_monitoring |
| | | set countyId = #{countyid,jdbcType=BIGINT}, |
| | | townId = #{townid,jdbcType=BIGINT}, |
| | | villageId = #{villageid,jdbcType=BIGINT}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据监测站编号删除监测站--> |
| | | <update id="deleteFlowMonitoringById"> |
| | | UPDATE pr_flow_monitoring |
| | | SET deleted = 1 |
| | | WHERE id = ${flowMonitoringId} |
| | | </update> |
| | | |
| | | <!--根据监测站编号获取未删除的监测站数量--> |
| | | <select id="getRecordCountOfFlowMonitoringByFlowMonitoringId" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) AS recordCountOfFlowMonitoring |
| | | FROM pr_flow_monitoring |
| | | WHERE deleted = 0 |
| | | AND id = ${flowMonitoringId} |
| | | </select> |
| | | |
| | | <!--查询全部监测站实体记录--> |
| | | <select id="selectAll" resultType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from pr_flow_monitoring |
| | | where deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <!--根据监测站编号获取未删除的监测站数量--> |
| | | <select id="getRecordCountOfFlowMonitoring" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) AS recordCountOfFlowMonitoring |
| | | from pr_flow_monitoring pfm |
| | | INNER JOIN ba_district country ON pfm.countyId = country.id |
| | | INNER JOIN ba_district town ON pfm.townId = town.id |
| | | INNER JOIN ba_district village ON pfm.villageId = village.id |
| | | INNER JOIN pr_monitoring_flowmeter pmofl ON pmofl.monitoringId = pfm.id |
| | | <where> |
| | | pfm.deleted = 0 |
| | | <if test = "name != null and name !=''"> |
| | | AND pfm.`name` like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test = "bindState != null and bindState > 0"> |
| | | AND pmofl.operateType = ${bindState} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取流量监测站实体记录--> |
| | | <select id="getPrFlowMonitoring" parameterType="map" resultType="com.dy.pipIrrGlobal.voPr.VoFlowMonitoring"> |
| | | select (@i:=@i+1) AS id, |
| | | CONCAT(country.`name`, town.`name`, village.`name`) AS address, |
| | | pfm.`name` AS `name`, |
| | | pmofl.operateType AS bindState |
| | | from pr_flow_monitoring pfm |
| | | INNER JOIN ba_district country ON pfm.countyId = country.id |
| | | INNER JOIN ba_district town ON pfm.townId = town.id |
| | | INNER JOIN ba_district village ON pfm.villageId = village.id |
| | | INNER JOIN pr_monitoring_flowmeter pmofl ON pmofl.monitoringId = pfm.id, |
| | | (SELECT @i:=0) AS itable |
| | | <where> |
| | | pfm.deleted = 0 |
| | | <if test = "name != null and name !=''"> |
| | | AND pfm.`name` like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test = "bindState != null and bindState > 0"> |
| | | AND pmofl.operateType = ${bindState} |
| | | </if> |
| | | </where> |
| | | ORDER BY pmofl.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | </update> |
| | | |
| | | <!--根据流量计编号获取未删除的流量计数量--> |
| | | <select id="getRecordCountOfFlowmeter" resultType="java.lang.Integer"> |
| | | <select id="getRecordCountOfFlowmeterByCode" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) AS recordCountOfFlowmeter FROM pr_flowmeter WHERE deleted = 0 AND id = ${flowmeterId} |
| | | </select> |
| | | |
| | | <!--根据流量计编号 或者 在线状态 获取未删除的流量计数量 --> |
| | | <select id="getRecordCountOfFlowMeterByOthers" resultType="_integer"> |
| | | SELECT COUNT(*) AS recordCountOfFlowmeter FROM pr_flowmeter |
| | | <where> |
| | | deleted = 0 AND |
| | | <if test="code != null"> |
| | | code = #{code,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="onlineState != null "> |
| | | onlineState = #{onlineState,jdbcType=TINYINT} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据流量计编号 或者 在线状态 获取未删除的流量计记录 --> |
| | | <select id="getFlowMeters" resultType="com.dy.pipIrrGlobal.voPr.VoFlowMeter"> |
| | | select (@i:=@i+1) AS id, |
| | | pfm.code AS code, |
| | | pfm.onlineState AS onlineState, |
| | | pfmt.`name` AS `name`, |
| | | pfm.operateDt AS operateDt |
| | | from pr_flowmeter pfm |
| | | inner join pr_monitoring_flowmeter pmofl on pmofl.flowmeterId = pfm.id |
| | | inner join pr_flow_monitoring pfmt on pfmt.id = pmofl.monitoringId, |
| | | (SELECT @i:=0) AS itable |
| | | <where> |
| | | pfm.deleted = 0 AND pfmt.deleted = 0 AND pmofl.operateType = 1 |
| | | <if test="code != null"> |
| | | AND code = #{code,jdbcType=VARCHAR} |
| | | </if> |
| | | <if test="onlineState != null "> |
| | | AND onlineState = #{onlineState,jdbcType=TINYINT} |
| | | </if> |
| | | </where> |
| | | ORDER BY pfm.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <!--@mbg.generated--> |
| | | id, monitoringId, flowmeterId, operateType, remarks, `operator`, operateDt |
| | | </sql> |
| | | <sql id="Base_Column_List_NoId"> |
| | | <!--@mbg.generated--> |
| | | monitoringId, flowmeterId, operateType, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据 流量监测站编号 获取 绑定记录 按操作时间降序--> |
| | | <select id="getBingRecordsByMonitoringId" parameterType="_long" resultType="java.util.Map"> |
| | | select (@i:=@i+1) AS id, |
| | | <include refid="Base_Column_List_NoId" /> |
| | | from pr_monitoring_flowmeter |
| | | ,(SELECT @i:=0) AS itable |
| | | where |
| | | monitoringId=#{monitoringId,jdbcType=BIGINT} |
| | | order by operateDt desc |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.dy.pipIrrBase.role; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.mybatis.envm.Deleted; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoRole>>> getRoles(QueryVo vo){ |
| | | try { |
| | | //BaRolePermissions baRolePermissions = roleSv.getRolePermissionsById(2023122018334500002L); |
| | | //return BaseResponseUtils.buildSuccess(baRolePermissions); |
| | | |
| | | QueryResultVo<List<VoRole>> res = roleSv.getRoles(vo); |
| | | if(res.itemTotal != null && res.itemTotal > 0) { |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | }else { |
| | | return BaseResponseUtils.buildFail(SystemResultCode.NO_ROLES.getMessage()); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | log.error("获取开卡记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | |
| | | |
| | | // 获取角色名称级权限列表 |
| | | String roleName = Optional.ofNullable(po.getRoleName()).orElse(""); |
| | | String permissions = Optional.ofNullable(po.getPermissions()).orElse(""); |
| | | JSONArray permissions = Optional.ofNullable(JSONArray.parseArray(po.getPermissions())).orElse(JSONArray.parseArray("[]")); |
| | | Long operator = Optional.ofNullable(po.getOperator()).orElse(0L); |
| | | |
| | | // 判断角色名称是否重名 |
| | |
| | | return BaseResponseUtils.buildFail(SystemResultCode.ADD_ROLE_FAIL.getMessage()); |
| | | |
| | | // 添加权限列表 |
| | | BaRolePermissions baRolePermissions = new BaRolePermissions(); |
| | | BaRolePermissions baRolePermissions = new BaRolePermissions(); |
| | | baRolePermissions.setRoleid(roleId); |
| | | baRolePermissions.setPermissions(permissions); |
| | | Integer rc = Optional.ofNullable(roleSv.addPermissions(baRolePermissions)).orElse(0); |
| | |
| | | |
| | | Long roleId = Optional.ofNullable(po.getRoleid()).orElse(0L); |
| | | String roleName = Optional.ofNullable(po.getRoleName()).orElse(""); |
| | | String permissions = Optional.ofNullable(po.getPermissions()).orElse(""); |
| | | //String permissions = Optional.ofNullable(po.getPermissions()).orElse(""); |
| | | JSONArray permissions = Optional.ofNullable(JSONArray.parseArray(po.getPermissions())).orElse(JSONArray.parseArray("[]")); |
| | | Long operator = Optional.ofNullable(po.getOperator()).orElse(0L); |
| | | |
| | | if(roleId == 0 && roleName.length() == 0) |
| | |
| | | package com.dy.pipIrrBase.role; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRoleMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRolePermissionsMapper; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | public QueryResultVo<List<VoRole>> getRoles(QueryVo queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = baRoleMapper.getRecordCount(params); |
| | | Long itemTotal = baRolePermissionsMapper.getRecordCount(params); |
| | | |
| | | QueryResultVo<List<VoRole>> rsVo = new QueryResultVo<>() ; |
| | | |
| | | Integer pageCurr = 0; |
| | | Integer pageSize = 10000; |
| | | rsVo.pageCurr = 1; |
| | |
| | | params.put("pageSize", pageSize); |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = baRoleMapper.getRoles(params); |
| | | //rsVo.obj = baRoleMapper.getRoles(params); |
| | | |
| | | /** |
| | | * 获取角色列表,把汗角色权限ID |
| | | * 遍历角色列表并取出角色对象中的perId |
| | | * 根据perId获取权限对象,并将对象添加到角色对象中 |
| | | */ |
| | | List<VoRole> list_Roles = Optional.ofNullable(baRolePermissionsMapper.getRoles(params)).orElse(new ArrayList<>()); |
| | | if(list_Roles.size() > 0) { |
| | | for(int i = 0; i < list_Roles.size(); i++) { |
| | | VoRole voRole = list_Roles.get(i); |
| | | Long perId = voRole.getPerId(); |
| | | BaRolePermissions baRolePermissions = baRolePermissionsMapper.selectByPrimaryKey(perId); |
| | | JSONArray array_permission = JSONArray.parseArray("[]"); |
| | | if(baRolePermissions != null) { |
| | | array_permission = baRolePermissions.getPermissions(); |
| | | } |
| | | voRole.setPermissions(array_permission); |
| | | } |
| | | } |
| | | rsVo.obj = list_Roles; |
| | | return rsVo ; |
| | | } |
| | | |
| | | public BaRolePermissions getRolePermissionsById(Long id) { |
| | | return baRolePermissionsMapper.selectByPrimaryKey(id); |
| | | } |
| | | |
| | | /** |
| | | * 得到所有角色 |
| | | * @return 所有角色集合 |
| | |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | * 控制器地址 |
| | | */ |
| | | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "控制器编号不能为空") |
| | | @Length(message = "控制器编号不大于{max}字",max = 25) |
| | | private String code; |
| | | @Schema(description = "控制器地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "控制器地址不能为空") |
| | | @Length(message = "控制器地址不大于{max}字",max = 11) |
| | | private String rtuAddr; |
| | | |
| | | /** |
| | | * 通讯协议 |
| | |
| | | @Mapper |
| | | public interface DtoToPojo { |
| | | DtoToPojo INSTANCT = Mappers.getMapper(DtoToPojo.class); |
| | | @Mapping(target = "code", source = "code") |
| | | @Mapping(target = "rtuaddr", source = "rtuAddr") |
| | | @Mapping(target = "protocol", source = "protocol") |
| | | @Mapping(target = "onlinestate", source = "onlineState") |
| | | @Mapping(target = "addways", source = "addWays") |
| | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaClient; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | /** |
| | | * 编辑修改监测站 |
| | | * @param po 保存监测站form表单对象 |
| | | * @return 是否成功 |
| | | */ |
| | | @Operation(summary = "编辑修改监测站", description = "提交监测站数据(form表单),进行修改") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid PrFlowMonitoring po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | // 接收村编号(主键) |
| | | Long villageId = po.getVillageid(); |
| | | /** |
| | | * 获取5级行政区划信息 |
| | | */ |
| | | Map map_districts = Optional.ofNullable(flowMonitoringSv.getDistrictsByVillageId(villageId)).orElse(new HashMap()); |
| | | if(map_districts.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("区划信息有误"); |
| | | } |
| | | Long countryId = Long.parseLong(map_districts.get("countryId").toString()); |
| | | Long townId = Long.parseLong(map_districts.get("townId").toString()); |
| | | po.setCountyid(countryId); |
| | | po.setTownid(townId); |
| | | int count; |
| | | Date operateTime = new Date(); |
| | | po.setOperatedt(operateTime); |
| | | po.setDeleted((byte)0); |
| | | try { |
| | | count = this.flowMonitoringSv.update(po); |
| | | } catch (Exception e) { |
| | | log.error("保存监测站异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | if(count <= 0){ |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.UPDATE_FLOW_MONITORING_FAIL.getMessage()) ; |
| | | }else{ |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 客户端请求得到所有监测站名字 |
| | | * @return 所有监测站名字 |
| | | */ |
| | | @Operation(summary = "获得全部监测站", description = "返回全部监测站数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回全部监测站数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = PrFlowMonitoring.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "all") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<PrFlowMonitoring>>> all(){ |
| | | try { |
| | | QueryResultVo<List<PrFlowMonitoring>> res = this.flowMonitoringSv.selectAll(); |
| | | if(res == null) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_FLOW_MONITORINGS.getMessage()); |
| | | }else { |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("查询监测站异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 得到一个监测站数据 |
| | | * @return 一个监测站数据 |
| | | */ |
| | | @Operation(summary = "一个监测站", description = "得到一个监测站数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一个监测站数据(BaseResponse.content:{})", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = PrFlowMonitoring.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "one/{id}") |
| | | @SsoAop() |
| | | public BaseResponse<PrFlowMonitoring> one(@PathVariable("id") Long id){ |
| | | if(this.flowMonitoringSv.selectById(id) == null) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_FLOW_MONITORINGS.getMessage()); |
| | | }else { |
| | | return BaseResponseUtils.buildSuccess(this.flowMonitoringSv.selectById(id)); |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "获得一页监测站记录", description = "返回一页监测站数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一页监测站数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = PrFlowMonitoring.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "getFlowMonitoring", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoFlowMonitoring>>> getFlowMonitoring(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<VoFlowMonitoring>> res = flowMonitoringSv.getPrFlowMonitorings(vo); |
| | | if(res == null) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_FLOW_MONITORINGS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取监测站记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.dy.pipIrrProject.flowMonitoring; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrFlowMonitoringMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrIntake; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | * @param flowMonitoringId 流量监测站编号 |
| | | * @return |
| | | */ |
| | | public Integer getRecordCountOfFlowMonitoring(Long flowMonitoringId) { |
| | | return prFlowMonitoringMapper.getRecordCountOfFlowMonitoring(flowMonitoringId); |
| | | public Integer getRecordCountOfFlowMonitoringByFlowMonitoringId(Long flowMonitoringId) { |
| | | return prFlowMonitoringMapper.getRecordCountOfFlowMonitoringByFlowMonitoringId(flowMonitoringId); |
| | | } |
| | | |
| | | /** |
| | | * 得到一个流量监测站 |
| | | * @param id 监测站ID |
| | | * @return 监测站实体 |
| | | */ |
| | | public PrFlowMonitoring selectById(Long id) { |
| | | return prFlowMonitoringMapper.selectByPrimaryKey(id); |
| | | } |
| | | |
| | | /** |
| | | * 得到全部流量监测站 |
| | | * @return 监测站实体集合 |
| | | */ |
| | | public QueryResultVo<List<PrFlowMonitoring>> selectAll(){ |
| | | QueryResultVo<List<PrFlowMonitoring>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.obj = this.prFlowMonitoringMapper.selectAll() ; |
| | | return rsVo ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据指定条件得到流量监测站实体记录 |
| | | * @param queryVo 给的条件 |
| | | * @return 监测站实体集合 |
| | | */ |
| | | public QueryResultVo<List<VoFlowMonitoring>> getPrFlowMonitorings(QueryVo queryVo){ |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ; |
| | | |
| | | QueryResultVo<List<VoFlowMonitoring>> rsVo = new QueryResultVo<>() ; |
| | | |
| | | Integer pageCurr = 0; |
| | | Integer pageSize = 10000; |
| | | rsVo.pageCurr = 1; |
| | | rsVo.pageSize = 10000; |
| | | if(queryVo.pageSize != null && queryVo.pageCurr != null) { |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr; |
| | | pageSize = queryVo.pageSize ; |
| | | pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString()); |
| | | } |
| | | params.put("pageCurr", pageCurr); |
| | | params.put("pageSize", pageSize); |
| | | |
| | | // 计算符合条件的记录数 |
| | | Integer itemTotal = prFlowMonitoringMapper.getRecordCountOfFlowMonitoring(params); |
| | | rsVo.calculateAndSet(itemTotal.longValue(), params); |
| | | rsVo.obj = prFlowMonitoringMapper.getPrFlowMonitoring(params); |
| | | |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 保存修改一个流量监测站实体 |
| | | * @param po 修改的内容(id不为空) |
| | | * @return |
| | | */ |
| | | public int update (PrFlowMonitoring po){ |
| | | return prFlowMonitoringMapper.updateByPrimaryKeySelective(po); |
| | | } |
| | | } |
| | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @Slf4j |
| | | @Tag(name = "流量监测站管理", description = "流量监测站操作") |
| | | @RestController |
| | | @RequestMapping(path="flowmeter") |
| | | @RequestMapping(path = "flowmeter") |
| | | @RequiredArgsConstructor |
| | | public class FlowmeterCtrl { |
| | | private final FlowmeterSv flowmeterSv; |
| | |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> add(@RequestBody @Valid DtoFlowmeter po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | public BaseResponse<Boolean> add(@RequestBody @Valid DtoFlowmeter po, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | PrFlowmeter prFlowmeter = DtoToFlowmeterPojo.INSTANCT.po2vo(po); |
| | | Date operateTime = new Date(); |
| | | prFlowmeter.setOperatedt(operateTime); |
| | | prFlowmeter.setDeleted((byte)0); |
| | | prFlowmeter.setDeleted((byte) 0); |
| | | prFlowmeter.setReporttime(operateTime); |
| | | Integer rec = Optional.ofNullable(flowmeterSv.addFlowmeter(prFlowmeter)).orElse(0); |
| | | if(rec == 0) { |
| | | if (rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.ADD_FLOWMETER_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | |
| | | /** |
| | | * 删除流量计 |
| | | * |
| | | * @param map |
| | | * @return |
| | | */ |
| | |
| | | }) |
| | | @PostMapping(path = "delete") |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> delete(@RequestBody Map map){ |
| | | if(map == null || map.size() <=0) { |
| | | public BaseResponse<Boolean> delete(@RequestBody Map map) { |
| | | if (map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.PLEASE_INPUT_FLOW_MONITORING_ID.getMessage()); |
| | | } |
| | | |
| | | Long flowmeterId = Long.parseLong(map.get("flowmeterId").toString()); |
| | | Integer recordCount = Optional.ofNullable(flowmeterSv.deleteFlowmeter(flowmeterId)).orElse(0); |
| | | if(recordCount == 0) { |
| | | if (recordCount == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_FLOWMETER_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | |
| | | @Operation(summary = "获得一页流量计记录", description = "返回一页流量计数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一页流量计数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = PrFlowmeter.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "getFlowMeters", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoFlowMeter>>> getFlowMeters(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVoFlowMeter vo) { |
| | | try { |
| | | QueryResultVo<List<VoFlowMeter>> res = flowmeterSv.getFlowMeters(vo); |
| | | if (res == null) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_FLOWMETERS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取流量计记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.dy.pipIrrProject.flowMonitoring; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoPr.PrFlowmeterMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @param flowmeterId |
| | | * @return |
| | | */ |
| | | public Integer getRecordCountOfFlowmeter(Long flowmeterId) { |
| | | return prFlowmeterMapper.getRecordCountOfFlowmeter(flowmeterId); |
| | | public Integer getRecordCountOfFlowmeterByCode(Long flowmeterId) { |
| | | return prFlowmeterMapper.getRecordCountOfFlowmeterByCode(flowmeterId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据指定条件得到流量计实体记录 |
| | | * @param queryVo 给的条件 |
| | | * @return 流量计实体集合 |
| | | */ |
| | | public QueryResultVo<List<VoFlowMeter>> getFlowMeters(QueryVoFlowMeter queryVo){ |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ; |
| | | |
| | | QueryResultVo<List<VoFlowMeter>> rsVo = new QueryResultVo<>() ; |
| | | |
| | | Integer pageCurr = 0; |
| | | Integer pageSize = 10000; |
| | | rsVo.pageCurr = 1; |
| | | rsVo.pageSize = 10000; |
| | | if(queryVo.pageSize != null && queryVo.pageCurr != null) { |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr; |
| | | pageSize = queryVo.pageSize ; |
| | | pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString()); |
| | | } |
| | | params.put("pageCurr", pageCurr); |
| | | params.put("pageSize", pageSize); |
| | | |
| | | // 计算符合条件的记录数 |
| | | Integer itemTotal = prFlowmeterMapper.getRecordCountOfFlowMeterByOthers(params); |
| | | rsVo.calculateAndSet(itemTotal.longValue(), params); |
| | | rsVo.obj = prFlowmeterMapper.getFlowMeters(params); |
| | | |
| | | return rsVo ; |
| | | } |
| | | } |
| | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @Slf4j |
| | | @Tag(name = "流量监测站、流量计关联管理", description = "流量监测站、流量计关联操作") |
| | | @RestController |
| | | @RequestMapping(path="moni_flow") |
| | | @RequestMapping(path = "moni_flow") |
| | | @RequiredArgsConstructor |
| | | public class MoniFlowCtrl { |
| | | private final MoniFlowSv moniFlowSv; |
| | |
| | | |
| | | /** |
| | | * 流量监测站绑定流量计 |
| | | * 若流量监测站或流量计不存在需提示用户 |
| | | * 若流量监测站已经与流量计绑定需提示用户 |
| | | * @param po 绑定关系对象 |
| | | * 若流量监测站或流量计不存在需提示用户 |
| | | * 若流量监测站已经与流量计绑定需提示用户 |
| | | * |
| | | * @param po 绑定关系对象 |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | |
| | | @PostMapping(path = "bind", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> bind(@RequestBody @Valid DtoMoniFlow po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | public BaseResponse<Boolean> bind(@RequestBody @Valid DtoMoniFlow po, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | // 根据编号分别获取流量监测站、流量计未删除记录数 |
| | | Integer recFlowMonitoring = Optional.ofNullable(flowMonitoringSv.getRecordCountOfFlowMonitoring(po.getMonitoringId())).orElse(0); |
| | | Integer recFlowmeter = Optional.ofNullable(flowmeterSv.getRecordCountOfFlowmeter(po.getFlowmeterId())).orElse(0); |
| | | if(recFlowMonitoring == 0 || recFlowmeter == 0) { |
| | | Integer recFlowMonitoring = Optional.ofNullable(flowMonitoringSv.getRecordCountOfFlowMonitoringByFlowMonitoringId(po.getMonitoringId())).orElse(0); |
| | | Integer recFlowmeter = Optional.ofNullable(flowmeterSv.getRecordCountOfFlowmeterByCode(po.getFlowmeterId())).orElse(0); |
| | | if (recFlowMonitoring == 0 || recFlowmeter == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.STATION_OR_FLOWMETER_NO_EXIST.getMessage()); |
| | | } |
| | | |
| | | // 根据编号获取已绑定数量 |
| | | Integer recordCount = Optional.ofNullable(moniFlowSv.getBindRecordCount(po.getMonitoringId(), po.getFlowmeterId(), (byte)1)).orElse(0); |
| | | if(recordCount > 0) { |
| | | Integer recordCount = Optional.ofNullable(moniFlowSv.getBindRecordCount(po.getMonitoringId(), po.getFlowmeterId(), (byte) 1)).orElse(0); |
| | | if (recordCount > 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.MONITORING_HAS_BINDED_FLOWMETER.getMessage()); |
| | | } |
| | | |
| | | PrMonitoringFlowmeter prMonitoringFlowmeter = DtoToMoniFlowPojo.INSTANCT.po2vo(po); |
| | | Date operateTime = new Date(); |
| | | prMonitoringFlowmeter .setOperatedt(operateTime); |
| | | prMonitoringFlowmeter.setOperatetype((byte)1); |
| | | prMonitoringFlowmeter.setOperatedt(operateTime); |
| | | prMonitoringFlowmeter.setOperatetype((byte) 1); |
| | | |
| | | Integer rec = Optional.ofNullable(moniFlowSv.addRecord(prMonitoringFlowmeter)).orElse(0); |
| | | if(rec == 0) { |
| | | if (rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.MONITORING_FLOWMETER_BIND_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | |
| | | @Operation(summary = "添加解绑记录", description = "添加解绑记录") |
| | |
| | | @PostMapping(path = "unbind", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> unbind(@RequestBody @Valid DtoMoniFlow po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | public BaseResponse<Boolean> unbind(@RequestBody @Valid DtoMoniFlow po, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | // 根据编号分别获取流量监测站、流量计未删除记录数 |
| | | Integer recFlowMonitoring = Optional.ofNullable(flowMonitoringSv.getRecordCountOfFlowMonitoring(po.getMonitoringId())).orElse(0); |
| | | Integer recFlowmeter = Optional.ofNullable(flowmeterSv.getRecordCountOfFlowmeter(po.getFlowmeterId())).orElse(0); |
| | | if(recFlowMonitoring == 0 || recFlowmeter == 0) { |
| | | Integer recFlowMonitoring = Optional.ofNullable(flowMonitoringSv.getRecordCountOfFlowMonitoringByFlowMonitoringId(po.getMonitoringId())).orElse(0); |
| | | Integer recFlowmeter = Optional.ofNullable(flowmeterSv.getRecordCountOfFlowmeterByCode(po.getFlowmeterId())).orElse(0); |
| | | if (recFlowMonitoring == 0 || recFlowmeter == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.STATION_OR_FLOWMETER_NO_EXIST.getMessage()); |
| | | } |
| | | |
| | | // 根据编号获取已绑定数量 |
| | | Integer recordCount = Optional.ofNullable(moniFlowSv.getBindRecordCount(po.getMonitoringId(), po.getFlowmeterId(), (byte)2)).orElse(0); |
| | | if(recordCount > 0) { |
| | | Integer recordCount = Optional.ofNullable(moniFlowSv.getBindRecordCount(po.getMonitoringId(), po.getFlowmeterId(), (byte) 2)).orElse(0); |
| | | if (recordCount > 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.STATION_FLOWMETER_HAS_UNBOUND.getMessage()); |
| | | } |
| | | |
| | | PrMonitoringFlowmeter prMonitoringFlowmeter = DtoToMoniFlowPojo.INSTANCT.po2vo(po); |
| | | Date operateTime = new Date(); |
| | | prMonitoringFlowmeter .setOperatedt(operateTime); |
| | | prMonitoringFlowmeter.setOperatetype((byte)1); |
| | | prMonitoringFlowmeter.setOperatedt(operateTime); |
| | | prMonitoringFlowmeter.setOperatetype((byte) 1); |
| | | |
| | | Integer rec = Optional.ofNullable(moniFlowSv.addRecord(prMonitoringFlowmeter)).orElse(0); |
| | | if(rec == 0) { |
| | | if (rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.MONITORING_FLOWMETER_BIND_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | |
| | | /** |
| | | * 根据监测站编号获取绑定记录 按操作时间降序 |
| | | * |
| | | * @param monitoringId 监测站编号 |
| | | * @return 绑定记录 |
| | | */ |
| | | @Operation(summary = "获取绑定记录", description = "返回获取绑定记录") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回绑定记录(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = PrMonitoringFlowmeter.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "bingRecords/{monitoringId}") |
| | | @SsoAop() |
| | | public BaseResponse<List<Map<String, Object>>> getBingRecordsByMonitoringId(@PathVariable("monitoringId") Long monitoringId) { |
| | | try { |
| | | List<Map<String, Object>> list = Optional.ofNullable(moniFlowSv.getBingRecordsByMonitoringId(monitoringId)).orElse(new ArrayList<>()); |
| | | if (list.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_MONITORING_FLOWMETERS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(list); |
| | | } catch (Exception e) { |
| | | log.error("查询绑定记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-01-05 10:25 |
| | |
| | | return prMonitoringFlowmeterMapper.getBindRecordCount(monitoringId, flowmeterId, operateType); |
| | | } |
| | | |
| | | /** |
| | | * 根据 流量监测站编号 获取 绑定记录 按操作时间降序 |
| | | * @param monitoringId |
| | | * @return PrMonitoringFlowmeter |
| | | * */ |
| | | public List<Map<String, Object>> getBingRecordsByMonitoringId(Long monitoringId){ |
| | | return prMonitoringFlowmeterMapper.getBingRecordsByMonitoringId(monitoringId); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.dy.pipIrrProject.flowMonitoring; |
| | | |
| | | import com.dy.common.webUtil.QueryConditionVo; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author :WuZeYu |
| | | * @Date :2024/1/15 11:12 |
| | | * @LastEditTime :2024/1/15 11:12 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ToString(callSuper = true) |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Builder |
| | | @Schema(name = "管网流量计查询条件") |
| | | public class QueryVoFlowMeter extends QueryConditionVo { |
| | | |
| | | @Schema(description = "流量计编号") |
| | | public String code; |
| | | |
| | | @Schema(title = "在线状态") |
| | | private Integer onlineState; |
| | | } |
| | |
| | | FLOW_MONITORING_FAIL(50001, "流量监测站添加失败"), |
| | | PLEASE_INPUT_FLOW_MONITORING_ID(50002, "请输入流量监测站编号"), |
| | | DELETE_FLOW_MONITORING_FAIL(50003, "流量监测站删除失败"), |
| | | |
| | | UPDATE_FLOW_MONITORING_FAIL(50004, "修改监测站数据失败"), |
| | | NO_FLOW_MONITORINGS(50005, "没有符合条件监测站数据"), |
| | | /** |
| | | * 流量计 |
| | | */ |
| | | ADD_FLOWMETER_FAIL(60001, "流量计添加失败"), |
| | | DELETE_FLOWMETER_FAIL(60002, "流量计删除失败"), |
| | | NO_FLOWMETERS(60003, "没有符合条件流量计数据"), |
| | | |
| | | /** |
| | | * 流量监测站、流量计关联 |
| | |
| | | MONITORING_HAS_BINDED_FLOWMETER(70001, "流量监测站与流量计已绑定"), |
| | | MONITORING_FLOWMETER_BIND_FAIL(70002, "流量监测站与流量计绑定失败"), |
| | | STATION_OR_FLOWMETER_NO_EXIST(70003, "流量监测站或流量计不存在"), |
| | | STATION_FLOWMETER_HAS_UNBOUND(70004, "流量监测站与流量计已解绑"); |
| | | STATION_FLOWMETER_HAS_UNBOUND(70004, "流量监测站与流量计已解绑"), |
| | | NO_MONITORING_FLOWMETERS(70005, "没有符合条件的绑定记录数据"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |