sinake
2026-10-26 82a0d121b3581b3634887850e0bded5874afc85d
ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml
@@ -181,7 +181,7 @@
            <if test="infoid != null">and sd.ID = #{infoid}</if>
            <if test="witnessState != null">and st.witness_state = #{witnessState}</if>
        </where>
        order by sd.InpatientNo desc
        order by sd.ReportTime desc
        <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if>
    </select>
@@ -288,7 +288,7 @@
    <select id="getDBDDonaterNumberThisYear" resultType="java.lang.Integer">
        select count(*) from service_donationwitness w
        inner join service_donatebaseinfo b on w.InfoID = b.id
        inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        left join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        where w.DonationCategory = "DBD"
        <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if>
        <if test="endtime != null ">and w.OperationBegTime &lt;= #{endtime}</if>
@@ -298,7 +298,7 @@
    <select id="getDCDDonaterNumberThisYear" resultType="java.lang.Integer">
        select count(*) from service_donationwitness w
        inner join service_donatebaseinfo b on w.InfoID = b.id
        inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        left join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        where w.DonationCategory = "DCD"
        <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if>
        <if test="endtime != null ">and w.OperationBegTime &lt;= #{endtime}</if>
@@ -309,7 +309,7 @@
    <select id="getDBCDDonaterNumberThisYear" resultType="java.lang.Integer">
        select count(*) from service_donationwitness w
        inner join service_donatebaseinfo b on w.InfoID = b.id
        inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        left join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        where w.DonationCategory = "DBCD"
        <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if>
        <if test="endtime != null ">and w.OperationBegTime &lt;= #{endtime}</if>
@@ -338,7 +338,7 @@
    <select id="countThisYearByTime" resultType="java.lang.Integer">
        select count(*) from service_donationwitness w
        inner join service_donatebaseinfo b on w.InfoID = b.id
        inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        left join base_organization o on b.TreatmentHospitalNo = o.OrganizationID
        <where>
            w.del_flag=0
            and b.del_flag=0