package jnpf.qualifications.service;

import jnpf.base.service.SuperService;
import jnpf.entity.qualifications.Qualifications;
import jnpf.exception.HandleException;
import jnpf.model.qualifications.dto.PaginationQualificationsDTO;
import jnpf.model.qualifications.dto.SaveQualificationsDTO;
import jnpf.model.qualifications.vo.GradeVOExp;
import jnpf.model.qualifications.vo.QualificationsInfoVO;
import jnpf.model.qualifications.vo.QualificationsStatisticsVO;

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

/**
 * todo
 *
 * @author Flynn Chan
 * @create 2024-03-04
 */
public interface QualificationsService extends SuperService<Qualifications> {

    List<Qualifications> pageList(PaginationQualificationsDTO queryDTO);

    /**
     * 根据职级查询
     *
     * @param gradeId 职级id
     * @return
     */
    List<Qualifications> selectByGradeId(String gradeId);
    List<Qualifications> selectByGradeIdAndPositionId(String positionId,String gradeId);

    QualificationsInfoVO info(String id) throws Exception;

    String insert(SaveQualificationsDTO qualificationsDTO) throws HandleException;

    Boolean update(SaveQualificationsDTO qualificationsDTO) throws HandleException;

    Boolean delete(String id) throws HandleException;

    Boolean deleteAllItemRelation(String qualificationsId);

    Boolean deleteAllItemRelationByFieldId(String fieldId);

    Boolean deleteAllItemRelationByItemIds(List<String> itemIds);

    QualificationsStatisticsVO statistics(String organizeId);

    Boolean checkExistByField(String fieldId);

    Boolean checkExistByItem(String fieldId, String itemId);

    List<GradeVOExp> rankList(String id);
    Map<String, Qualifications> rankAllSetList();
}
