liusheng
2025-12-28 73f5b82df781d2b061ba24d29182f6898b5535d9
ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
@@ -6,6 +6,7 @@
    <resultMap type="com.ruoyi.project.domain.ServiceDonatebaseinfo" id="ServiceDonatebaseinfoResult">
        <result property="id" column="ID"/>
        <result property="caseNo" column="case_no"/>
        <result property="name" column="Name"/>
        <result property="sex" column="Sex"/>
        <result property="idcardtype" column="IDCardType"/>
@@ -60,7 +61,7 @@
        <result property="reportername" column="ReporterName"/>
        <result property="reporterphone" column="ReporterPhone"/>
        <result property="reporttime" column="ReportTime"/>
        <result property="del_flag" column="del_flag"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="terminationCase" column="termination_case"/>
@@ -70,7 +71,8 @@
        <result property="occupation" column="Occupation"/>
        <result property="education" column="Education"/>
        <result property="nativeplace" column="NativePlace"/>
        <result property="infoname" column="infoName"/>
        <result property="infoName" column="info_name"/>
        <result property="infoNo" column="info_no"/>
        <result property="infophone" column="infoPhone"/>
        <result property="deptid" column="deptid"/>
        <result property="deptname" column="deptname"/>
@@ -85,6 +87,10 @@
        <result property="firstMedicalInstitution" column="first_medical_institution"/>
        <result property="currentDept" column="current_dept"/>
        <result property="firstDept" column="first_dept"/>
        <result property="reportId" column="report_id"/>
        <result property="gcsScore" column="gcs_score"/>
        <result property="coordinatorNo" column="coordinator_no"/>
        <result property="coordinatorName" column="coordinator_name"/>
    </resultMap>
    <sql id="selectServiceDonatebaseinfoVo">
@@ -106,6 +112,9 @@
            service_donatebaseinfo.del_flag = 0
            <if test="name != null  and name != ''">and Name like concat('%', #{name}, '%')</if>
            <if test="sex != null ">and Sex = #{sex}</if>
            <if test="coordinatorName != null ">and coordinator_name like concat('%',#{coordinatorName}, '%')</if>
            <if test="coordinatorNo != null ">and coordinator_no = #{coordinatorNo}</if>
            <if test="caseNo != null ">and service_donatebaseinfo.case_no = #{caseNo}</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>
@@ -207,7 +216,8 @@
            </if>
            <if test="reporterphone != null  and reporterphone != ''">and ReporterPhone = #{reporterphone}</if>
            <if test="reporttime != null ">and ReportTime = #{reporttime}</if>
            <if test="infoname != null ">and infoName = #{infoname}</if>
            <if test="infoName != null ">and info_name like concat('%',#{infoName},'%')</if>
            <if test="infoNo != null ">and info_no = #{infoNo}</if>
            <if test="infophone != null ">and infoPhone = #{infophone}</if>
            <if test="createBy != null ">and `service_donatebaseinfo`.create_by = #{createBy}</if>
            <if test="starttime != null ">and donatetime >= #{starttime}</if>
@@ -222,6 +232,8 @@
            <if test="donatetime != null ">and donatetime = #{donatetime}</if>
            <if test="donateno != null ">and donateno = #{donateno}</if>
            <if test="workflow != null ">and workflow = #{workflow}</if>
            <if test="reportId != null ">and report_id = #{reportId}</if>
            <if test="gcsScore != null ">and gcs_score = #{gcsScore}</if>
        </where>
        order by ReportTime desc
@@ -246,7 +258,10 @@
        <where>
            AND b.del_flag=0
            <if test="starttime != null ">and b.donatetime >= #{starttime}</if>
            <if test="caseNo != null ">and b.case_no >= #{caseNo}</if>
            <if test="reportId != null ">and b.report_id = #{reportId}</if>
            <if test="endtime != null ">and b.donatetime &lt;= #{endtime}</if>
            <if test="gcsScore != null ">and b.gcs_score = #{gcsScore}</if>
            <if test="city != null and city != ''">and o.City = #{city}</if>
            <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if>
        </where>
@@ -282,6 +297,7 @@
        inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        <where>
            <if test="starttime != null ">and b.ReportTime >= #{starttime}</if>
            <if test="caseNo != null ">and b.case_no >= #{caseNo}</if>
            <if test="endtime != null ">and b.ReportTime &lt;= #{endtime}</if>
            <if test="city != null and city != ''">and o.City = #{city}</if>
            <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if>
@@ -379,6 +395,7 @@
            <if test="endtime != null ">and d.CompleteTime &lt;= #{endtime}</if>
            <if test="city != null and city != ''">and o.City = #{city}</if>
            <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if>
            <if test="caseNo != null ">and b.case_no >= #{caseNo}</if>
        </where>
    </select>