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) ; 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
    } 
 | 
} 
 |