package com.casic.missiles.mapper.meter;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.dto.meter.MeterWorkbenchResponse;
import com.casic.missiles.dto.meter.TrainPlanApprovalListRequest;
import com.casic.missiles.dto.meter.TrainPlanApprovalListResponse;
import com.casic.missiles.dto.meter.TrainPlanDetailResponse;
import com.casic.missiles.model.meter.MeterTrainPlan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 计量管理-培训管理-培训计划表 Mapper 接口
 * </p>
 *
 * @author wangpeng
 * @since 2022-11-23
 */
public interface MeterTrainPlanMapper extends BaseMapper<MeterTrainPlan> {

    TrainPlanDetailResponse selectTrainPlanById(Long id);

    Long selectMaxTrainPlanNo();

    List<MeterWorkbenchResponse> meterTrainStatistic(@Param("startTime")String startTime, @Param("endTime")String endTime);

    List<MeterTrainPlan> selectDraftListForApproval(Page<TrainPlanApprovalListResponse> page, @Param("request")TrainPlanApprovalListRequest request);

    List<MeterTrainPlan> selectBatchForApproval(Page<TrainPlanApprovalListResponse> page, @Param("request")TrainPlanApprovalListRequest request, @Param("businessKey")List<String> businessKey);
}
