package com.dy.pipIrrStatistics.statistics; import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth; import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear; import com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @Author: liurunyu * @Date: 2024/12/23 14:53 * @Description */ @Component public class StChargeByIcSv { /** * 月统计---漏损 */ @Transactional protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){ // List list = rmIntakeAmountDayDao.statisticsByIntake(statisticsStartId, statisticsEndId) ; // if(list != null && list.size() > 0){ // for(VoIntakeAmountStatistics vo : list){ // StIntakeAmountMonth po = this.stIntakeAmountMonthDao.selectByIntakeIdAndYearAndMonth(vo.intakeId, statisticsYear, statisticsMonth) ; // if(po == null){ // po = new StIntakeAmountMonth() ; // } // po.intakeId = vo.intakeId ; // po.year = statisticsYear ; // po.month = statisticsMonth ; // po.amount = vo.amount; // if(po.id == null) { // stIntakeAmountMonthDao.insert(po); // }else{ // stIntakeAmountMonthDao.updateByPrimaryKey(po) ; // } // } // } } /** * 年统计---漏损 */ @Transactional protected void statisticsYear(Integer statisticsYear){ // List list = stIntakeAmountMonthDao.statisticsByIntake(statisticsYear) ; // if(list != null && list.size() > 0){ // for(VoIntakeAmountStatistics vo : list){ // StIntakeAmountYear po = stIntakeAmountYearDao.selectByIntakeIdAndYear(vo.intakeId, statisticsYear) ; // if(po == null){ // po = new StIntakeAmountYear() ; // } // po.intakeId = vo.intakeId ; // po.year = statisticsYear ; // po.amount = vo.amount; // if(po.id == null){ // stIntakeAmountYearDao.insert(po) ; // }else{ // stIntakeAmountYearDao.updateByPrimaryKey(po) ; // } // } // } } }