|
|
|
@ -1,56 +1,80 @@
|
|
|
|
|
<?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">
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.wx.mapper.MrRecordOrderMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="MrRecordOrder" id="MrRecordOrderResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="type" column="type" />
|
|
|
|
|
<result property="mrNumber" column="mr_number" />
|
|
|
|
|
<result property="patientName" column="patient_name" />
|
|
|
|
|
<result property="dischargeDate" column="discharge_date" />
|
|
|
|
|
<result property="times" column="times" />
|
|
|
|
|
<result property="applicantId" column="applicant_id" />
|
|
|
|
|
<result property="hospital" column="hospital" />
|
|
|
|
|
<result property="address" column="address" />
|
|
|
|
|
<result property="downloadUrl" column="download_url" />
|
|
|
|
|
<result property="unzipPwd" column="unzip_pwd" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
|
<result property="type" column="type"/>
|
|
|
|
|
<result property="mrNumber" column="mr_number"/>
|
|
|
|
|
<result property="patientName" column="patient_name"/>
|
|
|
|
|
<result property="dischargeDate" column="discharge_date"/>
|
|
|
|
|
<result property="times" column="times"/>
|
|
|
|
|
<result property="applicantId" column="applicant_id"/>
|
|
|
|
|
<result property="hospital" column="hospital"/>
|
|
|
|
|
<result property="address" column="address"/>
|
|
|
|
|
<result property="downloadUrl" column="download_url"/>
|
|
|
|
|
<result property="unzipPwd" column="unzip_pwd"/>
|
|
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<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"/>
|
|
|
|
|
<where>
|
|
|
|
|
<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="dischargeDate != null "> and discharge_date = #{dischargeDate}</if>
|
|
|
|
|
<if test="times != null "> and times = #{times}</if>
|
|
|
|
|
<if test="applicantId != null "> and applicant_id = #{applicantId}</if>
|
|
|
|
|
<if test="hospital != null and hospital != ''"> and hospital = #{hospital}</if>
|
|
|
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
|
|
<if test="downloadUrl != null and downloadUrl != ''"> and download_url = #{downloadUrl}</if>
|
|
|
|
|
<if test="unzipPwd != null and unzipPwd != ''"> and unzip_pwd = #{unzipPwd}</if>
|
|
|
|
|
<if test="status != null "> and status = #{status}</if>
|
|
|
|
|
<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="dischargeDate != null ">and discharge_date = #{dischargeDate}</if>
|
|
|
|
|
<if test="times != null ">and times = #{times}</if>
|
|
|
|
|
<if test="applicantId != null ">and applicant_id = #{applicantId}</if>
|
|
|
|
|
<if test="hospital != null and hospital != ''">and hospital = #{hospital}</if>
|
|
|
|
|
<if test="address != null and address != ''">and address = #{address}</if>
|
|
|
|
|
<if test="downloadUrl != null and downloadUrl != ''">and download_url = #{downloadUrl}</if>
|
|
|
|
|
<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}
|
|
|
|
|
where o.applicant_id = #{userId}
|
|
|
|
|
<if test="keyword!=null and keyword!=''">
|
|
|
|
|
and (o.mr_number like CONCAT('%',#{keyword},'%') or o.patient_name like CONCAT('%',#{keyword},'%'))
|
|
|
|
|
</if>
|
|
|
|
@ -60,12 +84,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
order by o.`status`,o.create_time DESC
|
|
|
|
|
limit ${startRow},${endRow}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectMrRecordOrderById" parameterType="Long" resultMap="MrRecordOrderResult">
|
|
|
|
|
<include refid="selectMrRecordOrderVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertMrRecordOrder" parameterType="MrRecordOrder" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into mr_record_order
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
@ -84,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="delivery!=null and delivery != ''">delivery,</if>
|
|
|
|
|
<if test="trackingNumber!=null and trackingNumber != ''">tracking_number,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="type != null">#{type},</if>
|
|
|
|
|
<if test="mrNumber != null and mrNumber != ''">#{mrNumber},</if>
|
|
|
|
@ -101,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="delivery!=null and delivery != ''">#{delivery},</if>
|
|
|
|
|
<if test="trackingNumber!=null and trackingNumber != ''">#{trackingNumber}</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateMrRecordOrder" parameterType="MrRecordOrder">
|
|
|
|
@ -127,23 +151,27 @@ 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">
|
|
|
|
|
delete from mr_record_order where id in
|
|
|
|
|
delete from mr_record_order where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</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>
|