package com.rf.psychological.plan.service;


import com.rf.psychological.dao.dto.InstitutionAuthSubjectNameDto;
import com.rf.psychological.plan.dao.dto.TestPlanAuthConTaskDto;
import com.rf.psychological.plan.dao.dto.TestPlanContendProgressDto;
import com.rf.psychological.plan.dao.dto.TestPlanUserProgressDto;
import com.rf.psychological.plan.dao.model.TestPlanContendEntity;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author lpf
 * @description:
 * @date 2022/1/614:35
 */
public interface TestPlanContendService {

    void deleteById(String id);

    void deleteByTestPlanId(String testPlanId);

    void deleteByTestIdAndTestPlanId(String testId, String testPlanId);

    void save(TestPlanContendEntity testPlanContendEntity);

    void saveInBatch(List<TestPlanContendEntity> testPlanContendEntities);

    Page<TestPlanContendEntity> findTestPlanContendEntitiesByTestPlanId(String testPlanId, String type, int beginNum, int pageSize);

    Page<InstitutionAuthSubjectNameDto> getTestPlanNoSubTask(String institutionNo,
                                                             String type, String searchKey,
                                                             String testPlanId, int beginNum, int pageSize, String categoryEname);

    Page<TestPlanAuthConTaskDto> getTestPlanNoConTask(String institutionNo,
                                                      String type, String searchKey,
                                                      String testPlanId, int beginNum, int pageSize, String categoryEname);

    Page<TestPlanContendEntity> getUserNoDoTestPlanContend(String institutionNo, String phone, String type,
                                                           String testPlanId, int beginNum, int pageSize);

    List<TestPlanContendEntity> getUserNoDoTestPlanContend(String institutionNo, String phone, String testPlanId);

    int getUserNoDoTestPlanContendNum(String institutionNo, String phone, String testPlanId);


    List<TestPlanContendEntity> getUserDoTestPlanContend(String institutionNo, String phone, String testPlanId);


    int getUserDoTestPlanContendNum(String institutionNo, String phone, String testPlanId);


    List<TestPlanContendProgressDto> getTestPlanContendProgress(String testPlanId);

    List<TestPlanUserProgressDto> getTestPlanUsersProgress(String testPlanId);

    void deleteTestPlanByFlag(String flag);

    /**
     * 测试计划任务总数
     * @param testPlanId
     * @return
     */
    int countContent(String testPlanId);
}
