package com.dy.pipIrrGlobal.daoSt; 
 | 
  
 | 
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 
 | 
import com.dy.pipIrrGlobal.pojoSt.StLossMonth; 
 | 
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 15:48 
 | 
 * @Description 
 | 
 */ 
 | 
@Mapper 
 | 
public interface StLossMonthMapper extends BaseMapper<StLossMonth> { 
 | 
    /** 
 | 
     * 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(StLossMonth record); 
 | 
  
 | 
    /** 
 | 
     * insert record to table selective 
 | 
     * 
 | 
     * @param record the record 
 | 
     * @return insert count 
 | 
     */ 
 | 
    int insertSelective(StLossMonth record); 
 | 
  
 | 
    /** 
 | 
     * select by primary key 
 | 
     * 
 | 
     * @param id primary key 
 | 
     * @return object by primary key 
 | 
     */ 
 | 
    StLossMonth selectByPrimaryKey(Long id); 
 | 
  
 | 
    /** 
 | 
     * 查询某年某月某取水口的月某量值 
 | 
     * @param intakeId 取水ID 
 | 
     * @param year 某年 
 | 
     * @param month 某月 
 | 
     * @return 
 | 
     */ 
 | 
    StLossMonth 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(StLossMonth record); 
 | 
  
 | 
    /** 
 | 
     * update record 
 | 
     * 
 | 
     * @param record the updated record 
 | 
     * @return update count 
 | 
     */ 
 | 
    int updateByPrimaryKey(StLossMonth record); 
 | 
  
 | 
    /** 
 | 
     * 以取水口维度统计漏损量 
 | 
     * @param year 统计年度 
 | 
     * @return 
 | 
     */ 
 | 
    List<VoIntakeLossStatistics> statisticsByIntake(Integer year) ; 
 | 
  
 | 
  
 | 
    //////////////////////////////////////////////// 
 | 
    // 统计查询 
 | 
    /////////////////////////////////////////////// 
 | 
  
 | 
    /** 
 | 
     * 为查询统计取水口日漏损量,统计取水口数量 
 | 
     * @param intakeN 
 | 
     * @return 
 | 
     */ 
 | 
    Long selectIntakeCount4LossMonth(@Param("intakeNum")String intakeN) ; 
 | 
  
 | 
    /** 
 | 
     * 为查询统计取水口日漏损量,查询一页取水口ID 
 | 
     * @param params 
 | 
     * @return 
 | 
     */ 
 | 
    List<VoMonthAmount> selectIntakes4LossMonth(Map<?, ?> params) ; 
 | 
  
 | 
    /** 
 | 
     * 查询统计取水口月漏损量 
 | 
     * @param params 
 | 
     * @return 
 | 
     */ 
 | 
    //下面1到12月分了2个查询,原因是在一个查询中,非常慢,不知道什么原因,也许是子查询太多的原因 
 | 
    List<VoMonthAmount> selectLossAmountOfMonth01_06(Map<?, ?> params); 
 | 
    List<VoMonthAmount> selectLossAmountOfMonth07_12(Map<?, ?> params); 
 | 
  
 | 
} 
 |