From 68ff33beff11310e830b0615b5a81f83fad0f683 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:33:14 +0800
Subject: [PATCH] ai优化
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/devrent/DevRentMapper.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
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 017ba7c..9308018 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
@@ -63,6 +63,28 @@
@Select("select * from lihu.dev_rent where state=#{state} and pat_id=#{patId} and check_type=#{checkType} and to_days(create_time)=to_days(now())")
List<DevRentDO> selectByPatAndChecktypeAndState(@Param("patId") String patId, @Param("checkType") Integer checkType, @Param("state") Integer state);
+ /**
+ * 璇ユ偅鑰� + 妫�鏌ラ」鐩��**浠婃棩**銆佺姸鎬佸湪缁欏畾闆嗗悎閲岀殑**鏈�杩戜竴鏉�**妫�鏌ュ崟銆�
+ *
+ * <p>涓ゅ鐢ㄩ�旓細
+ * <ol>
+ * <li>銆愭挙閿�鍥炴粴銆戞挙閿�銆屾鏌ュ畬鎴愩�嶆椂锛屾妸 60(甯歌妫�鏌ュ畬鎴�) 鐨勫崟鎵惧嚭鏉ュ洖婊氭垚 0(寰呮鏌�)锛�</li>
+ * <li>銆愬畬鎴愬厹搴曘�戝啀娆″畬鎴愭椂鑻ユ壘涓嶅埌銆屽緟妫�鏌�(0)銆嶇殑鍗曪紝鐢ㄦ渶杩戜竴鏉� 60/50 鐨勫崟鍏滃簳澶嶇敤锛�
+ * 閬垮厤鐩存帴鎶ャ�岃鍏堥绾︾‘璁ゃ�嶃��</li>
+ * </ol>
+ */
+ @Select("<script>" +
+ "select * from lihu.dev_rent where pat_id=#{patId} and check_type=#{checkType} " +
+ " and to_days(create_time)=to_days(now()) and state in ( " +
+ " <foreach collection='stateList' separator=',' item='state'>#{state}</foreach> ) " +
+ " order by id desc limit 1" +
+ "</script>")
+ @Results({
+ @Result(property = "patDetails", column = "pat_details", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
+ })
+ DevRentDO selectLatestByPatCheckTypeStates(@Param("patId") String patId, @Param("checkType") Integer checkType,
+ @Param("stateList") List<Integer> stateList);
+
@Select("<script>" +
"SELECT paid FROM lihu.dev_rent " +
"where id in (" +
--
Gitblit v1.9.3