<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.ruoyi.project.mapper.ServiceDeathinfoMapper">
|
|
<resultMap type="com.ruoyi.project.domain.ServiceDeathinfo" id="ServiceDeathinfoResult">
|
<result property="id" column="ID"/>
|
<result property="infoid" column="InfoID"/>
|
<result property="donorno" column="DonorNo"/>
|
<result property="gainhospitalno" column="GainHospitalNo"/>
|
<result property="gainhospitalname" column="GainHospitalName"/>
|
<result property="deathtime" column="DeathTime"/>
|
<result property="deathreason" column="DeathReason"/>
|
<result property="deathjudgedocto" column="DeathJudgeDoctO"/>
|
<result property="deathjudgedoctt" column="DeathJudgeDoctT"/>
|
<result property="deathjudgeannex" column="DeathJudgeAnnex"/>
|
<result property="isspendremember" column="IsSpendRemember"/>
|
<result property="isrestoreremains" column="IsRestoreRemains"/>
|
<result property="rememberannex" column="RememberAnnex"/>
|
<result property="responsibleuserid" column="ResponsibleUserID"/>
|
<result property="responsibleusername" column="ResponsibleUserName"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
</resultMap>
|
|
<sql id="selectServiceDeathinfoVo">
|
select ID,
|
InfoID,
|
DonorNo,
|
GainHospitalNo,
|
GainHospitalName,
|
DeathTime,
|
DeathReason,
|
DeathJudgeDoctO,
|
DeathJudgeDoctT,
|
DeathJudgeAnnex,
|
IsSpendRemember,
|
IsRestoreRemains,
|
RememberAnnex,
|
ResponsibleUserID,
|
ResponsibleUserName,
|
del_flag,
|
create_by,
|
create_time,
|
update_by,
|
update_time
|
from service_deathinfo
|
</sql>
|
|
<select id="selectServiceDeathinfoList" parameterType="com.ruoyi.project.domain.ServiceDeathinfo"
|
resultMap="ServiceDeathinfoResult">
|
<include refid="selectServiceDeathinfoVo"/>
|
<where>
|
<if test="infoid != null ">and InfoID = #{infoid}</if>
|
<if test="donorno != null and donorno != ''">and DonorNo = #{donorno}</if>
|
<if test="gainhospitalno != null and gainhospitalno != ''">and GainHospitalNo = #{gainhospitalno}</if>
|
<if test="gainhospitalname != null and gainhospitalname != ''">and GainHospitalName like concat('%',
|
#{gainhospitalname}, '%')
|
</if>
|
<if test="deathtime != null ">and DeathTime = #{deathtime}</if>
|
<if test="deathreason != null and deathreason != ''">and DeathReason = #{deathreason}</if>
|
<if test="deathjudgedocto != null and deathjudgedocto != ''">and DeathJudgeDoctO = #{deathjudgedocto}</if>
|
<if test="deathjudgedoctt != null and deathjudgedoctt != ''">and DeathJudgeDoctT = #{deathjudgedoctt}</if>
|
<if test="deathjudgeannex != null and deathjudgeannex != ''">and DeathJudgeAnnex = #{deathjudgeannex}</if>
|
<if test="isspendremember != null ">and IsSpendRemember = #{isspendremember}</if>
|
<if test="isrestoreremains != null ">and IsRestoreRemains = #{isrestoreremains}</if>
|
<if test="rememberannex != null and rememberannex != ''">and RememberAnnex = #{rememberannex}</if>
|
<if test="responsibleuserid != null and responsibleuserid != ''">and ResponsibleUserID =
|
#{responsibleuserid}
|
</if>
|
<if test="responsibleusername != null and responsibleusername != ''">and ResponsibleUserName like
|
concat('%', #{responsibleusername}, '%')
|
</if>
|
</where>
|
</select>
|
|
<select id="dathInfoBaseInfoList" parameterType="com.ruoyi.project.domain.vo.DeathBaseInfoVO"
|
resultType="com.ruoyi.project.domain.dto.DeathBaseInfoDTO">
|
SELECT
|
sd.treatmenthospitalname AS treatmenthospitalname,
|
sd.treatmenthospitalno AS treatmenthospitalno,
|
sd.DonorNo AS donorno,
|
sd.case_no AS caseNo,
|
sd.Name AS NAME,
|
sd.RecordState AS recordstate,
|
sd.Sex AS sex,
|
sd.Age AS age,
|
sd.BloodType AS bloodtype,
|
sd.idcardno AS idcardno,
|
sd.diagnosisname AS diagnosisname,
|
sdi.infoID AS infoid,
|
sdi.ID AS id,
|
sdi.GainHospitalNo as gainhospitalno,
|
sdi.GainHospitalName as gainhospitalname,
|
sdi.DeathTime as deathtime,
|
sdi.DeathReason as deathreason,
|
sdi.DeathJudgeDoctO as deathjudgedocto,
|
sdi.DeathJudgeDoctT as deathjudgedoctt,
|
sdi.DeathJudgeAnnex as deathjudgeannex,
|
sdi.IsSpendRemember as isspendremember,
|
sdi.IsRestoreRemains as isrestoreremains,
|
sdi.RememberAnnex as rememberannex,
|
sdi.ResponsibleUserID as responsibleuserid,
|
sdi.ResponsibleUserName as responsibleusername
|
FROM
|
service_donatebaseinfo sd
|
LEFT JOIN service_deathinfo sdi ON sd.ID = sdi.InfoID
|
AND sd.del_flag = 0
|
AND sdi.del_flag = 0
|
<where>
|
<if test="infoid != null ">and se.InfoID = #{infoid}</if>
|
<if test="caseNo != null and caseNo != ''">and sd.case_no = #{caseNo}</if>
|
<if test="name != null and name != ''">and sd.Name = #{name}</if>
|
<if test="donorno != null and donorno != ''">and sd.DonorNo = #{donorno}</if>
|
<if test="treatmenthospitalno != null and treatmenthospitalno != ''">and sd.treatmenthospitalno =
|
#{treatmenthospitalno}
|
</if>
|
<if test="treatmenthospitalname != null and treatmenthospitalname != ''">and sd.treatmenthospitalname like
|
concat('%',#{treatmenthospitalname}, '%')
|
</if>
|
<if test="name != null and name != ''">and sd.NAME like concat('%',#{name}, '%')</if>
|
<if test="deathtime != null">and sdi.DeathTime = #{deathtime}</if>
|
<if test="deathjudgedocto != null">and sdi.DeathJudgeDoctO = #{deathjudgedocto}</if>
|
<if test="deathjudgedoctt != null">and sdi.DeathJudgeDoctT = #{deathjudgedoctt}</if>
|
<if test="responsibleuserid != null">and sdi.ResponsibleUserID = #{responsibleuserid}</if>
|
<if test="responsibleusername != null and responsibleusername != ''">and sd.ResponsibleUserName like
|
concat('%',#{responsibleusername}, '%')
|
</if>
|
|
</where>
|
<if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if>
|
</select>
|
|
</mapper>
|