| | |
| | | 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, |
| | |
| | | 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> |