sinake
10 天以前 ca29e025563fb430861d191d11dcd226b4e8e4d7
ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml
@@ -47,6 +47,8 @@
        <result property="coordinatorOutOperating" column="coordinator_out_operating"/>
        <result property="coordinatorSign" column="coordinator_sign"/>
        <result property="coordinatorSignTime" column="coordinator_sign_time"/>
        <result property="witnessState" column="witness_state"/>
    </resultMap>
    <sql id="selectServiceDonationwitnessVo">
@@ -91,7 +93,8 @@
               update_time,
               OrganDonation,
               OrganDonation_Other,
               DonationCategory
               donationcategory,
               witness_state
        from service_donationwitness
    </sql>
@@ -108,13 +111,17 @@
        </where>
    </select>
    <select id="getDonationwitnessBaseInfo" parameterType="com.ruoyi.project.domain.vo.DonationwitnessBaseInfoVO" resultType="com.ruoyi.project.domain.dto.DonationwitnessBaseInfoDTO">
    <select id="getDonationwitnessBaseInfo" parameterType="com.ruoyi.project.domain.vo.DonationwitnessBaseInfoVO"
            resultType="com.ruoyi.project.domain.dto.DonationwitnessBaseInfoDTO">
        select
        sd.treatmenthospitalname AS treatmenthospitalname,
        sd.treatmenthospitalno AS treatmenthospitalno,
        sd.DonationCategory as donationcategory,
        sd.DonorNo AS donorno,
        sd.case_no AS caseNo,
        sd.NAME AS name,
        sd.extracontent AS extracontent,
        sd.InpatientNo AS inpatientno,
        sd.RecordState AS recordstate,
        sd.Sex AS sex,
        sd.Age AS age,
@@ -122,7 +129,8 @@
        sd.idcardno AS idcardno,
        sd.diagnosisname AS diagnosisname,
        st.coordinator_in_operating as coordinatorInOperating,
        st.InfoID as infoid,
        sd.id AS infoid,
        st.id as id,
        st.coordinator_out_operating as coordinatorOutOperating,
        st.coordinator_sign as coordinatorSign,
        st.coordinator_sign_time as coordinatorSignTime,
@@ -148,22 +156,32 @@
        st.AortaPerfusionTime as aortaperfusiontime,
        st.OrganDonation as organdonation,
        st.OrganDonation_Other as organdonationOther,
        st.DonationCategory as donationcategory
        st.DonationCategory as donationcategory,
        st.DeathJudgeAnnex as deathjudgeannex,
        st.witness_state as witnessState,
        st.IsSpendRemember as isspendremember,
        st.IsRestoreRemains as isrestoreremains
        FROM
        service_donatebaseinfo sd
        LEFT JOIN service_donationwitness st ON sd.ID = st.InfoID
        and st.ID is not null
        AND sd.del_flag = 0
        AND st.del_flag = 0
        <where>
            sd.termination_case = 0
            <if test="name != null  and name != ''">and sd.Name like concat('%', #{name}, '%')</if>
            <if test="inpatientno != null  and inpatientno != ''">and sd.inpatientno = #{inpatientno}</if>
            <if test="donorno != null  and donorno != ''">and st.DonorNo = #{donorno}</if>
            <if test="gainhospitalname != null  and gainhospitalname != ''">and  st.GainHospitalName like concat('%',
            <if test="gainhospitalname != null  and gainhospitalname != ''">and st.GainHospitalName like concat('%',
                #{gainhospitalname}, '%')
            </if>
            <if test="operationdoctor != null  and operationdoctor != ''">and  st.OperationDoctor = #{operationdoctor}</if>
            <if test="infoid != null">and  st.InfoID = #{infoid}</if>
            <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>
@@ -270,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>
@@ -280,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>
@@ -291,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>
@@ -320,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