From 9ff5a9b1a3ce92b7bf4fcd3a8fdabbb1739cfe4b Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 05 二月 2026 17:39:07 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml
index b0bd5b7..a27acad 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml
@@ -108,13 +108,17 @@
         </where>
     </select>
 
-    <select id="getDonationwitnessBaseInfo" parameterType="com.ruoyi.project.domain.vo.DonationwitnessBaseInfoVO" resultType="com.ruoyi.project.domain.dto.DonationwitnessBaseInfoDTO">
+    <select id="getDonationwitnessBaseInfo" parameterType="com.ruoyi.project.domain.vo.DonationwitnessBaseInfoVO"
+            resultType="com.ruoyi.project.domain.dto.DonationwitnessBaseInfoDTO">
         select
         sd.treatmenthospitalname AS treatmenthospitalname,
         sd.treatmenthospitalno AS treatmenthospitalno,
+        sd.DonationCategory as donationcategory,
         sd.DonorNo AS donorno,
         sd.case_no AS caseNo,
         sd.NAME AS name,
+        sd.extracontent AS extracontent,
+        sd.InpatientNo AS inpatientno,
         sd.RecordState AS recordstate,
         sd.Sex AS sex,
         sd.Age AS age,
@@ -122,7 +126,8 @@
         sd.idcardno AS idcardno,
         sd.diagnosisname AS diagnosisname,
         st.coordinator_in_operating as coordinatorInOperating,
-        st.InfoID as infoid,
+        sd.id AS infoid,
+        st.id as id,
         st.coordinator_out_operating as coordinatorOutOperating,
         st.coordinator_sign as coordinatorSign,
         st.coordinator_sign_time as coordinatorSignTime,
@@ -152,17 +157,21 @@
         FROM
         service_donatebaseinfo sd
         LEFT JOIN service_donationwitness st ON sd.ID = st.InfoID
+        and st.ID is not null
         AND sd.del_flag = 0
         AND st.del_flag = 0
         <where>
+            sd.termination_case = 0
+
             <if test="name != null  and name != ''">and sd.Name like concat('%', #{name}, '%')</if>
             <if test="inpatientno != null  and inpatientno != ''">and sd.inpatientno = #{inpatientno}</if>
             <if test="donorno != null  and donorno != ''">and st.DonorNo = #{donorno}</if>
-            <if test="gainhospitalname != null  and gainhospitalname != ''">and  st.GainHospitalName like concat('%',
+            <if test="gainhospitalname != null  and gainhospitalname != ''">and st.GainHospitalName like concat('%',
                 #{gainhospitalname}, '%')
             </if>
-            <if test="operationdoctor != null  and operationdoctor != ''">and  st.OperationDoctor = #{operationdoctor}</if>
-            <if test="infoid != null">and  st.InfoID = #{infoid}</if>
+            <if test="operationdoctor != null  and operationdoctor != ''">and st.OperationDoctor = #{operationdoctor}
+            </if>
+            <if test="infoid != null">and sd.ID = #{infoid}</if>
         </where>
         <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if>
     </select>

--
Gitblit v1.9.3