|
|
|
@ -22,17 +22,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="delivery" column="delivery"/>
|
|
|
|
|
<result property="trackingNumber" column="tracking_number"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap id="MrRecordOrderDto" type="com.ruoyi.wx.dto.MrRecordOrderDTO" extends="MrRecordOrderResult"></resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectMrRecordOrderVo">
|
|
|
|
|
select id, type, mr_number, patient_name, delivery, tracking_number, discharge_date, times, applicant_id, hospital, address, download_url, unzip_pwd, status, create_time, update_time from mr_record_order
|
|
|
|
|
select id,
|
|
|
|
|
type,
|
|
|
|
|
mr_number,
|
|
|
|
|
patient_name,
|
|
|
|
|
delivery,
|
|
|
|
|
tracking_number,
|
|
|
|
|
discharge_date,
|
|
|
|
|
times,
|
|
|
|
|
applicant_id,
|
|
|
|
|
hospital,
|
|
|
|
|
address,
|
|
|
|
|
download_url,
|
|
|
|
|
unzip_pwd,
|
|
|
|
|
status,
|
|
|
|
|
create_time,
|
|
|
|
|
update_time
|
|
|
|
|
from mr_record_order
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectMrRecordOrderList" parameterType="MrRecordOrder" resultMap="MrRecordOrderResult">
|
|
|
|
|
<include refid="selectMrRecordOrderVo"/>
|
|
|
|
|
<select id="selectMrRecordOrderList" parameterType="MrRecordOrder" resultMap="MrRecordOrderDto">
|
|
|
|
|
select ro.*,wu.name applicationName
|
|
|
|
|
from mr_record_order ro,wx_user wu
|
|
|
|
|
<where>
|
|
|
|
|
wu.id = ro.applicantId
|
|
|
|
|
<if test="type != null ">and type = #{type}</if>
|
|
|
|
|
<if test="mrNumber != null and mrNumber != ''">and mr_number = #{mrNumber}</if>
|
|
|
|
|
<if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
|
|
|
|
<if test="patientName != null and patientName != ''">and patient_name like concat('%', #{patientName},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dischargeDate != null ">and discharge_date = #{dischargeDate}</if>
|
|
|
|
|
<if test="times != null ">and times = #{times}</if>
|
|
|
|
|
<if test="applicantId != null ">and applicant_id = #{applicantId}</if>
|
|
|
|
@ -42,13 +63,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="unzipPwd != null and unzipPwd != ''">and unzip_pwd = #{unzipPwd}</if>
|
|
|
|
|
<if test="status != null ">and status = #{status}</if>
|
|
|
|
|
<if test="delivery!=null and delivery != ''">and delivery like concat('%',#{delivery},'%')</if>
|
|
|
|
|
<if test="trackingNumber!=null and trackingNumber != ''">and tracking_number like concat('%',#{trackingNumber},'%')</if>
|
|
|
|
|
<if test="trackingNumber!=null and trackingNumber != ''">and tracking_number like
|
|
|
|
|
concat('%',#{trackingNumber},'%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by `status`,create_time DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="searchList" resultType="com.ruoyi.wx.dto.RecordOrderDTO">
|
|
|
|
|
select o.id,if(o.type=0,'原件寄回','电子扫描件') type,o.mr_number mrNumber,o.patient_name patientName,o.discharge_date dischargeDate,o.times,o.hospital,o.address,if(o.`status`=0,'申请中','已完成') status,o.download_url downUrl
|
|
|
|
|
select o.id,if(o.type=0,'原件寄回','电子扫描件') type,o.mr_number mrNumber,o.patient_name patientName,o.discharge_date
|
|
|
|
|
dischargeDate,o.times,o.hospital,o.address,if(o.`status`=0,'申请中','已完成') status,o.download_url downUrl
|
|
|
|
|
from mr_record_order o
|
|
|
|
|
where o.applicant_id = #{userId}
|
|
|
|
|
<if test="keyword!=null and keyword!=''">
|
|
|
|
@ -127,7 +151,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteMrRecordOrderById" parameterType="Long">
|
|
|
|
|
delete from mr_record_order where id = #{id}
|
|
|
|
|
delete
|
|
|
|
|
from mr_record_order
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteMrRecordOrderByIds" parameterType="String">
|
|
|
|
@ -138,12 +164,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getUrlHeaders" resultType="map">
|
|
|
|
|
select url,headers from code_url where code=#{code}
|
|
|
|
|
select url, headers
|
|
|
|
|
from code_url
|
|
|
|
|
where code = #{code}
|
|
|
|
|
</select>
|
|
|
|
|
<insert id="saveCodeUrl">
|
|
|
|
|
insert into code_url (code,url,headers)values(#{code},#{url},#{headers})
|
|
|
|
|
insert into code_url (code, url, headers)
|
|
|
|
|
values (#{code}, #{url}, #{headers})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
</mapper>
|