package net.northking.cctp.dw.api.service;

import net.northking.cctp.dw.db.entity.*;
import net.northking.cctp.dw.dto.CaseDesignPieDto;
import net.northking.cctp.dw.dto.DwCaseDesignInfoDto;

import java.util.List;

/**
 * @author: puchao.ma
 * @date: 2021/12/15 9:35
 */
public interface MtCaseDesignApiService {
    void deleteAllMid();

    void addBatchMid(List<MidCaseDesign> midCaseDesigns);

    void deleteAllComplete();

    void addBatchComplete(List<CaseDesignCompleteDetails> completeDetails);

    /**
     * 创建案例进度数据
     *
     * @return
     */
    List<MtTestChart> createCaseDesignProgress(String tenantId);

    /**
     * 案例饼图
     *
     * @param projectId
     * @return
     */
    CaseDesignPieDto caseDesignPie(String projectId);

    List<MidCaseDesign> findAll(List<MidProjectInfo> midProjectInfos);

    /**
     * 处理用例进度图的数据
     *
     * @param item
     * @return
     */
    Integer caseDesignComplete(DwCaseDesignInfoDto item);

    /**
     * 处理用例中间表数据
     *
     * @return
     */
    Integer countCaseDesignInfoData(List<MidProjectInfo> midProjectInfos,String tenantId);

    Integer countTestPointData(List<MidProjectInfo> midProjectInfos,String tenantId);

    List<DwCaseDesignInfoDto> getProjectId();

    Integer deleteCompleteByProjectId(String projectId);

    Integer deleteMidByProjectId(List<MidProjectInfo> midProjectInfos);

    Integer deleteCompleteByProjectIds(DwCaseDesignInfoDto dwCaseDesignInfoDto);
}
