package com.casic.missiles.mapper.business;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.dto.business.outsource.OutsourceProjectApprovalListRequest;
import com.casic.missiles.dto.business.outsource.OutsourceProjectApprovalListResponse;
import com.casic.missiles.model.business.BusinessOutsourceProject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 分包项目表 Mapper 接口
 * </p>
 *
 * @author wangpeng
 * @since 2023-03-23
 */
public interface BusinessOutsourceProjectMapper extends BaseMapper<BusinessOutsourceProject> {

    List<BusinessOutsourceProject> selectDraftListForApproval(Page<OutsourceProjectApprovalListResponse> page, @Param("request") OutsourceProjectApprovalListRequest request);

    List<BusinessOutsourceProject> selectBatchForApproval(Page<OutsourceProjectApprovalListResponse> page, @Param("request") OutsourceProjectApprovalListRequest request, @Param("businessKey") List<String> businessKeys);

    Long selectMaxOutsourcerNo();

    BusinessOutsourceProject selectProjectById(@Param("id") Long id);

    int updateForProjectCheck(@Param("id") Long id);
}
