| | |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:jump')") |
| | | public CommonResult<String> queueJump( |
| | | @RequestParam("patId") String patId, |
| | | @RequestParam("bookCheckType") Integer bookCheckType, |
| | | @RequestParam("jumpFlag") Byte jumpFlag) |
| | | { |
| | | Integer result = queueService.patientJump(patId, jumpFlag); |
| | | Integer result = queueService.patientJump(patId, bookCheckType, jumpFlag); |
| | | if (null == result || 0 == result) |
| | | return error( new ErrorCode(201, "找不到患者") ); |
| | | |
| | |
| | | @Select("SELECT * FROM lihu.queue where seq_num = #{seqNum}") |
| | | QueueDO getQueueItemBySeqNum(@Param("seqNum")Integer seqNum); |
| | | |
| | | @Select("SELECT * FROM lihu.queue where pat_id = #{patId}") |
| | | QueueDO getQueueByPatId(@Param("patId")String patId); |
| | | @Select("SELECT * FROM lihu.queue where pat_id = #{patId} and book_check_type = #{bookCheckType}") |
| | | QueueDO getQueueByPatId(@Param("patId")String patId, @Param("bookCheckType")Integer bookCheckType); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue " + |
| | |
| | | @Param("curStatus")Integer curStatus, @Param("newStatus")Integer newStatus); |
| | | |
| | | @Update("update lihu.queue set jump_flag = #{jumped} " + |
| | | " where status = #{curStatus} and pat_id = #{patId}") |
| | | Integer queueJump(@Param("patId")String patId, @Param("curStatus")Integer curStatus, @Param("jumped")Byte jumped ); |
| | | " where status = #{curStatus} and pat_id = #{patId} and book_check_type=#{bookCheckType}") |
| | | Integer queueJump(@Param("patId")String patId, @Param("bookCheckType")Integer bookCheckType, |
| | | @Param("curStatus")Integer curStatus, @Param("jumped")Byte jumped ); |
| | | |
| | | //@Update("TRUNCATE TABLE lihu.queue") |
| | | @Delete("delete from lihu.queue where TO_DAYS(book_date) != TO_DAYS(NOW())") |
| | |
| | | |
| | | Integer recallInstallPatient(Long roomId, String bedNo, String patId, Integer checkType, Long roomId_operator, String bedNo_operator); |
| | | |
| | | Integer patientJump(String patId, Byte jumped ); |
| | | Integer patientJump(String patId, Integer bookCheckType, Byte jumped ); |
| | | |
| | | List<RoomDO> getDocRoomInfo(Long docId); |
| | | |
| | |
| | | devRent.setCheckType( queueSaveReqVO.getBookCheckType() ); |
| | | devRentMapper.insert(devRent); |
| | | |
| | | //startHurryUpOneCheckType( queue.getBookCheckType() ); |
| | | startHurryUpOneCheckType( queue.getBookCheckType() ); |
| | | } |
| | | |
| | | @Override |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer patientJump(String patId, Byte jumped) { |
| | | Integer updateNum = queueMapper.queueJump(patId, QueueStatusEnum.WAITING.getStatus(), jumped); |
| | | public Integer patientJump(String patId, Integer bookCheckType, Byte jumped) { |
| | | Integer updateNum = queueMapper.queueJump(patId, bookCheckType, QueueStatusEnum.WAITING.getStatus(), jumped); |
| | | |
| | | //QueueDO queueDO = queueMapper.getQueueByPatId(patId); |
| | | //startHurryUpOneCheckType(Integer.valueOf(queueDO.getBookCheckType())); |
| | | QueueDO queueDO = queueMapper.getQueueByPatId(patId, bookCheckType); |
| | | startHurryUpOneCheckType(Integer.valueOf(queueDO.getBookCheckType())); |
| | | return updateNum; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Deprecated 代码保留,实际已经不再使用 |
| | | * 原因: 同一工位可以同时处理多个检查项目,所以需要保证多个检查项目的就诊时间先后顺序 |
| | | * 一个工位可以支持多个检查项目,所以需要保证多个检查项目的就诊时间先后顺序 |
| | | * 按照一个检查项目来处理,就不能保证同一个工位的多个检查项目的就诊时间的先后顺序 |
| | | * 所以实现逻辑是 让支持该检查项目的所有工位去抢占 【排队中】【工位支持的检查项目】的患者 |
| | | * 实际抢占的未必是 参数中的检查项目的患者,可能是其他检查项目的患者 |
| | | * @param checkType |
| | | */ |
| | | public void hurryupOneCheckType(Integer checkType) { |
| | |
| | | return; |
| | | |
| | | // 查看 是否有排队中的患者 |
| | | Integer updateNum = queueMapper.preemptWaitingPatient( |
| | | Integer updateNum = queueMapper.preemptWaitingPatientWithBedCheckTypes( |
| | | bedQueueBO.getRoomId(), |
| | | bedQueueBO.getRoomName(), |
| | | bedQueueBO.getBedNo(), |
| | | curSeqNum.get() + 1, |
| | | QueueStatusEnum.WAITING.getStatus(), |
| | | QueueStatusEnum.READY.getStatus(), |
| | | checkType); |
| | | bedQueueBO.checkTypes); //关键点 关键点 关键点 checkType |
| | | |
| | | // 没有抢到排队患者 |
| | | if (null == updateNum || 0 == updateNum) { |