修改bug
commit
ddc972d0d3
@ -1,228 +1,200 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?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" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.emr.dao.emrPrintAndDownLoad.EmrPrintDownloadInfoMapper">
|
<mapper namespace="com.emr.dao.emrPrintAndDownLoad.EmrPrintDownloadInfoMapper" >
|
||||||
<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="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" />
|
||||||
<result column="create_time" property="createTime" jdbcType="NVARCHAR"/>
|
<result column="create_time" property="createTime" jdbcType="NVARCHAR" />
|
||||||
<result column="creater" property="creater" jdbcType="NVARCHAR"/>
|
<result column="creater" property="creater" jdbcType="NVARCHAR" />
|
||||||
<result column="ip" property="ip" jdbcType="NVARCHAR"/>
|
<result column="ip" property="ip" jdbcType="NVARCHAR" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<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="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" />
|
||||||
<result column="create_time" property="createTime" jdbcType="NVARCHAR"/>
|
<result column="create_time" property="createTime" jdbcType="NVARCHAR" />
|
||||||
<result column="creater" property="creater" jdbcType="NVARCHAR"/>
|
<result column="creater" property="creater" jdbcType="NVARCHAR" />
|
||||||
<result column="inpatient_no" property="inpatientNo" jdbcType="NVARCHAR"/>
|
<result column="inpatient_no" property="inpatientNo" jdbcType="NVARCHAR" />
|
||||||
<result column="admiss_times" property="admissTimes" jdbcType="SMALLINT"/>
|
<result column="admiss_times" property="admissTimes" jdbcType="SMALLINT" />
|
||||||
<result column="type_name" property="typeName" jdbcType="NVARCHAR"/>
|
<result column="type_name" property="typeName" jdbcType="NVARCHAR" />
|
||||||
<result column="assort_id" property="assortId" jdbcType="NVARCHAR"/>
|
<result column="assort_id" property="assortId" jdbcType="NVARCHAR" />
|
||||||
<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>
|
||||||
<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, assort_id,
|
||||||
scan_page, type_id, oper_type,
|
scan_page, type_id, oper_type,
|
||||||
create_time, creater)
|
create_time, creater)
|
||||||
values (#{id,jdbcType=INTEGER}, #{patientId,jdbcType=NVARCHAR}, #{assortId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=INTEGER}, #{patientId,jdbcType=NVARCHAR}, #{assortId,jdbcType=VARCHAR},
|
||||||
#{scanPage,jdbcType=NVARCHAR}, #{typeId,jdbcType=INTEGER}, #{operType,jdbcType=SMALLINT},
|
#{scanPage,jdbcType=NVARCHAR}, #{typeId,jdbcType=INTEGER}, #{operType,jdbcType=SMALLINT},
|
||||||
#{createTime,jdbcType=NVARCHAR}, #{creater,jdbcType=NVARCHAR})
|
#{createTime,jdbcType=NVARCHAR}, #{creater,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
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||||
<if test="id != null">
|
<if test="id != null" >
|
||||||
id,
|
id,
|
||||||
</if>
|
</if>
|
||||||
<if test="patientId != null">
|
<if test="patientId != null" >
|
||||||
patient_id,
|
patient_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="assortId != null">
|
<if test="assortId != null" >
|
||||||
assort_id,
|
assort_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="scanPage != null">
|
<if test="scanPage != null" >
|
||||||
scan_page,
|
scan_page,
|
||||||
</if>
|
</if>
|
||||||
<if test="typeId != null">
|
<if test="typeId != null" >
|
||||||
type_id,
|
type_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="operType != null">
|
<if test="operType != null" >
|
||||||
oper_type,
|
oper_type,
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null" >
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
</if>
|
||||||
<if test="creater != null">
|
<if test="creater != null" >
|
||||||
creater,
|
creater,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||||
<if test="id != null">
|
<if test="id != null" >
|
||||||
#{id,jdbcType=INTEGER},
|
#{id,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="patientId != null">
|
<if test="patientId != null" >
|
||||||
#{patientId,jdbcType=NVARCHAR},
|
#{patientId,jdbcType=NVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="assortId != null">
|
<if test="assortId != null" >
|
||||||
#{assortId,jdbcType=VARCHAR},
|
#{assortId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="scanPage != null">
|
<if test="scanPage != null" >
|
||||||
#{scanPage,jdbcType=NVARCHAR},
|
#{scanPage,jdbcType=NVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="typeId != null">
|
<if test="typeId != null" >
|
||||||
#{typeId,jdbcType=INTEGER},
|
#{typeId,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="operType != null">
|
<if test="operType != null" >
|
||||||
#{operType,jdbcType=SMALLINT},
|
#{operType,jdbcType=SMALLINT},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null" >
|
||||||
#{createTime,jdbcType=NVARCHAR},
|
#{createTime,jdbcType=NVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="creater != null">
|
<if test="creater != null" >
|
||||||
#{creater,jdbcType=NVARCHAR},
|
#{creater,jdbcType=NVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<!--批量添加下载记录-->
|
<!--批量添加下载记录-->
|
||||||
<insert id="SimpleInsert" parameterType="java.util.List">
|
<insert id="SimpleInsert" parameterType="java.util.List">
|
||||||
insert into emr_print_download_info (patient_id, scan_page,assort_id,
|
insert into emr_print_download_info (patient_id, scan_page,assort_id,
|
||||||
type_id, oper_type, create_time,
|
type_id, oper_type, create_time,
|
||||||
creater)
|
creater,ip)
|
||||||
<foreach collection="list" item="items" separator="union">
|
<foreach collection="list" item="items" separator="union">
|
||||||
select #{items.patientId,jdbcType=NVARCHAR},
|
select #{items.patientId,jdbcType=NVARCHAR}, #{items.scanPage,jdbcType=NVARCHAR},#{items.assortId,jdbcType=VARCHAR},
|
||||||
#{items.scanPage,jdbcType=NVARCHAR},#{items.assortId,jdbcType=VARCHAR},
|
#{items.typeId,jdbcType=INTEGER}, #{items.operType,jdbcType=SMALLINT}, #{items.createTime,jdbcType=NVARCHAR},
|
||||||
#{items.typeId,jdbcType=INTEGER}, #{items.operType,jdbcType=SMALLINT},
|
#{items.creater,jdbcType=NVARCHAR}, #{items.ip,jdbcType=NVARCHAR}
|
||||||
#{items.createTime,jdbcType=NVARCHAR},
|
</foreach>
|
||||||
#{items.creater,jdbcType=NVARCHAR}
|
</insert>
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!--查询列表-->
|
<!--查询列表-->
|
||||||
<select id="selectAll" resultMap="BaseResultMapVo"
|
<select id="selectAll" resultMap="BaseResultMapVo" parameterType="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo">
|
||||||
parameterType="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo">
|
SELECT
|
||||||
SELECT
|
emr_print_download_info.id,
|
||||||
emr_print_download_info.id,
|
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
|
||||||
commomtable.${flag} + '/' + emr_print_download_info.scan_page
|
) scanAddr,
|
||||||
) scanAddr,
|
emr_print_download_info.creater,
|
||||||
emr_print_download_info.creater,
|
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
|
||||||
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
|
<if test="record.name != null and record.name != ''">
|
||||||
<if test="record.name != null and record.name != ''">
|
AND commomtable.name LIKE '%${record.name}%'
|
||||||
AND commomtable.name LIKE '%${record.name}%'
|
</if>
|
||||||
</if>
|
<if test="record.inpatientNo != null and record.inpatientNo != ''">
|
||||||
<if test="record.inpatientNo != null and record.inpatientNo != ''">
|
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
|
||||||
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.assort_id = #{record.assortId}
|
</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}%'
|
</if>
|
||||||
</if>
|
<if test="record.startTime != '' and record.startTime != null">
|
||||||
<if test="record.startTime != '' and record.startTime != null">
|
AND emr_print_download_info.create_time >= '${record.startTime} 00:00:00'
|
||||||
AND emr_print_download_info.create_time >= '${record.startTime} 00:00:00'
|
<if test="record.endTime != '' and record.endTime != null">
|
||||||
<if test="record.endTime != '' and record.endTime != null">
|
AND emr_print_download_info.create_time <= '${record.endTime} 23:59:59'
|
||||||
AND emr_print_download_info.create_time <= '${record.endTime} 23:59:59'
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</if>
|
order by emr_print_download_info.create_time desc
|
||||||
order by emr_print_download_info.create_time desc
|
</select>
|
||||||
</select>
|
<!--按id集合查-->
|
||||||
<!--按id集合查-->
|
<select id="selectAllByIds" resultMap="BaseResultMapVo">
|
||||||
<select id="selectAllByIds" resultMap="BaseResultMapVo">
|
SELECT
|
||||||
SELECT
|
emr_print_download_info.id,
|
||||||
emr_print_download_info.id,
|
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
|
||||||
commomtable.${flag} + '/' + emr_print_download_info.scan_page
|
) scanAddr,
|
||||||
) scanAddr,
|
emr_print_download_info.creater,
|
||||||
emr_print_download_info.creater,
|
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
|
||||||
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
|
||||||
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>
|
|
||||||
|
|
||||||
<!--查询最近打印次数-->
|
<!--查询最近打印次数-->
|
||||||
<select id="getPrintCount" resultMap="BaseResultMapVo">
|
<select id="getPrintCount" resultMap="BaseResultMapVo">
|
||||||
SELECT
|
SELECT
|
||||||
top(
|
top (
|
||||||
SELECT
|
SELECT
|
||||||
times
|
times
|
||||||
FROM
|
FROM
|
||||||
emr_comom_set
|
emr_comom_set
|
||||||
WHERE
|
WHERE
|
||||||
id = 1
|
id = 1
|
||||||
)
|
) COUNT(scan_page) printCount,
|
||||||
COUNT(
|
ISNULL(emr_type.type_name,'无') typeName,
|
||||||
scan_page)
|
CONVERT(varchar(100),emr_print_download_info.create_time,23) create_time,
|
||||||
printCount,
|
emr_print_download_info.creater
|
||||||
ISNULL(
|
FROM
|
||||||
emr_type
|
emr_print_download_info
|
||||||
.
|
LEFT JOIN emr_type ON emr_print_download_info.type_id = emr_type.id
|
||||||
type_name,
|
WHERE
|
||||||
'无')
|
oper_type = 1
|
||||||
typeName,
|
AND patient_id = #{patientId}
|
||||||
CONVERT(
|
GROUP BY
|
||||||
varchar(
|
emr_print_download_info.creater,
|
||||||
100),
|
emr_print_download_info.create_time,
|
||||||
emr_print_download_info
|
emr_type.type_name
|
||||||
.
|
ORDER BY
|
||||||
create_time,
|
emr_print_download_info.create_time DESC
|
||||||
23)
|
</select>
|
||||||
create_time,
|
|
||||||
emr_print_download_info
|
|
||||||
.
|
|
||||||
creater
|
|
||||||
FROM
|
|
||||||
emr_print_download_info
|
|
||||||
LEFT
|
|
||||||
JOIN
|
|
||||||
emr_type
|
|
||||||
ON emr_print_download_info
|
|
||||||
.
|
|
||||||
type_id =
|
|
||||||
emr_type
|
|
||||||
.
|
|
||||||
id
|
|
||||||
WHERE
|
|
||||||
oper_type = 1
|
|
||||||
AND patient_id = #{patientId}
|
|
||||||
GROUP BY
|
|
||||||
emr_print_download_info.creater,
|
|
||||||
emr_print_download_info.create_time,
|
|
||||||
emr_type.type_name
|
|
||||||
ORDER BY
|
|
||||||
emr_print_download_info.create_time DESC
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue