/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.constructionunit.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;
import com.jeeplus.core.persistence.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.jeeplus.modules.constructionunit.entity.ConstructionUnit;

import java.util.List;

/**
 * ConstructionUnitMAPPER接口
 * @author 邱悦
 * @version 2021-12-29
 */
@Mapper
@Repository
public interface ConstructionUnitMapper extends BaseMapper<ConstructionUnit> {

    /**
     * 通过评价年份和单位名称判断项目是否唯一
     * @param entity 查询条件
     * */
    ConstructionUnit getYearName(ConstructionUnit entity);

    /**
     * 导入时，通过评价年份和单位名称获取已有的数据
     * @param list 查询条件
     * */
    List<ConstructionUnit>  findListByYearName(@Param("list") List<ConstructionUnit> list, @Param("yearOfEvaluation") String yearOfEvaluation);

    /**
     * 批量插入
     * */
    void insertList(List<ConstructionUnit> list);
}