liurunyu
2025-08-18 9440721414f31d1c85094be1a035d9a90f9c4d5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.dy.pipIrrTemp.delRepeatStClientAmountDay;
 
import com.dy.pipIrrGlobal.daoTmp.DeleteMapper;
import com.dy.pipIrrGlobal.voTmp.VoStClientAmountDay;
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: 2025/7/30 9:05
 * @Description
 */
@Slf4j
@Service
public class DelRepeatStClientAmountDaySv {
    private DeleteMapper dao ;
 
    @Autowired
    private void setDao(DeleteMapper dao){
        this.dao = dao;
    }
 
    @Transactional
    public void delStClientAmountDay(){
        VoStClientAmountDay client = null ;
        List<VoStClientAmountDay> list = dao.selectStClientAmountDayByYearMonth(2025, 5) ;
        if(list != null && list.size() > 0){
            for(VoStClientAmountDay vo : list){
                if(client == null){
                    client = vo ;
                }else{
                    if(client.clientId.longValue() != vo.clientId.longValue()){
                        //农户变了
                        client = vo ;
                    }else{
                        dao.deleteStClientDayById(vo.id) ;
                    }
                }
            }
        }
    }
}