From 1dfb9beb8057d51d528a209fae1a9f9eed5c352f Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期二, 24 九月 2024 17:47:13 +0800 Subject: [PATCH] 新增 设备状态 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 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 8efdddd..7153832 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 @@ -6,8 +6,13 @@ import javax.annotation.Resource; 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.devrent.DevRentMapper; +import cn.lihu.jh.module.ecg.enums.DevRentStateEnum; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.springframework.validation.annotation.Validated; @@ -46,6 +51,12 @@ @Resource private RoomMapper roomMapper; + + @Resource + private CallMapper callMapper; + + @Resource + private DevRentMapper devRentMapper; AtomicInteger openingFlag = new AtomicInteger(0); AtomicInteger curSeqNum = new AtomicInteger(0); @@ -468,6 +479,8 @@ // 娓呴櫎闈炲綋澶╃殑鎺掗槦浜哄憳 queueMapper.clearQueue(); + // 娓呴櫎闈炲綋澶╃殑璇煶鍙彿璁板綍 + callMapper.clearCall(); // 浠嶥B 鑾峰彇 宸ヤ綅鍒楄〃 List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>(); @@ -577,11 +590,16 @@ * @param queueSaveReqVO */ @Override + @Transactional public void queue(QueueSaveReqVO queueSaveReqVO) { queueSaveReqVO.setStatus(QueueStatusEnum.WAITING.getStatus()); //鎺掗槦涓� QueueDO queue = BeanUtils.toBean(queueSaveReqVO, QueueDO.class); queueMapper.insert(queue); + DevRentDO devRent = BeanUtils.toBean(queueSaveReqVO, DevRentDO.class); + devRent.setState( DevRentStateEnum.FREE.getState() ); + devRentMapper.insert(devRent); + startHurryUp(); } -- Gitblit v1.9.3