| | |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants; |
| | | import cn.lihu.jh.module.ecg.Utils; |
| | | import cn.lihu.jh.module.ecg.config.DynamicSchedulingConfig; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO; |
| | |
| | | import cn.lihu.jh.framework.common.util.object.BeanUtils; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper; |
| | | |
| | | import static cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; |
| | | 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.framework.common.pojo.CommonResult.success; |
| | |
| | | bedQueueBO.setStatus(BedStatusEnum.OPENING.getStatus()); |
| | | priorityQueue.offer(bedQueueBO); |
| | | mapBedVsQueue.put(String.format("%09d%s", roomId, bedNo), bedQueueBO); |
| | | return SUCCESS; |
| | | |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | mapBedVsQueue.remove(String.format("%09d%s", roomId, bedNo)); |
| | | priorityQueue.remove(bedQueueBO); |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.PAUSE.getStatus()); |
| | | priorityQueue.remove(bedQueueBO); |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | return ECG_INNER_ERROR; |
| | | } |
| | | |
| | | hurryup(); |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.DOCTOR_ON.getStatus()); |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.OPENING.getStatus()); |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | private void validatequeueExists(Integer id) { |
| | |
| | | Integer num = queueMapper.getMaxSeqNum(); |
| | | curSeqNum = new AtomicInteger(null == num ? 0 : num); |
| | | |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | /** |
| | |
| | | priorityQueue.remove(bo); |
| | | priorityQueue.offer(bo); |
| | | |
| | | hurryup(); |
| | | return SUCCESS; |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | public void finishNextPatient(Long roomId, String bedNo) { |