From 0fa12146289cd478799db7ed1c1e1578e966ec7d Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期一, 21 九月 2026 15:57:34 +0800
Subject: [PATCH] 捐献器官统计明细列表
---
ruoyi-project/src/main/resources/mapper/project/ServiceTotalsMapper.xml | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceTotalsMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceTotalsMapper.xml
index 9b49fe8..df4a872 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceTotalsMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceTotalsMapper.xml
@@ -10,7 +10,7 @@
LEFT JOIN service_donatecompletioninfo b ON b.InfoID=a.id
<where>
a.del_flag=0
- <if test="area != null and area != ''">and a.RegisterCountyName>=#{area}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
<if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
</where>
@@ -23,7 +23,7 @@
LEFT JOIN service_donatecompletioninfo b ON b.InfoID=a.id
<where>
a.del_flag=0
- <if test="area != null and area != ''">and a.RegisterCountyName>=#{area}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
<if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
</where>
@@ -36,7 +36,7 @@
LEFT JOIN service_donatecompletioninfo b ON b.InfoID=a.id
<where>
a.del_flag=0
- <if test="area != null and area != ''">and a.RegisterCountyName>=#{area}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
<if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
</where>
@@ -54,8 +54,8 @@
<if test="area != null and area != ''">
and a.InfoID in (select id FROM service_donatecompletioninfo where RegisterCountyName>=#{area} )
</if>
- <if test="area != null and area != ''">and c.RegisterCountyName>=#{area}</if>
- <if test="organName != null and organName != ''">and a.OrganName>=#{organName}</if>
+ <if test="area != null and area != ''">and c.RegisterCountyName=#{area}</if>
+ <if test="organName != null and organName != ''">and a.OrganName=#{organName}</if>
<if test="startTime != null and startTime != ''">and a.organ_start_time>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.organ_start_time <= #{endTime}</if>
</where>
@@ -72,7 +72,7 @@
<if test="area != null and area != ''">
and a.InfoID in (select id FROM service_donatecompletioninfo where RegisterCountyName>=#{area} )
</if>
- <if test="organName != null and organName != ''">and a.OrganName>=#{organName}</if>
+ <if test="organName != null and organName != ''">and a.OrganName=#{organName}</if>
<if test="startTime != null and startTime != ''">and a.organ_start_time>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.organ_start_time <= #{endTime}</if>
</where>
@@ -89,7 +89,7 @@
<if test="area != null and area != ''">
and a.InfoID in (select id FROM service_donatecompletioninfo where RegisterCountyName>=#{area} )
</if>
- <if test="organName != null and organName != ''">and a.OrganName>=#{organName}</if>
+ <if test="organName != null and organName != ''">and a.OrganName=#{organName}</if>
<if test="startTime != null and startTime != ''">and a.organ_start_time>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.organ_start_time <= #{endTime}</if>
</where>
@@ -180,7 +180,7 @@
LEFT JOIN service_deathinfo d ON d.InfoID=a.id
<where>
a.del_flag=0
- <if test="area != null and area != ''">and a.RegisterCountyName>=#{area}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
<if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
</where>
@@ -194,7 +194,7 @@
LEFT JOIN service_deathinfo d ON d.InfoID=a.id
<where>
a.del_flag=0
- <if test="area != null and area != ''">and a.RegisterCountyName>=#{area}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
<if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
<if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
</where>
@@ -209,4 +209,35 @@
(SELECT COUNT(*) FROM service_donationwitnessorgan WHERE del_flag=0 AND OrganState=4) totalRecycle
</select>
+ <select id="organList" parameterType="com.ruoyi.project.domain.ServiceTotals"
+ resultType="organList">
+ SELECT a.id,a.case_no,a.NAME,a.RegisterCountyName,YEAR(a.donatetime) donateYear,b.OrganName,b.transplantstate,
+ b.TransplantTime,b.Name,b.TransplantDoct,b.HospitalName,c.OrganGetTime,c.notgetreason
+ FROM service_donatebaseinfo a LEFT JOIN service_donatecomporgan b ON a.ID=b.InfoID
+ LEFT JOIN service_donationwitnessorgan c ON a.ID=c.InfoID
+ <where>
+ a.del_flag=0 AND b.del_flag=0 AND c.del_flag=0
+ <if test="organName != null and organName != ''">and b.OrganName=#{organName}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
+ <if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
+ <if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
+ </where>
+
+ </select>
+
+ <select id="organCount" parameterType="com.ruoyi.project.domain.ServiceTotals"
+ resultType="Long">
+ SELECT count(*)
+ FROM service_donatebaseinfo a LEFT JOIN service_donatecomporgan b ON a.ID=b.InfoID
+ LEFT JOIN service_donationwitnessorgan c ON a.ID=c.InfoID
+ <where>
+ a.del_flag=0 AND b.del_flag=0 AND c.del_flag=0
+ <if test="organName != null and organName != ''">and b.OrganName=#{organName}</if>
+ <if test="area != null and area != ''">and a.RegisterCountyName=#{area}</if>
+ <if test="startTime != null and startTime != ''">and a.donatetime>=#{startTime}</if>
+ <if test="endTime != null and endTime != ''">and a.donatetime <= #{endTime}</if>
+ </where>
+
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3