liurunyu
2025-01-11 89dc7eddbc0c9ce1f6d7e7f5da8ca85e54e32edc
pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/changeSome/ChSomeIntakeAmountSv.java
@@ -6,6 +6,7 @@
import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth;
import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear;
import com.dy.pipIrrGlobal.voSt.VoIntake;
import com.dy.pipIrrGlobal.voTmp.VoRmIntakeAmountDay;
import com.dy.pipIrrTemp.util.StClientAmountConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -148,11 +149,11 @@
     */
    public void statisticsIntakeAmountDay() throws Exception{
        int nowYear = Integer.parseInt(DateTime.yyyy()) ;
        int nowMonth = Integer.parseInt(DateTime.mm()) ;
        int nowMonth = Integer.parseInt(DateTime.MM()) ;
        int nowDay = Integer.parseInt(DateTime.dd()) ;
        Date startDt ;
        Date endDt ;
        List<RmIntakeAmountDay> list ;
        List<VoRmIntakeAmountDay> list ;
        boolean stop = false ;
        for(int[] ym : StClientAmountConstant.yearMonthGrp) {
            int[] dates = DateTime.dayGrpInMonth(ym[0], ym[1]);
@@ -162,7 +163,7 @@
                }
                if(!stop){
                    startDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(ym[0] + "-" + ym[1] + "-" + day + " 00:00:00") ;
                    endDt = DateTime.dateFrom_yyyy_MM_dd(ym[0] + "-" + ym[1] + "-" + day + " 23:59:59") ;
                    endDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(ym[0] + "-" + ym[1] + "-" + day + " 23:59:59") ;
                    list = dao.statisticAllIntakeAmountDayFromOpenCloseValveHistory(startDt, endDt) ;
                    this.doStatisticsIntakeAmountDay(ym[0], ym[1], day, list) ;
                }else{
@@ -172,11 +173,11 @@
        }
    }
    @Transactional
    protected void doStatisticsIntakeAmountDay(int year, int month, int day, List<RmIntakeAmountDay> list) throws Exception{
    protected void doStatisticsIntakeAmountDay(int year, int month, int day, List<VoRmIntakeAmountDay> list) throws Exception{
        if(list != null && list.size() > 0){
            Date date = DateTime.dateFrom_yyyy_MM_dd(year + "-" + month + "-" + day) ;
            for(RmIntakeAmountDay po : list){
                dao.updateOneIntakeAmountDay1(po.intakeId, date, po.amount, po.money, po.times);
            for(VoRmIntakeAmountDay vo : list){
                dao.updateOneIntakeAmountDay1(vo.intakeId, date, vo.amount, vo.money, vo.times);
            }
        }
    }
@@ -203,7 +204,7 @@
     */
    public void statisticsIntakeAmountMonth() throws Exception{
        int nowYear = Integer.parseInt(DateTime.yyyy()) ;
        int nowMonth = Integer.parseInt(DateTime.mm()) ;
        int nowMonth = Integer.parseInt(DateTime.MM()) ;
        Date startDt ;
        Date endDt ;
        List<StIntakeAmountMonth> list ;