package cn.hnthyy.thmz.service.thmz;

import cn.hnthyy.thmz.entity.MzException;
import cn.hnthyy.thmz.entity.thmz.ScheduleOfMedical;
import cn.hnthyy.thmz.entity.thmz.ScheduleOfMedicalApply;
import cn.hnthyy.thmz.entity.thmz.User;

import java.util.List;

public interface ScheduleOfMedicalService {
    /**
     * 新增科室排班档期
     *
     * @param scheduleOfMedical
     * @return
     */
    int saveScheduleOfMedical(ScheduleOfMedical scheduleOfMedical,Long userId) throws MzException;

    /**
     * 根据通用参数查询排班
     * @param scheduleOfMedical
     * @return
     */
    List<ScheduleOfMedical> queryByCommonParams(ScheduleOfMedical scheduleOfMedical);


    /**
     * 更新排班档期
     * @param scheduleOfMedical
     * @return
     */
    int modifyScheduleOfMedical(ScheduleOfMedical scheduleOfMedical,Long userId);

    /**
     * 删除档期
     * @param id
     * @return
     */
    int removeScheduleOfMedical(Long id);


    /**
     * 分页查询排班档期
     *
     *
     * @param scheduleOfMedical
     * @return
     */
    List<ScheduleOfMedical> queryScheduleOfMedicalWithPage(ScheduleOfMedical scheduleOfMedical);


    /**
     * 查询排班档期总数
     *
     *
     * @param scheduleOfMedical
     * @return
     */
    Integer queryCountScheduleOfMedical(ScheduleOfMedical scheduleOfMedical);


    /**
     * 按照id查询档期
     * @param id
     * @return
     */
    ScheduleOfMedical queryScheduleOfMedicalById(Long id);



    /**
     * 预约排班档期
     * @param scheduleOfMedicalApply
     * @param user
     * @return
     */
    int applyScheduleOfMedical(ScheduleOfMedicalApply scheduleOfMedicalApply, User user) throws Exception;


    /**
     * 取消预约排班档期
     * @param scheduleId
     * @param user
     * @return
     */
    int cancelApplyScheduleOfMedical(Long scheduleId,User user) throws Exception;



    /**
     * 驳回预约排班档期
     * @param scheduleOfMedical
     * @param user
     * @return
     */
    int rejectApplyScheduleOfMedical(ScheduleOfMedical scheduleOfMedical,User user);


    /**
     * 按照日期和人员查询所有科室
     * @param scheduleOfMedical
     * @return
     */
    List<String> queryDeptNos(ScheduleOfMedical scheduleOfMedical);
}
