package net.northking.cctp.dw.db.dao;

import net.northking.cctp.dw.db.entity.DwAtuPlanInfo;
import net.northking.cctp.dw.db.mapper.DwAtuPlanInfoMapper;
import net.northking.cctp.dw.dto.FailPlanInfoDto;
import net.northking.cctp.dw.dto.PlanQueryRspDto;
import net.northking.cctp.dw.dto.UIDwAtuPlanQueryDto;
import net.northking.cctp.dw.dto.atu.DwAtuPlanExecutionDataDto;
import net.northking.cctp.dw.dto.atu.DwDataAndSumDto;
import net.northking.cctp.dw.dto.atu.DwOptionDto;
import net.northking.cctp.dw.dto.atu.ScriptSuccessQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface DwAtuPlanInfoDao extends DwAtuPlanInfoMapper {

    String getPlanName(@Param("planId") String planId);


    List<DwAtuPlanExecutionDataDto> pageQuery(UIDwAtuPlanQueryDto query);

    List<DwOptionDto> getPlanList();

    DwAtuPlanInfo getNameByPlanId(String planId);

    DwDataAndSumDto getFirstDateAndSum(ScriptSuccessQuery successQuery);

    DwDataAndSumDto getEndDateAndSum(ScriptSuccessQuery successQuery);

    Integer getPlanNum(@Param("projectId") String projectId,
                       @Param("userId") String userId,
                       @Param("queryToday")String queryToday,
                       @Param("todayStart") Date todayStart,
                       @Param("todayEnd")Date todayEnd);

    List<FailPlanInfoDto> failPlanQuery(@Param("projectIdList") List<String> projectIdList,@Param("userId") String userId);

    List<PlanQueryRspDto> planQuery();
}
