From c19de84fa332a00c651f28e3a52292fd14f143a1 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 23 九月 2025 17:30:07 +0800
Subject: [PATCH] 陆常丽反应软件系统财务对账时而数据不准确,分析源码,找到bug原因是,财务对账统计只有用户点击后才会触发统计功能,把历史上及当天进行了统计,如果当天统计时未下班,例如是中午触发统计了,而下午又进行了充值售水,但下班后未再点击触发对账统计,那么今天的对账统计完成了但数据不对。编写自动任务,在下半夜进行对账统计。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsSv.java |   84 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsSv.java
new file mode 100644
index 0000000..b883689
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsSv.java
@@ -0,0 +1,84 @@
+package com.dy.pipIrrStatistics.allRound;
+
+import com.dy.common.mw.protocol.p206V1.CommonV1;
+import com.dy.pipIrrGlobal.voAllRound.*;
+import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/2/5 10:46
+ * @Description
+ */
+@Slf4j
+@Service
+public class Ar4StatisticsSv {
+
+    @Autowired
+    private Ar4StatisticsMapper statisticsDao;
+
+    //璁板綍鏉℃暟
+    private static final int totalRecordsCount = 10 ;
+
+    /**
+     * 寰楀埌鍙栨按鍙e紑鍏抽榾璁板綍锛坱otalRecordsCount鏉★級
+     * @param intakeId
+     */
+    public List<VoArIntakeOpenCloseValve> openCloseValveRecords(Long intakeId){
+        List<VoArIntakeOpenCloseValve> list = statisticsDao.openCloseRecords(intakeId, 0, totalRecordsCount);
+        if(list != null && list.size() > 0){
+            for (VoArIntakeOpenCloseValve vo : list) {
+                if(vo != null){
+                    if(vo.opType != null){
+                        vo.openType = CommonV1.openCloseValveType(vo.opType);
+                    }
+                    if(vo.clType != null){
+                        vo.closeType = CommonV1.openCloseValveType(vo.clType);
+                    }
+                }
+            }
+        }
+        return list;
+    }
+
+
+    /**
+     * 寰楀埌鍙栨按鍙f棩婕忔崯璁板綍锛坱otalRecordsCount鏉★級
+     * @param intakeId
+     */
+    public List<VoArIntakeLossDay> lossDayRecords(Long intakeId){
+        return statisticsDao.lossDayRecords(intakeId, 0, totalRecordsCount);
+    }
+
+
+    /**
+     * 寰楀埌鍙栨按鍙f湀婕忔崯璁板綍锛坱otalRecordsCount鏉★級
+     * @param intakeId
+     */
+    public List<VoArIntakeLossMonth> lossMonthRecords(Long intakeId){
+        return statisticsDao.lossMonthRecords(intakeId, 0, totalRecordsCount);
+    }
+
+
+    /**
+     * 寰楀埌鍙栨按鍙f棩鐢ㄦ按璁板綍锛坱otalRecordsCount鏉★級
+     * @param intakeId
+     */
+    public List<VoArIntakeAmountDay> amountDayRecords(Long intakeId){
+        return statisticsDao.amountDayRecords(intakeId, 0, totalRecordsCount);
+    }
+
+
+    /**
+     * 寰楀埌鍙栨按鍙f湀鐢ㄦ按璁板綍锛坱otalRecordsCount鏉★級
+     * @param intakeId
+     */
+    public List<VoArIntakeAmountMonth> amountMonthRecords(Long intakeId){
+        return statisticsDao.amountMonthRecords(intakeId, 0, totalRecordsCount);
+    }
+
+}

--
Gitblit v1.8.0