liusheng
2025-12-26 2944ea778f0fc87c8e09ae47200d9de8069049e3
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?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.ServiceDonatebaseinfoReportMapper">
 
    <resultMap type="com.ruoyi.project.domain.ServiceDonatebaseinfoReport" id="ServiceDonatebaseinfoReportResult">
        <result property="id" column="ID"/>
        <result property="caseNo" column="case_no"/>
        <result property="reportStatus" column="report_status"/>
        <result property="name" column="Name"/>
        <result property="sex" column="Sex"/>
        <result property="idcardtype" column="IDCardType"/>
        <result property="idcardno" column="IDCardNo"/>
        <result property="age" column="Age"/>
        <result property="ageunit" column="AgeUnit"/>
        <result property="birthday" column="Birthday"/>
        <result property="phone" column="Phone"/>
        <result property="nationality" column="Nationality"/>
        <result property="nativeplace" column="NativePlace"/>
        <result property="nation" column="Nation"/>
        <result property="occupation" column="Occupation"/>
        <result property="education" column="Education"/>
        <result property="residenceaddress" column="ResidenceAddress"/>
        <result property="residenceprovince" column="ResidenceProvince"/>
        <result property="residenceprovincename" column="ResidenceProvinceName"/>
        <result property="residencetownname" column="ResidenceTownName"/>
        <result property="residencecommunity" column="ResidenceCommunity"/>
        <result property="residencecommunityname" column="ResidenceCommunityName"/>
        <result property="residencecountycode" column="ResidenceCountyCode"/>
        <result property="residencecountyname" column="ResidenceCountyName"/>
        <result property="registeraddress" column="RegisterAddress"/>
        <result property="registerprovince" column="RegisterProvince"/>
        <result property="registerprovincename" column="RegisterProvinceName"/>
        <result property="registercityname" column="RegisterCityName"/>
        <result property="registertownname" column="RegisterTownName"/>
        <result property="registercommunityname" column="RegisterCommunityName"/>
        <result property="treatmenthospitalname" column="TreatmentHospitalName"/>
        <result property="treatmentdeptname" column="TreatmentDeptName"/>
        <result property="diagnosisname" column="DiagnosisName"/>
        <result property="inpatientno" column="InpatientNo"/>
        <result property="illnessoverview" column="IllnessOverview"/>
        <result property="infectious" column="Infectious"/>
        <result property="infectiousOther" column="Infectious_Other"/>
        <result property="patientstate" column="PatientState"/>
        <result property="reporterno" column="ReporterNo"/>
        <result property="reportername" column="ReporterName"/>
        <result property="reporterphone" column="ReporterPhone"/>
        <result property="reporttime" column="ReportTime"/>
        <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"/>
        <result property="terminationCase" column="termination_case"/>
        <result property="userNo" column="user_no"/>
        <result property="userName" column="user_name"/>
        <result property="deptName" column="dept_name"/>
        <result property="deptNo" column="dept_no"/>
        <result property="isTransport" column="is_transport"/>
        <result property="gscScore" column="gsc_score"/>
    </resultMap>
 
    <sql id="selectServiceDonatebaseinfoReportVo">
        select ID,
               case_no,
               report_status,
               gsc_score,
               Name,
               Sex,
               IDCardType,
               IDCardNo,
               Age,
               AgeUnit,
               Birthday,
               Phone,
               Nationality,
               NativePlace,
               Nation,
               Occupation,
               Education,
               ResidenceAddress,
               ResidenceProvince,
               ResidenceProvinceName,
               ResidenceTownName,
               ResidenceCommunity,
               ResidenceCommunityName,
               ResidenceCountyCode,
               ResidenceCountyName,
               RegisterAddress,
               RegisterProvince,
               RegisterProvinceName,
               RegisterCityName,
               RegisterTownName,
               RegisterCommunityName,
               TreatmentHospitalName,
               TreatmentDeptName,
               DiagnosisName,
               InpatientNo,
               IllnessOverview,
               Infectious,
               Infectious_Other,
               PatientState,
               ReporterNo,
               ReporterName,
               ReporterPhone,
               ReportTime,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time,
               termination_case,
               user_no,
               user_name,
               dept_no,
               dept_name,
               is_transport
        from service_donatebaseinfo_report
    </sql>
 
    <select id="selectServiceDonatebaseinfoReportList"
            parameterType="com.ruoyi.project.domain.ServiceDonatebaseinfoReport"
            resultMap="ServiceDonatebaseinfoReportResult">
        <include refid="selectServiceDonatebaseinfoReportVo"/>
        <where>
            <if test="caseNo != null  and caseNo != ''">and case_no = #{caseNo}</if>
            <if test="gscScore != null  and gscScore != ''">and gsc_score = #{gscScore}</if>
            <if test="reportStatus != null  and reportStatus != ''">and report_status = #{reportStatus}</if>
            <if test="name != null  and name != ''">and Name like concat('%', #{name}, '%')</if>
            <if test="sex != null  and sex != ''">and Sex = #{sex}</if>
            <if test="idcardtype != null ">and IDCardType = #{idcardtype}</if>
            <if test="idcardno != null  and idcardno != ''">and IDCardNo = #{idcardno}</if>
            <if test="age != null ">and Age = #{age}</if>
            <if test="ageunit != null  and ageunit != ''">and AgeUnit = #{ageunit}</if>
            <if test="birthday != null ">and Birthday = #{birthday}</if>
            <if test="phone != null  and phone != ''">and Phone = #{phone}</if>
            <if test="nationality != null  and nationality != ''">and Nationality = #{nationality}</if>
            <if test="nativeplace != null  and nativeplace != ''">and NativePlace = #{nativeplace}</if>
            <if test="nation != null  and nation != ''">and Nation = #{nation}</if>
            <if test="occupation != null  and occupation != ''">and Occupation = #{occupation}</if>
            <if test="education != null  and education != ''">and Education = #{education}</if>
            <if test="residenceaddress != null  and residenceaddress != ''">and ResidenceAddress = #{residenceaddress}
            </if>
            <if test="residenceprovince != null  and residenceprovince != ''">and ResidenceProvince =
                #{residenceprovince}
            </if>
            <if test="residenceprovincename != null  and residenceprovincename != ''">and ResidenceProvinceName like
                concat('%', #{residenceprovincename}, '%')
            </if>
            <if test="residencetownname != null  and residencetownname != ''">and ResidenceTownName like concat('%',
                #{residencetownname}, '%')
            </if>
            <if test="residencecommunity != null  and residencecommunity != ''">and ResidenceCommunity =
                #{residencecommunity}
            </if>
            <if test="residencecommunityname != null  and residencecommunityname != ''">and ResidenceCommunityName like
                concat('%', #{residencecommunityname}, '%')
            </if>
            <if test="residencecountycode != null  and residencecountycode != ''">and ResidenceCountyCode =
                #{residencecountycode}
            </if>
            <if test="residencecountyname != null  and residencecountyname != ''">and ResidenceCountyName like
                concat('%', #{residencecountyname}, '%')
            </if>
            <if test="registeraddress != null  and registeraddress != ''">and RegisterAddress = #{registeraddress}</if>
            <if test="registerprovince != null  and registerprovince != ''">and RegisterProvince = #{registerprovince}
            </if>
            <if test="registerprovincename != null  and registerprovincename != ''">and RegisterProvinceName like
                concat('%', #{registerprovincename}, '%')
            </if>
            <if test="registercityname != null  and registercityname != ''">and RegisterCityName like concat('%',
                #{registercityname}, '%')
            </if>
            <if test="registertownname != null  and registertownname != ''">and RegisterTownName like concat('%',
                #{registertownname}, '%')
            </if>
            <if test="registercommunityname != null  and registercommunityname != ''">and RegisterCommunityName like
                concat('%', #{registercommunityname}, '%')
            </if>
            <if test="treatmenthospitalname != null  and treatmenthospitalname != ''">and TreatmentHospitalName like
                concat('%', #{treatmenthospitalname}, '%')
            </if>
            <if test="treatmentdeptname != null  and treatmentdeptname != ''">and TreatmentDeptName like concat('%',
                #{treatmentdeptname}, '%')
            </if>
            <if test="diagnosisname != null  and diagnosisname != ''">and DiagnosisName like concat('%',
                #{diagnosisname}, '%')
            </if>
            <if test="inpatientno != null  and inpatientno != ''">and InpatientNo = #{inpatientno}</if>
            <if test="illnessoverview != null  and illnessoverview != ''">and IllnessOverview = #{illnessoverview}</if>
            <if test="infectious != null  and infectious != ''">and Infectious = #{infectious}</if>
            <if test="infectiousOther != null  and infectiousOther != ''">and Infectious_Other = #{infectiousOther}</if>
            <if test="patientstate != null  and patientstate != ''">and PatientState = #{patientstate}</if>
            <if test="reporterno != null  and reporterno != ''">and ReporterNo = #{reporterno}</if>
            <if test="reportername != null  and reportername != ''">and ReporterName like concat('%', #{reportername},
                '%')
            </if>
            <if test="reporterphone != null  and reporterphone != ''">and ReporterPhone = #{reporterphone}</if>
            <if test="reporttime != null ">and ReportTime = #{reporttime}</if>
            <if test="terminationCase != null ">and termination_case = #{terminationCase}</if>
            <if test="userNo != null  and userNo != ''">and userNo = #{userNo}</if>
            <if test="userName != null  and userName != ''">and user_name = #{userName}</if>
            <if test="deptNo != null  and deptNo != ''">and dept_no = #{deptNo}</if>
            <if test="deptName != null  and deptName != ''">and dept_name = #{deptName}</if>
            <if test="isTransport != null  and isTransport != ''">and is_transport = #{isTransport}</if>
        </where>
    </select>
 
</mapper>