liusheng
10 天以前 d88fffd5d757a23f302011ced88dea92e1ce31e9
ruoyi-project/src/main/resources/mapper/project/ServiceDonatemaintenanceMapper.xml
@@ -38,13 +38,38 @@
    </sql>
    <select id="selectServiceDonatemaintenanceList" parameterType="com.ruoyi.project.domain.ServiceDonatemaintenance"
            resultMap="ServiceDonatemaintenanceResult">
        <include refid="selectServiceDonatemaintenanceVo"/>
            resultType="com.ruoyi.project.domain.dto.DonationCompletionBaseInfoDTO">
        select
        sd.treatmenthospitalname AS treatmenthospitalname,
        sd.treatmenthospitalno AS treatmenthospitalno,
        sd.DonorNo AS donorno,
        sd.DonationCategory as donationcategory,
        sd.case_no AS caseNo,
        sd.NAME AS name,
        sd.RecordState AS recordstate,
        sd.Sex AS sex,
        sd.Age AS age,
        sd.BloodType AS bloodtype,
        sd.idcardno AS idcardno,
        sd.diagnosisname AS diagnosisname,
        sdm.id AS infoid,
        sdm.item_no as itemNo,
        sdm.item_name as itemName,
        sdm.item_time as itemTime,
        sdm.item_desc as itemDesc
        FROM
        service_donatebaseinfo sd
        LEFT JOIN service_donatemaintenance sdm ON sd.ID = sdm.InfoID
        AND sd.del_flag = 0
        AND sdm.del_flag = 0
        and sdm.ID is not null
        <where>
            del_flag=0
            sd.termination_case = 0
            <if test="infoid != null ">and InfoID = #{infoid}</if>
            <if test="caseNo != null  and caseNo != ''">and case_no = #{caseNo}</if>
            <if test="donorno != null  and donorno != ''">and DonorNo = #{donorno}</if>
            <if test="name != null  and name != ''">and name = #{name}</if>
            <if test="coordinatorName != null  and coordinatorName != ''">and coordinator_name = #{coordinatorName}</if>
            <if test="itemNo != null  and itemNo != ''">and item_no = #{itemNo}</if>
            <if test="itemName != null  and itemName != ''">and item_name like concat('%', #{itemName}, '%')</if>
            <if test="itemTime != null ">and item_time = #{itemTime}</if>