| | |
| | | where CompleteTime >= #{starttime} AND CompleteTime <= #{endtime} AND del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getDonationCompletionBaseInfo" resultType="com.ruoyi.project.domain.dto.DonationCompletionBaseInfoDTO"> |
| | | SELECT |
| | | sd.treatmenthospitalname AS treatmenthospitalname, |
| | | sd.treatmenthospitalno AS treatmenthospitalno, |
| | | sd.DonorNo AS donorno, |
| | | sd.case_no AS caseNo, |
| | | sd.extracontent AS extracontent, |
| | | sd.DonationCategory as donationcategory, |
| | | 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.id AS infoid, |
| | | sdc.ID AS id, |
| | | sdc.DonorNo AS donorno, |
| | | sdc.IsBodyDonation AS isbodydonation, |
| | | sdc.ReceivingUnitName AS receivingunitname, |
| | | sdc.ReceivingUnit AS receivingunit, |
| | | sdc.CompleteTime AS completetime, |
| | | sdc.ResponsibleUserID AS responsibleuserid, |
| | | sdc.ResponsibleUserName AS responsibleusername, |
| | | sdc.CoordinatedUserIDO AS coordinateduserido, |
| | | sdc.CoordinatedUserNameO AS coordinatedusernameo, |
| | | sdc.CoordinatedUserIDT AS coordinateduseridt, |
| | | sdc.CoordinatedUserNameT AS coordinatedusernamet, |
| | | sdc.AssessAnnex AS assessannex, |
| | | sdc.DonateOrgan AS donateorgan |
| | | FROM |
| | | service_donatebaseinfo sd |
| | | LEFT JOIN service_donatecompletioninfo sdc ON sd.ID = sdc.InfoID |
| | | AND sd.del_flag = 0 |
| | | AND sdc.del_flag = 0 |
| | | and sdc.ID is not null |
| | | <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 sdc.DonorNo = #{donorno}</if> |
| | | <if test="infoid != null">and sdc.InfoID = #{infoid}</if> |
| | | </where> |
| | | <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if> |
| | | </select> |
| | | |
| | | |
| | | <update id="delDuplicateDonateCompletioninfo"> |
| | | update service_donatecompletioninfo |