/*
 * Author: wangjian
 * 生成mapper
 */
package com.tofly.xrtygis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.xrtygis.entity.Dmaregion;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * DMA分区信息表：TF_YWPN_DMAREGION_W
 *
 * @author admin
 * @date Wed Mar 10 00:00:00 CST 2021
 */
public interface DmaregionMapper extends BaseMapper<Dmaregion> {
    String getIsycName(@Param("isYc") String isYc);
    String getPName(@Param("pId") Long pId);
    List<Map> partitionNum();

    void updateMinFlow(@Param("id") Long parId, @Param("min") BigDecimal minFlow);

    IPage<Dmaregion> getPartitionById(Page page, @Param("id") Long id, @Param("content") String content);

    IPage<Dmaregion> getOneLevelByIds(Page page, @Param("ids") String ids, @Param("content") String content);

    List<Dmaregion> getPartitionByIdList(@Param("id") Long id, @Param("content") String content);

    List<Dmaregion> getOneLevelByIdsList(@Param("ids") String ids, @Param("content") String content);

    String getGuid();

    /**
     * 根据设备获取当前年 年平均压力
     * @param year
     * @param deviceIdList
     * @return
     */
    BigDecimal getYearPressure(@Param("year") String year,@Param("list") List<Long> deviceIdList);
}
