From 24bbe7a75c85816524c097caacb141cc6846acb9 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 11 十二月 2024 15:21:21 +0800
Subject: [PATCH] 增加删除取水口水量月统计年统计重复数据功能,增加删除农户用水量月统计年统计重复数据功能,

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountYear.java               |    5 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountYear.java                 |    3 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountMonth.java              |    4 
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeIntakeAmountSv.java |   95 +++++++++
 /dev/null                                                                                                     |   63 ------
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountMonth.java                |    2 
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeClientAmountSv.java |   96 +++++++++
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4DeleteMapper.xml                                 |  106 +++++++++-
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountYear.java               |    3 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoTmp/DeleteMapper.java                      |   55 +++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountMonth.java              |    2 
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeCtrl.java           |   40 +++
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeLossAmountSv.java   |   95 +++++++++
 13 files changed, 475 insertions(+), 94 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoTmp/DeleteMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoTmp/DeleteMapper.java
index f72072a..bf158f7 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoTmp/DeleteMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoTmp/DeleteMapper.java
@@ -1,7 +1,7 @@
 package com.dy.pipIrrGlobal.daoTmp;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.dy.pipIrrGlobal.voTmp.VoStLossMonth;
+import com.dy.pipIrrGlobal.voTmp.*;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
@@ -16,9 +16,58 @@
 
     /**
      * 鏌ヨ鍏ㄩ儴婕忔崯鏈堢粺璁�
+     *
      * @return 瀹炰綋闆嗗悎
      */
-    List<VoStLossMonth> selectAllStLossMonth() ;
+    List<VoStLossAmountMonth> selectAllStLossMonth();
 
-    int deleteStLossMonthById(Long id) ;
+    int deleteStLossMonthById(Long id);
+
+    /**
+     * 鏌ヨ鍏ㄩ儴婕忔崯骞寸粺璁�
+     *
+     * @return 瀹炰綋闆嗗悎
+     */
+    List<VoStLossAmountYear> selectAllStLossYear();
+
+    int deleteStLossYearById(Long id);
+
+
+    /**
+     * 鏌ヨ鍏ㄩ儴鍙栨按鍙f湀缁熻
+     *
+     * @return 瀹炰綋闆嗗悎
+     */
+    List<VoStIntakeAmountMonth> selectAllStIntakeMonth();
+
+    int deleteStIntakeMonthById(Long id);
+
+    /**
+     * 鏌ヨ鍏ㄩ儴鍙栨按鍙e勾缁熻
+     *
+     * @return 瀹炰綋闆嗗悎
+     */
+    List<VoStIntakeAmountYear> selectAllStIntakeYear();
+
+    int deleteStIntakeYearById(Long id);
+
+
+    /**
+     * 鏌ヨ鍏ㄩ儴鍐滄埛鏈堢粺璁�
+     *
+     * @return 瀹炰綋闆嗗悎
+     */
+    List<VoStClientAmountMonth> selectAllStClientMonth();
+
+    int deleteStClientMonthById(Long id);
+
+    /**
+     * 鏌ヨ鍏ㄩ儴鍐滄埛骞寸粺璁�
+     *
+     * @return 瀹炰綋闆嗗悎
+     */
+    List<VoStClientAmountYear> selectAllStClientYear();
+
+    int deleteStClientYearById(Long id);
+
 }
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountMonth.java
similarity index 78%
copy from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
copy to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountMonth.java
index d5f8cd5..d648701 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountMonth.java
@@ -8,9 +8,9 @@
  * @Description
  */
 @Data
