Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
	
		
		1 文件已重命名
	
		
		22个文件已修改
	
		
		6个文件已添加
	
	
 
	
	
	
	
	
	
	
	
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoOnHour> getOnHourReports_history(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmOnHourReportLast; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOnHour; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<RmOnHourReportLast> getRmOnHourReportLast(Long intakeId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取整点报最新记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getOnHourReportsCount_last(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取整点报最新记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoOnHour> getOnHourReports_last(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return update count | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | int updateByPrimaryKey(RmOpenCloseValveHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报历史记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getOpenCloseValveReportsCount_history(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报历史记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoOpenCloseValve> getOpenCloseValveReports_history(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmWorkReportHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return object by rtuAddr | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<RmOpenCloseValveLast> selectByIntakeId(Long intakeId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报最新记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getOpenCloseValveReportsCount_last(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报最新记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoOpenCloseValve> getOpenCloseValveReports_last(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoTiming; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | 
|---|
|  |  |  | int updateByPrimaryKeySelective(RmTimingReportHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int updateByPrimaryKey(RmTimingReportHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报历史记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getTimingReportsCount_history(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报历史记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoTiming> getTimingReports_history(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmTimingReportLast; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoTiming; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<RmTimingReportLast> getRmTimingReportLast(Long intakeId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报最新记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getTimingReportsCount_last(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报最新记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoTiming> getTimingReports_last(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmWorkReportHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmWorkReportLast; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoWork; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return update count | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | int updateByPrimaryKey(RmWorkReportHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报历史记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getWorkReportsCount_history(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报历史记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoWork> getWorkReports_history(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.daoRm; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmWorkReportLast; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoWork; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return object by rtuAddr | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<RmWorkReportLast> selectByIntakeId(Long intakeId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报最新记录数量 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getWorkReportsCount_last(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报最新记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoWork> getWorkReports_last(Map<?, ?> params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-07-23 17:12 | 
|---|
|  |  |  | 
|---|
|  |  |  | * 数据接收时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private String receiveTime; | 
|---|
|  |  |  | private Date receiveTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 瞬时流量 | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.voRm; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-07-24 15:55 | 
|---|
|  |  |  | * @LastEditTime 2024-07-24 15:55 | 
|---|
|  |  |  | * @Description 开关阀报视图对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class VoOpenCloseValve { | 
|---|
|  |  |  | private static final long serialVersionUID = 202407241556001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing= ObjectWriterImplToString.class) | 
|---|
|  |  |  | private Long intakeId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String intakeNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 阀控器地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String rtuAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 农户姓名 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String clientName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀IC卡编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String openIcNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀IC卡地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String openIcAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀数据接收时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date openTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Byte openType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀订单号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String openOrderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀时累计流量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double openTotalAmount; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀时剩余金额 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double openRemainMoney; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀时用户剩余剩余水量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double openWaterRemain; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开阀电表累计电量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double openEleTotalAmount; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀IC卡编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String closeIcNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀IC卡地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String closeIcAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀数据接收时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date closeTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Byte closeType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀报中本地用水量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double closeThisAmount; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀报中本地用水时长(分钟) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Integer thisTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀报中本地消费金额 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double thisMoney; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀时剩余金额 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double closeRemainMoney; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 关阀时累计流量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double closeTotalAmount; | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.voRm; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-07-25 9:45 | 
|---|
|  |  |  | * @LastEditTime 2024-07-25 9:45 | 
|---|
|  |  |  | * @Description 定时报视图对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class VoTiming { | 
|---|
|  |  |  | private static final long serialVersionUID = 202407250946001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Long intakeId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String intakeNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 阀控器地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String rtuAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 数据接收时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date receiveTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 本年累计流量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterTotalAmountYear; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 水表累计流量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterTotalAmountMeter; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 本年累计电量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double eleTotalAmountYear; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 电表累计电量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double eleTotalAmountMeter; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当日水表净流量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterTotalAmountDay; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当日用户用水量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterUserTotalAmountDay; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 漏损水量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double lossTotalAmountDay; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 后备电池电压 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double batteryVolt; | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.voRm; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-07-25 11:29 | 
|---|
|  |  |  | * @LastEditTime 2024-07-25 11:29 | 
|---|
|  |  |  | * @Description 工作报视图对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class VoWork { | 
|---|
|  |  |  | private static final long serialVersionUID = 202407251130001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing= ObjectWriterImplToString.class) | 
|---|
|  |  |  | private Long intakeId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String intakeNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 阀控器地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String rtuAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 农户姓名 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String clientName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * IC卡编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String icNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * IC卡地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String icAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 数据接收时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date receiveTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订单号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String orderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 水位(单位0.001米) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterLevel; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 水压(单位0.01千帕) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterPress; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 瞬时流量(单位0.01m3/小时) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterInstant; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 水表累计流量(单位0.01m3) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterTotal; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 电表累计电量(单位0.01度) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double ele_total; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 用户剩余金额(单位0.01元) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double moneyRemain; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 用户剩余水量(单位0.01m3) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterRemain; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 本次使用电量(单位0.01度) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double thisEle; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 本次使用水量(单位0.01m3) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double thisWater; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 本次使用金额(单位0.01元) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double thisMoney; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 本次使用时长(单位:分钟  最大9999分钟) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Integer thisDuration; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当前水量单价(单位0.01元 最大99.99元) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterPrice; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当前电量单价(单位0.01元 最大99.99元) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double elePrice; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 交流A相电压(单位0.1伏特) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonProperty("aVolt") | 
|---|
|  |  |  | private Double aVolt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 交流B相电压(单位0.1伏特) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonProperty("bVolt") | 
|---|
|  |  |  | private Double bVolt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 交流C相电压(单位0.1伏特) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonProperty("cVolt") | 
|---|
|  |  |  | private Double cVolt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 交流A相电流(单位0.1安培) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonProperty("aCurrent") | 
|---|
|  |  |  | private Double aCurrent; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 交流B相电流数据(单位0.1安培) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonProperty("bCurrent") | 
|---|
|  |  |  | private Double bCurrent; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 交流C相电流(单位0.1安培) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JsonProperty("cCurrent") | 
|---|
|  |  |  | private Double cCurrent; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 后备电池电压(单位0.01伏特) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double batteryVolt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 水表远传电压(单位0.01伏特) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterMeterTransVolt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 水表工作电压(单位0.01伏特) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Double waterMeterWorkVolt; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | FROM rm_on_hour_report_history oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeName != null and intakeName !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeName},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | FROM rm_on_hour_report_history oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | from rm_on_hour_report_last | 
|---|
|  |  |  | where intake_id = #{intakeId} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取整点报最新记录数量--> | 
|---|
|  |  |  | <select id="getOnHourReportsCount_last" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_on_hour_report_last oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND oh.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND oh.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取整点报最新记录--> | 
|---|
|  |  |  | <select id="getOnHourReports_last" resultType="com.dy.pipIrrGlobal.voRm.VoOnHour"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | oh.intake_id AS intakeId, | 
|---|
|  |  |  | inta.`name` AS intakeNum, | 
|---|
|  |  |  | oh.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | oh.dt AS receiveTime, | 
|---|
|  |  |  | oh.instant_amount AS instantAmount, | 
|---|
|  |  |  | oh.total_amount AS totalAmount, | 
|---|
|  |  |  | oh.loss_amount AS lossAmount, | 
|---|
|  |  |  | oh.water_press AS waterPress, | 
|---|
|  |  |  | oh.battery_volt AS batteryVolt, | 
|---|
|  |  |  | oh.signal_value AS signalValue, | 
|---|
|  |  |  | oh.water_price AS waterPrice | 
|---|
|  |  |  | FROM rm_on_hour_report_last oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND oh.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND oh.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY oh.dt DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | cl_this_ele = #{clThisEle,jdbcType=FLOAT} | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取开关阀报历史记录数量--> | 
|---|
|  |  |  | <select id="getOpenCloseValveReportsCount_history" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_open_close_valve_history oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND oh.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_open != null and timeStop_open != null"> | 
|---|
|  |  |  | AND oh.op_dt BETWEEN #{timeStart_open} AND #{timeStop_open} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_close != null and timeStop_close != null"> | 
|---|
|  |  |  | AND oh.cl_dt BETWEEN #{timeStart_close} AND #{timeStop_close} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取开关阀报历史记录--> | 
|---|
|  |  |  | <select id="getOpenCloseValveReports_history" resultType="com.dy.pipIrrGlobal.voRm.VoOpenCloseValve"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | oh.intake_id AS intakeId, | 
|---|
|  |  |  | inta.name AS intakenum, | 
|---|
|  |  |  | oh.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | oh.client_name AS clientName, | 
|---|
|  |  |  | oh.op_ic_card_no AS openIcNum, | 
|---|
|  |  |  | oh.op_ic_card_addr AS openIcAddr, | 
|---|
|  |  |  | oh.op_dt AS openTime, | 
|---|
|  |  |  | oh.op_type AS openType, | 
|---|
|  |  |  | oh.op_order_no AS openOrderNo, | 
|---|
|  |  |  | oh.op_total_amount AS openTotalAmount, | 
|---|
|  |  |  | oh.op_remain_money AS openRemainMoney, | 
|---|
|  |  |  | oh.op_water_remain_user AS openWaterRemain, | 
|---|
|  |  |  | oh.op_ele_total_amount AS openEleTotalAmount, | 
|---|
|  |  |  | oh.cl_ic_card_no AS closeIcNum, | 
|---|
|  |  |  | oh.cl_ic_card_addr AS closeIcAddr, | 
|---|
|  |  |  | oh.cl_dt AS closeTime, | 
|---|
|  |  |  | oh.cl_type AS closeType, | 
|---|
|  |  |  | oh.cl_this_amount AS closeThisAmount, | 
|---|
|  |  |  | oh.cl_this_time AS thisTime, | 
|---|
|  |  |  | oh.cl_this_money AS thisMoney, | 
|---|
|  |  |  | oh.cl_remain_money AS closeRemainMoney, | 
|---|
|  |  |  | oh.cl_total_amount AS closeTotalAmount | 
|---|
|  |  |  | FROM rm_open_close_valve_history oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND oh.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_open != null and timeStop_open != null"> | 
|---|
|  |  |  | AND oh.op_dt BETWEEN #{timeStart_open} AND #{timeStop_open} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_close != null and timeStop_close != null"> | 
|---|
|  |  |  | AND oh.cl_dt BETWEEN #{timeStart_close} AND #{timeStop_close} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY oh.op_dt DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | cl_this_ele = #{clThisEle,jdbcType=FLOAT} | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取开关阀报最新记录数量--> | 
|---|
|  |  |  | <select id="getOpenCloseValveReportsCount_last" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_open_close_valve_last oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND oh.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_open != null and timeStop_open != null"> | 
|---|
|  |  |  | AND oh.op_dt BETWEEN #{timeStart_open} AND #{timeStop_open} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_close != null and timeStop_close != null"> | 
|---|
|  |  |  | AND oh.cl_dt BETWEEN #{timeStart_close} AND #{timeStop_close} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取开关阀报最新记录--> | 
|---|
|  |  |  | <select id="getOpenCloseValveReports_last" resultType="com.dy.pipIrrGlobal.voRm.VoOpenCloseValve"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | oh.intake_id AS intakeId, | 
|---|
|  |  |  | inta.name AS intakeNum, | 
|---|
|  |  |  | oh.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | oh.client_name AS clientName, | 
|---|
|  |  |  | oh.op_ic_card_no AS openIcNum, | 
|---|
|  |  |  | oh.op_ic_card_addr AS openIcAddr, | 
|---|
|  |  |  | oh.op_dt AS openTime, | 
|---|
|  |  |  | oh.op_type AS openType, | 
|---|
|  |  |  | oh.op_order_no AS openOrderNo, | 
|---|
|  |  |  | oh.op_total_amount AS openTotalAmount, | 
|---|
|  |  |  | oh.op_remain_money AS openRemainMoney, | 
|---|
|  |  |  | oh.op_water_remain_user AS openWaterRemain, | 
|---|
|  |  |  | oh.op_ele_total_amount AS openEleTotalAmount, | 
|---|
|  |  |  | oh.cl_ic_card_no AS closeIcNum, | 
|---|
|  |  |  | oh.cl_ic_card_addr AS closeIcAddr, | 
|---|
|  |  |  | oh.cl_dt AS closeTime, | 
|---|
|  |  |  | oh.cl_type AS closeType, | 
|---|
|  |  |  | oh.cl_this_amount AS closeThisAmount, | 
|---|
|  |  |  | oh.cl_this_time AS thisTime, | 
|---|
|  |  |  | oh.cl_this_money AS thisMoney, | 
|---|
|  |  |  | oh.cl_remain_money AS closeRemainMoney, | 
|---|
|  |  |  | oh.cl_total_amount AS closeTotalAmount | 
|---|
|  |  |  | FROM rm_open_close_valve_last oh | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = oh.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND oh.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND oh.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_open != null and timeStop_open != null"> | 
|---|
|  |  |  | AND oh.op_dt BETWEEN #{timeStart_open} AND #{timeStop_open} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart_close != null and timeStop_close != null"> | 
|---|
|  |  |  | AND oh.cl_dt BETWEEN #{timeStart_close} AND #{timeStop_close} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY oh.op_dt DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | battery_volt = #{batteryVolt,jdbcType=FLOAT} | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取定时报历史记录数量--> | 
|---|
|  |  |  | <select id="getTimingReportsCount_history" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_timing_report_history tim | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = tim.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND tim.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND tim.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND tim.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取定时报历史记录--> | 
|---|
|  |  |  | <select id="getTimingReports_history" resultType="com.dy.pipIrrGlobal.voRm.VoTiming"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | tim.intake_id AS intakeId, | 
|---|
|  |  |  | inta.name AS intakenum, | 
|---|
|  |  |  | tim.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | tim.dt AS receiveTime, | 
|---|
|  |  |  | tim.water_total_amount_year AS waterTotalAmountYear, | 
|---|
|  |  |  | tim.water_total_amount_meter AS waterTotalAmountMeter, | 
|---|
|  |  |  | tim.ele_total_amount_year AS eleTotalAmountYear, | 
|---|
|  |  |  | tim.ele_total_amount_meter AS eleTotalAmountMeter, | 
|---|
|  |  |  | tim.water_total_amount_day AS waterTotalAmountDay, | 
|---|
|  |  |  | tim.water_user_total_amount_day AS waterUserTotalAmountDay, | 
|---|
|  |  |  | tim.loss_total_amount_day AS lossTotalAmountDay, | 
|---|
|  |  |  | tim.battery_volt AS batteryVolt | 
|---|
|  |  |  | FROM rm_timing_report_history tim | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = tim.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND tim.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND tim.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND tim.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY tim.dt DESC, tim.loss_total_amount_day DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | from rm_timing_report_last | 
|---|
|  |  |  | where intake_id = #{intakeId} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取定时报最新记录数量--> | 
|---|
|  |  |  | <select id="getTimingReportsCount_last" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_timing_report_last tim | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = tim.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND tim.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND tim.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND tim.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取定时报最新记录--> | 
|---|
|  |  |  | <select id="getTimingReports_last" resultType="com.dy.pipIrrGlobal.voRm.VoTiming"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | tim.intake_id AS intakeId, | 
|---|
|  |  |  | inta.name AS intakenum, | 
|---|
|  |  |  | tim.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | tim.dt AS receiveTime, | 
|---|
|  |  |  | tim.water_total_amount_year AS waterTotalAmountYear, | 
|---|
|  |  |  | tim.water_total_amount_meter AS waterTotalAmountMeter, | 
|---|
|  |  |  | tim.ele_total_amount_year AS eleTotalAmountYear, | 
|---|
|  |  |  | tim.ele_total_amount_meter AS eleTotalAmountMeter, | 
|---|
|  |  |  | tim.water_total_amount_day AS waterTotalAmountDay, | 
|---|
|  |  |  | tim.water_user_total_amount_day AS waterUserTotalAmountDay, | 
|---|
|  |  |  | tim.loss_total_amount_day AS lossTotalAmountDay, | 
|---|
|  |  |  | tim.battery_volt AS batteryVolt | 
|---|
|  |  |  | FROM rm_timing_report_last tim | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = tim.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND tim.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND tim.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND tim.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY tim.dt DESC, tim.loss_total_amount_day DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | water_meter_work_volt = #{waterMeterWorkVolt,jdbcType=FLOAT} | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取工作报历史记录数量--> | 
|---|
|  |  |  | <select id="getWorkReportsCount_history" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_work_report_history wo | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = wo.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND wo.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND wo.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND wo.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取工作报历史记录--> | 
|---|
|  |  |  | <select id="getWorkReports_history" resultType="com.dy.pipIrrGlobal.voRm.VoWork"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | wo.intake_id AS intakeId, | 
|---|
|  |  |  | inta.name AS intakeNum, | 
|---|
|  |  |  | wo.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | wo.client_name AS clientName, | 
|---|
|  |  |  | wo.ic_card_no AS icNum, | 
|---|
|  |  |  | wo.ic_card_addr AS icAddr, | 
|---|
|  |  |  | wo.dt AS receiveTime, | 
|---|
|  |  |  | wo.order_no AS orderNo, | 
|---|
|  |  |  | wo.water_level AS waterLevel, | 
|---|
|  |  |  | wo.water_press AS waterPress, | 
|---|
|  |  |  | wo.water_instant AS waterInstant, | 
|---|
|  |  |  | wo.water_total AS waterTotal, | 
|---|
|  |  |  | wo.ele_total AS ele_total, | 
|---|
|  |  |  | wo.money_remain AS moneyRemain, | 
|---|
|  |  |  | wo.water_remain AS waterRemain, | 
|---|
|  |  |  | wo.this_ele AS thisEle, | 
|---|
|  |  |  | wo.this_water AS thisWater, | 
|---|
|  |  |  | wo.this_money AS thisMoney, | 
|---|
|  |  |  | wo.this_duration AS thisDuration, | 
|---|
|  |  |  | wo.water_price AS waterPrice, | 
|---|
|  |  |  | wo.ele_price AS elePrice, | 
|---|
|  |  |  | wo.a_volt AS aVolt, | 
|---|
|  |  |  | wo.b_volt AS bVolt, | 
|---|
|  |  |  | wo.c_volt AS cVolt, | 
|---|
|  |  |  | wo.a_current AS aCurrent, | 
|---|
|  |  |  | wo.b_current AS bCurrent, | 
|---|
|  |  |  | wo.c_current AS cCurrent, | 
|---|
|  |  |  | wo.battery_volt AS batteryVolt, | 
|---|
|  |  |  | wo.water_meter_trans_volt AS waterMeterTransVolt, | 
|---|
|  |  |  | wo.water_meter_work_volt AS waterMeterWorkVolt | 
|---|
|  |  |  | FROM rm_work_report_history wo | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = wo.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND wo.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND wo.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND wo.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY wo.dt DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | from rm_work_report_last | 
|---|
|  |  |  | where intake_id = #{intakeId,jdbcType=BIGINT} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取工作报最新记录数量--> | 
|---|
|  |  |  | <select id="getWorkReportsCount_last" resultType="java.lang.Long"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | COUNT(*) AS recordCount | 
|---|
|  |  |  | FROM rm_work_report_last wo | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = wo.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND wo.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND wo.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND wo.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取工作报最新记录--> | 
|---|
|  |  |  | <select id="getWorkReports_last" resultType="com.dy.pipIrrGlobal.voRm.VoWork"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | wo.intake_id AS intakeId, | 
|---|
|  |  |  | inta.name AS intakeNum, | 
|---|
|  |  |  | wo.rtu_addr AS rtuAddr, | 
|---|
|  |  |  | wo.client_name AS clientName, | 
|---|
|  |  |  | wo.ic_card_no AS icNum, | 
|---|
|  |  |  | wo.ic_card_addr AS icAddr, | 
|---|
|  |  |  | wo.dt AS receiveTime, | 
|---|
|  |  |  | wo.order_no AS orderNo, | 
|---|
|  |  |  | wo.water_level AS waterLevel, | 
|---|
|  |  |  | wo.water_press AS waterPress, | 
|---|
|  |  |  | wo.water_instant AS waterInstant, | 
|---|
|  |  |  | wo.water_total AS waterTotal, | 
|---|
|  |  |  | wo.ele_total AS ele_total, | 
|---|
|  |  |  | wo.money_remain AS moneyRemain, | 
|---|
|  |  |  | wo.water_remain AS waterRemain, | 
|---|
|  |  |  | wo.this_ele AS thisEle, | 
|---|
|  |  |  | wo.this_water AS thisWater, | 
|---|
|  |  |  | wo.this_money AS thisMoney, | 
|---|
|  |  |  | wo.this_duration AS thisDuration, | 
|---|
|  |  |  | wo.water_price AS waterPrice, | 
|---|
|  |  |  | wo.ele_price AS elePrice, | 
|---|
|  |  |  | wo.a_volt AS aVolt, | 
|---|
|  |  |  | wo.b_volt AS bVolt, | 
|---|
|  |  |  | wo.c_volt AS cVolt, | 
|---|
|  |  |  | wo.a_current AS aCurrent, | 
|---|
|  |  |  | wo.b_current AS bCurrent, | 
|---|
|  |  |  | wo.c_current AS cCurrent, | 
|---|
|  |  |  | wo.battery_volt AS batteryVolt, | 
|---|
|  |  |  | wo.water_meter_trans_volt AS waterMeterTransVolt, | 
|---|
|  |  |  | wo.water_meter_work_volt AS waterMeterWorkVolt | 
|---|
|  |  |  | FROM rm_work_report_last wo | 
|---|
|  |  |  | INNER JOIN pr_intake inta ON inta.id = wo.intake_id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="intakeId != null and intakeId >0"> | 
|---|
|  |  |  | AND wo.intake_id = #{intakeId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "intakeNum != null and intakeNum !=''"> | 
|---|
|  |  |  | AND inta.name LIKE CONCAT('%',#{intakeNum},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "rtuAddr != null and rtuAddr !=''"> | 
|---|
|  |  |  | AND wo.rtu_addr LIKE CONCAT('%',#{rtuAddr},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND wo.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY wo.dt DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.core.env.Environment; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.time.format.DateTimeFormatter; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoCommand>> getCommandHistories(QoCommand query) { | 
|---|
|  |  |  | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); | 
|---|
|  |  |  | // 完善查询起止时间 | 
|---|
|  |  |  | String timeStart = query.getTimeStart(); | 
|---|
|  |  |  | String timeStop = query.getTimeStop(); | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoControllerAlarmState; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voSe.VoActiveCard; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.records.clientAmountDay.ClientAmountDayQueryVo; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.records.controllerAlarmState.ControllerAlarmStateQueryVo; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDayQueryVo; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Content; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoClientAmountDay; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoControllerAlarmState; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.records.clientAmountDay.ClientAmountDayQueryVo; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.records.controllerAlarmState.ControllerAlarmStateQueryVo; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDayQueryVo; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrRemote.records.clientAmountDay; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryConditionVo; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.sql.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author :WuZeYu | 
|---|
|  |  |  | * @Date :2024/7/23  15:55 | 
|---|
|  |  |  | * @LastEditTime :2024/7/23  15:55 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @EqualsAndHashCode(callSuper = false) | 
|---|
|  |  |  | @ToString(callSuper = true) | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | @Builder | 
|---|
|  |  |  | @Schema(name = "农户日用水量统计查询条件") | 
|---|
|  |  |  | public class ClientAmountDayQueryVo extends QueryConditionVo { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "农户姓名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | private String clientName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "统计开始日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | private Date startDt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "统计结束日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | private Date endDt; | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrRemote.records.controllerAlarmState; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryConditionVo; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.*; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author :WuZeYu | 
|---|
|  |  |  | * @Date :2024/7/22  20:01 | 
|---|
|  |  |  | * @LastEditTime :2024/7/22  20:01 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @EqualsAndHashCode(callSuper = false) | 
|---|
|  |  |  | @ToString(callSuper = true) | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | @Builder | 
|---|
|  |  |  | @Schema(name = "控制器报警与状态查询条件") | 
|---|
|  |  |  | public class ControllerAlarmStateQueryVo extends QueryConditionVo { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "取水口名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | private String intakeName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "阀门状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)//(0打开、1关闭) | 
|---|
|  |  |  | private Byte valveState; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 
|---|
|  |  |  | private Date startDt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 
|---|
|  |  |  | private Date endDt; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(description = "报警状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)//(0正常、1报警) | 
|---|
|  |  |  | private Byte alarmState; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOnHour; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.report.qo.ReportQO; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoTiming; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoWork; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.report.qo.OnHourQO; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.report.qo.OpenCloseValveQO; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/on_hour_report_history") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoOnHour>>> getOnHourReportHistory(ReportQO qo){ | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoOnHour>>> getOnHourReportHistory(OnHourQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getOnHourReportsHistory(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取整点报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/on_hour_report_last") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoOnHour>>> getOnHourReportLast(OnHourQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getOnHourReportsLast(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报历史记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/opem_close_valve_report_history") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoOpenCloseValve>>> getOpenCloseValveReportHistory(OpenCloseValveQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getOpenCloseValveReports_history(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/opem_close_valve_report_last") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoOpenCloseValve>>> getOpenCloseValveReportLast(OpenCloseValveQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getOpenCloseValveReports_last(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报历史记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/timing_report_history") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoTiming>>> getTimingReportHistory(OnHourQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getTimingReportsHistory(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/timing_report_last") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoTiming>>> getTimingReportLast(OnHourQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getTimingReportsLast(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报历史记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/work_report_history") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoWork>>> getWorkReportHistory(OnHourQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getWorkReportsHistory(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/work_report_last") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoWork>>> getWorkReportLast(OnHourQO qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(reportSv.getWorkReportsLast(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoRm.*; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOnHour; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.report.qo.ReportQO; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoTiming; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoWork; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.report.qo.OnHourQO; | 
|---|
|  |  |  | import com.dy.pipIrrRemote.report.qo.OpenCloseValveQO; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoOnHour>> getOnHourReportsHistory(ReportQO qo) { | 
|---|
|  |  |  | public QueryResultVo<List<VoOnHour>> getOnHourReportsHistory(OnHourQO qo) { | 
|---|
|  |  |  | String timeStart = qo.getTimeStart(); | 
|---|
|  |  |  | String timeStop = qo.getTimeStop(); | 
|---|
|  |  |  | if(timeStart != null) { | 
|---|
|  |  |  | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取整点报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoOnHour>> getOnHourReportsLast(OnHourQO qo) { | 
|---|
|  |  |  | String timeStart = qo.getTimeStart(); | 
|---|
|  |  |  | String timeStop = qo.getTimeStop(); | 
|---|
|  |  |  | if(timeStart != null) { | 
|---|
|  |  |  | timeStart = timeStart + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart(timeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop != null) { | 
|---|
|  |  |  | timeStop = timeStop + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop(timeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmOnHourReportLastMapper.getOnHourReportsCount_last(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoOnHour>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmOnHourReportLastMapper.getOnHourReports_last(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报历史记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoOpenCloseValve>> getOpenCloseValveReports_history(OpenCloseValveQO qo) { | 
|---|
|  |  |  | String timeStart_open = qo.getTimeStart_open(); | 
|---|
|  |  |  | String timeStop_open = qo.getTimeStop_open(); | 
|---|
|  |  |  | if(timeStart_open != null) { | 
|---|
|  |  |  | timeStart_open = timeStart_open + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStop_open(timeStart_open); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop_open != null) { | 
|---|
|  |  |  | timeStop_open = timeStop_open + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop_open(timeStop_open); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String timeStart_close = qo.getTimeStart_close(); | 
|---|
|  |  |  | String timeStop_close = qo.getTimeStop_close(); | 
|---|
|  |  |  | if(timeStart_close != null) { | 
|---|
|  |  |  | timeStart_close = timeStart_close + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart_close(timeStart_close); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop_close != null) { | 
|---|
|  |  |  | timeStop_close = timeStop_close + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop_close(timeStop_close); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmOpenCloseValveHistoryMapper.getOpenCloseValveReportsCount_history(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoOpenCloseValve>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmOpenCloseValveHistoryMapper.getOpenCloseValveReports_history(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取开关阀报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoOpenCloseValve>> getOpenCloseValveReports_last(OpenCloseValveQO qo) { | 
|---|
|  |  |  | String timeStart_open = qo.getTimeStart_open(); | 
|---|
|  |  |  | String timeStop_open = qo.getTimeStop_open(); | 
|---|
|  |  |  | if(timeStart_open != null) { | 
|---|
|  |  |  | timeStart_open = timeStart_open + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStop_open(timeStart_open); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop_open != null) { | 
|---|
|  |  |  | timeStop_open = timeStop_open + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop_open(timeStop_open); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String timeStart_close = qo.getTimeStart_close(); | 
|---|
|  |  |  | String timeStop_close = qo.getTimeStop_close(); | 
|---|
|  |  |  | if(timeStart_close != null) { | 
|---|
|  |  |  | timeStart_close = timeStart_close + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart_close(timeStart_close); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop_close != null) { | 
|---|
|  |  |  | timeStop_close = timeStop_close + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop_close(timeStop_close); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmOpenCloseValveLastMapper.getOpenCloseValveReportsCount_last(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoOpenCloseValve>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmOpenCloseValveLastMapper.getOpenCloseValveReports_last(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报历史记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoTiming>> getTimingReportsHistory(OnHourQO qo) { | 
|---|
|  |  |  | String timeStart = qo.getTimeStart(); | 
|---|
|  |  |  | String timeStop = qo.getTimeStop(); | 
|---|
|  |  |  | if(timeStart != null) { | 
|---|
|  |  |  | timeStart = timeStart + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart(timeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop != null) { | 
|---|
|  |  |  | timeStop = timeStop + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop(timeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmTimingReportHistoryMapper.getTimingReportsCount_history(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoTiming>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmTimingReportHistoryMapper.getTimingReports_history(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取定时报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoTiming>> getTimingReportsLast(OnHourQO qo) { | 
|---|
|  |  |  | String timeStart = qo.getTimeStart(); | 
|---|
|  |  |  | String timeStop = qo.getTimeStop(); | 
|---|
|  |  |  | if(timeStart != null) { | 
|---|
|  |  |  | timeStart = timeStart + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart(timeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop != null) { | 
|---|
|  |  |  | timeStop = timeStop + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop(timeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmTimingReportLastMapper.getTimingReportsCount_last(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoTiming>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmTimingReportLastMapper.getTimingReports_last(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报历史记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoWork>> getWorkReportsHistory(OnHourQO qo) { | 
|---|
|  |  |  | String timeStart = qo.getTimeStart(); | 
|---|
|  |  |  | String timeStop = qo.getTimeStop(); | 
|---|
|  |  |  | if(timeStart != null) { | 
|---|
|  |  |  | timeStart = timeStart + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart(timeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop != null) { | 
|---|
|  |  |  | timeStop = timeStop + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop(timeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmWorkReportHistoryMapper.getWorkReportsCount_history(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoWork>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmWorkReportHistoryMapper.getWorkReports_history(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取工作报最新记录 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VoWork>> getWorkReportsLast(OnHourQO qo) { | 
|---|
|  |  |  | String timeStart = qo.getTimeStart(); | 
|---|
|  |  |  | String timeStop = qo.getTimeStop(); | 
|---|
|  |  |  | if(timeStart != null) { | 
|---|
|  |  |  | timeStart = timeStart + " 00:00:00"; | 
|---|
|  |  |  | qo.setTimeStart(timeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(timeStop != null) { | 
|---|
|  |  |  | timeStop = timeStop + " 23:59:59"; | 
|---|
|  |  |  | qo.setTimeStop(timeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = rmWorkReportLastMapper.getWorkReportsCount_last(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoWork>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = rmWorkReportLastMapper.getWorkReports_last(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
| File was renamed from pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/ReportQO.java | 
|  |  |  | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-07-23 16:31 | 
|---|
|  |  |  | * @LastEditTime 2024-07-23 16:31 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | * @Description 整点报查询对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | @Builder | 
|---|
|  |  |  | public class ReportQO extends QueryConditionVo { | 
|---|
|  |  |  | public class OnHourQO extends QueryConditionVo { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口ID,最新记录跳转历史记录时使用 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Long intakeId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口编号 | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrRemote.report.qo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryConditionVo; | 
|---|
|  |  |  | import lombok.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-07-24 16:25 | 
|---|
|  |  |  | * @LastEditTime 2024-07-24 16:25 | 
|---|
|  |  |  | * @Description 开关阀报查询对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @EqualsAndHashCode(callSuper = false) | 
|---|
|  |  |  | @ToString(callSuper = true) | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | @Builder | 
|---|
|  |  |  | public class OpenCloseValveQO extends QueryConditionVo { | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口ID,最新记录跳转历史记录时使用 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Long intakeId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String intakeNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 阀控器地址 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String rtuAddr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询开始日期_开阀 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String timeStart_open; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询结束日期_开阀 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String timeStop_open; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询开始日期_关阀 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String timeStart_close; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询结束日期_关阀 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String timeStop_close; | 
|---|
|  |  |  | } | 
|---|