package com.rf.psychological.plan.service;


import com.rf.psychological.plan.dao.dto.TestPlanUserDto;
import com.rf.psychological.plan.dao.model.TestPlanEntity;
import com.rf.psychological.plan.dao.model.TestPlanUserEntity;
import com.rf.psychological.utils.Result;
import org.springframework.data.domain.Page;

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

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

    Page<TestPlanEntity> findAllByInstitutionNo(String institutionNo, String searchKey, Date beginTime, Date endTime, String status, int beginNum, int pageNum);

    TestPlanEntity findAllById(String id, String searchKey, Date beginTime, Date endTime, String status);

    void updateStatus(String id, int status);

    void updateInfo(String id, String name, Date beginTestTime, Date endTestTime);

    void save(TestPlanEntity testPlanEntity);

    void saveInBatch(List<TestPlanEntity> testPlanEntity);

    void deleteById(String id);

    Result getSubCogInfo(String flag, String type);

    List<TestPlanUserDto> getTestPlanInUser(List<TestPlanUserEntity> testPlanUserEntities, String searchKey, Date beginTime, Date endTime, String userId, String status);

    List<TestPlanEntity> findall();


    /**
     * find by id
     * @param planId
     * @return
     */
    TestPlanEntity findById(String planId);


    /**
     * 计划id  计划状态
     * @param planIds
     * @param status
     * @return
     */
    List<TestPlanEntity> findByPlanId(List<String> planIds, List<Integer> status);

    /**
     * 到达开始时间未开始的测试计划
     * 到达结束时间未结束的测试计划
     */
    List<TestPlanEntity> findPlan();

    /**
     * 批量删除
     * @param deleteEntryList
     */
    void deleteInBatch(List<TestPlanEntity> deleteEntryList);

    List<TestPlanEntity> findAllByInstitutionNo(String institutionNo);
}
