package com.jeeplus.modules.supply.projectInformation.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.supply.materialLibrary.entity.MaterialLibrary;
import com.jeeplus.modules.supply.projectInformation.entity.ProjectInformation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 项目信息（项目信息表+审定单表）mapper
 * @author: 黄俊杰
 * @create: 2022-02-28 16:00
 */
@MyBatisMapper
public interface ProjectInformationMapper extends BaseMapper<ProjectInformation> {
    /**
     * 批量新增审定单信息
     * @param list
     * @return
     */
    Integer insertSubmissionFormList(@Param("list") List<ProjectInformation> list);

    /**
     * 批量新增项目信息
     * @param list
     * @return
     */
    Integer insertProjectInformationList(@Param("list") List<ProjectInformation> list);

    /**
     * 按审定单idlist来查询
     * @param submissionFormIdList
     * @return
     */
    List<String> getSubmissionFormIdListBysubmissionFormIdList(@Param("submissionFormIdList") List<String> submissionFormIdList);

    /**
     * 批量删除
     * @param codeList
     * @return
     */
    Integer deleteAllByCodList(@Param("codeList") List<String> codeList);

    /**
     * 查询审定单表中项目定义号的count
     * @param projectInformation
     * @return
     */
    int getProjectDefinitionNumberCountBySubmissionId(ProjectInformation projectInformation);

    /**
     * 通过审定单表id关联删除项目信息表+审定单信息表
     * @param projectInformation
     * @return
     */
    int deleteAllById(ProjectInformation projectInformation);

    /**
     * 查询向目标数据量
     * @return
     */
    Integer getProjectCount();

    /**
     * 删除项目表中数据
     */
    void deleteAllProject();

    /**
     * 删除工程结算表中数据
     */
    void deleteAllSubmissionForm();
}
