/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.business.mapper;

import org.springblade.business.entity.InformationQuery;
import org.springblade.business.vo.InformationQueryVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2022-06-08
 */
public interface InformationQueryMapper extends BaseMapper<InformationQuery> {

	/**
	 * 根据节点ID及其填报的类型获取填报记录
	 * @param wbsId 节点ID
	 * @param classify 1施工2质检
	 * @return 结果对象
	 */
	InformationQuery getInformationQueryByWbsId(@Param("wbsId") Long wbsId, @Param("classify") Integer classify);

	/**
	 * 获取当前合同段下所有的上报批次
	 * @param classify 合同段类型
	 * @param contractId 合同段ID
	 * @return 填报人集合
	 */
	List<Integer> getReportNumberByContractId(@Param("classify") Integer classify, @Param("contractId") String contractId);

	/**
	 * 查询填报人集合
	 * @param classify 合同段类型
	 * @param contractId 合同段ID
	 * @return 填报人集合
	 */
	List<InformationQuery> queryFileUserByContractId(@Param("classify") Integer classify, @Param("contractId") String contractId);

	/**
	 * 统计
	 */
	Integer countInformationQuery(@Param("query") InformationQueryVO informationQuery);

	/**
	 * 自定义分页
	 */
	List<InformationQuery> selectInformationQueryPage(@Param("current") Long current, @Param("size") Long size, @Param("query") InformationQueryVO informationQuery);

}
