package org.gyk.modules.sssj.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.gyk.modules.lssj.jldls.entity.CxcSssjLssjJldlsRsj;
import org.gyk.modules.sssj.entity.Rishuju;

import java.util.List;
import java.util.Map;

@Mapper
public interface RishujuMapper extends BaseMapper<Rishuju> {
    /**
     * 分别查询多个计量点今月累计量
     * @return
     * @param jldId
     */
    List<Map<String, Object>> getMouthDataByIds(@Param("jldId") String jldId);

    /**
     * 分别查询多个计量点本年累计量
     * @return
     * @param jldId
     */
//    @Select("select jld_id , SUM(jrl)as jia from  cxc_sssj_lssj_jldls_rsj where YEAR ( create_time ) = YEAR(NOW()) AND jld_id IN (#{jldId}) GROUP BY jld_id")
    List<Map<String, Object>> getYearDataByIds (@Param("jldId") String jldId);
    /**
     * 查询计量点月累和年累 查询一个计量点是单点的年累和月累  查询多个点是多点的年累和月累
     * @return
     * @param jldId
     */
    List<Map<String, Object>> getYMDataByjldIds(@Param("jldId") String jldId);

}
