package cn.lihu.jh.module.ecg.service.queuesequence;
|
|
import java.util.*;
|
import cn.lihu.jh.module.ecg.controller.admin.queuesequence.vo.*;
|
import cn.lihu.jh.module.ecg.dal.dataobject.queuesequence.QueueSequenceDO;
|
import cn.lihu.jh.framework.common.pojo.PageResult;
|
import cn.lihu.jh.framework.common.pojo.PageParam;
|
|
import javax.validation.Valid;
|
|
/**
|
* 当天序号 Service 接口
|
*
|
* @author 金华医院
|
*/
|
public interface QueueSequenceService {
|
|
void initQueueSequenceTable();
|
|
/**
|
* 创建当天序号
|
*
|
* @param createReqVO 创建信息
|
* @return 编号
|
*/
|
Integer createQueueSequence(@Valid QueueSequenceSaveReqVO createReqVO);
|
|
/**
|
* 更新当天序号
|
*
|
* @param updateReqVO 更新信息
|
*/
|
void updateQueueSequence(@Valid QueueSequenceSaveReqVO updateReqVO);
|
|
/**
|
* 删除当天序号
|
*
|
* @param id 编号
|
*/
|
void deleteQueueSequence(Integer id);
|
|
/**
|
* 获得当天序号
|
*
|
* @param id 编号
|
* @return 当天序号
|
*/
|
QueueSequenceDO getQueueSequence(Integer id);
|
|
/**
|
* 获得指定检查类型的时间段情况
|
*
|
*/
|
List<QueueSequenceDO> selectGivenCheckTypeTimeslot(Integer checkType);
|
|
/**
|
* 获得当天序号分页
|
*
|
* @param pageReqVO 分页查询
|
* @return 当天序号分页
|
*/
|
PageResult<QueueSequenceDO> getQueueSequencePage(QueueSequencePageReqVO pageReqVO);
|
|
void resetQueueSequence();
|
|
Integer distributeSeqNo(Integer checkType, Integer timeslot);
|
Integer distributeVipSeqNo(Integer checkType, Integer timeslot);
|
|
/**
|
* 按【检查类型配置的规则】分配排队序号(签到时调用)。
|
*
|
* <p>规则来自 {@code check_type.seq_rule},取值见
|
* {@link cn.lihu.jh.module.ecg.enums.SeqRuleEnum}:
|
* <ul>
|
* <li>{@code 0=预约号} —— 直接用预约系统已下发的号({@code existingSeqNo}),不再分配;</li>
|
* <li>{@code 1=签到序号} —— 当天同检查类型内连续递增,每 9 个号预留 1 个给加急;</li>
|
* <li>{@code 2=时段号} —— 按预约时段从号池取号(改造前的原有行为,也是未配置时的默认)。</li>
|
* </ul>
|
*
|
* @param checkType 检查类型值({@code check_type.value})
|
* @param timeslot HIS 下发的预约时段(仅规则 2 使用)
|
* @param existingSeqNo 预约系统已下发的号(仅规则 0 使用;为 null 时回退到签到序号规则)
|
* @param urgent 是否加急({@code jjbz=J})—— 仅规则 1 使用:加急可占用预留号
|
* @return 分配给该患者的排队序号(从 1 开始)
|
*/
|
Integer distributeSeqNoByRule(Integer checkType, Integer timeslot,
|
Integer existingSeqNo, boolean urgent);
|
|
void initNumber();
|
}
|