From 111ded437886aa10072434f8b0a459da24f8545a Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 11 十月 2024 18:55:51 +0800
Subject: [PATCH] update

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
index 35499bc..980551d 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
@@ -7,8 +7,10 @@
 import cn.lihu.jh.module.ecg.dal.dataobject.jobrecord.JobRecordDO;
 import cn.lihu.jh.module.ecg.dal.mysql.devmanage.DeviceMapper;
 import cn.lihu.jh.module.ecg.dal.mysql.jobrecord.JobRecordMapper;
+import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
 import cn.lihu.jh.module.ecg.enums.DevRentStateEnum;
 import cn.lihu.jh.module.ecg.enums.DevStateEnum;
+import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.transaction.annotation.Transactional;
@@ -47,6 +49,9 @@
 
     @Resource
     DeviceMapper deviceMapper;
+
+    @Resource
+    QueueMapper queueMapper;
 
     @Override
     public CommonResult<Long> registerOperation(DevRentSaveReqVO createReqVO) {
@@ -114,6 +119,11 @@
                 jobRecordMapper.updateById(jobRecordDO);
             }
         }
+
+        // 鎮h�呮帓闃熺姸鎬� 鏇存柊涓� 宸查鐢�
+        queueMapper.updatePatientQueueStatus( createReqVO.getPatId(),
+                QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.RECEIVED.getStatus());
+
         return CommonResult.success(rent_id);
     }
 
@@ -178,6 +188,11 @@
             jobRecordDO.setUpdateTime(LocalDateTime.now());
             jobRecordMapper.updateById(jobRecordDO);
         }
+
+        // 鎮h�呮帓闃熺姸鎬� 鏇存柊涓� 宸插氨璇�
+        queueMapper.updatePatientQueueStatus( createReqVO.getPatId(),
+                QueueStatusEnum.RECEIVED.getStatus(), QueueStatusEnum.FINISH.getStatus());
+
         return CommonResult.success(rent_id);
     }
 

--
Gitblit v1.9.3