From 86719a90118b4b458ae593b53457f23c11ee8d44 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 25 七月 2024 15:27:52 +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/pojoSt/StClientAmountMonth.java | 67 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayCtrl.java | 96 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml | 14
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml | 122 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountYearMapper.xml | 91 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossYearMapper.java | 55
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossMonth.java | 65 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml | 6
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java | 2
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayLastMapper.java | 93 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml | 47
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java | 10
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountMonthMapper.xml | 110 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java | 2
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeLossStatistics.java | 14
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java | 61 +
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java | 20
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDaySv.java | 71 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossMonthMapper.java | 72 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoClientAmountStatistics.java | 15
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateSv.java | 72 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossMonthMapper.xml | 111 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDaySv.java | 71 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsCtrl.java | 63 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDayLast.java | 2
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeAmountStatistics.java | 14
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayCtrl.java | 94 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIntakeAmountDay.java | 52
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountMonthMapper.java | 73 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml | 4
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountMonth.java | 61 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayQueryVo.java | 32
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsListener.java | 3
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoLossDay.java | 48
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml | 23
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml | 2
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsJob.java | 78 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayLastMapper.java | 18
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/RecordsSv.java | 58
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java | 66 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountYearMapper.java | 55
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClient.java | 22
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/dbSv/DbSv.java | 29
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayMapper.java | 31
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml | 55
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayMapper.java | 100 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java | 55
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/util/OrgListener.java | 22
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java | 97 +
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLoss.java | 19
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossYearMapper.xml | 90 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayCtrl.java | 98 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java | 33
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java | 69 +
/dev/null | 68 -
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossYear.java | 55
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml | 205 +++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountYear.java | 55
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLossSv.java | 66 +
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntake.java | 18
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml | 111 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmClientAmountDayMapper.java | 12
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml | 102 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java | 67 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDaySv.java | 72 +
65 files changed, 3,385 insertions(+), 199 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmClientAmountDayMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmClientAmountDayMapper.java
index 0ab6a70..807bfae 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmClientAmountDayMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmClientAmountDayMapper.java
@@ -3,7 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmClientAmountDay;
import com.dy.pipIrrGlobal.voRm.VoClientAmountDay;
-import com.dy.pipIrrGlobal.voRm.VoControllerAlarmState;
+import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -88,4 +88,14 @@
* @return
*/
List<VoClientAmountDay> getClientAmountDayHistory(Map<?, ?> params);
+
+
+ /**
+ * 浠ュ啘鎴风淮搴︾粺璁$敤姘撮噺鍙婅垂鐢�
+ * @param statisticsStartId 缁熻鏃堕棿娈靛紑濮嬫椂闂村搴旂殑ID
+ * @param statisticsEndId 缁熻鏃堕棿娈垫埅姝㈡椂闂村搴旂殑ID
+ * @return
+ */
+ List<VoClientAmountStatistics> statisticsByClient(@Param("startId")Long statisticsStartId, @Param("endId")Long statisticsEndId) ;
+
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayLastMapper.java
index e347da8..ab88f66 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayLastMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayLastMapper.java
@@ -1,12 +1,12 @@
package com.dy.pipIrrGlobal.daoRm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay;
import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDayLast;
-import com.dy.pipIrrGlobal.pojoRm.RmLossLast;
+import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
+import java.util.Map;
/**
* @Author: liurunyu
@@ -63,4 +63,18 @@
* @return update count
*/
int updateByPrimaryKey(RmIntakeAmountDayLast record);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟
+ * @param params
+ * @return
+ */
+ Long getRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍
+ * @param params
+ * @return
+ */
+ List<VoIntakeAmountDay> getIntakeAmountDayLast(Map<?, ?> params);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayMapper.java
index 3b3cd14..7b8e54a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountDayMapper.java
@@ -2,12 +2,15 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay;
-import com.dy.pipIrrGlobal.pojoRm.RmLossHistory;
-import com.dy.pipIrrGlobal.pojoRm.RmOnHourReportHistory;
+import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay;
+import com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
+import java.util.Map;
/**
* @Author: liurunyu
@@ -64,4 +67,28 @@
* @return update count
*/
int updateByPrimaryKey(RmIntakeAmountDay record);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟
+ * @param params
+ * @return
+ */
+ Long getRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍
+ * @param params
+ * @return
+ */
+ List<VoIntakeAmountDay> getIntakeAmountDayHistory(Map<?, ?> params);
+
+
+ /**
+ * 浠ュ彇姘村彛缁村害缁熻鍙栨按鍙e彇姘撮噺
+ * @param statisticsStartId 缁熻鏃堕棿娈靛紑濮嬫椂闂村搴旂殑ID
+ * @param statisticsEndId 缁熻鏃堕棿娈垫埅姝㈡椂闂村搴旂殑ID
+ * @return
+ */
+ List<VoIntakeAmountStatistics> statisticsByIntake(@Param("startId")Long statisticsStartId, @Param("endId")Long statisticsEndId) ;
+
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayLastMapper.java
new file mode 100644
index 0000000..b2cc73d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayLastMapper.java
@@ -0,0 +1,93 @@
+package com.dy.pipIrrGlobal.daoRm;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.voRm.VoLossDay;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
+import com.dy.pipIrrGlobal.pojoRm.RmLossDayLast;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author liurunyu
+ * @Date 2024/2/28 15:31
+ * @LastEditTime 2024/2/28 15:31
+ * @Description
+ */
+@Mapper
+public interface RmLossDayLastMapper extends BaseMapper<RmLossDayLast> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(RmLossDayLast record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(RmLossDayLast record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ RmLossDayLast selectByPrimaryKey(Long id);
+
+ /**
+ * select by rtuAddr
+ * @param intakeId 鎺у埗鍣ㄦ墍缁戝彇姘村彛ID
+ * @return object by rtuAddr
+ */
+ List<RmLossDayLast> selectByIntakeId(Long intakeId) ;
+ /**
+ * select by dt
+ * @param date 鏃ユ湡锛坹yyy-mm-dd锛�
+ * @return object by rtuAddr
+ */
+ List<RmLossDayLast> selectByDate(Date date) ;
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(RmLossDayLast record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(RmLossDayLast record);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟
+ * @param params
+ * @return
+ */
+ Long getRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍
+ * @param params
+ * @return
+ */
+ List<VoLossDay> getLossDayLast(Map<?, ?> params);
+
+
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayMapper.java
new file mode 100644
index 0000000..7647fa9
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossDayMapper.java
@@ -0,0 +1,100 @@
+package com.dy.pipIrrGlobal.daoRm;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoRm.RmLossDay;
+import com.dy.pipIrrGlobal.voRm.VoLossDay;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author liurunyu
+ * @Date 2024/2/28 15:31
+ * @LastEditTime 2024/2/28 15:31
+ * @Description
+ */
+@Mapper
+public interface RmLossDayMapper extends BaseMapper<RmLossDay> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(RmLossDay record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(RmLossDay record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ RmLossDay selectByPrimaryKey(Long id);
+
+ /**
+ * select by rtuAddr
+ * @param intakeId 鎺у埗鍣ㄦ墍缁戝彇姘村彛ID
+ * @return object by rtuAddr
+ */
+ List<RmLossDay> selectByIntakeId(Long intakeId) ;
+ /**
+ /**
+ * select by dt
+ * @param date 鏃ユ湡锛坹yyy-mm-dd锛�
+ * @return object by rtuAddr
+ */
+ List<RmLossDay> selectByDate(Date date) ;
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(RmLossDay record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(RmLossDay record);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟
+ * @param params
+ * @return
+ */
+ Long getRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍
+ * @param params
+ * @return
+ */
+ List<VoLossDay> getLossDayHistory(Map<?, ?> params);
+
+
+ /**
+ * 浠ュ彇姘村彛缁村害缁熻婕忔崯閲�
+ * @param statisticsStartId 缁熻鏃堕棿娈靛紑濮嬫椂闂村搴旂殑ID
+ * @param statisticsEndId 缁熻鏃堕棿娈垫埅姝㈡椂闂村搴旂殑ID
+ * @return
+ */
+ List<VoIntakeLossStatistics> statisticsByIntake(@Param("startId")Long statisticsStartId, @Param("endId")Long statisticsEndId) ;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossHistoryMapper.java
deleted file mode 100644
index d346315..0000000
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossHistoryMapper.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.dy.pipIrrGlobal.daoRm;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay;
-import com.dy.pipIrrGlobal.pojoRm.RmLossHistory;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * @Author liurunyu
- * @Date 2024/2/28 15:31
- * @LastEditTime 2024/2/28 15:31
- * @Description
- */
-@Mapper
-public interface RmLossHistoryMapper extends BaseMapper<RmLossHistory> {
- /**
- * delete by primary key
- * @param id primaryKey
- * @return deleteCount
- */
- int deleteByPrimaryKey(Long id);
-
- /**
- * insert record to table
- * @param record the record
- * @return insert count
- */
- int insert(RmLossHistory record);
-
- /**
- * insert record to table selective
- * @param record the record
- * @return insert count
- */
- int insertSelective(RmLossHistory record);
-
- /**
- * select by primary key
- * @param id primary key
- * @return object by primary key
- */
- RmLossHistory selectByPrimaryKey(Long id);
-
- /**
- * select by dt
- * @param date 鏃ユ湡锛坹yyy-mm-dd锛�
- * @return object by rtuAddr
- */
- List<RmLossHistory> selectByDate(Date date) ;
-
- /**
- * update record selective
- * @param record the updated record
- * @return update count
- */
- int updateByPrimaryKeySelective(RmLossHistory record);
-
- /**
- * update record
- * @param record the updated record
- * @return update count
- */
- int updateByPrimaryKey(RmLossHistory record);
-}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossLastMapper.java
deleted file mode 100644
index 0dd4bc9..0000000
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmLossLastMapper.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.dy.pipIrrGlobal.daoRm;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.dy.pipIrrGlobal.pojoRm.RmLossHistory;
-import com.dy.pipIrrGlobal.pojoRm.RmLossLast;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * @Author liurunyu
- * @Date 2024/2/28 15:31
- * @LastEditTime 2024/2/28 15:31
- * @Description
- */
-@Mapper
-public interface RmLossLastMapper extends BaseMapper<RmLossLast> {
- /**
- * delete by primary key
- * @param id primaryKey
- * @return deleteCount
- */
- int deleteByPrimaryKey(Long id);
-
- /**
- * insert record to table
- * @param record the record
- * @return insert count
- */
- int insert(RmLossLast record);
-
- /**
- * insert record to table selective
- * @param record the record
- * @return insert count
- */
- int insertSelective(RmLossLast record);
-
- /**
- * select by primary key
- * @param id primary key
- * @return object by primary key
- */
- RmLossLast selectByPrimaryKey(Long id);
-
- /**
- * select by rtuAddr
- * @param intakeId 鎺у埗鍣ㄦ墍缁戝彇姘村彛ID
- * @return object by rtuAddr
- */
- List<RmLossLast> selectByIntakeId(Long intakeId) ;
- /**
- * select by dt
- * @param date 鏃ユ湡锛坹yyy-mm-dd锛�
- * @return object by rtuAddr
- */
- List<RmLossLast> selectByDate(Date date) ;
-
- /**
- * update record selective
- * @param record the updated record
- * @return update count
- */
- int updateByPrimaryKeySelective(RmLossLast record);
-
- /**
- * update record
- * @param record the updated record
- * @return update count
- */
- int updateByPrimaryKey(RmLossLast record);
-}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java
new file mode 100644
index 0000000..43a55a6
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java
@@ -0,0 +1,67 @@
+package com.dy.pipIrrGlobal.daoSt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth;
+import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 17:03
+ * @Description
+ */
+@Mapper
+public interface StClientAmountMonthMapper extends BaseMapper<StClientAmountMonth> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(StClientAmountMonth record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(StClientAmountMonth record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ StClientAmountMonth selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(StClientAmountMonth record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(StClientAmountMonth record);
+
+
+ /**
+ * 浠ュ啘鎴风淮搴︾粺璁$敤姘撮噺鍙婅垂鐢�
+ * @param year 缁熻骞村害
+ * @return
+ */
+ List<VoClientAmountStatistics> statisticsByClient(Integer year) ;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java
new file mode 100644
index 0000000..d25a617
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.daoSt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountYear;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 17:03
+ * @Description
+ */
+@Mapper
+public interface StClientAmountYearMapper extends BaseMapper<StClientAmountYear> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(StClientAmountYear record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(StClientAmountYear record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ StClientAmountYear selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(StClientAmountYear record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(StClientAmountYear record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountMonthMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountMonthMapper.java
new file mode 100644
index 0000000..5235d26
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountMonthMapper.java
@@ -0,0 +1,73 @@
+package com.dy.pipIrrGlobal.daoSt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth;
+import com.dy.pipIrrGlobal.pojoSt.StLossMonth;
+import com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 16:38
+ * @Description
+ */
+@Mapper
+public interface StIntakeAmountMonthMapper extends BaseMapper<StIntakeAmountMonth> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(StIntakeAmountMonth record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(StIntakeAmountMonth record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ StIntakeAmountMonth selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(StIntakeAmountMonth record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(StIntakeAmountMonth record);
+
+ /**
+ * 浠ュ彇姘村彛缁村害缁熻鍙栨按閲�
+ * @param year 缁熻骞村害
+ * @return
+ */
+ List<VoIntakeAmountStatistics> statisticsByIntake(Integer year, Integer month, Long startId, Long endId) ;
+ /**
+ * 浠ュ彇姘村彛缁村害缁熻鍙栨按閲�
+ * @param year 缁熻骞村害
+ * @return
+ */
+ List<VoIntakeAmountStatistics> statisticsByIntake(Integer year) ;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountYearMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountYearMapper.java
new file mode 100644
index 0000000..3c75c42
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StIntakeAmountYearMapper.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.daoSt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 16:38
+ * @Description
+ */
+@Mapper
+public interface StIntakeAmountYearMapper extends BaseMapper<StIntakeAmountYear> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(StIntakeAmountYear record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(StIntakeAmountYear record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ StIntakeAmountYear selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(StIntakeAmountYear record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(StIntakeAmountYear record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossMonthMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossMonthMapper.java
new file mode 100644
index 0000000..712f239
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossMonthMapper.java
@@ -0,0 +1,72 @@
+package com.dy.pipIrrGlobal.daoSt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSt.StLossMonth;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 15:48
+ * @Description
+ */
+@Mapper
+public interface StLossMonthMapper extends BaseMapper<StLossMonth> {
+ /**
+ * delete by primary key
+ *
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ *
+ * @param record the record
+ * @return insert count
+ */
+ int insert(StLossMonth record);
+
+ /**
+ * insert record to table selective
+ *
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(StLossMonth record);
+
+ /**
+ * select by primary key
+ *
+ * @param id primary key
+ * @return object by primary key
+ */
+ StLossMonth selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ *
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(StLossMonth record);
+
+ /**
+ * update record
+ *
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(StLossMonth record);
+
+ /**
+ * 浠ュ彇姘村彛缁村害缁熻婕忔崯閲�
+ * @param year 缁熻骞村害
+ * @return
+ */
+ List<VoIntakeLossStatistics> statisticsByIntake(Integer year) ;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossYearMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossYearMapper.java
new file mode 100644
index 0000000..5fa6d70
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StLossYearMapper.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.daoSt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSt.StLossYear;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 15:18
+ * @Description
+ */
+@Mapper
+public interface StLossYearMapper extends BaseMapper<StLossYear> {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(StLossYear record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(StLossYear record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ StLossYear selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(StLossYear record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(StLossYear record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossHistory.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java
similarity index 98%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossHistory.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java
index fd5fd49..a7d5754 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossHistory.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java
@@ -28,7 +28,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "鎺у埗鍣ㄦ棩婕忔崯姘撮噺鍘嗗彶鏁版嵁 ")
-public class RmLossHistory implements BaseEntity {
+public class RmLossDay implements BaseEntity {
public static final long serialVersionUID = 202402281620001L;
/**
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossLast.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDayLast.java
similarity index 98%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossLast.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDayLast.java
index 7b38ffa..5e6ffc9 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossLast.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDayLast.java
@@ -28,7 +28,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "鎺у埗鍣ㄦ棩婕忔崯姘撮噺鏈�鏂版暟鎹�")
-public class RmLossLast implements BaseEntity {
+public class RmLossDayLast implements BaseEntity {
public static final long serialVersionUID = 202402281621001L;
/**
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java
new file mode 100644
index 0000000..7a6b8db
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java
@@ -0,0 +1,67 @@
+package com.dy.pipIrrGlobal.pojoSt;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 17:03
+ * @Description
+ */
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+@TableName(value="rm_client_amount_month", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍐滄埛鐢ㄦ按閲忓強璐圭敤鏈堢粺璁�")
+public class StClientAmountMonth implements BaseEntity {
+
+ public static final long serialVersionUID = 202407241705001L;
+ /**
+ * 涓婚敭
+ */
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @Schema(description = "鍐滄埛澶栭敭", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long clientId;
+
+ /**
+ * 缁熻骞村害
+ */
+ @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer year;
+
+ /**
+ * 缁熻鏈堜唤
+ */
+ @Schema(description = "缁熻鏈堜唤", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer month;
+
+ /**
+ * 鐢ㄦ按閲忥紙m3锛�
+ */
+ @Schema(description = "鏈堢敤姘撮噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+ /**
+ * 璐圭敤锛堝厓锛�
+ */
+ @Schema(description = "鏈堣垂鐢紙鍏冿級", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double money;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java
new file mode 100644
index 0000000..ca94c39
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java
@@ -0,0 +1,61 @@
+package com.dy.pipIrrGlobal.pojoSt;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 17:03
+ * @Description
+ */
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+@TableName(value="rm_client_amount_year", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍐滄埛鐢ㄦ按閲忓強璐圭敤骞寸粺璁�")
+public class StClientAmountYear implements BaseEntity {
+
+ public static final long serialVersionUID = 202407241705002L;
+ /**
+ * 涓婚敭
+ */
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @Schema(description = "鍐滄埛澶栭敭", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long clientId;
+
+ /**
+ * 缁熻骞村害
+ */
+ @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer year;
+
+ /**
+ * 骞寸敤姘撮噺
+ */
+ @Schema(description = "骞寸敤姘撮噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+ /**
+ * 骞磋垂鐢�
+ */
+ @Schema(description = "骞磋垂鐢紙鍏冿級", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double money;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountMonth.java
new file mode 100644
index 0000000..69ab585
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountMonth.java
@@ -0,0 +1,61 @@
+package com.dy.pipIrrGlobal.pojoSt;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 16:38
+ * @Description
+ */
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+@TableName(value="rm_intake_amount_month", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙e彇姘撮噺鏈堢粺璁�")
+public class StIntakeAmountMonth implements BaseEntity {
+
+ public static final long serialVersionUID = 202407241644001L;
+ /**
+ * 涓婚敭
+ */
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鍙栨按鍙D
+ */
+ @Schema(description = "鍙栨按鍙e閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long intakeId;
+
+ /**
+ * 缁熻骞村害
+ */
+ @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer year;
+
+ /**
+ * 缁熻鏈堜唤
+ */
+ @Schema(description = "缁熻鏈堜唤", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer month;
+
+ /**
+ * 鏈堝彇姘撮噺
+ */
+ @Schema(description = "鏈堝彇姘撮噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountYear.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountYear.java
new file mode 100644
index 0000000..9b56873
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StIntakeAmountYear.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.pojoSt;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 16:38
+ * @Description
+ */
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+@TableName(value="rm_intake_amount_year", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙e勾鍙栨按閲忕粺璁�")
+public class StIntakeAmountYear implements BaseEntity {
+
+ public static final long serialVersionUID = 202407241644002L;
+ /**
+ * 涓婚敭
+ */
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鍙栨按鍙D
+ */
+ @Schema(description = "鍙栨按鍙e疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long intakeId;
+
+ /**
+ * 缁熻骞村害
+ */
+ @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer year;
+
+ /**
+ * 骞村彇姘撮噺
+ */
+ @Schema(description = "骞村彇姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossMonth.java
new file mode 100644
index 0000000..4356bc1
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossMonth.java
@@ -0,0 +1,65 @@
+package com.dy.pipIrrGlobal.pojoSt;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 15:48
+ * @Description 鍙栨按鍙f紡鎹熸湀缁熻
+ */
+
+@TableName(value="rm_loss_month", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙f紡鎹熸湀缁熻")
+public class StLossMonth implements BaseEntity {
+
+ public static final long serialVersionUID = 202407241523001L;
+ /**
+ * 涓婚敭
+ */
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+
+ /**
+ * 鍙栨按鍙D
+ */
+ /**
+ * 鍙栨按鍙D
+ */
+ @Schema(description = "鍙栨按鍙e閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long intakeId;
+
+ /**
+ * 缁熻骞�
+ */
+ @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer year;
+
+ /**
+ * 缁熻鏈�
+ */
+ @Schema(description = "缁熻鏈堜唤", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer month;
+
+ /**
+ * 鏈堢粺璁�
+ */
+ @Schema(description = "鏈堟紡鎹熼噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossYear.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossYear.java
new file mode 100644
index 0000000..7ce65e3
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StLossYear.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.pojoSt;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 15:18
+ * @Description 鍙栨按鍙f紡鎹熷勾缁熻
+ */
+
+@TableName(value="rm_loss_year", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙f紡鎹熷勾缁熻")
+public class StLossYear implements BaseEntity {
+
+ public static final long serialVersionUID = 202407241523002L;
+ /**
+ * 涓婚敭
+ */
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鍙栨按鍙D
+ */
+ @Schema(description = "鍙栨按鍙e疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long intakeId;
+
+ /**
+ * 骞村害
+ */
+ @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer year;
+
+ /**
+ * 骞存紡鎹熺粺璁�
+ */
+ @Schema(description = "骞存紡鎹熼噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIntakeAmountDay.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIntakeAmountDay.java
new file mode 100644
index 0000000..9d1b4ea
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIntakeAmountDay.java
@@ -0,0 +1,52 @@
+package com.dy.pipIrrGlobal.voRm;
+
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 10:27
+ * @LastEditTime :2024/7/24 10:27
+ * @Description
+ */
+@Data
+@Schema(title = "鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺瑙嗗浘瀵硅薄")
+public class VoIntakeAmountDay implements BaseEntity {
+
+ private static final long serialVersionUID = 202407241028001L;
+
+
+ @Schema(description = "鍙栨按鍙D", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String intakeId;
+
+ @Schema(description = "鍙栨按鍙e悕绉�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String intakeName;
+
+ @Schema(description = "鏃ュ彇姘撮噺锛堜笉鍖呮嫭婕忔崯姘撮噺锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Double amount;
+
+ @Schema(description = "缁熻鏃ユ湡(yyyy-mm-dd)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private java.sql.Date dt;
+
+ @Schema(description = "鏈�鍚庤姘撮噺涓婃姤鏁版嵁鎺ユ敹鏃堕棿(yyyy-mm-dd hh:mm:ss)", 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 java.util.Date dtLast;
+
+ @Schema(description = "鏈�鍚庤姘撮噺鐨勬帶鍒跺櫒鍦板潃", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String rtuAddrLast;
+
+ @Schema(description = "鏈�鍚庤姘撮噺鐨勬帶鍒跺櫒ID锛堝閿級", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String controllerIdLast;
+
+ @Schema(description = "鏈�鍚庤姘撮噺鏃舵帶鍒跺櫒绱姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Double totalAmountLast;
+
+ @Schema(description = "鏈�鍚庤姘撮噺鏃舵帶鍒跺櫒鏃堕挓锛坹yyy-mm-dd HH:MM:SS锛�", 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 java.util.Date rtuDtLast;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoLossDay.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoLossDay.java
new file mode 100644
index 0000000..7849c78
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoLossDay.java
@@ -0,0 +1,48 @@
+package com.dy.pipIrrGlobal.voRm;
+
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 15:50
+ * @LastEditTime :2024/7/24 15:50
+ * @Description
+ */
+@Data
+@Schema(title = "婕忔崯璁板綍瑙嗗浘瀵硅薄")
+public class VoLossDay implements BaseEntity {
+
+ private static final long serialVersionUID = 202407241551001L;
+
+ @Schema(description = "鎺у埗鍣↖D", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String controllerId;
+
+ @Schema(description = "鍙栨按鍙D", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String intakeId;
+
+ @Schema(description = "鍙栨按鍙e悕绉�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String intakeName;
+
+ @Schema(description = "鎺у埗鍣ㄥ湴鍧�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String rtuAddr;
+
+ @Schema(description = "缁熻鏃ユ湡(yyyy-mm-dd)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private java.sql.Date dt;
+
+ @Schema(description = "鎺у埗鍣ㄦ渶鍚庝笂鎶ユ暟鎹棩鏈熸椂闂�(yyyy-mm-dd hh:mm:ss)", 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 java.util.Date dtLast;
+
+ @Schema(description = "鎺у埗鍣ㄦ椂閽燂紙yyyy-mm-dd HH:MM:SS锛�", 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 java.util.Date dtRtu;
+
+ @Schema(description = "鏃ユ紡鎹熸祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Double lossAmount;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoClientAmountStatistics.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoClientAmountStatistics.java
new file mode 100644
index 0000000..dfdbe82
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoClientAmountStatistics.java
@@ -0,0 +1,15 @@
+package com.dy.pipIrrGlobal.voSt;
+
+import lombok.Data;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 17:09
+ * @Description
+ */
+@Data
+public class VoClientAmountStatistics {
+ public Long clientId ;
+ public Double amount;
+ public Double money;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeAmountStatistics.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeAmountStatistics.java
new file mode 100644
index 0000000..508e4ae
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeAmountStatistics.java
@@ -0,0 +1,14 @@
+package com.dy.pipIrrGlobal.voSt;
+
+import lombok.Data;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 14:16
+ * @Description 浠ュ彇姘村彛缁熻婕忔崯
+ */
+@Data
+public class VoIntakeAmountStatistics {
+ public Long intakeId ;
+ public Double amount;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeLossStatistics.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeLossStatistics.java
new file mode 100644
index 0000000..72cda07
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntakeLossStatistics.java
@@ -0,0 +1,14 @@
+package com.dy.pipIrrGlobal.voSt;
+
+import lombok.Data;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 14:16
+ * @Description 浠ュ彇姘村彛缁熻婕忔崯
+ */
+@Data
+public class VoIntakeLossStatistics {
+ public Long intakeId ;
+ public Double amount;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
index 12877db..cf03082 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -72,7 +72,7 @@
pipIrr:
global:
- dev: false #鏄惁寮�鍙戦樁娈碉紝true鎴杅alse
+ dev: true #鏄惁寮�鍙戦樁娈碉紝true鎴杅alse
dsName: ym #寮�鍙戦樁娈碉紝璁剧疆涓存椂鐨勬暟鎹簱鍚嶇О
mw:
webPort: 8070
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
index 924a29c..55279e8 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
@@ -397,7 +397,7 @@
and rash.valve_state = #{valveState,jdbcType=TINYINT}
</if>
<if test="intakeName != null">
- and pint.name = #{intakeName,jdbcType=VARCHAR}
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
and rash.dt >= #{startDt,jdbcType=TIMESTAMP}
@@ -487,7 +487,7 @@
and rash.dt <= #{endDt,jdbcType=TIMESTAMP}
</if>
</where>
- ORDER BY rash.dt DESC
+ ORDER BY rash.id DESC
<if test="pageCurr != null and pageSize != null">
LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
</if>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml
index 6fb51ff..98990c4 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml
@@ -379,7 +379,7 @@
and rasl.valve_state = #{valveState,jdbcType=TINYINT}
</if>
<if test="intakeName != null">
- and pint.name = #{intakeName,jdbcType=VARCHAR}
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
and rasl.dt >= #{startDt,jdbcType=TIMESTAMP}
@@ -416,7 +416,7 @@
rasl.alarm_valve as alarmValve,
rasl.power_type as powerType
from rm_alarm_state_last rasl
- Left join pr_intake pint on intake_id = pint.id
+ Left join pr_intake pint on rasl.intake_id = pint.id
<where>
<if test="alarmState == 1">
and (
@@ -469,7 +469,7 @@
and rasl.dt <= #{endDt,jdbcType=TIMESTAMP}
</if>
</where>
- ORDER BY rasl.dt DESC
+ ORDER BY rasl.id DESC
<if test="pageCurr != null and pageSize != null">
LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
</if>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml
index 8179361..f674e37 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml
@@ -195,13 +195,13 @@
Left join se_client sc on sc.id = rcadl.client_id
<where>
<if test="clientName != null">
- and sc.name = #{clientName,jdbcType=VARCHAR}
+ and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
- and rash.dt >= #{startDt,jdbcType=TIMESTAMP}
+ and rcadl.dt >= #{startDt,jdbcType=DATE}
</if>
<if test="endDt != null">
- and rash.dt <= #{endDt,jdbcType=TIMESTAMP}
+ and rcadl.dt <= #{endDt,jdbcType=DATE}
</if>
</where>
</select>
@@ -223,16 +223,16 @@
Left join se_client sc on sc.id = rcadl.client_id
<where>
<if test="clientName != null">
- and sc.name = #{clientName,jdbcType=VARCHAR}
+ and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
- and rash.dt >= #{startDt,jdbcType=TIMESTAMP}
+ and rcadl.dt >= #{startDt,jdbcType=DATE}
</if>
<if test="endDt != null">
- and rash.dt <= #{endDt,jdbcType=TIMESTAMP}
+ and rcadl.dt <= #{endDt,jdbcType=DATE}
</if>
</where>
- ORDER BY rcadl.dt DESC
+ ORDER BY rcadl.id DESC
<if test="pageCurr != null and pageSize != null">
LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
</if>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml
index 8c8f8ef..e2cbdd6 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml
@@ -185,13 +185,13 @@
Left join se_client sc on sc.id = rcad.client_id
<where>
<if test="clientName != null">
- and sc.name = #{clientName,jdbcType=VARCHAR}
+ and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
- and rash.dt >= #{startDt,jdbcType=TIMESTAMP}
+ and rcad.dt >= #{startDt,jdbcType=DATE}
</if>
<if test="endDt != null">
- and rash.dt <= #{endDt,jdbcType=TIMESTAMP}
+ and rcad.dt <= #{endDt,jdbcType=DATE}
</if>
</where>
</select>
@@ -213,18 +213,27 @@
Left join se_client sc on sc.id = rcad.client_id
<where>
<if test="clientName != null">
- and sc.name = #{clientName,jdbcType=VARCHAR}
+ and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
- and rash.dt >= #{startDt,jdbcType=TIMESTAMP}
+ and rcad.dt >= #{startDt,jdbcType=DATE}
</if>
<if test="endDt != null">
- and rash.dt <= #{endDt,jdbcType=TIMESTAMP}
+ and rcad.dt <= #{endDt,jdbcType=DATE}
</if>
</where>
- ORDER BY rcad.dt DESC
+ ORDER BY rcad.id DESC
<if test="pageCurr != null and pageSize != null">
LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
</if>
</select>
+
+
+ <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics">
+ select client_id, sum(amount) as amount, sum(money) as money
+ from rm_client_amount_day
+ where id <![CDATA[>=]]> #{startId,jdbcType=BIGINT} and id <![CDATA[<]]> #{endId,jdbcType=BIGINT}
+ group by client_id
+ </select>
+
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
index 25a5872..ea0db3b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
@@ -167,4 +167,51 @@
rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟-->
+ <select id="getRecordCount" resultType="java.lang.Long">
+ select count(*)
+ from rm_intake_amount_day_last riadl
+ Left join pr_intake pint on pint.id = riadl.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and riadl.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and riadl.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ </select>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍-->
+ <select id="getIntakeAmountDayLast" resultType="com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay">
+ select
+ CAST(riadl.intake_id AS char)AS intakeId,
+ pint.name as intakeName,
+ riadl.dt as dt,
+ riadl.amount as amount,
+ riadl.dt_last as dtLast,
+ riadl.rtu_addr_last as rtuAddrLast,
+ CAST(riadl.controller_id_last AS char)AS controllerIdLast,
+ riadl.total_amount_last as totalAmountLast,
+ riadl.rtu_dt_last as rtuDtLast
+ from rm_intake_amount_day_last riadl
+ Left join pr_intake pint on pint.id = riadl.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and riadl.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and riadl.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ ORDER BY riadl.id DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
+ </if>
+ </select>
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml
index f96ad0c..ac46b99 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml
@@ -155,4 +155,59 @@
rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟-->
+ <select id="getRecordCount" resultType="java.lang.Long">
+ select count(*)
+ from rm_intake_amount_day riad
+ Left join pr_intake pint on pint.id = riad.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and riad.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and riad.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ </select>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍-->
+ <select id="getIntakeAmountDayHistory" resultType="com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay">
+ select
+ CAST(riad.intake_id AS char)AS intakeId,
+ pint.name as intakeName,
+ riad.dt as dt,
+ riad.amount as amount,
+ riad.dt_last as dtLast,
+ riad.rtu_addr_last as rtuAddrLast,
+ CAST(riad.controller_id_last AS char)AS controllerIdLast,
+ riad.total_amount_last as totalAmountLast,
+ riad.rtu_dt_last as rtuDtLast
+ from rm_intake_amount_day riad
+ Left join pr_intake pint on pint.id = riad.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and riad.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and riad.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ ORDER BY riad.id DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
+ </if>
+ </select>
+
+
+ <select id="statisticsByIntake" resultType="com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics">
+ select intake_id, sum(amount) amount
+ from rm_intake_amount_day
+ where id <![CDATA[>=]]> #{startId, jdbcType=BIGINT} and id <![CDATA[<]]> #{endId, jdbcType=BIGINT}
+ group by intake_id
+ </select>
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml
similarity index 62%
rename from pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossLastMapper.xml
rename to pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml
index 5a99947..cf6a6ca 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.dy.pipIrrGlobal.daoRm.RmLossLastMapper">
- <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmLossLast">
+<mapper namespace="com.dy.pipIrrGlobal.daoRm.RmLossDayLastMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmLossDayLast">
<!--@mbg.generated-->
- <!--@Table rm_loss_last-->
+ <!--@Table rm_loss_day_last-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="last_history_id" jdbcType="BIGINT" property="lastHistoryId" />
<result column="controller_id" jdbcType="BIGINT" property="controllerId" />
@@ -20,42 +20,42 @@
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
- select
+ select
<include refid="Base_Column_List" />
- from rm_loss_last
+ from rm_loss_day_last
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByIntakeId" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
- from rm_loss_last
+ from rm_loss_day_last
where intake_id = #{intakeId,jdbcType=BIGINT}
</select>
<select id="selectByDate" parameterType="java.util.Date" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
- from rm_loss_last
+ from rm_loss_day_last
where dt = #{dt,jdbcType=DATE}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
- delete from rm_loss_last
+ delete from rm_loss_day_last
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossLast">
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDayLast">
<!--@mbg.generated-->
- insert into rm_loss_last (id, last_history_id, controller_id,
- intake_id, rtu_addr, dt, dt_last, dt_rtu,
- loss_amount)
- values (#{id,jdbcType=BIGINT}, #{lastHistoryId,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT},
- #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{dtLast,jdbcType=TIMESTAMP}, #{dtRtu,jdbcType=TIMESTAMP},
- #{lossAmount,jdbcType=DOUBLE})
+ insert into rm_loss_day_last (id, last_history_id, controller_id,
+ intake_id, rtu_addr, dt, dt_last, dt_rtu,
+ loss_amount)
+ values (#{id,jdbcType=BIGINT}, #{lastHistoryId,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT},
+ #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{dtLast,jdbcType=TIMESTAMP}, #{dtRtu,jdbcType=TIMESTAMP},
+ #{lossAmount,jdbcType=DOUBLE})
</insert>
- <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossLast">
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDayLast">
<!--@mbg.generated-->
- insert into rm_loss_last
+ insert into rm_loss_day_last
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
@@ -115,9 +115,9 @@
</if>
</trim>
</insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossLast">
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDayLast">
<!--@mbg.generated-->
- update rm_loss_last
+ update rm_loss_day_last
<set>
<if test="lastHistoryId != null">
last_history_id = #{lastHistoryId,jdbcType=BIGINT},
@@ -134,11 +134,11 @@
<if test="dt != null">
dt = #{dt,jdbcType=DATE},
</if>
- <if test="dtLast != null">
- dt_last = #{dtLast,jdbcType=TIMESTAMP},
+ <if test="dtLast != null">
+ dt_last = #{dtLast,jdbcType=TIMESTAMP},
</if>
- <if test="dtRtu != null">
- dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
+ <if test="dtRtu != null">
+ dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
</if>
<if test="lossAmount != null">
loss_amount = #{lossAmount,jdbcType=DOUBLE},
@@ -146,17 +146,64 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
- <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossLast">
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDayLast">
<!--@mbg.generated-->
- update rm_loss_last
+ update rm_loss_day_last
set last_history_id = #{lastHistoryId,jdbcType=BIGINT},
- controller_id = #{controllerId,jdbcType=BIGINT},
- intake_id = #{intakeId,jdbcType=BIGINT},
- rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
- dt = #{dt,jdbcType=DATE},
- dt_last = #{dtLast,jdbcType=TIMESTAMP},
- dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
- loss_amount = #{lossAmount,jdbcType=DOUBLE}
+ controller_id = #{controllerId,jdbcType=BIGINT},
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
+ dt = #{dt,jdbcType=DATE},
+ dt_last = #{dtLast,jdbcType=TIMESTAMP},
+ dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
+ loss_amount = #{lossAmount,jdbcType=DOUBLE}
where id = #{id,jdbcType=BIGINT}
</update>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟-->
+ <select id="getRecordCount" resultType="java.lang.Long">
+ select count(*)
+ from rm_loss_day_last rldl
+ Left join pr_intake pint on pint.id = rldl.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and rldl.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and rldl.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ </select>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍-->
+ <select id="getLossDayLast" resultType="com.dy.pipIrrGlobal.voRm.VoLossDay">
+ select
+ CAST(rldl.intake_id AS char)AS intakeId,
+ CAST(rldl.controller_id AS char)AS controllerId,
+ pint.name as intakeName,
+ rldl.rtu_addr as rtuAddr,
+ rldl.dt as dt,
+ rldl.dt_last as dtLast,
+ rldl.dt_rtu as dtRtu,
+ rldl.loss_amount as lossAmount
+ from rm_loss_day_last rldl
+ Left join pr_intake pint on pint.id = rldl.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and rldl.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and rldl.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ ORDER BY rldl.id DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
+ </if>
+ </select>
+
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml
new file mode 100644
index 0000000..cbd6149
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoRm.RmLossDayMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmLossDay">
+ <!--@mbg.generated-->
+ <!--@Table rm_loss_day-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="controller_id" jdbcType="BIGINT" property="controllerId" />
+ <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
+ <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
+ <result column="dt" jdbcType="DATE" property="dt" />
+ <result column="dt_last" jdbcType="TIMESTAMP" property="dtLast" />
+ <result column="dt_rtu" jdbcType="TIMESTAMP" property="dtRtu" />
+ <result column="loss_amount" jdbcType="DOUBLE" property="lossAmount" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, controller_id, intake_id, rtu_addr, dt, dt_last, dt_rtu, loss_amount
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from rm_loss_day
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <select id="selectByIntakeId" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from rm_loss_day
+ where intake_id = #{intakeId,jdbcType=BIGINT}
+ </select>
+
+ <select id="selectByDate" parameterType="java.util.Date" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from rm_loss_day
+ where dt = #{dt,jdbcType=DATE}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from rm_loss_day
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDay">
+ <!--@mbg.generated-->
+ insert into rm_loss_day (id, controller_id, intake_id,
+ rtu_addr, dt, dt_last, dt_rtu, loss_amount
+ )
+ values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
+ #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{dtLast,jdbcType=TIMESTAMP}, #{dtRtu,jdbcType=TIMESTAMP}, #{lossAmount,jdbcType=DOUBLE}
+ )
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDay">
+ <!--@mbg.generated-->
+ insert into rm_loss_day
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="controllerId != null">
+ controller_id,
+ </if>
+ <if test="intakeId != null">
+ intake_id,
+ </if>
+ <if test="rtuAddr != null">
+ rtu_addr,
+ </if>
+ <if test="dt != null">
+ dt,
+ </if>
+ <if test="dtLast != null">
+ dt_last,
+ </if>
+ <if test="dtRtu != null">
+ dt_rtu,
+ </if>
+ <if test="lossAmount != null">
+ loss_amount,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="controllerId != null">
+ #{controllerId,jdbcType=BIGINT},
+ </if>
+ <if test="intakeId != null">
+ #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="rtuAddr != null">
+ #{rtuAddr,jdbcType=VARCHAR},
+ </if>
+ <if test="dt != null">
+ #{dt,jdbcType=DATE},
+ </if>
+ <if test="dtLast != null">
+ #{dtLast,jdbcType=TIMESTAMP},
+ </if>
+ <if test="dtRtu != null">
+ #{dtRtu,jdbcType=TIMESTAMP},
+ </if>
+ <if test="lossAmount != null">
+ #{lossAmount,jdbcType=DOUBLE},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDay">
+ <!--@mbg.generated-->
+ update rm_loss_day
+ <set>
+ <if test="controllerId != null">
+ controller_id = #{controllerId,jdbcType=BIGINT},
+ </if>
+ <if test="intakeId != null">
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="rtuAddr != null">
+ rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
+ </if>
+ <if test="dt != null">
+ dt = #{dt,jdbcType=DATE},
+ </if>
+ <if test="dtLast != null">
+ dt_last = #{dtLast,jdbcType=TIMESTAMP},
+ </if>
+ <if test="dtRtu != null">
+ dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
+ </if>
+ <if test="lossAmount != null">
+ loss_amount = #{lossAmount,jdbcType=DOUBLE},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossDay">
+ <!--@mbg.generated-->
+ update rm_loss_day
+ set controller_id = #{controllerId,jdbcType=BIGINT},
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
+ dt = #{dt,jdbcType=DATE},
+ dt_last = #{dtLast,jdbcType=TIMESTAMP},
+ dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
+ loss_amount = #{lossAmount,jdbcType=DOUBLE}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟-->
+ <select id="getRecordCount" resultType="java.lang.Long">
+ select count(*)
+ from rm_loss_day rld
+ Left join pr_intake pint on pint.id = rld.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and rld.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and rld.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ </select>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍-->
+ <select id="getLossDayHistory" resultType="com.dy.pipIrrGlobal.voRm.VoLossDay">
+ select
+ CAST(rld.intake_id AS char)AS intakeId,
+ CAST(rld.controller_id AS char)AS controllerId,
+ pint.name as intakeName,
+ rld.rtu_addr as rtuAddr,
+ rld.dt as dt,
+ rld.dt_last as dtLast,
+ rld.dt_rtu as dtRtu,
+ rld.loss_amount as lossAmount
+ from rm_loss_day rld
+ Left join pr_intake pint on pint.id = rld.intake_id
+ <where>
+ <if test="intakeName != null">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and rld.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and rld.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ ORDER BY rld.id DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
+ </if>
+ </select>
+
+ <select id="statisticsByIntake" resultType="com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics">
+ select intake_id, sum(loss_amount) amount
+ from rm_loss_day
+ where id <![CDATA[>=]]> #{startId, jdbcType=BIGINT} and id <![CDATA[<]]> #{endId, jdbcType=BIGINT}
+ group by intake_id
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossHistoryMapper.xml
deleted file mode 100644
index 858ff67..0000000
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossHistoryMapper.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.dy.pipIrrGlobal.daoRm.RmLossHistoryMapper">
- <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmLossHistory">
- <!--@mbg.generated-->
- <!--@Table rm_loss_history-->
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="controller_id" jdbcType="BIGINT" property="controllerId" />
- <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
- <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
- <result column="dt" jdbcType="DATE" property="dt" />
- <result column="dt_last" jdbcType="TIMESTAMP" property="dtLast" />
- <result column="dt_rtu" jdbcType="TIMESTAMP" property="dtRtu" />
- <result column="loss_amount" jdbcType="DOUBLE" property="lossAmount" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, controller_id, intake_id, rtu_addr, dt, dt_last, dt_rtu, loss_amount
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from rm_loss_history
- where id = #{id,jdbcType=BIGINT}
- </select>
- <select id="selectByDate" parameterType="java.util.Date" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from rm_loss_history
- where dt = #{dt,jdbcType=DATE}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- <!--@mbg.generated-->
- delete from rm_loss_history
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossHistory">
- <!--@mbg.generated-->
- insert into rm_loss_history (id, controller_id, intake_id,
- rtu_addr, dt, dt_last, dt_rtu, loss_amount
- )
- values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
- #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{dtLast,jdbcType=TIMESTAMP}, #{dtRtu,jdbcType=TIMESTAMP}, #{lossAmount,jdbcType=DOUBLE}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossHistory">
- <!--@mbg.generated-->
- insert into rm_loss_history
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="controllerId != null">
- controller_id,
- </if>
- <if test="intakeId != null">
- intake_id,
- </if>
- <if test="rtuAddr != null">
- rtu_addr,
- </if>
- <if test="dt != null">
- dt,
- </if>
- <if test="dtLast != null">
- dt_last,
- </if>
- <if test="dtRtu != null">
- dt_rtu,
- </if>
- <if test="lossAmount != null">
- loss_amount,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="controllerId != null">
- #{controllerId,jdbcType=BIGINT},
- </if>
- <if test="intakeId != null">
- #{intakeId,jdbcType=BIGINT},
- </if>
- <if test="rtuAddr != null">
- #{rtuAddr,jdbcType=VARCHAR},
- </if>
- <if test="dt != null">
- #{dt,jdbcType=DATE},
- </if>
- <if test="dtLast != null">
- #{dtLast,jdbcType=TIMESTAMP},
- </if>
- <if test="dtRtu != null">
- #{dtRtu,jdbcType=TIMESTAMP},
- </if>
- <if test="lossAmount != null">
- #{lossAmount,jdbcType=DOUBLE},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossHistory">
- <!--@mbg.generated-->
- update rm_loss_history
- <set>
- <if test="controllerId != null">
- controller_id = #{controllerId,jdbcType=BIGINT},
- </if>
- <if test="intakeId != null">
- intake_id = #{intakeId,jdbcType=BIGINT},
- </if>
- <if test="rtuAddr != null">
- rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
- </if>
- <if test="dt != null">
- dt = #{dt,jdbcType=DATE},
- </if>
- <if test="dtLast != null">
- dt_last = #{dtLast,jdbcType=TIMESTAMP},
- </if>
- <if test="dtRtu != null">
- dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
- </if>
- <if test="lossAmount != null">
- loss_amount = #{lossAmount,jdbcType=DOUBLE},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmLossHistory">
- <!--@mbg.generated-->
- update rm_loss_history
- set controller_id = #{controllerId,jdbcType=BIGINT},
- intake_id = #{intakeId,jdbcType=BIGINT},
- rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
- dt = #{dt,jdbcType=DATE},
- dt_last = #{dtLast,jdbcType=TIMESTAMP},
- dt_rtu = #{dtRtu,jdbcType=TIMESTAMP},
- loss_amount = #{lossAmount,jdbcType=DOUBLE}
- where id = #{id,jdbcType=BIGINT}
- </update>
-</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml
new file mode 100644
index 0000000..f1f8237
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSt.StClientAmountMonthMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
+ <!--@mbg.generated-->
+ <!--@Table st_client_amount_month-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="client_id" jdbcType="BIGINT" property="clientId" />
+ <result column="year" jdbcType="INTEGER" property="year" />
+ <result column="month" jdbcType="INTEGER" property="month" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ <result column="money" jdbcType="FLOAT" property="money" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, client_id, `year`, `month`, amount, money
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from st_client_amount_month
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from st_client_amount_month
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
+ <!--@mbg.generated-->
+ insert into st_client_amount_month (id, client_id, `year`,
+ `month`, amount, money)
+ values (#{id,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER},
+ #{month,jdbcType=INTEGER}, #{amount,jdbcType=FLOAT}, #{money,jdbcType=FLOAT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
+ <!--@mbg.generated-->
+ insert into st_client_amount_month
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="clientId != null">
+ client_id,
+ </if>
+ <if test="year != null">
+ `year`,
+ </if>
+ <if test="month != null">
+ `month`,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ <if test="money != null">
+ money,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="clientId != null">
+ #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ #{year,jdbcType=INTEGER},
+ </if>
+ <if test="month != null">
+ #{month,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ <if test="money != null">
+ #{money,jdbcType=FLOAT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
+ <!--@mbg.generated-->
+ update st_client_amount_month
+ <set>
+ <if test="clientId != null">
+ client_id = #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER},
+ </if>
+ <if test="month != null">
+ `month` = #{month,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ <if test="money != null">
+ money = #{money,jdbcType=FLOAT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
+ <!--@mbg.generated-->
+ update st_client_amount_month
+ set client_id = #{clientId,jdbcType=BIGINT},
+ `year` = #{year,jdbcType=INTEGER},
+ `month` = #{month,jdbcType=INTEGER},
+ amount = #{amount,jdbcType=FLOAT},
+ money = #{money,jdbcType=FLOAT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+
+ <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics">
+ select client_id, sum(amount) as amount, sum(money) as money
+ from st_client_amount_month
+ where `year` = #{year,jdbcType=INTEGER}
+ group by client_id
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
new file mode 100644
index 0000000..c3abc50
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSt.StClientAmountYearMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
+ <!--@mbg.generated-->
+ <!--@Table st_client_amount_year-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="client_id" jdbcType="BIGINT" property="clientId" />
+ <result column="year" jdbcType="INTEGER" property="year" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ <result column="money" jdbcType="FLOAT" property="money" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, client_id, `year`, amount, money
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from st_client_amount_year
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from st_client_amount_year
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
+ <!--@mbg.generated-->
+ insert into st_client_amount_year (id, client_id, `year`,
+ amount, money)
+ values (#{id,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER},
+ #{amount,jdbcType=FLOAT}, #{money,jdbcType=FLOAT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
+ <!--@mbg.generated-->
+ insert into st_client_amount_year
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="clientId != null">
+ client_id,
+ </if>
+ <if test="year != null">
+ `year`,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ <if test="money != null">
+ money,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="clientId != null">
+ #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ #{year,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ <if test="money != null">
+ #{money,jdbcType=FLOAT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
+ <!--@mbg.generated-->
+ update st_client_amount_year
+ <set>
+ <if test="clientId != null">
+ client_id = #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ <if test="money != null">
+ money = #{money,jdbcType=FLOAT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
+ <!--@mbg.generated-->
+ update st_client_amount_year
+ set client_id = #{clientId,jdbcType=BIGINT},
+ `year` = #{year,jdbcType=INTEGER},
+ amount = #{amount,jdbcType=FLOAT},
+ money = #{money,jdbcType=FLOAT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountMonthMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountMonthMapper.xml
new file mode 100644
index 0000000..92ae711
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountMonthMapper.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSt.StIntakeAmountMonthMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ <!--@mbg.generated-->
+ <!--@Table st_intake_amount_month-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
+ <result column="year" jdbcType="INTEGER" property="year" />
+ <result column="month" jdbcType="INTEGER" property="month" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, intake_id, `year`, `month`, amount
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from st_intake_amount_month
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from st_intake_amount_month
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ <!--@mbg.generated-->
+ insert into st_intake_amount_month (id, intake_id, `year`,
+ `month`, amount)
+ values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER},
+ #{month,jdbcType=INTEGER}, #{amount,jdbcType=FLOAT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ <!--@mbg.generated-->
+ insert into st_intake_amount_month
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="intakeId != null">
+ intake_id,
+ </if>
+ <if test="year != null">
+ `year`,
+ </if>
+ <if test="month != null">
+ `month`,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="intakeId != null">
+ #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ #{year,jdbcType=INTEGER},
+ </if>
+ <if test="month != null">
+ #{month,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ <!--@mbg.generated-->
+ update st_intake_amount_month
+ <set>
+ <if test="intakeId != null">
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER},
+ </if>
+ <if test="month != null">
+ `month` = #{month,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ <!--@mbg.generated-->
+ update st_intake_amount_month
+ set intake_id = #{intakeId,jdbcType=BIGINT},
+ `year` = #{year,jdbcType=INTEGER},
+ `month` = #{month,jdbcType=INTEGER},
+ amount = #{amount,jdbcType=FLOAT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <select id="statisticsByIntake" resultType="com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics">
+ select intake_id, sum(amount) as amount
+ from st_intake_amount_month
+ where `year` = #{year,jdbcType=INTEGER}
+ group by intake_id
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountYearMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountYearMapper.xml
new file mode 100644
index 0000000..d76e2f0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StIntakeAmountYearMapper.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSt.StIntakeAmountYearMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ <!--@mbg.generated-->
+ <!--@Table st_intake_amount_year-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
+ <result column="year" jdbcType="INTEGER" property="year" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, intake_id, `year`, amount
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from st_intake_amount_year
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from st_intake_amount_year
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ <!--@mbg.generated-->
+ insert into st_intake_amount_year (id, intake_id, `year`,
+ amount)
+ values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER},
+ #{amount,jdbcType=FLOAT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ <!--@mbg.generated-->
+ insert into st_intake_amount_year
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="intakeId != null">
+ intake_id,
+ </if>
+ <if test="year != null">
+ `year`,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="intakeId != null">
+ #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ #{year,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ <!--@mbg.generated-->
+ update st_intake_amount_year
+ <set>
+ <if test="intakeId != null">
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ <!--@mbg.generated-->
+ update st_intake_amount_year
+ set intake_id = #{intakeId,jdbcType=BIGINT},
+ `year` = #{year,jdbcType=INTEGER},
+ amount = #{amount,jdbcType=FLOAT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossMonthMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossMonthMapper.xml
new file mode 100644
index 0000000..4783b47
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossMonthMapper.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSt.StLossMonthMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ <!--@mbg.generated-->
+ <!--@Table st_loss_month-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
+ <result column="year" jdbcType="INTEGER" property="year" />
+ <result column="month" jdbcType="INTEGER" property="month" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, intake_id, `year`, `month`, amount
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from st_loss_month
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from st_loss_month
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ <!--@mbg.generated-->
+ insert into st_loss_month (id, intake_id, `year`,
+ `month`, amount)
+ values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER},
+ #{month,jdbcType=INTEGER}, #{amount,jdbcType=FLOAT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ <!--@mbg.generated-->
+ insert into st_loss_month
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="intakeId != null">
+ intake_id,
+ </if>
+ <if test="year != null">
+ `year`,
+ </if>
+ <if test="month != null">
+ `month`,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="intakeId != null">
+ #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ #{year,jdbcType=INTEGER},
+ </if>
+ <if test="month != null">
+ #{month,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ <!--@mbg.generated-->
+ update st_loss_month
+ <set>
+ <if test="intakeId != null">
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER},
+ </if>
+ <if test="month != null">
+ `month` = #{month,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ <!--@mbg.generated-->
+ update st_loss_month
+ set intake_id = #{intakeId,jdbcType=BIGINT},
+ `year` = #{year,jdbcType=INTEGER},
+ `month` = #{month,jdbcType=INTEGER},
+ amount = #{amount,jdbcType=FLOAT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+
+ <select id="statisticsByIntake" resultType="com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics">
+ select intake_id, sum(amount) as amount
+ from st_loss_month
+ where `year` = #{year,jdbcType=INTEGER}
+ group by intake_id
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossYearMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossYearMapper.xml
new file mode 100644
index 0000000..3013771
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StLossYearMapper.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSt.StLossYearMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ <!--@mbg.generated-->
+ <!--@Table st_loss_year-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
+ <result column="year" jdbcType="INTEGER" property="year" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, intake_id, `year`, amount
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from st_loss_year
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from st_loss_year
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ <!--@mbg.generated-->
+ insert into st_loss_year (id, intake_id, `year`, amount)
+ values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER},
+ #{amount,jdbcType=FLOAT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ <!--@mbg.generated-->
+ insert into st_loss_year
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="intakeId != null">
+ intake_id,
+ </if>
+ <if test="year != null">
+ `year`,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="intakeId != null">
+ #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ #{year,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ <!--@mbg.generated-->
+ update st_loss_year
+ <set>
+ <if test="intakeId != null">
+ intake_id = #{intakeId,jdbcType=BIGINT},
+ </if>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ <!--@mbg.generated-->
+ update st_loss_year
+ set intake_id = #{intakeId,jdbcType=BIGINT},
+ `year` = #{year,jdbcType=INTEGER},
+ amount = #{amount,jdbcType=FLOAT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/dbSv/DbSv.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/dbSv/DbSv.java
index 847d2b8..97bada3 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/dbSv/DbSv.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/dbSv/DbSv.java
@@ -1,14 +1,11 @@
package com.dy.rtuMw.server.rtuData.dbSv;
import com.dy.common.util.NumUtil;
-import com.dy.common.webUtil.BaseResponseUtils;
-import com.dy.pipIrrGlobal.daoBa.BaClientMapper;
import com.dy.pipIrrGlobal.daoPr.PrControllerMapper;
import com.dy.pipIrrGlobal.daoPr.PrControllerTrampMapper;
import com.dy.pipIrrGlobal.daoRm.*;
import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper;
import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
-import com.dy.pipIrrGlobal.pojoBa.BaClient;
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp;
import com.dy.pipIrrGlobal.pojoRm.*;
@@ -58,9 +55,9 @@
@Autowired
private RmClientAmountDayMapper rmClientAmountDayMapperDao ;//鍐滄埛鏃ョ敤姘撮噺缁熻鏁版嵁DAO
@Autowired
- private RmLossLastMapper rmLossLastMapperDao ;//鎺у埗鍣ㄦ紡鎹熸按閲忕粺璁℃渶鏂版暟鎹瓺AO
+ private RmLossDayLastMapper rmLossLastMapperDao ;//鎺у埗鍣ㄦ紡鎹熸按閲忕粺璁℃渶鏂版暟鎹瓺AO
@Autowired
- private RmLossHistoryMapper rmLossHistoryMapperDao ;//鎺у埗鍣ㄦ紡鎹熸按閲忕粺璁″巻鍙叉暟鎹瓺AO
+ private RmLossDayMapper rmLossHistoryMapperDao ;//鎺у埗鍣ㄦ紡鎹熸按閲忕粺璁″巻鍙叉暟鎹瓺AO
@Autowired
private RmCommandHistoryMapper rmCommandHistoryDao ;//杩滅▼鍛戒护鏃ュ織鐩稿叧
@Autowired
@@ -559,8 +556,8 @@
* @param intakeId
* @return
*/
- public RmLossLast getRmLossLast(Long intakeId){
- List<RmLossLast> list = rmLossLastMapperDao.selectByIntakeId(intakeId) ;
+ public RmLossDayLast getRmLossLast(Long intakeId){
+ List<RmLossDayLast> list = rmLossLastMapperDao.selectByIntakeId(intakeId) ;
if(list != null && list.size() > 0){
return list.get(0) ;
}
@@ -571,7 +568,7 @@
* @param po
*/
@Transactional(rollbackFor = Exception.class)
- public void saveRmLossLast(RmLossLast po){
+ public void saveRmLossLast(RmLossDayLast po){
this.rmLossLastMapperDao.insert(po) ;
}
/**
@@ -579,7 +576,7 @@
* @param po
*/
@Transactional(rollbackFor = Exception.class)
- public void saveRmLossHistory(RmLossHistory po){
+ public void saveRmLossHistory(RmLossDay po){
this.rmLossHistoryMapperDao.insert(po) ;
}
/**
@@ -587,7 +584,7 @@
* @param po
*/
@Transactional(rollbackFor = Exception.class)
- public void updateRmLossLast(RmLossLast po){
+ public void updateRmLossLast(RmLossDayLast po){
this.rmLossLastMapperDao.updateByPrimaryKey(po) ;
}
/**
@@ -595,7 +592,7 @@
* @param po
*/
@Transactional(rollbackFor = Exception.class)
- public void updateRmLossHistory(RmLossHistory po){
+ public void updateRmLossHistory(RmLossDay po){
this.rmLossHistoryMapperDao.updateByPrimaryKey(po) ;
}
@@ -604,7 +601,7 @@
* @param id
* @return
*/
- public RmLossHistory getRmLossHistory(Long id){
+ public RmLossDay getRmLossHistory(Long id){
return rmLossHistoryMapperDao.selectByPrimaryKey(id) ;
}
@@ -614,8 +611,8 @@
* @param dt
* @return
*/
- public RmLossLast getRmLossLastByDate(Date dt){
- List<RmLossLast> list = rmLossLastMapperDao.selectByDate(dt) ;
+ public RmLossDayLast getRmLossLastByDate(Date dt){
+ List<RmLossDayLast> list = rmLossLastMapperDao.selectByDate(dt) ;
if(list != null && list.size() > 0){
return list.get(0) ;
}
@@ -627,8 +624,8 @@
* @param dt
* @return
*/
- public RmLossHistory getRmLossHistoryByDate(Date dt){
- List<RmLossHistory> list = rmLossHistoryMapperDao.selectByDate(dt) ;
+ public RmLossDay getRmLossHistoryByDate(Date dt){
+ List<RmLossDay> list = rmLossHistoryMapperDao.selectByDate(dt) ;
if(list != null && list.size() > 0){
return list.get(0) ;
}
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java
index 225fc0c..fbefd1c 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java
@@ -1,7 +1,7 @@
package com.dy.rtuMw.server.rtuData.p206V1_0_0;
-import com.dy.pipIrrGlobal.pojoRm.RmLossHistory;
-import com.dy.pipIrrGlobal.pojoRm.RmLossLast;
+import com.dy.pipIrrGlobal.pojoRm.RmLossDay;
+import com.dy.pipIrrGlobal.pojoRm.RmLossDayLast;
import com.dy.rtuMw.server.rtuData.TaskSurpport;
import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import com.dy.common.mw.protocol.Data;
@@ -56,7 +56,7 @@
* @param dataCdC0Vo 寮�闃�涓婃姤鏁版嵁瀵硅薄
*/
private void doDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception {
- RmLossLast poLast = sv.getRmLossLast(controller.getIntakeId());
+ RmLossDayLast poLast = sv.getRmLossLast(controller.getIntakeId());
if (poLast == null) {
//鏁版嵁搴撲腑涓嶅瓨鍦ㄨ鍙栨按鍙g殑婕忔崯鏁版嵁
//棣栧厛鐢熸垚鏈�鏂版暟鎹強鍘嗗彶鏁版嵁锛屽苟鍏堜繚瀛�
@@ -67,7 +67,7 @@
if(DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt).equals(poLast.dtRtu)){
//鏃堕棿涓�鑷达紝閲嶅涓婃姤鏁版嵁锛屼笉杩涜浠讳綍澶勭悊
}else{
- RmLossHistory poHistory = null ;
+ RmLossDay poHistory = null ;
if(poLast.lastHistoryId != null){
poHistory = sv.getRmLossHistory(poLast.lastHistoryId) ;
}
@@ -107,8 +107,8 @@
* @return
* @throws Exception
*/
- private RmLossLast newRmLossLast(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
- RmLossLast po = new RmLossLast() ;
+ private RmLossDayLast newRmLossLast(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
+ RmLossDayLast po = new RmLossDayLast() ;
po.controllerId = controller==null?null:controller.getId();
po.intakeId = controller==null?null:controller.getIntakeId();
po.rtuAddr = rtuAddr;
@@ -125,8 +125,8 @@
* @return
* @throws Exception
*/
- private RmLossHistory newRmLossHistory(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
- RmLossHistory po = new RmLossHistory() ;
+ private RmLossDay newRmLossHistory(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
+ RmLossDay po = new RmLossDay() ;
po.controllerId = controller==null?null:controller.getId();
po.intakeId = controller==null?null:controller.getIntakeId();
po.rtuAddr = rtuAddr;
@@ -146,8 +146,8 @@
* @throws Exception
* @return RmLossHistory
*/
- private RmLossHistory newAndSaveHistoryDataDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo, RmLossLast poLast)throws Exception {
- RmLossHistory poHistory = this.newRmLossHistory(controller, rtuAddr, dV1_0_1, dataCdC0Vo) ;
+ private RmLossDay newAndSaveHistoryDataDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo, RmLossDayLast poLast)throws Exception {
+ RmLossDay poHistory = this.newRmLossHistory(controller, rtuAddr, dV1_0_1, dataCdC0Vo) ;
sv.saveRmLossHistory(poHistory);
//鐢辨渶鏂版暟鎹寔鏈夊巻鍙叉暟鎹腑鐨勬渶鏂拌褰旾D锛屼互鏂逛究蹇�熸煡璇�
poLast.lastHistoryId = poHistory == null ? null: poHistory.id ;
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 c012a5e..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
@@ -7,7 +7,11 @@
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.voRm.VoClientAmountDay;
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 io.swagger.v3.oas.annotations.media.Schema;
@@ -106,7 +110,7 @@
@ApiResponses(value = {
@ApiResponse(
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
- description = "杩斿洖涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佹暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ description = "杩斿洖涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁℃暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
schema = @Schema(implementation = VoActiveCard.class))}
)
@@ -134,7 +138,7 @@
@ApiResponses(value = {
@ApiResponse(
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
- description = "杩斿洖涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佹暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ description = "杩斿洖涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁℃暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
schema = @Schema(implementation = VoActiveCard.class))}
)
@@ -150,4 +154,59 @@
return BaseResponseUtils.buildException(e.getMessage());
}
}
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙f棩鍙栨按閲忔紡鎹熷垪琛紙鍘嗗彶锛�
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勫彇姘村彛鏃ュ彇姘撮噺婕忔崯鍒楄〃锛堝巻鍙诧級
+ */
+ @Operation(summary = "鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯璁板綍", description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯鏁版嵁锛圔aseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getIntakeAmountDayHistory")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayHistory(@RequestBody IntakeAmountDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoIntakeAmountDay>> res = recordsSv.getIntakeAmountDayHistory(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍐滄埛鏃ョ敤姘撮噺缁熻璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙f棩鍙栨按閲忔紡鎹熷垪琛紙鏈�鏂帮級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勫彇姘村彛鏃ュ彇姘撮噺婕忔崯鍒楄〃锛堟渶鏂帮級
+ */
+ @Operation(summary = "鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯璁板綍", description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯鏁版嵁锛圔aseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getIntakeAmountDayLast")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayLast(@RequestBody IntakeAmountDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoIntakeAmountDay>> res = recordsSv.getIntakeAmountDayLast(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍐滄埛鏃ョ敤姘撮噺缁熻璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
}
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 b5c94a7..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
@@ -1,12 +1,13 @@
package com.dy.pipIrrRemote.records;
import com.dy.common.webUtil.QueryResultVo;
-import com.dy.pipIrrGlobal.daoRm.RmAlarmStateHistoryMapper;
-import com.dy.pipIrrGlobal.daoRm.RmAlarmStateLastMapper;
-import com.dy.pipIrrGlobal.daoRm.RmClientAmountDayLastMapper;
-import com.dy.pipIrrGlobal.daoRm.RmClientAmountDayMapper;
+import com.dy.pipIrrGlobal.daoRm.*;
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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -30,9 +31,14 @@
private RmAlarmStateLastMapper rmAlarmStateLastMapper;
@Autowired
- private RmClientAmountDayLastMapper rmClientAmountDayLastMapper;
- @Autowired
private RmClientAmountDayMapper rmClientAmountDayMapper;
+ @Autowired
+ private RmClientAmountDayLastMapper rmClientAmountDayLastMapper;
+
+ @Autowired
+ private RmIntakeAmountDayMapper rmIntakeAmountDayMapper;
+ @Autowired
+ private RmIntakeAmountDayLastMapper rmIntakeAmountDayLastMapper;
/**
@@ -118,4 +124,44 @@
rsVo.obj = rmClientAmountDayLastMapper.getClientAmountDayLast(params);
return rsVo;
}
+
+ /**
+ * 鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯璁板綍(鍘嗗彶)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeAmountDay>> getIntakeAmountDayHistory(IntakeAmountDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmIntakeAmountDayMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoIntakeAmountDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmIntakeAmountDayMapper.getIntakeAmountDayHistory(params);
+ return rsVo;
+ }
+
+ /**
+ * 鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯璁板綍(鏈�鏂�)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeAmountDay>> getIntakeAmountDayLast(IntakeAmountDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmIntakeAmountDayLastMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoIntakeAmountDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmIntakeAmountDayLastMapper.getIntakeAmountDayLast(params);
+ return rsVo;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayCtrl.java
new file mode 100644
index 0000000..78f3af1
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayCtrl.java
@@ -0,0 +1,96 @@
+package com.dy.pipIrrRemote.records.clientAmountDay;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.voRm.VoClientAmountDay;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 14:30
+ * @LastEditTime :2024/7/24 14:30
+ * @Description
+ */
+@Slf4j
+@Tag(name = "鍐滄埛鏃ョ敤姘撮噺缁熻鏌ヨ", description = "鍐滄埛鏃ョ敤姘撮噺缁熻鏌ヨ")
+@RestController
+@RequestMapping(path = "clientAmountDay")
+public class ClientAmountDayCtrl {
+
+ @Autowired
+ private ClientAmountDaySv clientAmountDaySv;
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍐滄埛鏃ョ敤姘撮噺缁熻鍒楄〃锛堝巻鍙诧級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勫啘鎴锋棩鐢ㄦ按閲忕粺璁″垪琛紙鍘嗗彶锛�
+ */
+ @Operation(summary = "鑾峰緱涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁¤褰�", description = "杩斿洖涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁℃暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁℃暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getClientAmountDayHistory")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayHistory(@RequestBody ClientAmountDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoClientAmountDay>> res = clientAmountDaySv.getClientAmountDayHistory(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍐滄埛鏃ョ敤姘撮噺缁熻璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍐滄埛鏃ョ敤姘撮噺缁熻鍒楄〃锛堟渶鏂帮級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勫啘鎴锋棩鐢ㄦ按閲忕粺璁″垪琛紙鏈�鏂帮級
+ */
+ @Operation(summary = "鑾峰緱涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁¤褰�", description = "杩斿洖涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁℃暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁℃暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getClientAmountDayLast")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayLast(@RequestBody ClientAmountDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoClientAmountDay>> res = clientAmountDaySv.getClientAmountDayLast(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍐滄埛鏃ョ敤姘撮噺缁熻璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/ClientAmountDayQueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java
similarity index 66%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/ClientAmountDayQueryVo.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java
index 15abb5a..e26c93c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/ClientAmountDayQueryVo.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java
@@ -1,12 +1,10 @@
-package com.dy.pipIrrRemote.records;
+package com.dy.pipIrrRemote.records.clientAmountDay;
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;
+import java.sql.Date;
/**
* @author :WuZeYu
@@ -27,12 +25,8 @@
private String clientName;
@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;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDaySv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDaySv.java
new file mode 100644
index 0000000..133ed16
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDaySv.java
@@ -0,0 +1,72 @@
+package com.dy.pipIrrRemote.records.clientAmountDay;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoRm.RmClientAmountDayLastMapper;
+import com.dy.pipIrrGlobal.daoRm.RmClientAmountDayMapper;
+import com.dy.pipIrrGlobal.voRm.VoClientAmountDay;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 14:30
+ * @LastEditTime :2024/7/24 14:30
+ * @Description
+ */
+@Slf4j
+@Service
+public class ClientAmountDaySv {
+
+ @Autowired
+ private RmClientAmountDayMapper rmClientAmountDayMapper;
+ @Autowired
+ private RmClientAmountDayLastMapper rmClientAmountDayLastMapper;
+
+
+ /**
+ * 鑾峰緱涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁¤褰�(鍘嗗彶)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoClientAmountDay>> getClientAmountDayHistory(ClientAmountDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmClientAmountDayMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoClientAmountDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmClientAmountDayMapper.getClientAmountDayHistory(params);
+ return rsVo;
+ }
+
+
+
+ /**
+ * 鑾峰緱涓�椤靛啘鎴锋棩鐢ㄦ按閲忕粺璁¤褰�(鏈�鏂�)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoClientAmountDay>> getClientAmountDayLast(ClientAmountDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmClientAmountDayLastMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoClientAmountDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmClientAmountDayLastMapper.getClientAmountDayLast(params);
+ return rsVo;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java
new file mode 100644
index 0000000..15bd426
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java
@@ -0,0 +1,97 @@
+package com.dy.pipIrrRemote.records.controllerAlarmState;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.voRm.VoControllerAlarmState;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 14:22
+ * @LastEditTime :2024/7/24 14:22
+ * @Description
+ */
+@Slf4j
+@Tag(name = "鎺у埗鍣ㄦ姤璀︿笌鐘舵�佹煡璇�", description = "鎺у埗鍣ㄦ姤璀︿笌鐘舵�佹煡璇�")
+@RestController
+@RequestMapping(path = "controllerAlarmState")
+public class ControllerAlarmStateCtrl {
+
+ @Autowired
+ private ControllerAlarmStateSv controllerAlarmStateSv;
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鎺у埗鍣ㄦ姤璀︿笌鐘舵�佸垪琛紙鍘嗗彶锛�
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勬帶鍒跺櫒鎶ヨ涓庣姸鎬佸垪琛紙鍘嗗彶锛�
+ */
+ @Operation(summary = "鑾峰緱涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佽褰�", description = "杩斿洖涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佹暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佹暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getControllerAlarmStateHistory")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory(@RequestBody ControllerAlarmStateQueryVo vo) {
+ try {
+ QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateHistory(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鎺у埗鍣ㄦ姤璀︿笌鐘舵�佽褰曞紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鎺у埗鍣ㄦ姤璀︿笌鐘舵�佸垪琛紙鏈�鏂帮級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勬帶鍒跺櫒鎶ヨ涓庣姸鎬佸垪琛紙鏈�鏂帮級
+ */
+ @Operation(summary = "鑾峰緱涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佽褰�", description = "杩斿洖涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佹暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佹暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getControllerAlarmStateLast")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast(@RequestBody ControllerAlarmStateQueryVo vo) {
+ try {
+ QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateLast(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鎺у埗鍣ㄨ褰曞紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/ControllerAlarmStateQueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java
similarity index 96%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/ControllerAlarmStateQueryVo.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java
index 199b9b0..bc3d339 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/ControllerAlarmStateQueryVo.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrRemote.records;
+package com.dy.pipIrrRemote.records.controllerAlarmState;
import com.dy.common.webUtil.QueryConditionVo;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateSv.java
new file mode 100644
index 0000000..0221272
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateSv.java
@@ -0,0 +1,72 @@
+package com.dy.pipIrrRemote.records.controllerAlarmState;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoRm.RmAlarmStateHistoryMapper;
+import com.dy.pipIrrGlobal.daoRm.RmAlarmStateLastMapper;
+import com.dy.pipIrrGlobal.voRm.VoControllerAlarmState;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 14:22
+ * @LastEditTime :2024/7/24 14:22
+ * @Description
+ */
+@Slf4j
+@Service
+public class ControllerAlarmStateSv {
+
+ @Autowired
+ private RmAlarmStateHistoryMapper rmAlarmStateHistoryMapper;
+ @Autowired
+ private RmAlarmStateLastMapper rmAlarmStateLastMapper;
+
+
+
+ /**
+ * 鑾峰緱涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佽褰�(鍘嗗彶)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoControllerAlarmState>> getControllerAlarmStateHistory(ControllerAlarmStateQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmAlarmStateHistoryMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoControllerAlarmState>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmAlarmStateHistoryMapper.getControllerAlarmStateHistory(params);
+ return rsVo;
+ }
+
+
+ /**
+ * 鑾峰緱涓�椤垫帶鍒跺櫒鎶ヨ涓庣姸鎬佽褰�(鏈�鏂�)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoControllerAlarmState>> getControllerAlarmStateLast(ControllerAlarmStateQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmAlarmStateLastMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoControllerAlarmState>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmAlarmStateLastMapper.getControllerAlarmStateLast(params);
+ return rsVo;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayCtrl.java
new file mode 100644
index 0000000..1308c38
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayCtrl.java
@@ -0,0 +1,94 @@
+package com.dy.pipIrrRemote.records.intakeAmountDay;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 14:37
+ * @LastEditTime :2024/7/24 14:37
+ * @Description
+ */
+@Slf4j
+@Tag(name = "鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺鏌ヨ", description = "鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺鏌ヨ")
+@RestController
+@RequestMapping(path = "intakeAmountDay")
+public class IntakeAmountDayCtrl {
+
+ @Autowired
+ private IntakeAmountDaySv intakeAmountDaySv;
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺鍒楄〃锛堝巻鍙诧級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勫彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忓垪琛紙鍘嗗彶锛�
+ */
+ @Operation(summary = "鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忚褰�", description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忔暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯鏁版嵁锛圔aseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getIntakeAmountDayHistory")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayHistory(@RequestBody IntakeAmountDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoIntakeAmountDay>> res = intakeAmountDaySv.getIntakeAmountDayHistory(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺鍒楄〃锛堟渶鏂帮級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勫彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忓垪琛紙鏈�鏂帮級
+ */
+ @Operation(summary = "鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忚褰�", description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忔暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯閲忔暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getIntakeAmountDayLast")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayLast(@RequestBody IntakeAmountDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoIntakeAmountDay>> res = intakeAmountDaySv.getIntakeAmountDayLast(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍙栨按鍙f棩鍙栨按閲忔紡鎹熼噺璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayQueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayQueryVo.java
new file mode 100644
index 0000000..5bb8dd0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayQueryVo.java
@@ -0,0 +1,32 @@
+package com.dy.pipIrrRemote.records.intakeAmountDay;
+
+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/24 10:21
+ * @LastEditTime :2024/7/24 10:21
+ * @Description
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Schema(name = "鍙栨按鍙f棩鍙栨按閲忔紡鎹熸煡璇㈡潯浠�")
+public class IntakeAmountDayQueryVo extends QueryConditionVo {
+
+ @Schema(description = "鍙栨按鍙e悕绉�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String intakeName;
+
+ @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/intakeAmountDay/IntakeAmountDaySv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDaySv.java
new file mode 100644
index 0000000..7b8a90a
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDaySv.java
@@ -0,0 +1,71 @@
+package com.dy.pipIrrRemote.records.intakeAmountDay;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoRm.RmIntakeAmountDayLastMapper;
+import com.dy.pipIrrGlobal.daoRm.RmIntakeAmountDayMapper;
+import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 14:38
+ * @LastEditTime :2024/7/24 14:38
+ * @Description
+ */
+@Slf4j
+@Service
+public class IntakeAmountDaySv {
+
+ @Autowired
+ private RmIntakeAmountDayMapper rmIntakeAmountDayMapper;
+ @Autowired
+ private RmIntakeAmountDayLastMapper rmIntakeAmountDayLastMapper;
+
+
+ /**
+ * 鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯璁板綍(鍘嗗彶)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeAmountDay>> getIntakeAmountDayHistory(IntakeAmountDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmIntakeAmountDayMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoIntakeAmountDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmIntakeAmountDayMapper.getIntakeAmountDayHistory(params);
+ return rsVo;
+ }
+
+
+ /**
+ * 鑾峰緱涓�椤靛彇姘村彛鏃ュ彇姘撮噺婕忔崯璁板綍(鏈�鏂�)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeAmountDay>> getIntakeAmountDayLast(IntakeAmountDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmIntakeAmountDayLastMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoIntakeAmountDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmIntakeAmountDayLastMapper.getIntakeAmountDayLast(params);
+ return rsVo;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayCtrl.java
new file mode 100644
index 0000000..49ca0aa
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayCtrl.java
@@ -0,0 +1,98 @@
+package com.dy.pipIrrRemote.records.lossDay;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay;
+import com.dy.pipIrrGlobal.voRm.VoLossDay;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDayQueryVo;
+import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDaySv;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 15:29
+ * @LastEditTime :2024/7/24 15:29
+ * @Description
+ */
+@Slf4j
+@Tag(name = "婕忔崯璁板綍鏌ヨ", description = "婕忔崯璁板綍鏌ヨ")
+@RestController
+@RequestMapping(path = "lossDay")
+public class LossDayCtrl {
+
+ @Autowired
+ private LossDaySv lossDaySv;
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇婕忔崯璁板綍鍒楄〃锛堝巻鍙诧級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勬紡鎹熻褰曞垪琛紙鍘嗗彶锛�
+ */
+ @Operation(summary = "鑾峰緱涓�椤垫紡鎹熻褰曡褰�", description = "杩斿洖涓�椤垫紡鎹熻褰曟暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤垫紡鎹熻褰曟暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getLossDayHistory")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayHistory(@RequestBody LossDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoLossDay>> res = lossDaySv.getLossDayHistory(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇婕忔崯璁板綍璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇婕忔崯璁板綍鍒楄〃锛堟渶鏂帮級
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勬紡鎹熻褰曞垪琛紙鏈�鏂帮級
+ */
+ @Operation(summary = "鑾峰緱涓�椤垫紡鎹熻褰曡褰�", description = "杩斿洖涓�椤垫紡鎹熻褰曟暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤垫紡鎹熻褰曟暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getLossDayLast")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayLast(@RequestBody LossDayQueryVo vo) {
+ try {
+ QueryResultVo<List<VoLossDay>> res = lossDaySv.getLossDayLast(vo);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇婕忔崯璁板綍璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java
new file mode 100644
index 0000000..66f92f0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java
@@ -0,0 +1,33 @@
+package com.dy.pipIrrRemote.records.lossDay;
+
+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/24 15:44
+ * @LastEditTime :2024/7/24 15:44
+ * @Description
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Schema(name = "婕忔崯璁板綍鏌ヨ鏉′欢")
+public class LossDayQueryVo extends QueryConditionVo {
+
+
+ @Schema(description = "鍙栨按鍙e悕绉�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String intakeName;
+
+ @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/lossDay/LossDaySv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDaySv.java
new file mode 100644
index 0000000..6e97517
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDaySv.java
@@ -0,0 +1,71 @@
+package com.dy.pipIrrRemote.records.lossDay;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoRm.RmLossDayMapper;
+import com.dy.pipIrrGlobal.daoRm.RmLossDayLastMapper;
+import com.dy.pipIrrGlobal.voRm.VoLossDay;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/7/24 15:29
+ * @LastEditTime :2024/7/24 15:29
+ * @Description
+ */
+@Slf4j
+@Service
+public class LossDaySv {
+
+ @Autowired
+ private RmLossDayMapper rmLossHistoryMapper;
+ @Autowired
+ private RmLossDayLastMapper rmLossLastMapper;
+
+
+ /**
+ * 鑾峰緱涓�椤垫紡鎹熻褰曟煡璇�(鍘嗗彶)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoLossDay>> getLossDayHistory(LossDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmLossHistoryMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoLossDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmLossHistoryMapper.getLossDayHistory(params);
+ return rsVo;
+ }
+
+
+ /**
+ * 鑾峰緱涓�椤垫紡鎹熻褰曟煡璇�(鏈�鏂�)
+ * @param vo
+ * @return
+ */
+ public QueryResultVo<List<VoLossDay>> getLossDayLast(LossDayQueryVo vo) {
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
+
+ Long itemTotal = rmLossLastMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoLossDay>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = vo.pageSize;
+ rsVo.pageCurr = vo.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmLossLastMapper.getLossDayLast(params);
+ return rsVo;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StLossSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StLossSv.java
deleted file mode 100644
index 9b6ab74..0000000
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StLossSv.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.dy.pipIrrStatistics.listeners;
-
-/**
- * @Author: liurunyu
- * @Date: 2024/7/24 11:24
- * @Description
- */
-public class StLossSv {
-}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StatisticsJob.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StatisticsJob.java
deleted file mode 100644
index a7ecb8d..0000000
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StatisticsJob.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.dy.pipIrrStatistics.listeners;
-
-import com.dy.common.schedulerTask.TaskJob;
-import com.dy.common.schedulerTask.Test;
-import com.dy.common.springUtil.SpringContextUtil;
-import com.dy.common.util.DateTime;
-import com.dy.common.util.IDLongGenerator;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * @Author: liurunyu
- * @Date: 2024/7/22 16:41
- * @Description
- */
-public class StatisticsJob extends TaskJob {
-
- private static Logger log = LogManager.getLogger(Test.class.getName()) ;
-
- private StLoss stLoss ;
-
- private StIntake stIntake ;
-
- private StClient stClient ;
-
- private String statisticsYyyy_mm;
- private Long statisticsStartId ;
- private Long statisticsEndId ;
-
- @Override
- public void execute(JobExecutionContext ctx) throws JobExecutionException {
- stLoss = SpringContextUtil.getBean(StLoss.class);
- stIntake = SpringContextUtil.getBean(StIntake.class);
- stClient = SpringContextUtil.getBean(StClient.class);
- if(stLoss != null && stIntake != null && stClient != null){
- int[] ymd = DateTime.yyyy_MM_dd_2_ymdGroup(DateTime.yyyy_MM_dd()) ;
- if(ymd[2] == 1){
- //缁熻涓婁釜鏈堢殑
- statisticsYyyy_mm = DateTime.lastMonth_ym() ;//缁熻鏈�
- int lastYear = Integer.parseInt(statisticsYyyy_mm.substring(0, 4)) ;
- int lastMonth = Integer.parseInt(statisticsYyyy_mm.substring(5, 7)) ;
- statisticsStartId = IDLongGenerator.generateOneDayStartId(lastYear, lastMonth, 1) ;
- statisticsEndId = IDLongGenerator.generateOneDayEndId(lastYear, lastMonth, 31) ;
- }else{
- //缁熻鏈湀鐨�
- statisticsYyyy_mm = ymd[0] + "-" + ymd[1] ;//缁熻鏈�
- statisticsStartId = IDLongGenerator.generateOneDayStartId(ymd[0], ymd[1], 1) ;
- statisticsEndId = IDLongGenerator.generateOneDayEndId(ymd[0], ymd[1], 31) ;
- }
- doStatistics() ;
- }else{
- log.error("鏈兘浠嶴pring瀹瑰櫒涓緱鍒扮粺璁ean");
- }
- }
-
- /**
- * 缁熻
- */
- private void doStatistics(){
- stLoss.statistics(statisticsYyyy_mm, statisticsStartId, statisticsEndId) ;
- stIntake.statistics(statisticsYyyy_mm, statisticsStartId, statisticsEndId) ;
- stClient.statistics(statisticsYyyy_mm, statisticsStartId, statisticsEndId) ;
- }
-}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StClient.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClient.java
similarity index 65%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StClient.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClient.java
index 7a917ce..9701ed8 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StClient.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClient.java
@@ -1,6 +1,5 @@
-package com.dy.pipIrrStatistics.listeners;
+package com.dy.pipIrrStatistics.statistics;
-import com.dy.pipIrrGlobal.daoRm.RmClientAmountDayMapper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -16,17 +15,21 @@
private static Logger log = LogManager.getLogger(StClient.class.getName()) ;
- @Autowired
- protected RmClientAmountDayMapper rmClientAmountDayDao ;
- private String statisticsYyyy_mm;
+ @Autowired
+ protected StClientSv sv ;
+
+ private Integer statisticsYear;
+ private Integer statisticsMonth;
private Long statisticsStartId ;
private Long statisticsEndId ;
- protected void statistics(String statisticsYyyy_mm,
+ protected void statistics(Integer statisticsYear,
+ Integer statisticsMonth,
Long statisticsStartId,
Long statisticsEndId){
- this.statisticsYyyy_mm = statisticsYyyy_mm ;
+ this.statisticsYear = statisticsYear ;
+ this.statisticsMonth = statisticsMonth ;
this.statisticsStartId = statisticsStartId ;
this.statisticsEndId = statisticsEndId ;
this.statisticsMonth() ;
@@ -37,14 +40,13 @@
* 鏈堢粺璁�---鍐滄埛
*/
private void statisticsMonth(){
- log.info(statisticsYyyy_mm + " " + statisticsStartId + " " + statisticsEndId);
- log.info(rmClientAmountDayDao.toString());
+ sv.statisticsMonth(statisticsYear, statisticsMonth, statisticsStartId, statisticsEndId);
}
/**
* 骞寸粺璁�---鍐滄埛
*/
private void statisticsYear(){
-
+ sv.statisticsYear(statisticsYear);
}
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java
new file mode 100644
index 0000000..e453ab8
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java
@@ -0,0 +1,66 @@
+package com.dy.pipIrrStatistics.statistics;
+
+import com.dy.pipIrrGlobal.daoRm.RmClientAmountDayMapper;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountMonthMapper;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountYearMapper;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountYear;
+import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 16:28
+ * @Description
+ */
+@Component
+public class StClientSv {
+
+ @Autowired
+ protected RmClientAmountDayMapper rmClientAmountDayDao;
+
+ @Autowired
+ protected StClientAmountMonthMapper stClientAmountMonthDao ;
+
+ @Autowired
+ protected StClientAmountYearMapper stClientAmountYearDao ;
+
+ /**
+ * 鏈堢粺璁�---婕忔崯
+ */
+ @Transactional
+ protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){
+ List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ;
+ if(list != null && list.size() > 0){
+ for(VoClientAmountStatistics vo : list){
+ StClientAmountMonth po = new StClientAmountMonth() ;
+ po.clientId = vo.clientId ;
+ po.year = statisticsYear ;
+ po.month = statisticsMonth ;
+ po.amount = vo.amount;
+ stClientAmountMonthDao.insert(po) ;
+ }
+ }
+ }
+
+ /**
+ * 骞寸粺璁�---婕忔崯
+ */
+ @Transactional
+ protected void statisticsYear(Integer statisticsYear){
+ List<VoClientAmountStatistics> list = stClientAmountMonthDao.statisticsByClient(statisticsYear) ;
+ if(list != null && list.size() > 0){
+ for(VoClientAmountStatistics vo : list){
+ StClientAmountYear po = new StClientAmountYear() ;
+ po.clientId = vo.clientId ;
+ po.year = statisticsYear ;
+ po.amount = vo.amount;
+ stClientAmountYearDao.insert(po) ;
+ }
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StIntake.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntake.java
similarity index 66%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StIntake.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntake.java
index 1544c52..2d644bd 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StIntake.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntake.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrStatistics.listeners;
+package com.dy.pipIrrStatistics.statistics;
import com.dy.pipIrrGlobal.daoRm.RmIntakeAmountDayMapper;
import org.apache.logging.log4j.LogManager;
@@ -17,16 +17,19 @@
private static Logger log = LogManager.getLogger(StIntake.class.getName()) ;
@Autowired
- protected RmIntakeAmountDayMapper rmIntakeAmountDayDao ;
+ protected StIntakeSv sv ;
- private String statisticsYyyy_mm;
+ private Integer statisticsYear;
+ private Integer statisticsMonth;
private Long statisticsStartId ;
private Long statisticsEndId ;
- protected void statistics(String statisticsYyyy_mm,
+ protected void statistics(Integer statisticsYear,
+ Integer statisticsMonth,
Long statisticsStartId,
Long statisticsEndId){
- this.statisticsYyyy_mm = statisticsYyyy_mm ;
+ this.statisticsYear = statisticsYear ;
+ this.statisticsMonth = statisticsMonth ;
this.statisticsStartId = statisticsStartId ;
this.statisticsEndId = statisticsEndId ;
this.statisticsMonth() ;
@@ -37,14 +40,13 @@
* 鏈堢粺璁�---鍙栨按鍙�
*/
private void statisticsMonth(){
- log.info(statisticsYyyy_mm + " " + statisticsStartId + " " + statisticsEndId);
- log.info(rmIntakeAmountDayDao.toString());
+ sv.statisticsMonth(statisticsYear, statisticsMonth, statisticsStartId, statisticsEndId);
}
/**
* 骞寸粺璁�---鍙栨按鍙�
*/
private void statisticsYear(){
-
+ sv.statisticsYear(statisticsYear);
}
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java
new file mode 100644
index 0000000..aecf2fa
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java
@@ -0,0 +1,69 @@
+package com.dy.pipIrrStatistics.statistics;
+
+import com.dy.pipIrrGlobal.daoRm.RmIntakeAmountDayMapper;
+import com.dy.pipIrrGlobal.daoSt.StIntakeAmountMonthMapper;
+import com.dy.pipIrrGlobal.daoSt.StIntakeAmountYearMapper;
+import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth;
+import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear;
+import com.dy.pipIrrGlobal.pojoSt.StLossYear;
+import com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 16:28
+ * @Description
+ */
+@Component
+public class StIntakeSv {
+
+ @Autowired
+ protected RmIntakeAmountDayMapper rmIntakeAmountDayDao;
+
+ @Autowired
+ protected StIntakeAmountMonthMapper stIntakeAmountMonthDao ;
+
+ @Autowired
+ protected StIntakeAmountYearMapper stIntakeAmountYearDao ;
+
+ /**
+ * 鏈堢粺璁�---婕忔崯
+ */
+ @Transactional
+ protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){
+ List<VoIntakeAmountStatistics> list = rmIntakeAmountDayDao.statisticsByIntake(statisticsStartId, statisticsEndId) ;
+ if(list != null && list.size() > 0){
+ for(VoIntakeAmountStatistics vo : list){
+ StIntakeAmountMonth po = new StIntakeAmountMonth() ;
+ po.intakeId = vo.intakeId ;
+ po.year = statisticsYear ;
+ po.month = statisticsMonth ;
+ po.amount = vo.amount;
+ stIntakeAmountMonthDao.insert(po) ;
+ }
+ }
+ }
+
+ /**
+ * 骞寸粺璁�---婕忔崯
+ */
+ @Transactional
+ protected void statisticsYear(Integer statisticsYear){
+ List<VoIntakeAmountStatistics> list = stIntakeAmountMonthDao.statisticsByIntake(statisticsYear) ;
+ if(list != null && list.size() > 0){
+ for(VoIntakeAmountStatistics vo : list){
+ StIntakeAmountYear po = new StIntakeAmountYear() ;
+ po.intakeId = vo.intakeId ;
+ po.year = statisticsYear ;
+ po.amount = vo.amount;
+ stIntakeAmountYearDao.insert(po) ;
+ }
+ }
+ }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StLoss.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLoss.java
similarity index 65%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StLoss.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLoss.java
index f2d6b90..6c17169 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StLoss.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLoss.java
@@ -1,6 +1,5 @@
-package com.dy.pipIrrStatistics.listeners;
+package com.dy.pipIrrStatistics.statistics;
-import com.dy.pipIrrGlobal.daoRm.RmLossHistoryMapper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,16 +16,19 @@
private static Logger log = LogManager.getLogger(StLoss.class.getName()) ;
@Autowired
- protected RmLossHistoryMapper rmLossHistoryDao ;
+ protected StLossSv sv ;
- private String statisticsYyyy_mm;
+ private Integer statisticsYear;
+ private Integer statisticsMonth;
private Long statisticsStartId ;
private Long statisticsEndId ;
- protected void statistics(String statisticsYyyy_mm,
+ protected void statistics(Integer statisticsYear,
+ Integer statisticsMonth,
Long statisticsStartId,
Long statisticsEndId){
- this.statisticsYyyy_mm = statisticsYyyy_mm ;
+ this.statisticsYear = statisticsYear ;
+ this.statisticsMonth = statisticsMonth ;
this.statisticsStartId = statisticsStartId ;
this.statisticsEndId = statisticsEndId ;
this.statisticsMonth() ;
@@ -37,14 +39,13 @@
* 鏈堢粺璁�---婕忔崯
*/
private void statisticsMonth(){
- log.info(statisticsYyyy_mm + " " + statisticsStartId + " " + statisticsEndId);
- log.info(rmLossHistoryDao.toString());
+ sv.statisticsMonth(statisticsYear, statisticsMonth, statisticsStartId, statisticsEndId);
}
/**
* 骞寸粺璁�---婕忔崯
*/
private void statisticsYear(){
-
+ sv.statisticsYear(statisticsYear);
}
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLossSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLossSv.java
new file mode 100644
index 0000000..a3c517f
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StLossSv.java
@@ -0,0 +1,66 @@
+package com.dy.pipIrrStatistics.statistics;
+
+import com.dy.pipIrrGlobal.daoRm.RmLossDayMapper;
+import com.dy.pipIrrGlobal.daoSt.StLossMonthMapper;
+import com.dy.pipIrrGlobal.daoSt.StLossYearMapper;
+import com.dy.pipIrrGlobal.pojoSt.StLossMonth;
+import com.dy.pipIrrGlobal.pojoSt.StLossYear;
+import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/24 11:24
+ * @Description
+ */
+@Component
+public class StLossSv {
+
+ @Autowired
+ protected RmLossDayMapper rmLossDayDao;
+
+ @Autowired
+ protected StLossMonthMapper stLossMonthDao ;
+
+ @Autowired
+ protected StLossYearMapper stLossYearDao ;
+
+ /**
+ * 鏈堢粺璁�---婕忔崯
+ */
+ @Transactional
+ protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){
+ List<VoIntakeLossStatistics> list = rmLossDayDao.statisticsByIntake(statisticsStartId, statisticsEndId) ;
+ if(list != null && list.size() > 0){
+ for(VoIntakeLossStatistics vo : list){
+ StLossMonth po = new StLossMonth() ;
+ po.intakeId = vo.intakeId ;
+ po.year = statisticsYear ;
+ po.month = statisticsMonth ;
+ po.amount = vo.amount;
+ stLossMonthDao.insert(po) ;
+ }
+ }
+ }
+
+ /**
+ * 骞寸粺璁�---婕忔崯
+ */
+ @Transactional
+ protected void statisticsYear(Integer statisticsYear){
+ List<VoIntakeLossStatistics> list = stLossMonthDao.statisticsByIntake(statisticsYear) ;
+ if(list != null && list.size() > 0){
+ for(VoIntakeLossStatistics vo : list){
+ StLossYear po = new StLossYear() ;
+ po.intakeId = vo.intakeId ;
+ po.year = statisticsYear ;
+ po.amount = vo.amount;
+ stLossYearDao.insert(po) ;
+ }
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsJob.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsJob.java
new file mode 100644
index 0000000..da3c02b
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsJob.java
@@ -0,0 +1,78 @@
+package com.dy.pipIrrStatistics.statistics;
+
+import com.dy.common.multiDataSource.DataSourceContext;
+import com.dy.common.schedulerTask.TaskJob;
+import com.dy.common.schedulerTask.Test;
+import com.dy.common.springUtil.SpringContextUtil;
+import com.dy.common.util.DateTime;
+import com.dy.common.util.IDLongGenerator;
+import com.dy.pipIrrGlobal.util.Org;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/7/22 16:41
+ * @Description
+ */
+public class StatisticsJob extends TaskJob {
+
+ private static Logger log = LogManager.getLogger(Test.class.getName()) ;
+
+ private StLoss stLoss ;
+
+ private StIntake stIntake ;
+
+ private StClient stClient ;
+
+ private Integer statisticsYear;
+ private Integer statisticsMonth;
+ private Long statisticsStartId ;
+ private Long statisticsEndId ;
+
+ @Override
+ public void execute(JobExecutionContext ctx) throws JobExecutionException {
+ stLoss = SpringContextUtil.getBean(StLoss.class);
+ stIntake = SpringContextUtil.getBean(StIntake.class);
+ stClient = SpringContextUtil.getBean(StClient.class);
+ if(stLoss != null && stIntake != null && stClient != null){
+ int[] ymd = DateTime.yyyy_MM_dd_2_ymdGroup(DateTime.yyyy_MM_dd()) ;
+ if(ymd[2] == 1){
+ //缁熻涓婁釜鏈堢殑
+ String statisticsYyyy_mm = DateTime.lastMonth_ym() ; //缁熻骞存湀
+ statisticsYear = Integer.parseInt(statisticsYyyy_mm.substring(0, 4)) ;//缁熻骞�
+ statisticsMonth = Integer.parseInt(statisticsYyyy_mm.substring(5, 7)) ;//缁熻鏈�
+ statisticsStartId = IDLongGenerator.generateOneDayStartId(statisticsYear, statisticsMonth, 1) ;
+ statisticsEndId = IDLongGenerator.generateOneDayEndId(statisticsYear, statisticsMonth, 31) ;
+ }else{
+ //缁熻鏈湀鐨�
+ statisticsYear = ymd[0] ;//缁熻鏈�
+ statisticsMonth = ymd[1] ;//缁熻鏈�
+ statisticsStartId = IDLongGenerator.generateOneDayStartId(ymd[0], ymd[1], 1) ;
+ statisticsEndId = IDLongGenerator.generateOneDayEndId(ymd[0], ymd[1], 31) ;
+ }
+ doStatistics() ;
+ }else{
+ log.error("鏈兘浠嶴pring瀹瑰櫒涓緱鍒扮粺璁ean");
+ }
+ }
+
+ /**
+ * 缁熻
+ */
+ private void doStatistics(){
+ List<Org.OrgVo> orgList = Org.OrgList ;
+ if(orgList != null && orgList.size() >0){
+ for(Org.OrgVo vo : orgList){
+ DataSourceContext.set(vo.tag);//璁剧疆鏁版嵁婧�
+ stLoss.statistics(statisticsYear, statisticsMonth, statisticsStartId, statisticsEndId) ;
+ stIntake.statistics(statisticsYear, statisticsMonth, statisticsStartId, statisticsEndId) ;
+ stClient.statistics(statisticsYear, statisticsMonth, statisticsStartId, statisticsEndId) ;
+ }
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StatisticsListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsListener.java
similarity index 95%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StatisticsListener.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsListener.java
index 4d19109..79c15cf 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/listeners/StatisticsListener.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StatisticsListener.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrStatistics.listeners;
+package com.dy.pipIrrStatistics.statistics;
/**
* @Author: liurunyu
@@ -9,7 +9,6 @@
import com.dy.common.schedulerTask.SchedulerTaskSupport;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/util/OrgListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/util/OrgListener.java
new file mode 100644
index 0000000..3aa1ae5
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/util/OrgListener.java
@@ -0,0 +1,22 @@
+package com.dy.pipIrrStatistics.util;
+
+import com.dy.pipIrrGlobal.util.OrgListenerSupport;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
+
+@Component
+public class OrgListener extends OrgListenerSupport implements ApplicationListener<ApplicationReadyEvent> {
+
+ @Override
+ public void onApplicationEvent(ApplicationReadyEvent event) {
+ try {
+ //绛�1绉掞紝绛夊緟com.alibaba.druid.pool.DruidDataSource瀹炲鍖栧畬鎴�
+ Thread.sleep(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } finally {
+ super.init();
+ }
+ }
+}
\ No newline at end of file
--
Gitblit v1.8.0