| | |
| | | <if test="operationdoctor != null and operationdoctor != ''">and st.OperationDoctor = #{operationdoctor} |
| | | </if> |
| | | <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 |
| | | <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if> |
| | | </select> |
| | | |
| | |
| | | <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 <= #{endtime}</if> |
| | |
| | | <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 <= #{endtime}</if> |
| | |
| | | <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 <= #{endtime}</if> |
| | |
| | | <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 |