From 14f87cf04b519fd33ef6f76ea5e2926f30fab419 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 18 十二月 2024 16:22:13 +0800
Subject: [PATCH] 设备管理: 更改设置状态时 允许同时更新备注
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devmanage/DeviceMapper.java | 6 +++---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devmanage/DeviceServiceImpl.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devmanage/DeviceMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devmanage/DeviceMapper.java
index feb4d04..3c84343 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devmanage/DeviceMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devmanage/DeviceMapper.java
@@ -33,7 +33,7 @@
.eqIfPresent(DeviceDO::getModel, reqVO.getModel())
.betweenIfPresent(DeviceDO::getPurchaseDate, reqVO.getPurchaseDate())
.betweenIfPresent(DeviceDO::getCreateTime, reqVO.getCreateTime())
- .orderByAsc(DeviceDO::getStateDate));
+ .orderByAsc(DeviceDO::getDevId));
}
@Select("select * from lihu.device where dev_id=#{devId}")
@@ -42,8 +42,8 @@
})
DeviceDO getDeviceByDevId(@Param("devId") String devId);
- @Update("update lihu.device set state=#{state}, state_date=#{stateDate} where dev_id=#{devId}")
- Integer updateDevState(@Param("devId") String devId, @Param("state") Integer state, @Param("stateDate") LocalDate stateDate);
+ @Update("update lihu.device set state=#{state}, state_date=#{stateDate}, comment=#{comment} where dev_id=#{devId}")
+ Integer updateDevState(@Param("devId") String devId, @Param("state") Integer state, @Param("stateDate") LocalDate stateDate, @Param("comment") String comment);
@Select("<script>" +
"select category, state, count(1) as dev_count from lihu.device " +
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devmanage/DeviceServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devmanage/DeviceServiceImpl.java
index 8174a3b..683b1e3 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devmanage/DeviceServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devmanage/DeviceServiceImpl.java
@@ -83,7 +83,7 @@
validateDeviceExists(updateReqVO.getId());
// 鏇存柊
DeviceDO updateObj = BeanUtils.toBean(updateReqVO, DeviceDO.class);
- return deviceMapper.updateDevState(updateObj.getDevId(), updateObj.getState(), updateObj.getStateDate());
+ return deviceMapper.updateDevState(updateObj.getDevId(), updateObj.getState(), updateObj.getStateDate(), updateObj.getComment());
}
@Override
--
Gitblit v1.9.3