liusheng
2026-01-21 29f287cf6e4869d7bbc283991458e09a03b59c52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?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>