package com.keao.edu.user.service;

import com.keao.edu.common.page.PageInfo;
import com.keao.edu.common.service.BaseService;
import com.keao.edu.user.dto.ExamOrganStatisticsDto;
import com.keao.edu.user.dto.ExamOrganizationRelationExtraDto;
import com.keao.edu.user.entity.ExamOrganizationRelation;
import com.keao.edu.user.entity.Organization;
import com.keao.edu.user.enums.ExamStatusEnum;
import com.keao.edu.user.page.ExamOrganizationRelationQueryInfo;

import java.util.List;
import java.util.Map;

public interface ExamOrganizationRelationService extends BaseService<Long, ExamOrganizationRelation> {

    /**
     * @describe 查询考级项目关联合作单位记录
     * @author Joburgess
     * @date 2020.06.28
     * @param queryInfo:
     * @return com.keao.edu.common.page.PageInfo<com.keao.edu.user.entity.ExamOrganizationRelation>
     */
    PageInfo<ExamOrganizationRelationExtraDto> queryExamOrgans(ExamOrganizationRelationQueryInfo queryInfo);

    List<ExamOrganizationRelationExtraDto> getChildOrgans(Long examId,Integer organId);

    /**
     * @describe 添加单位
     * @author Joburgess
     * @date 2020.07.07
     * @param examId:
     * @param orgainIdsStr:
     * @return void
     */
    void addExamOrganizations(Long examId, String orgainIdsStr);

    /**
     * @describe 添加单位
     * @author Joburgess
     * @date 2020.07.07
     * @param examId:
     * @param orgainIdsStr:
     * @return void
     */
    void addExamOrganizations(List<ExamOrganizationRelation> organizationRelations, Integer selfOrganId);

    void deleteExamOrgan(Long id);

    /**
     * @describe 更新考级项目与合作单位关联信息
     * @author Joburgess
     * @date 2020.06.18
     * @param examOrganizationRelation:
     * @return void
     */
    void updateExamOrganizationRelation(ExamOrganizationRelation examOrganizationRelation, Integer selfOrganId);

    /**
     * @describe 发送考级报名链接
     * @author Joburgess
     * @date 2020.06.18
     * @param examId:
     * @param organIds:
     * @return void
     */
    void sendUrl(Integer examId, Integer selfOrganId);

    /**
     * @describe 考级项目状态变化推送
     * @author Joburgess
     * @date 2020.07.21
     * @param examId:
     * @param examStatus:
     * @return void
     */
    void examStatusChangePush(Long examId, ExamStatusEnum examStatus);

    /**
     * @describe 考级项目时间调整推送
     * @author Joburgess
     * @date 2020.07.21
     * @param examId:
     * @return void
     */
    void examDateChangePush(Long examId);

    /**
     * @describe 考级项目报名截至推送
     * @author Joburgess
     * @date 2020.07.21
     * @param examId:
     * @return void
     */
    void examRegistCutOffPush(Long examId);

    /**
     * @describe 获取本单位统计信息
     * @author Joburgess
     * @date 2020.07.16
     * @param examId:
     * @return com.keao.edu.user.dto.ExamOrganStatisticsDto
     */
    ExamOrganStatisticsDto getExamOrganStatistics(Integer organId, Long examId);

    /**
     * @describe 获取未关联到考级项目的合作单位
     * @author Joburgess
     * @date 2020.07.03
     * @param queryInfo:
     * @return org.springframework.data.domain.Page<com.keao.edu.user.entity.Organization>
     */
    Map<String, Object> queryUnRelatedOrgans(ExamOrganizationRelationQueryInfo queryInfo);

}
