| | |
| | | import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper; |
| | | import cn.lihu.jh.module.ecg.enums.BedStatusEnum; |
| | | import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; |
| | | import cn.lihu.jh.module.infra.api.config.ConfigApi; |
| | | import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception; |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.error; |
| | | import static cn.lihu.jh.module.ecg.Constants.*; |
| | | import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*; |
| | | |
| | | /** |
| | |
| | | @Validated |
| | | @Slf4j |
| | | public class QueueServiceTxFunctions { |
| | | |
| | | @Resource |
| | | private ConfigApi configApi; |
| | | |
| | | @Resource |
| | | private OAuth2TokenApi oAuth2TokenApi; |
| | |
| | | |
| | | // 常规 或者 领用 时 医生 取下一位患者 |
| | | public ErrorCode nextPatient(Long roomId, String bedNo) { |
| | | // 从 DB 把 序号最小的 [就诊准备中] 的人 设置为 [就诊中] (或领用中) |
| | | // 从 DB 把该工位.序号最小的 [就诊准备中] 的人 设置为 [就诊中] (或领用中) |
| | | Integer updateNum = queueMapper.updateBedQueueStatus(roomId, bedNo, |
| | | QueueStatusEnum.READY.getStatus(), QueueStatusEnum.ONSTAGE.getStatus()); |
| | | // 该工位 没有 [就诊准备中] 人员 |