From 02856700ce4cc57cf9447134a9f0c6860d85b802 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 11 九月 2024 10:19:01 +0800
Subject: [PATCH] 拆机功能
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devrent/DevRentMapper.java | 7 +++----
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java | 2 +-
sql/mysql/jh.sql | 4 ++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java | 6 ++----
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 4 ++--
5 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java
index 7b1766e..485a506 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java
@@ -94,13 +94,11 @@
@GetMapping("/get-latest-rent")
@Operation(summary = "鑾峰彇鎮h�呰澶囩殑鏈�杩戠璧佹儏鍐�")
- @Parameter(name = "pat-id", description = "鎮h�呯紪鍙�", required = true, example = "1024")
@Parameter(name = "dev-id", description = "璁惧缂栧彿", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
- public CommonResult<DevRentRespVO> getLatestRent(
- @RequestParam("pat-id") String patId, @RequestParam("dev-id") String devId)
+ public CommonResult<DevRentRespVO> getLatestRent( @RequestParam("dev-id") String devId )
{
- DevRentDO devRent = devRentService.getLatestRent(patId, devId);
+ DevRentDO devRent = devRentService.getLatestRent( devId );
return success(BeanUtils.toBean(devRent, DevRentRespVO.class));
}
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devrent/DevRentMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devrent/DevRentMapper.java
index d39c1cb..699c511 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devrent/DevRentMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devrent/DevRentMapper.java
@@ -34,8 +34,7 @@
.orderByDesc(DevRentDO::getId));
}
- @Select("select * from lihu.dev_rent where pat_id=#{patId} and dev_id=#{devId} order by rent_time desc limit 1")
- DevRentDO getLatestRent(@Param("patId") String patId, @Param("devId") String devId);
+ @Select("select * from lihu.dev_rent where dev_id=#{devId} order by rent_time desc limit 1")
+ DevRentDO getLatestRent( @Param("devId") String devId );
-
-}
\ No newline at end of file
+}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java
index 04e2fc3..e6d2f31 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java
@@ -53,5 +53,5 @@
*/
PageResult<DevRentDO> getDevRentPage(DevRentPageReqVO pageReqVO);
- DevRentDO getLatestRent(String patId, String devId);
+ DevRentDO getLatestRent(String devId);
}
\ No newline at end of file
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 1815eae..e59d14c 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
@@ -75,8 +75,8 @@
}
@Override
- public DevRentDO getLatestRent(String patId, String devId) {
- return devRentMapper.getLatestRent(patId, devId);
+ public DevRentDO getLatestRent(String devId) {
+ return devRentMapper.getLatestRent(devId);
}
}
\ No newline at end of file
diff --git a/sql/mysql/jh.sql b/sql/mysql/jh.sql
index 53ab944..7ef5784 100644
--- a/sql/mysql/jh.sql
+++ b/sql/mysql/jh.sql
@@ -157,8 +157,8 @@
`update_time` datetime NOT NULL COMMENT '鏇存柊鏃堕棿',
`deleted` bit(1) DEFAULT b'0' COMMENT '鍒犻櫎鏍囪',
PRIMARY KEY (`id`),
- KEY `indx_pat_dev` (`pat_id`,`dev_id`,`rent_time`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='瑁呮満鎷嗘満琛�';
+ KEY `indx_pat_dev` (`dev_id`,`rent_time`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='瑁呮満鎷嗘満琛�';
-- ----------------------------
-- Table structure for job_record
--
Gitblit v1.9.3