From f16ee221c1384160c96a5907791d07e4f6126c4c Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 24 四月 2026 10:48:17 +0800
Subject: [PATCH] 获取捐献进程进度统计

---
 ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
index 185951c..5d97133 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
@@ -478,4 +478,34 @@
         <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if>
 
     </select>
+    <select id="totalConfirmationBaseInfo" resultType="Map">
+        SELECT  recordstate AS recordState, count(recordstate) AS stateCount
+        FROM service_donatebaseinfo sd
+        LEFT JOIN service_medicalevaluation sm ON sd.ID = sm.InfoID
+        AND sm.del_flag = 0 -- 鎹愮尞璇勪及
+        LEFT JOIN service_relativesconfirmation sr ON sd.ID = sr.InfoID
+        AND sr.del_flag = 0-- 鎹愮尞纭
+        LEFT JOIN service_ethicalreviewinitiate se ON sd.ID = se.InfoID
+        AND se.del_flag = 0-- 浼︾悊瀹℃煡
+        LEFT JOIN service_donationwitness sdw ON sd.ID = sdw.InfoID
+        AND sdw.del_flag = 0-- 鑾峰彇瑙佽瘉
+        LEFT JOIN service_donatecompletioninfo sdt ON sd.ID = sdt.InfoID
+        AND sdt.del_flag = 0 -- 瀹屾垚鐧昏
+
+        <where>sd.del_flag = 0
+            <if test="terminationCase != null ">AND sd.termination_case = #{terminationCase}</if>
+            <if test="treatmentHospitalName != null ">AND sd.TreatmentHospitalName = #{treatmentHospitalName}</if>
+            <if test="name != null ">AND sd.Name like concat('%', #{name}, '%')</if>
+            <if test="inpatientNo != null ">AND sd.InpatientNo = #{inpatientNo}</if>
+            <if test="startAge != null">AND sd.age &gt;= #{startAge}</if>
+            <if test="endAge !=null">AND sd.age &lt;= #{endAge}
+            </if>
+            <if test="idcardno != null  and idcardno != ''">and IDCardNo = #{idcardno}</if>
+            <if test="recordstate != null and recordstate != ''">and sd.RecordState = #{recordstate}</if>
+            <if test="workflow != null">and sd.workflow = #{workflow}</if>
+            <if test="diagnosisName != null">and sd.DiagnosisName like concat('%', #{diagnosisName}, '%')</if>
+        </where>
+        GROUP BY recordstate
+    </select>
+
 </mapper>

--
Gitblit v1.9.3