From 15c3b88b86bcefbb9c10df7b14a7246c771cbe63 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 25 七月 2024 16:07:51 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java | 1 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OnHourQO.java | 9 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsSv.java | 2 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportLastMapper.xml | 79 +++ pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java | 2 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java | 19 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOnHour.java | 4 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportLastMapper.java | 16 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportHistoryMapper.java | 18 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java | 44 + pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml | 60 ++ pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java | 32 + pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportHistoryMapper.xml | 61 ++ pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportCtrl.java | 113 ++++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportLastMapper.java | 17 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml | 77 ++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportHistoryMapper.java | 19 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsCtrl.java | 2 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportHistoryMapper.xml | 79 +++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java | 17 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportLastMapper.xml | 61 ++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoWork.java | 179 ++++++ pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml | 7 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOpenCloseValve.java | 133 +++++ pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OpenCloseValveQO.java | 54 ++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java | 17 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml | 77 ++ pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java | 231 ++++++++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoTiming.java | 78 +++ 29 files changed, 1,494 insertions(+), 14 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java index 1eaa921..e510968 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java @@ -70,4 +70,5 @@ * @return */ List<VoOnHour> getOnHourReports_history(Map<?, ?> params); + } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java index d02ab16..63ccf0a 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java @@ -2,10 +2,11 @@ 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 @@ -64,4 +65,18 @@ * @return */ List<RmOnHourReportLast> getRmOnHourReportLast(Long intakeId); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鏁寸偣鎶ユ渶鏂拌褰曟暟閲� + * @param params + * @return + */ + Long getOnHourReportsCount_last(Map<?, ?> params); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鏁寸偣鎶ユ渶鏂拌褰� + * @param params + * @return + */ + List<VoOnHour> getOnHourReports_last(Map<?, ?> params); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java index bb78c28..7474543 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java @@ -2,8 +2,11 @@ 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 @@ -59,4 +62,18 @@ * @return update count */ int updateByPrimaryKey(RmOpenCloseValveHistory record); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇寮�鍏抽榾鎶ュ巻鍙茶褰曟暟閲� + * @param params + * @return + */ + Long getOpenCloseValveReportsCount_history(Map<?, ?> params); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇寮�鍏抽榾鎶ュ巻鍙茶褰� + * @param params + * @return + */ + List<VoOpenCloseValve> getOpenCloseValveReports_history(Map<?, ?> params); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java index 2c251ca..e9b9ec6 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java @@ -2,10 +2,11 @@ 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 @@ -69,4 +70,18 @@ * @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); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportHistoryMapper.java index 32f5cfc..4404b5e 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportHistoryMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportHistoryMapper.java @@ -2,7 +2,11 @@ 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 @@ -24,4 +28,18 @@ 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); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportLastMapper.java index 75f7ae9..65337d8 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportLastMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmTimingReportLastMapper.java @@ -2,9 +2,11 @@ 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 @@ -33,4 +35,18 @@ * @return */ List<RmTimingReportLast> getRmTimingReportLast(Long intakeId); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇瀹氭椂鎶ユ渶鏂拌褰曟暟閲� + * @param params + * @return + */ + Long getTimingReportsCount_last(Map<?, ?> params); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇瀹氭椂鎶ユ渶鏂拌褰� + * @param params + * @return + */ + List<VoTiming> getTimingReports_last(Map<?, ?> params); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportHistoryMapper.java index bcc4e96..f6f65f1 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportHistoryMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportHistoryMapper.java @@ -2,8 +2,11 @@ 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 @@ -59,4 +62,18 @@ * @return update count */ int updateByPrimaryKey(RmWorkReportHistory record); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇宸ヤ綔鎶ュ巻鍙茶褰曟暟閲� + * @param params + * @return + */ + Long getWorkReportsCount_history(Map<?, ?> params); + + /** + * 鏍规嵁鎸囧畾鏉′欢鑾峰彇宸ヤ綔鎶ュ巻鍙茶褰� + * @param params + * @return + */ + List<VoWork> getWorkReports_history(Map<?, ?> params); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportLastMapper.java index 779fd6a..de7ba8f 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportLastMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmWorkReportLastMapper.java @@ -1,11 +1,12 @@ 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 @@ -69,4 +70,18 @@ * @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); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOnHour.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOnHour.java index 26dece0..1da4dca 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOnHour.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOnHour.java @@ -5,6 +5,8 @@ import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import java.util.Date; + /** * @author ZhuBaoMin * @date 2024-07-23 17:12 @@ -36,7 +38,7 @@ * 鏁版嵁鎺ユ敹鏃堕棿 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private String receiveTime; + private Date receiveTime; /** * 鐬椂娴侀噺 diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOpenCloseValve.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOpenCloseValve.java new file mode 100644 index 0000000..9eed8fd --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoOpenCloseValve.java @@ -0,0 +1,133 @@ +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; + + /** + * 鍙栨按鍙D + */ + @JSONField(serializeUsing= ObjectWriterImplToString.class) + private Long intakeId; + + /** + * 鍙栨按鍙g紪鍙� + */ + 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; +} diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoTiming.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoTiming.java new file mode 100644 index 0000000..e216f9d --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoTiming.java @@ -0,0 +1,78 @@ +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; + + /** + * 鍙栨按鍙D + */ + private Long intakeId; + + /** + * 鍙栨按鍙g紪鍙� + */ + 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; +} diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoWork.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoWork.java new file mode 100644 index 0000000..933b15c --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoWork.java @@ -0,0 +1,179 @@ +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; + + /** + * 鍙栨按鍙D + */ + @JSONField(serializeUsing= ObjectWriterImplToString.class) + private Long intakeId; + + /** + * 鍙栨按鍙g紪鍙� + */ + 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; +} diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml index dab83eb..8a7c937 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml @@ -202,6 +202,9 @@ 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> @@ -231,6 +234,9 @@ 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> @@ -248,4 +254,5 @@ </if> </trim> </select> + </mapper> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml index 9881923..2d91d54 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml @@ -202,4 +202,64 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml index e65efd8..6ef2564 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml @@ -408,4 +408,81 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml index b098b54..8f9d0cc 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml @@ -428,4 +428,81 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportHistoryMapper.xml index 8b2b2e0..a2650e4 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportHistoryMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportHistoryMapper.xml @@ -219,4 +219,65 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportLastMapper.xml index b762a02..3cca12b 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportLastMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmTimingReportLastMapper.xml @@ -227,4 +227,65 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportHistoryMapper.xml index 87c4af8..e23deda 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportHistoryMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportHistoryMapper.xml @@ -432,4 +432,83 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportLastMapper.xml index dc9d03b..310fac4 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportLastMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWorkReportLastMapper.xml @@ -439,4 +439,83 @@ 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> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java index f9a8a68..a4119e8 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java @@ -28,7 +28,6 @@ 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; @@ -212,7 +211,6 @@ * @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(); diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsCtrl.java index 952336d..25f859e 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsCtrl.java @@ -9,6 +9,8 @@ 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; diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsSv.java index f1adb13..0ef668a 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsSv.java @@ -5,6 +5,8 @@ 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; diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java new file mode 100644 index 0000000..e26c93c --- /dev/null +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java @@ -0,0 +1,32 @@ +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; +} diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java new file mode 100644 index 0000000..bc3d339 --- /dev/null +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java @@ -0,0 +1,44 @@ +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 = "鍙栨按鍙e悕绉�", 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姝e父銆�1鎶ヨ锛� + private Byte alarmState; +} diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportCtrl.java index e3cdcda..4294b2b 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportCtrl.java @@ -5,7 +5,11 @@ 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; @@ -35,11 +39,116 @@ */ @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()) ; + } + } } diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java index ed17765..2131e44 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java @@ -3,7 +3,11 @@ 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; @@ -44,7 +48,7 @@ * @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) { @@ -68,5 +72,228 @@ 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 ; + } } diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/ReportQO.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OnHourQO.java similarity index 75% rename from pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/ReportQO.java rename to pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OnHourQO.java index 92b88f6..2f1a65b 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/ReportQO.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OnHourQO.java @@ -7,7 +7,7 @@ * @author ZhuBaoMin * @date 2024-07-23 16:31 * @LastEditTime 2024-07-23 16:31 - * @Description + * @Description 鏁寸偣鎶ユ煡璇㈠璞� */ @Data @@ -16,7 +16,12 @@ @NoArgsConstructor @AllArgsConstructor @Builder -public class ReportQO extends QueryConditionVo { +public class OnHourQO extends QueryConditionVo { + + /** + * 鍙栨按鍙D锛屾渶鏂拌褰曡烦杞巻鍙茶褰曟椂浣跨敤 + */ + private Long intakeId; /** * 鍙栨按鍙g紪鍙� diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OpenCloseValveQO.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OpenCloseValveQO.java new file mode 100644 index 0000000..c6f4cc4 --- /dev/null +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/qo/OpenCloseValveQO.java @@ -0,0 +1,54 @@ +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 { + /** + * 鍙栨按鍙D锛屾渶鏂拌褰曡烦杞巻鍙茶褰曟椂浣跨敤 + */ + private Long intakeId; + + /** + * 鍙栨按鍙g紪鍙� + */ + private String intakeNum; + + /** + * 闃�鎺у櫒鍦板潃 + */ + private String rtuAddr; + + /** + * 鏌ヨ寮�濮嬫棩鏈焈寮�闃� + */ + private String timeStart_open; + + /** + * 鏌ヨ缁撴潫鏃ユ湡_寮�闃� + */ + private String timeStop_open; + + /** + * 鏌ヨ寮�濮嬫棩鏈焈鍏抽榾 + */ + private String timeStart_close; + + /** + * 鏌ヨ缁撴潫鏃ユ湡_鍏抽榾 + */ + private String timeStop_close; +} -- Gitblit v1.8.0