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-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java | 69 ++++++++++++++++++++++++++++++++++
1 files changed, 69 insertions(+), 0 deletions(-)
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) ;
+ }
+ }
+ }
+
+}
--
Gitblit v1.8.0