-public class VoStLossMonth {
+public class VoStClientAmountMonth {
     public Long id ;
-    public Long intakeId ;
+    public Long clientId ;
     public Integer year ;
     public Integer month ;
     public Double amount ;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountYear.java
similarity index 71%
copy from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
copy to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountYear.java
index d5f8cd5..60c9665 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStClientAmountYear.java
@@ -8,10 +8,9 @@
  * @Description
  */
 @Data
-public class VoStLossMonth {
+public class VoStClientAmountYear {
     public Long id ;
-    public Long intakeId ;
+    public Long clientId ;
     public Integer year ;
-    public Integer month ;
     public Double amount ;
 }
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountMonth.java
similarity index 87%
copy from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
copy to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountMonth.java
index d5f8cd5..856fc67 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountMonth.java
@@ -8,7 +8,7 @@
  * @Description
  */
 @Data
-public class VoStLossMonth {
+public class VoStIntakeAmountMonth {
     public Long id ;
     public Long intakeId ;
     public Integer year ;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountYear.java
similarity index 80%
copy from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
copy to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountYear.java
index d5f8cd5..27f4c13 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStIntakeAmountYear.java
@@ -8,10 +8,9 @@
  * @Description
  */
 @Data
-public class VoStLossMonth {
+public class VoStIntakeAmountYear {
     public Long id ;
     public Long intakeId ;
     public Integer year ;
-    public Integer month ;
     public Double amount ;
 }
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountMonth.java
similarity index 88%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountMonth.java
index d5f8cd5..5a889c7 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountMonth.java
@@ -8,7 +8,7 @@
  * @Description
  */
 @Data
-public class VoStLossMonth {
+public class VoStLossAmountMonth {
     public Long id ;
     public Long intakeId ;
     public Integer year ;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountYear.java
similarity index 80%
copy from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
copy to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountYear.java
index d5f8cd5..11a9271 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoStLossAmountYear.java
@@ -8,10 +8,9 @@
  * @Description
  */
 @Data
-public class VoStLossMonth {
+public class VoStLossAmountYear {
     public Long id ;
     public Long intakeId ;
     public Integer year ;
-    public Integer month ;
     public Double amount ;
 }
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4DeleteMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4DeleteMapper.xml
index 63cfe37..60f1e56 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4DeleteMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4DeleteMapper.xml
@@ -1,18 +1,98 @@
 <?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.daoTmp.DeleteMapper">
-  <select id="selectAllStLossMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStLossMonth">
-    select id as id,
-            intake_id as intakeId ,
-            year as year,
-            month as month,
-            amount as amount
-    from  st_loss_month
-    order by intake_id DESC, id DESC
-  </select>
+    <!-- 婕忔崯缁熻鐩稿叧 -->
+    <select id="selectAllStLossMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStLossAmountMonth">
+        select id as id,
+               intake_id as intakeId ,
+               year as year,
+               month as month,
+               amount as amount
+        from  st_loss_month
+        order by intake_id DESC, id DESC
+    </select>
 
-  <delete id="deleteStLossMonthById" parameterType="java.lang.Long">
-    delete from st_loss_month
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
+    <delete id="deleteStLossMonthById" parameterType="java.lang.Long">
+        delete from st_loss_month
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+    <select id="selectAllStLossYear" resultType="com.dy.pipIrrGlobal.voTmp.VoStLossAmountYear">
+        select id as id,
+               intake_id as intakeId ,
+               year as year,
+               amount as amount
+        from  st_loss_year
+        order by intake_id DESC, id DESC
+    </select>
+
+    <delete id="deleteStLossYearById" parameterType="java.lang.Long">
+        delete from st_loss_year
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+
+
+    <!-- 鍙栨按鍙g粺璁$浉鍏� -->
+    <select id="selectAllStIntakeMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountMonth">
+        select id as id,
+               intake_id as intakeId ,
+               year as year,
+               month as month,
+               amount as amount
+        from  st_intake_amount_month
+        order by intake_id DESC, id DESC
+    </select>
+
+    <delete id="deleteStIntakeMonthById" parameterType="java.lang.Long">
+        delete from st_intake_amount_month
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+    <select id="selectAllStIntakeYear" resultType="com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountYear">
+        select id as id,
+               intake_id as intakeId ,
+               year as year,
+               amount as amount
+        from  st_intake_amount_year
+        order by intake_id DESC, id DESC
+    </select>
+
+    <delete id="deleteStIntakeYearById" parameterType="java.lang.Long">
+        delete from st_intake_amount_year
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+
+
+    <!-- 鍐滄埛缁熻鐩稿叧 -->
+    <select id="selectAllStClientMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStClientAmountMonth">
+        select id as id,
+               client_id as clientId ,
+               year as year,
+               month as month,
+               amount as amount
+        from  st_client_amount_month
+        order by client_id DESC, id DESC
+    </select>
+
+    <delete id="deleteStClientMonthById" parameterType="java.lang.Long">
+        delete from st_client_amount_month
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+    <select id="selectAllStClientYear" resultType="com.dy.pipIrrGlobal.voTmp.VoStClientAmountYear">
+        select id as id,
+               client_id as clientId ,
+               year as year,
+               amount as amount
+        from  st_client_amount_year
+        order by client_id DESC, id DESC
+    </select>
+
+    <delete id="deleteStClientYearById" parameterType="java.lang.Long">
+        delete from st_client_amount_year
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
 </mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeClientAmountSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeClientAmountSv.java
new file mode 100644
index 0000000..185b9dd
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeClientAmountSv.java
@@ -0,0 +1,96 @@
+package com.dy.pipIrrTemp.delSome;
+
+import com.dy.pipIrrGlobal.daoTmp.DeleteMapper;
+import com.dy.pipIrrGlobal.voTmp.VoStClientAmountMonth;
+import com.dy.pipIrrGlobal.voTmp.VoStClientAmountYear;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/12/11 10:54
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class DelSomeClientAmountSv {
+
+    private DeleteMapper dao;
+
+    @Autowired
+    private void setDao(DeleteMapper dao){
+        this.dao = dao;
+    }
+
+    public void delStClientMonth(){
+        VoStClientAmountMonth first = null ;
+        List<VoStClientAmountMonth> list = dao.selectAllStClientMonth() ;
+        if(list != null && list.size() > 0){
+            for(VoStClientAmountMonth vo : list){
+                if(first == null){
+                    first = vo ;
+                }else{
+                    if(first.clientId.longValue() != vo.clientId.longValue()){
+                        //鍐滄埛鍙樹簡
+                        first = vo ;
+                    }else{
+                        if(first.year.intValue() != vo.year.intValue()) {
+                            //骞村害鍙樹簡
+                            first = vo ;
+                        }else{
+                            if(first.month.intValue() != vo.month.intValue()){
+                                //鏈堜唤鍙樹簡
+                                first = vo ;
+                            }else{
+                                //鍚屼竴涓啘鎴峰悓骞村悓鏈�
+                                doDelStClientMonth(vo.id) ;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    public void delStClientYear(){
+        VoStClientAmountYear first = null ;
+        List<VoStClientAmountYear> list = dao.selectAllStClientYear() ;
+        if(list != null && list.size() > 0){
+            for(VoStClientAmountYear vo : list){
+                if(first == null){
+                    first = vo ;
+                }else{
+                    if(first.clientId.longValue() != vo.clientId.longValue()){
+                        //鍐滄埛鍙樹簡
+                        first = vo ;
+                    }else{
+                        if(first.year.intValue() != vo.year.intValue()) {
+                            //骞村害鍙樹簡
+                            first = vo ;
+                        }else{
+                            //鍚屼竴涓啘鎴峰悓骞�
+                            doDelStClientYear(vo.id) ;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    @Transactional
+    int doDelStClientMonth(Long id){
+        return dao.deleteStClientMonthById(id) ;
+    }
+
+    @Transactional
+    int doDelStClientYear(Long id){
+        return dao.deleteStClientYearById(id) ;
+    }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeCtrl.java
index 529f2d0..b1a4519 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeCtrl.java
@@ -20,11 +20,18 @@
 @SuppressWarnings("unchecked")//java鐗堟湰瓒婇珮锛屽娉涘瀷绾︽潫瓒婁弗锛屾墍浠ラ厤缃甋uppressWarnings("unchecked")
 public class DelSomeCtrl {
 
-    private DelSomeSv sv;
+    private DelSomeLossAmountSv lossAmountSv;
+    private DelSomeIntakeAmountSv intakeAmountSv;
+    private DelSomeClientAmountSv clientAmountSv;
 
     @Autowired
-    private void setSv(DelSomeSv sv) {
-        this.sv = sv;
+    private void setSv(DelSomeLossAmountSv sv) {
+        this.lossAmountSv = sv;
+    }
+
+    @Autowired
+    private void setSv(DelSomeIntakeAmountSv sv) {
+        this.intakeAmountSv = sv;
     }
 
     /**
@@ -34,7 +41,32 @@
     @GetMapping(path = "deleteSomeStatisticLossAmount")
     @SsoAop()
     public BaseResponse<Boolean> deleteSomeStatisticLossAmount(){
-        this.sv.delStLossMonth();
+        this.lossAmountSv.delStLossMonth();
+        this.lossAmountSv.delStLossYear();
+        return BaseResponseUtils.buildSuccess(true);
+    }
+
+    /**
+     * 鍒犻櫎涓�浜涘彇姘村彛缁熻
+     * @return
+     */
+    @GetMapping(path = "deleteSomeStatisticIntakeAmount")
+    @SsoAop()
+    public BaseResponse<Boolean> deleteSomeStatisticIntakeAmount(){
+        this.intakeAmountSv.delStIntakeMonth();
+        this.intakeAmountSv.delStIntakeYear();
+        return BaseResponseUtils.buildSuccess(true);
+    }
+
+    /**
+     * 鍒犻櫎涓�浜涘啘鎴风粺璁�
+     * @return
+     */
+    @GetMapping(path = "deleteSomeStatisticClientAmount")
+    @SsoAop()
+    public BaseResponse<Boolean> deleteSomeStatisticClientAmount(){
+        this.clientAmountSv.delStClientMonth();
+        this.clientAmountSv.delStClientYear();
         return BaseResponseUtils.buildSuccess(true);
     }
 }
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeIntakeAmountSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeIntakeAmountSv.java
new file mode 100644
index 0000000..4c79d6e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeIntakeAmountSv.java
@@ -0,0 +1,95 @@
+package com.dy.pipIrrTemp.delSome;
+
+import com.dy.pipIrrGlobal.daoTmp.DeleteMapper;
+import com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountMonth;
+import com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountYear;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/12/11 10:54
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class DelSomeIntakeAmountSv {
+
+    private DeleteMapper dao;
+
+    @Autowired
+    private void setDao(DeleteMapper dao){
+        this.dao = dao;
+    }
+
+    public void delStIntakeMonth(){
+        VoStIntakeAmountMonth first = null ;
+        List<VoStIntakeAmountMonth> list = dao.selectAllStIntakeMonth() ;
+        if(list != null && list.size() > 0){
+            for(VoStIntakeAmountMonth vo : list){
+                if(first == null){
+                    first = vo ;
+                }else{
+                    if(first.intakeId.longValue() != vo.intakeId.longValue()){
+                        //鍙栨按鍙e彉浜�
+                        first = vo ;
+                    }else{
+                        if(first.year.intValue() != vo.year.intValue()) {
+                            //骞村害鍙樹簡
+                            first = vo ;
+                        }else{
+                            if(first.month.intValue() != vo.month.intValue()){
+                                //鏈堜唤鍙樹簡
+                                first = vo ;
+                            }else{
+                                //鍚屼竴涓彇姘村彛鍚屽勾鍚屾湀
+                                doDelStIntakeMonth(vo.id) ;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    public void delStIntakeYear(){
+        VoStIntakeAmountYear first = null ;
+        List<VoStIntakeAmountYear> list = dao.selectAllStIntakeYear() ;
+        if(list != null && list.size() > 0){
+            for(VoStIntakeAmountYear vo : list){
+                if(first == null){
+                    first = vo ;
+                }else{
+                    if(first.intakeId.longValue() != vo.intakeId.longValue()){
+                        //鍙栨按鍙e彉浜�
+                        first = vo ;
+                    }else{
+                        if(first.year.intValue() != vo.year.intValue()) {
+                            //骞村害鍙樹簡
+                            first = vo ;
+                        }else{
+                            //鍚屼竴涓彇姘村彛鍚屽勾
+                            doDelStIntakeYear(vo.id) ;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    @Transactional
+    int doDelStIntakeMonth(Long id){
+        return dao.deleteStIntakeMonthById(id) ;
+    }
+
+    @Transactional
+    int doDelStIntakeYear(Long id){
+        return dao.deleteStIntakeYearById(id) ;
+    }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeLossAmountSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeLossAmountSv.java
new file mode 100644
index 0000000..aa71944
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeLossAmountSv.java
@@ -0,0 +1,95 @@
+package com.dy.pipIrrTemp.delSome;
+
+import com.dy.pipIrrGlobal.daoTmp.DeleteMapper;
+import com.dy.pipIrrGlobal.voTmp.VoStLossAmountMonth;
+import com.dy.pipIrrGlobal.voTmp.VoStLossAmountYear;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/12/11 10:54
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class DelSomeLossAmountSv {
+
+    private DeleteMapper dao;
+
+    @Autowired
+    private void setDao(DeleteMapper dao){
+        this.dao = dao;
+    }
+
+    public void delStLossMonth(){
+        VoStLossAmountMonth first = null ;
+        List<VoStLossAmountMonth> list = dao.selectAllStLossMonth() ;
+        if(list != null && list.size() > 0){
+            for(VoStLossAmountMonth vo : list){
+                if(first == null){
+                    first = vo ;
+                }else{
+                    if(first.intakeId.longValue() != vo.intakeId.longValue()){
+                        //鍙栨按鍙e彉浜�
+                        first = vo ;
+                    }else{
+                        if(first.year.intValue() != vo.year.intValue()) {
+                            //骞村害鍙樹簡
+                            first = vo ;
+                        }else{
+                            if(first.month.intValue() != vo.month.intValue()){
+                                //鏈堜唤鍙樹簡
+                                first = vo ;
+                            }else{
+                                //鍚屼竴涓彇姘村彛鍚屽勾鍚屾湀
+                                doDelStLossMonth(vo.id) ;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    public void delStLossYear(){
+        VoStLossAmountYear first = null ;
+        List<VoStLossAmountYear> list = dao.selectAllStLossYear() ;
+        if(list != null && list.size() > 0){
+            for(VoStLossAmountYear vo : list){
+                if(first == null){
+                    first = vo ;
+                }else{
+                    if(first.intakeId.longValue() != vo.intakeId.longValue()){
+                        //鍙栨按鍙e彉浜�
+                        first = vo ;
+                    }else{
+                        if(first.year.intValue() != vo.year.intValue()) {
+                            //骞村害鍙樹簡
+                            first = vo ;
+                        }else{
+                            //鍚屼竴涓彇姘村彛鍚屽勾
+                            doDelStLossYear(vo.id) ;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    @Transactional
+    int doDelStLossMonth(Long id){
+        return dao.deleteStLossMonthById(id) ;
+    }
+
+    @Transactional
+    int doDelStLossYear(Long id){
+        return dao.deleteStLossYearById(id) ;
+    }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeSv.java
deleted file mode 100644
index 253e3df..0000000
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/delSome/DelSomeSv.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.dy.pipIrrTemp.delSome;
-
-import com.dy.pipIrrGlobal.daoTmp.DeleteMapper;
-import com.dy.pipIrrGlobal.voTmp.VoStLossMonth;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * @Author: liurunyu
- * @Date: 2024/12/11 10:54
- * @Description
- */
-
-@Slf4j
-@Service
-public class DelSomeSv {
-
-    private DeleteMapper dao;
-
-    @Autowired
-    private void setDao(DeleteMapper dao){
-        this.dao = dao;
-    }
-
-    public void delStLossMonth(){
-        VoStLossMonth first = null ;
-        List<VoStLossMonth> list = dao.selectAllStLossMonth() ;
-        if(list != null && list.size() > 0){
-            for(VoStLossMonth vo : list){
-                if(first == null){
-                    first = vo ;
-                }else{
-                    if(first.intakeId.longValue() != vo.intakeId.longValue()){
-                        //鍙栨按鍙e彉浜�
-                        first = vo ;
-                    }else{
-                        if(first.year.intValue() != vo.year.intValue()) {
-                            //骞村害鍙樹簡
-                            first = vo ;
-                        }else{
-                            if(first.month.intValue() != vo.month.intValue()){
-                                //鏈堜唤鍙樹簡
-                                first = vo ;
-                            }else{
-                                //鍚屼竴涓彇姘村彛鍚屽勾鍚屾湀
-                                doDelStLossMonth(vo.id) ;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    @Transactional
-    int doDelStLossMonth(Long id){
-        return dao.deleteStLossMonthById(id) ;
-    }
-}

--
Gitblit v1.8.0