From e86481b3a32200d83fdcdbca826b72e3776ae5cd Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期六, 12 十月 2024 14:23:55 +0800
Subject: [PATCH] 装机功能 相关 待续
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java | 62 +++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 8 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
index 7e18a19..4fa8e7c 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -7,7 +7,6 @@
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import cn.lihu.jh.module.ecg.dal.dataobject.devrent.DevRentDO;
import cn.lihu.jh.module.ecg.dal.mysql.call.CallMapper;
-import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper;
import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper;
import cn.lihu.jh.module.ecg.enums.DevRentStateEnum;
import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi;
@@ -27,7 +26,7 @@
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.util.object.BeanUtils;
-import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper;
+import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
@@ -50,7 +49,7 @@
private OAuth2TokenApi oAuth2TokenApi;
@Resource
- private queueMapper queueMapper;
+ private QueueMapper queueMapper;
@Resource
private RoomMapper roomMapper;
@@ -219,6 +218,25 @@
}
@Override
+ public ErrorCode startNextInstallPatient(Long roomId, String bedNo) {
+ Future<ErrorCode> future = singleThreadExecutor.submit(
+ new BedDoctorNextInstallPatientCallable(queueServiceTxFunctions, roomId, bedNo)
+ );
+
+ try {
+ ErrorCode ret = future.get();
+ return ret;
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ }
+
+ System.out.println("startNextInstallPatient ========");
+ return ECG_INNER_ERROR;
+ }
+
+ @Override
public void startHurryUpOneBed(Long roomId, String bedNo) {
singleThreadExecutor.execute( () -> {
queueServiceTxFunctions.hurryupOneBed(roomId, bedNo);
@@ -304,27 +322,55 @@
devRent.setState( DevRentStateEnum.FREE.getState() );
devRentMapper.insert(devRent);
- startHurryUpOneCheckType(Integer.valueOf(queue.getBookCheckType()));
+ startHurryUpOneCheckType( queue.getBookCheckType() );
}
+ // 甯歌妫�鏌� 鍙彿
+ @Override
public void finishNextPatient(Long roomId, String bedNo) {
// 浠� DB 鎶� 灏辫瘖涓殑浜� 璁剧疆涓哄氨璇婂畬鎴�
- Integer ret = queueMapper.updateQueueStatus(roomId, bedNo,
+ Integer ret = queueMapper.updateBedQueueStatus(roomId, bedNo,
QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.FINISH.getStatus());
startNextPatient(roomId, bedNo);
}
+ // 棰嗙敤 鍙彿
+ @Override
+ public void finishReceiveNextPatient(Long roomId, String bedNo) {
+ // 浠� DB 鎶� 灏辫瘖涓殑浜� 璁剧疆涓哄氨璇婂畬鎴�
+ Integer ret = queueMapper.updateBedQueueStatus(roomId, bedNo,
+ QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.RECEIVED.getStatus());
+
+ startNextPatient(roomId, bedNo);
+ }
+
+ // 瑁呮満 鍙彿
+ @Override
+ public void finishInstallNextPatient(Long roomId, String bedNo) {
+ // 浠� DB 鎶� [瀹夎涓璢 鐨勪汉 璁剧疆涓� [宸插氨璇奭
+ Integer ret = queueMapper.updateBedQueueStatus(roomId, bedNo,
+ QueueStatusEnum.INSTALLING.getStatus(), QueueStatusEnum.FINISH.getStatus());
+
+ startNextInstallPatient(roomId, bedNo);
+ }
+
public void passNextPatient(Long roomId, String bedNo) {
// 浠� DB 鎶� 灏辫瘖涓殑浜� 璁剧疆涓鸿繃鍙�
- Integer ret = queueMapper.updateQueueStatus(roomId, bedNo,
+ Integer ret = queueMapper.updateBedQueueStatus(roomId, bedNo,
QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.PASSED.getStatus());
startNextPatient(roomId, bedNo);
}
- public List<QueueDO> getDoctorQueueByStatus(Long roomId, String bedNo, List<Byte> statusList) {
- List<QueueDO> queueDOList = queueMapper.getDoctorQueueByStatus(roomId, bedNo, statusList);
+ public List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Byte> statusList) {
+ List<QueueDO> queueDOList = queueMapper.getBedQueueByStatus(roomId, bedNo, statusList);
+ return queueDOList;
+ }
+
+ @Override
+ public List<QueueDO> getRoomQueueByStatus(Long roomId, List<Byte> statusList) {
+ List<QueueDO> queueDOList = queueMapper.getRoomQueueByStatus(roomId, statusList);
return queueDOList;
}
--
Gitblit v1.9.3