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 | 12 ++++++++++++ 1 files changed, 12 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 aa243de..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,9 +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; @@ -50,6 +54,9 @@ @Resource private CallMapper callMapper; + + @Resource + private DevRentMapper devRentMapper; AtomicInteger openingFlag = new AtomicInteger(0); AtomicInteger curSeqNum = new AtomicInteger(0); @@ -583,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