jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedDoctorNextPatientCallable.java
@@ -1,6 +1,7 @@ package cn.lihu.jh.module.ecg.service.queue; import cn.lihu.jh.framework.common.exception.ErrorCode; import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants; import java.util.concurrent.Callable; @@ -19,7 +20,12 @@ } public ErrorCode call() throws Exception { return queueService.nextPatient(roomId, bedNo); ErrorCode ec = queueService.nextPatient(roomId, bedNo); if (GlobalErrorCodeConstants.SUCCESS.equals(ec)) { queueService.hurryup(); } return ec; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedDoctorResumeCallable.java
@@ -1,6 +1,7 @@ package cn.lihu.jh.module.ecg.service.queue; import cn.lihu.jh.framework.common.exception.ErrorCode; import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants; import java.util.concurrent.Callable; @@ -23,7 +24,12 @@ } public ErrorCode call() throws Exception { return queueService.bedDoctorResume(roomId, bedNo, docId, docName); ErrorCode ec = queueService.bedDoctorResume(roomId, bedNo, docId, docName); if (GlobalErrorCodeConstants.SUCCESS.equals(ec)) { queueService.hurryup(); } return ec; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedOpenCallable.java
@@ -1,6 +1,8 @@ package cn.lihu.jh.module.ecg.service.queue; import cn.lihu.jh.framework.common.exception.ErrorCode; import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants; import java.util.concurrent.Callable; public class BedOpenCallable implements Callable<ErrorCode> { @@ -18,7 +20,12 @@ } public ErrorCode call() throws Exception { return queueService.bedOpen(roomId, bedNo); ErrorCode ec = queueService.bedOpen(roomId, bedNo); if (GlobalErrorCodeConstants.SUCCESS.equals(ec)) { queueService.hurryup(); } return ec; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
@@ -6,6 +6,7 @@ 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; @@ -32,7 +33,6 @@ 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; @@ -264,7 +264,8 @@ bedQueueBO.setStatus(BedStatusEnum.OPENING.getStatus()); priorityQueue.offer(bedQueueBO); mapBedVsQueue.put(String.format("%09d%s", roomId, bedNo), bedQueueBO); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } @Override @@ -300,7 +301,7 @@ mapBedVsQueue.remove(String.format("%09d%s", roomId, bedNo)); priorityQueue.remove(bedQueueBO); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } @Override @@ -339,7 +340,7 @@ bedQueueBO.setStatus(BedStatusEnum.PAUSE.getStatus()); priorityQueue.remove(bedQueueBO); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } @Override @@ -368,8 +369,7 @@ return ECG_INNER_ERROR; } hurryup(); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } @Override @@ -390,7 +390,7 @@ } bedQueueBO.setStatus(BedStatusEnum.DOCTOR_ON.getStatus()); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } @Override @@ -411,7 +411,7 @@ } bedQueueBO.setStatus(BedStatusEnum.OPENING.getStatus()); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } private void validatequeueExists(Integer id) { @@ -473,7 +473,7 @@ Integer num = queueMapper.getMaxSeqNum(); curSeqNum = new AtomicInteger(null == num ? 0 : num); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } /** @@ -582,8 +582,7 @@ priorityQueue.remove(bo); priorityQueue.offer(bo); hurryup(); return SUCCESS; return GlobalErrorCodeConstants.SUCCESS; } public void finishNextPatient(Long roomId, String bedNo) {