package com.dy.pipIrrGlobal.daoSt; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth; import com.dy.pipIrrGlobal.pojoSt.StLossMonth; import com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics; import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics; import com.dy.pipIrrGlobal.voSt.VoMonthAmount; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; /** * @Author: liurunyu * @Date: 2024/7/24 16:38 * @Description */ @Mapper public interface StIntakeAmountMonthMapper extends BaseMapper { /** * delete by primary key * @param id primaryKey * @return deleteCount */ int deleteByPrimaryKey(Long id); /** * insert record to table * @param record the record * @return insert count */ int insert(StIntakeAmountMonth record); /** * insert record to table selective * @param record the record * @return insert count */ int insertSelective(StIntakeAmountMonth record); /** * select by primary key * @param id primary key * @return object by primary key */ StIntakeAmountMonth selectByPrimaryKey(Long id); /** * 查询某年某月某取水口的月某量值 * @param intakeId 取水ID * @param year 某年 * @param month 某月 * @return */ List selectByIntakeIdAndYearAndMonth(@Param("intakeId")Long intakeId, @Param("year")Integer year, @Param("month")Integer month) ; /** * update record selective * @param record the updated record * @return update count */ int updateByPrimaryKeySelective(StIntakeAmountMonth record); /** * update record * @param record the updated record * @return update count */ int updateByPrimaryKey(StIntakeAmountMonth record); /** * 以取水口维度统计取水量 * @param year 统计年度 * @return */ List statisticsByIntake(@Param("year")Integer year, @Param("month")Integer month, @Param("startId")Long startId, @Param("endId")Long endId) ; /** * 以取水口维度统计取水量 * @param year 统计年度 * @return */ List statisticsByIntake(Integer year) ; //////////////////////////////////////////////// // 统计查询 /////////////////////////////////////////////// /** * 为查询统计取水口日漏损量,统计取水口数量 * @param intakeN * @return */ Long selectIntakeCount4AmountMonth(@Param("intakeNum")String intakeN) ; /** * 为查询统计取水口日漏损量,查询一页取水口ID * @param params * @return */ List selectIntakes4AmountMonth(Map params) ; /** * 查询统计取水口月漏损量 * @param params * @return */ //下面1到12月分了2个查询,原因是在一个查询中,非常慢,不知道什么原因,也许是子查询太多的原因 List selectIntakeAmountOfMonth01_06(Map params); List selectIntakeAmountOfMonth07_12(Map params); }