pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoTmp/ChangeMapper.java
@@ -8,6 +8,7 @@ import com.dy.pipIrrGlobal.pojoSt.StLossMonth; import com.dy.pipIrrGlobal.pojoSt.StLossYear; import com.dy.pipIrrGlobal.voSt.VoIntake; import com.dy.pipIrrGlobal.voTmp.VoRmIntakeAmountDay; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -70,8 +71,8 @@ * 统计所有取水口的日用水量 * @return 实体集合 */ List<RmIntakeAmountDay> statisticAllIntakeAmountDayFromOpenCloseValveHistory(@Param("startDt")Date startDt, @Param("endDt")Date endDt); List<VoRmIntakeAmountDay> statisticAllIntakeAmountDayFromOpenCloseValveHistory(@Param("startDt")Date startDt, @Param("endDt")Date endDt); List<RmIntakeAmountDay> selectStIntakeDayStatisticsByDate(@Param("intakeId")Long intakeId, @Param("date")Date date); pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voTmp/VoRmIntakeAmountDay.java
New file @@ -0,0 +1,18 @@ package com.dy.pipIrrGlobal.voTmp; import lombok.Data; import java.util.Date; /** * @Author: liurunyu * @Date: 2025/1/11 14:38 * @Description */ @Data public class VoRmIntakeAmountDay { public Long intakeId ; public Double amount ; public Double money ; public Integer times ; } pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
@@ -49,7 +49,7 @@ </delete> <!-- --> <select id="statisticAllIntakeAmountDayFromOpenCloseValveHistory" resultType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay"> <select id="statisticAllIntakeAmountDayFromOpenCloseValveHistory" resultType="com.dy.pipIrrGlobal.voTmp.VoRmIntakeAmountDay"> select intake_id as intakeId , sum(cl_this_amount) as amount, sum(cl_this_money) as money, 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; @@ -152,7 +153,7 @@ 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]); @@ -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); } } }