|
|
|
@ -4,8 +4,7 @@
|
|
|
|
<resultMap id="BaseResultMap" type="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
<resultMap id="BaseResultMap" type="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
<result column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
<result column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
|
|
|
|
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
|
|
|
|
<result column="assort_id" property="assortId" jdbcType="VARCHAR" />
|
|
|
|
<result column="scan_page" property="scanPage" jdbcType="VARCHAR" />
|
|
|
|
<result column="scan_page" property="scanPage" jdbcType="NVARCHAR" />
|
|
|
|
|
|
|
|
<result column="type_id" property="typeId" jdbcType="INTEGER" />
|
|
|
|
<result column="type_id" property="typeId" jdbcType="INTEGER" />
|
|
|
|
<result column="oper_type" property="operType" jdbcType="SMALLINT" />
|
|
|
|
<result column="oper_type" property="operType" jdbcType="SMALLINT" />
|
|
|
|
<result column="create_time" property="createTime" jdbcType="NVARCHAR" />
|
|
|
|
<result column="create_time" property="createTime" jdbcType="NVARCHAR" />
|
|
|
|
@ -15,7 +14,6 @@
|
|
|
|
<resultMap id="BaseResultMapVo" type="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo" >
|
|
|
|
<resultMap id="BaseResultMapVo" type="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo" >
|
|
|
|
<result column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
<result column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
|
|
|
|
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
|
|
|
|
<result column="assort_id" property="assortId" jdbcType="VARCHAR" />
|
|
|
|
|
|
|
|
<result column="scan_page" property="scanPage" jdbcType="NVARCHAR" />
|
|
|
|
<result column="scan_page" property="scanPage" jdbcType="NVARCHAR" />
|
|
|
|
<result column="type_id" property="typeId" jdbcType="INTEGER" />
|
|
|
|
<result column="type_id" property="typeId" jdbcType="INTEGER" />
|
|
|
|
<result column="oper_type" property="operType" jdbcType="SMALLINT" />
|
|
|
|
<result column="oper_type" property="operType" jdbcType="SMALLINT" />
|
|
|
|
@ -28,13 +26,26 @@
|
|
|
|
<result column="assort_name" property="assortName" jdbcType="NVARCHAR" />
|
|
|
|
<result column="assort_name" property="assortName" jdbcType="NVARCHAR" />
|
|
|
|
<result column="ip" property="ip" jdbcType="NVARCHAR" />
|
|
|
|
<result column="ip" property="ip" jdbcType="NVARCHAR" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
|
|
|
|
|
|
id, patient_id, scan_page, type_id, oper_type, create_time, creater, ip
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
|
|
|
from emr_print_download_info
|
|
|
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
|
|
|
|
|
delete from emr_print_download_info
|
|
|
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</delete>
|
|
|
|
<insert id="insert" parameterType="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
<insert id="insert" parameterType="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
insert into emr_print_download_info (id, patient_id, assort_id,
|
|
|
|
insert into emr_print_download_info (id, patient_id, scan_page,
|
|
|
|
scan_page, type_id, oper_type,
|
|
|
|
type_id, oper_type, create_time,
|
|
|
|
create_time, creater)
|
|
|
|
creater, ip)
|
|
|
|
values (#{id,jdbcType=INTEGER}, #{patientId,jdbcType=NVARCHAR}, #{assortId,jdbcType=VARCHAR},
|
|
|
|
values (#{id,jdbcType=INTEGER}, #{patientId,jdbcType=NVARCHAR}, #{scanPage,jdbcType=VARCHAR},
|
|
|
|
#{scanPage,jdbcType=NVARCHAR}, #{typeId,jdbcType=INTEGER}, #{operType,jdbcType=SMALLINT},
|
|
|
|
#{typeId,jdbcType=INTEGER}, #{operType,jdbcType=SMALLINT}, #{createTime,jdbcType=NVARCHAR},
|
|
|
|
#{createTime,jdbcType=NVARCHAR}, #{creater,jdbcType=NVARCHAR})
|
|
|
|
#{creater,jdbcType=NVARCHAR}, #{ip,jdbcType=NVARCHAR})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" parameterType="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
<insert id="insertSelective" parameterType="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
insert into emr_print_download_info
|
|
|
|
insert into emr_print_download_info
|
|
|
|
@ -45,9 +56,6 @@
|
|
|
|
<if test="patientId != null" >
|
|
|
|
<if test="patientId != null" >
|
|
|
|
patient_id,
|
|
|
|
patient_id,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="assortId != null" >
|
|
|
|
|
|
|
|
assort_id,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="scanPage != null" >
|
|
|
|
<if test="scanPage != null" >
|
|
|
|
scan_page,
|
|
|
|
scan_page,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
@ -63,6 +71,9 @@
|
|
|
|
<if test="creater != null" >
|
|
|
|
<if test="creater != null" >
|
|
|
|
creater,
|
|
|
|
creater,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="ip != null" >
|
|
|
|
|
|
|
|
ip,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
<if test="id != null" >
|
|
|
|
<if test="id != null" >
|
|
|
|
@ -71,11 +82,8 @@
|
|
|
|
<if test="patientId != null" >
|
|
|
|
<if test="patientId != null" >
|
|
|
|
#{patientId,jdbcType=NVARCHAR},
|
|
|
|
#{patientId,jdbcType=NVARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="assortId != null" >
|
|
|
|
|
|
|
|
#{assortId,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="scanPage != null" >
|
|
|
|
<if test="scanPage != null" >
|
|
|
|
#{scanPage,jdbcType=NVARCHAR},
|
|
|
|
#{scanPage,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="typeId != null" >
|
|
|
|
<if test="typeId != null" >
|
|
|
|
#{typeId,jdbcType=INTEGER},
|
|
|
|
#{typeId,jdbcType=INTEGER},
|
|
|
|
@ -89,19 +97,49 @@
|
|
|
|
<if test="creater != null" >
|
|
|
|
<if test="creater != null" >
|
|
|
|
#{creater,jdbcType=NVARCHAR},
|
|
|
|
#{creater,jdbcType=NVARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="ip != null" >
|
|
|
|
|
|
|
|
#{ip,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<!--批量添加下载记录-->
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
<insert id="SimpleInsert" parameterType="java.util.List">
|
|
|
|
update emr_print_download_info
|
|
|
|
insert into emr_print_download_info (patient_id, scan_page,assort_id,
|
|
|
|
<set >
|
|
|
|
type_id, oper_type, create_time,
|
|
|
|
<if test="patientId != null" >
|
|
|
|
creater,ip)
|
|
|
|
patient_id = #{patientId,jdbcType=NVARCHAR},
|
|
|
|
<foreach collection="list" item="items" separator="union">
|
|
|
|
</if>
|
|
|
|
select #{items.patientId,jdbcType=NVARCHAR}, #{items.scanPage,jdbcType=NVARCHAR},#{items.assortId,jdbcType=VARCHAR},
|
|
|
|
<if test="scanPage != null" >
|
|
|
|
#{items.typeId,jdbcType=INTEGER}, #{items.operType,jdbcType=SMALLINT}, #{items.createTime,jdbcType=NVARCHAR},
|
|
|
|
scan_page = #{scanPage,jdbcType=VARCHAR},
|
|
|
|
#{items.creater,jdbcType=NVARCHAR}, #{items.ip,jdbcType=NVARCHAR}
|
|
|
|
</if>
|
|
|
|
</foreach>
|
|
|
|
<if test="typeId != null" >
|
|
|
|
</insert>
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="operType != null" >
|
|
|
|
|
|
|
|
oper_type = #{operType,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="createTime != null" >
|
|
|
|
|
|
|
|
create_time = #{createTime,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="creater != null" >
|
|
|
|
|
|
|
|
creater = #{creater,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="ip != null" >
|
|
|
|
|
|
|
|
ip = #{ip,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</set>
|
|
|
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo" >
|
|
|
|
|
|
|
|
update emr_print_download_info
|
|
|
|
|
|
|
|
set patient_id = #{patientId,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
scan_page = #{scanPage,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
oper_type = #{operType,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
create_time = #{createTime,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
creater = #{creater,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
ip = #{ip,jdbcType=NVARCHAR}
|
|
|
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<!--查询列表-->
|
|
|
|
<!--查询列表-->
|
|
|
|
<select id="selectAll" resultMap="BaseResultMapVo" parameterType="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo">
|
|
|
|
<select id="selectAll" resultMap="BaseResultMapVo" parameterType="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo">
|
|
|
|
@ -110,16 +148,12 @@
|
|
|
|
emr_print_download_info.create_time,
|
|
|
|
emr_print_download_info.create_time,
|
|
|
|
emr_print_download_info.patient_id,
|
|
|
|
emr_print_download_info.patient_id,
|
|
|
|
emr_print_download_info.scan_page,
|
|
|
|
emr_print_download_info.scan_page,
|
|
|
|
(
|
|
|
|
|
|
|
|
commomtable.${flag} + '/' + emr_print_download_info.scan_page
|
|
|
|
|
|
|
|
) scanAddr,
|
|
|
|
|
|
|
|
emr_print_download_info.creater,
|
|
|
|
emr_print_download_info.creater,
|
|
|
|
emr_print_download_info.ip,
|
|
|
|
emr_print_download_info.ip,
|
|
|
|
commomtable.name,
|
|
|
|
commomtable.name,
|
|
|
|
commomtable.admiss_times,
|
|
|
|
commomtable.admiss_times,
|
|
|
|
commomtable.inpatient_no,
|
|
|
|
commomtable.inpatient_no,
|
|
|
|
emr_type.type_name,
|
|
|
|
emr_type.type_name
|
|
|
|
zd_assort.assort_name
|
|
|
|
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
emr_print_download_info
|
|
|
|
emr_print_download_info
|
|
|
|
INNER JOIN commomtable ON emr_print_download_info.patient_id = commomtable.patient_id
|
|
|
|
INNER JOIN commomtable ON emr_print_download_info.patient_id = commomtable.patient_id
|
|
|
|
@ -130,11 +164,13 @@
|
|
|
|
AND commomtable.inpatient_no LIKE '%${record.inpatientNo}%'
|
|
|
|
AND commomtable.inpatient_no LIKE '%${record.inpatientNo}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
LEFT JOIN emr_type ON emr_print_download_info.type_id = emr_type.id
|
|
|
|
LEFT JOIN emr_type ON emr_print_download_info.type_id = emr_type.id
|
|
|
|
INNER JOIN zd_assort ON emr_print_download_info.assort_id = zd_assort.assort_id
|
|
|
|
|
|
|
|
WHERE
|
|
|
|
WHERE
|
|
|
|
emr_print_download_info.oper_type = #{record.operType}
|
|
|
|
emr_print_download_info.oper_type = #{record.operType}
|
|
|
|
<if test="record.assortId != null and record.assortId != ''">
|
|
|
|
<if test="record.assortId != null and record.assortId != ''">
|
|
|
|
AND emr_print_download_info.assort_id = #{record.assortId}
|
|
|
|
AND emr_print_download_info.scan_page like '%${record.assortId}%'
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="record.typeName != null and record.typeName != ''">
|
|
|
|
|
|
|
|
AND emr_type.type_name like '%${record.typeName}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="record.creater != null and record.creater != ''">
|
|
|
|
<if test="record.creater != null and record.creater != ''">
|
|
|
|
AND emr_print_download_info.creater LIKE '%${record.creater}%'
|
|
|
|
AND emr_print_download_info.creater LIKE '%${record.creater}%'
|
|
|
|
@ -154,20 +190,16 @@
|
|
|
|
emr_print_download_info.create_time,
|
|
|
|
emr_print_download_info.create_time,
|
|
|
|
emr_print_download_info.patient_id,
|
|
|
|
emr_print_download_info.patient_id,
|
|
|
|
emr_print_download_info.scan_page,
|
|
|
|
emr_print_download_info.scan_page,
|
|
|
|
(
|
|
|
|
|
|
|
|
commomtable.${flag} + '/' + emr_print_download_info.scan_page
|
|
|
|
|
|
|
|
) scanAddr,
|
|
|
|
|
|
|
|
emr_print_download_info.creater,
|
|
|
|
emr_print_download_info.creater,
|
|
|
|
|
|
|
|
emr_print_download_info.ip,
|
|
|
|
commomtable.name,
|
|
|
|
commomtable.name,
|
|
|
|
commomtable.inpatient_no,
|
|
|
|
commomtable.inpatient_no,
|
|
|
|
commomtable.admiss_times,
|
|
|
|
commomtable.admiss_times,
|
|
|
|
emr_type.type_name,
|
|
|
|
emr_type.type_name
|
|
|
|
zd_assort.assort_name
|
|
|
|
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
emr_print_download_info
|
|
|
|
emr_print_download_info
|
|
|
|
INNER JOIN commomtable ON emr_print_download_info.patient_id = commomtable.patient_id
|
|
|
|
INNER JOIN commomtable ON emr_print_download_info.patient_id = commomtable.patient_id
|
|
|
|
LEFT JOIN emr_type ON emr_print_download_info.type_id = emr_type.id
|
|
|
|
LEFT JOIN emr_type ON emr_print_download_info.type_id = emr_type.id
|
|
|
|
INNER JOIN zd_assort ON emr_print_download_info.assort_id = zd_assort.assort_id
|
|
|
|
|
|
|
|
where emr_print_download_info.id in (${ids})
|
|
|
|
where emr_print_download_info.id in (${ids})
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
@ -211,4 +243,18 @@
|
|
|
|
emr_print_download_info.oper_type = 2
|
|
|
|
emr_print_download_info.oper_type = 2
|
|
|
|
GROUP BY emr_print_download_info.create_time,emr_print_download_info.creater
|
|
|
|
GROUP BY emr_print_download_info.create_time,emr_print_download_info.creater
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--批量插入-->
|
|
|
|
|
|
|
|
<insert id="SimpleInsert" parameterType="java.util.List">
|
|
|
|
|
|
|
|
insert into emr_print_download_info
|
|
|
|
|
|
|
|
(patient_id, scan_page,
|
|
|
|
|
|
|
|
type_id, oper_type, create_time,
|
|
|
|
|
|
|
|
creater, ip)
|
|
|
|
|
|
|
|
values
|
|
|
|
|
|
|
|
<foreach collection="list" item="record" separator=",">
|
|
|
|
|
|
|
|
(#{record.patientId,jdbcType=NVARCHAR}, #{record.scanPage,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{record.typeId,jdbcType=INTEGER}, #{record.operType,jdbcType=SMALLINT}, #{record.createTime,jdbcType=NVARCHAR},
|
|
|
|
|
|
|
|
#{record.creater,jdbcType=NVARCHAR}, #{record.ip,jdbcType=NVARCHAR})
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|