| | |
| | | FROM |
| | | service_donatebaseinfo sd |
| | | LEFT JOIN service_deathinfo sdi ON sd.ID = sdi.InfoID |
| | | AND sd.del_flag = 0 |
| | | |
| | | AND sdi.del_flag = 0 |
| | | AND sdi.ID IS NOT NULL |
| | | <where> |
| | | sd.termination_case = 0 |
| | | sd.termination_case = 0 AND sd.del_flag = 0 |
| | | <if test="infoid != null ">and sd.ID = #{infoid}</if> |
| | | <if test="inpatientno != null ">and sd.InpatientNo = #{inpatientno}</if> |
| | | <if test="caseNo != null and caseNo != ''">and sd.case_no = #{caseNo}</if> |
| | |
| | | <if test="startDeathtime != null and endDeathtime != null ">and sdi.DeathTime BETWEEN #{startDeathtime} and #{endDeathtime}</if> |
| | | </where> |
| | | |
| | | order by sd.InpatientNo desc |
| | | order by sd.ReportTime desc |
| | | <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if> |
| | | </select> |
| | | |