<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.ruoyi.project.mapper.ServiceDonateorganBaseMapper">
|
|
<resultMap type="com.ruoyi.project.domain.ServiceDonateorganBase" id="ServiceDonateorganBaseResult">
|
<result property="id" column="ID"/>
|
<result property="infoid" column="InfoID"/>
|
<result property="allocationStatus" column="allocation_status"/>
|
<result property="allocationTime" column="allocation_time"/>
|
<result property="registrationCode" column="registration_code"/>
|
<result property="registrationName" column="registration_name"/>
|
<result property="registrationTime" column="registration_time"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="estimatedtime" column="EstimatedTime"/>
|
</resultMap>
|
|
<sql id="selectServiceDonateorganBaseVo">
|
select ID,
|
InfoID,
|
allocation_status,
|
allocation_time,
|
registration_code,
|
registration_name,
|
registration_time,
|
del_flag,
|
create_by,
|
create_time,
|
update_by,
|
update_time,
|
EstimatedTime
|
from service_donateorgan_base
|
</sql>
|
|
<select id="selectServiceDonateorganBaseList" parameterType="com.ruoyi.project.domain.ServiceDonateorganBase"
|
resultMap="ServiceDonateorganBaseResult">
|
<include refid="selectServiceDonateorganBaseVo"/>
|
<where>
|
<if test="infoid != null ">and InfoID = #{infoid}</if>
|
<if test="allocationStatus != null ">and allocation_status = #{allocationStatus}</if>
|
<if test="allocationTime != null ">and allocation_time = #{allocationTime}</if>
|
<if test="registrationCode != null and registrationCode != ''">and registration_code =
|
#{registrationCode}
|
</if>
|
<if test="registrationName != null and registrationName != ''">and registration_name like concat('%',
|
#{registrationName}, '%')
|
</if>
|
<if test="registrationTime != null ">and registration_time = #{registrationTime}</if>
|
<if test="estimatedtime != null ">and EstimatedTime = #{estimatedtime}</if>
|
</where>
|
</select>
|
|
|
<select id="getDonateorganBaseInfoList" resultType="com.ruoyi.project.domain.dto.DonateorganBaseInfoDTO">
|
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.Sex AS sex,
|
sd.Age AS age,
|
sd.BloodType AS bloodtype,
|
sd.idcardno AS idcardno,
|
sd.diagnosisname AS diagnosisname,
|
sd.id AS infoid,
|
sdb.ID AS id,
|
sdb.registration_name AS registrationName,
|
sdb.registration_time AS registrationTime,
|
sdb.registration_code AS registrationCode
|
FROM
|
service_donatebaseinfo sd
|
LEFT JOIN service_donateorgan_base sdb ON sd.ID = sdb.InfoID and sd.del_flag = 0
|
and sdb.del_flag = 0
|
and sdb.ID is not null
|
<where>
|
sd.termination_case = 0
|
<if test="donorno != null and donorno != ''">and sd.DonorNo = #{donorno}</if>
|
<if test="treatmenthospitalname != null and treatmenthospitalname != ''">and sd.treatmenthospitalname like
|
concat('%', #{treatmenthospitalname}, '%')
|
</if>
|
<if test="idcardno != null and idcardno != ''">and sd.IDCardNo. = #{idcardno}</if>
|
<if test="treatmenthospitalno != null and treatmenthospitalno != ''">and sd.TreatmentHospitalNo =
|
#{treatmenthospitalno}
|
</if>
|
<if test="recordstate != null and recordstate != ''">and sd.RecordState = #{recordstate}
|
</if>
|
<if test="name != null and name != ''">and sd.Name = #{name}
|
</if>
|
<if test="inpatientno != null and inpatientno != ''">and sd.InpatientNo = #{inpatientno}
|
</if>
|
<if test="registrationName != null and registrationName != ''">and sdb.registration_name =
|
#{registrationName}
|
</if>
|
<if test="registrationTime != null and registrationTime != ''">
|
and sdb.registration_time = #{registrationTime}
|
</if>
|
<if test="registrationCode != null and registrationCode != ''">
|
and sdb.registration_code = #{registrationCode}
|
</if>
|
</where>
|
<if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if>
|
</select>
|
|
</mapper>
|