/*
* Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
*
*/
package net.northking.cctp.executePlan.db.service;

import net.northking.cctp.common.db.BasicService;
import net.northking.cctp.common.db.Pagination;
import net.northking.cctp.common.http.QueryByPage;
import net.northking.cctp.executePlan.db.entity.AtuPlanInfo;
import net.northking.cctp.executePlan.dto.planInfo.AtuPlanInfoDetailDto;
import net.northking.cctp.executePlan.dto.planInfo.AtuPlanInfoPageDto;
import net.northking.cctp.executePlan.dto.planInfo.AtuPlanInfoQueryDto;
import net.northking.cctp.executePlan.dto.planInfo.AtuPlanPrincipalDto;

import java.util.List;

/**
 * 执行计划表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-12-07 17:41:09  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
public interface AtuPlanInfoService extends BasicService<AtuPlanInfo>
{
    /**
     * 根据最后批次ID查询计划信息
     * @param batchId 批次ID
     * @return 计划信息
     */
    AtuPlanInfo queryByLastBatchId(String batchId);

    /**
     * 查询设置该计划为前置执行的计划ID集合
     * @param planId 计划ID
     * @return 计划ID集合
     */
    List<String> queryFollowUpPlanIdList(String planId);

    Pagination<AtuPlanInfoDetailDto> queryPlanInfoPage(QueryByPage<AtuPlanInfoQueryDto> queryByPage);

    String clonePlanName(AtuPlanInfo atuPlanInfo);

    Integer updatePlanResultById(AtuPlanInfo atuPlanInfo);

    /**
     * 根据批次ID查询计划信息
     * @param batchId 批次ID
     * @return 计划信息
     */
    AtuPlanInfo findByBatchId(String batchId);


    /**
     * 更新计划下一次执行时间
     * @param atuPlanInfo 计划信息
     * @return 结果
     */
    Integer updatePlanNextExecTime(AtuPlanInfo atuPlanInfo);

    /**
     * 根据批次编号修改计划状态
     * @param batchId 批次编号
     * @param status 状态
     * @return 结果
     */
    Integer updatePlanByLastBatchId(String batchId, String status);

    void updatePlanByIds(List<String> ids);

    Integer checkNameUnique(AtuPlanInfo info);

    List<AtuPlanInfoDetailDto> queryPlanInfo(AtuPlanInfoQueryDto selectParamAtuPlanInfoQueryDto);

    void updatePrincipal(AtuPlanPrincipalDto dto);

    Pagination<AtuPlanInfoDetailDto> queryUpFrontPlan(QueryByPage<AtuPlanInfoPageDto> queryByPage);

    List<AtuPlanInfo> queryByPage(int fromIndex, int toIndex);

    Integer countdeleted(AtuPlanInfo countParams);

    List<AtuPlanInfo> queryPlanInfoByIds(List<String> objectIds);

    Integer updatePlanRetryCount(AtuPlanInfo entity);

    List<String> selectManagerByProject(String projectId);

    List<String> selectCreatorByProject(String projectId);

    List<String> selectUpdaterByProject(String projectId);
}
