123 lines
5.5 KiB
XML
123 lines
5.5 KiB
XML
<?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.czlis.liswork.mapper.LisWorkMapper">
|
|
<resultMap type="SysUser" id="SysUserResult">
|
|
<id property="userId" column="user_id" />
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="userName" column="user_name" />
|
|
<result property="nickName" column="nick_name" />
|
|
<result property="email" column="email" />
|
|
<result property="phonenumber" column="phonenumber" />
|
|
<result property="sex" column="sex" />
|
|
<result property="avatar" column="avatar" />
|
|
<result property="password" column="password" />
|
|
<result property="status" column="status" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="loginIp" column="login_ip" />
|
|
<result property="loginDate" column="login_date" />
|
|
<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="remark" column="remark" />
|
|
<result property="vshisuser" column="vshisuser" />
|
|
<result property="vshisuser1" column="vshisuser1" />
|
|
<result property="vshisuser2" column="vshisuser2" />
|
|
<result property="yljg" column="yljg" />
|
|
<result property="sn" column="sn" />
|
|
<result property="snid" column="snid" />
|
|
<result property="signCert" column="signCert" />
|
|
</resultMap>
|
|
|
|
<sql id="selectLabPatVo">
|
|
select instrid,jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg,alarmflag,finish,fslx,autojgbz,lstd,shcs,yblx,sqh,yhdh,ch,zjf from lab_pat
|
|
</sql>
|
|
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
|
<include refid="selectLabPatVo"></include>
|
|
<where>
|
|
<if test="jyrq != null and jyrq != ''">
|
|
and jyrq = #{jyrq}
|
|
</if>
|
|
<if test="yq != null and yq != ''">
|
|
and yq = #{yq}
|
|
</if>
|
|
<if test="ybh != null and ybh != ''">
|
|
and ybh = #{ybh}
|
|
</if>
|
|
<if test="brxm != null and brxm != ''">
|
|
and brxm like '%'+#{brxm}+'%'
|
|
</if>
|
|
<if test="sqh != null and sqh != ''">
|
|
and sqh = #{sqh}
|
|
</if>
|
|
<if test="jgbz != null and jgbz != ''">
|
|
and jgbz = #{jgbz}
|
|
</if>
|
|
<if test="jzbz != null and jzbz != ''">
|
|
and jzbz = #{jzbz}
|
|
</if>
|
|
<if test="yljg != null and yljg != ''">
|
|
and yljg = #{yljg}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<select id="getLabResultMedInfo" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
|
|
select * from lab_resultmed where jyrq = #{jyrq} and yq = #{yq}
|
|
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
|
<if test="xmdh != null and xmdh !=''">and xmdh = #{xmdh}</if>
|
|
<if test="xh != null">and xh = #{xh}</if>
|
|
<if test="ywdh != null and ywdh != ''">and ywdh = #{ywdh}</if>
|
|
</select>
|
|
|
|
<select id="getSysUser" parameterType="String" resultMap="SysUserResult">
|
|
select * from sys_user
|
|
where user_name = #{userName} and del_flag = '0'
|
|
</select>
|
|
<select id="getLabPatBk" resultType="com.czlis.common.core.domain.entity.lis.LabPatBk">
|
|
select * from lab_pat_bk
|
|
where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
|
</select>
|
|
<select id="getLabResultBk" resultType="com.czlis.common.core.domain.entity.lis.LabResultBk">
|
|
select * from lab_result_bk
|
|
where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
|
</select>
|
|
<select id="getnoitemresult" resultType="map">
|
|
SELECT xmdh,csjg FROM lab_result WHERE jyrq = #{jyrq} AND yq = #{yq} AND ybh =#{ybh}
|
|
AND upper(xmdh) not in (select tdh from xm_inter where yq = #{yq} )
|
|
</select>
|
|
<select id="getXmInter" resultType="com.czlis.common.core.domain.entity.lis.XmInter">
|
|
select * from xm_inter
|
|
<where>
|
|
<if test="yq != null and yq != ''">
|
|
and yq = #{yq}
|
|
</if>
|
|
<if test="tdh != null and tdh != ''">
|
|
and tdh = #{tdh}
|
|
</if>
|
|
<if test="xmdh != null and xmdh != ''">
|
|
and xmdh = #{xmdh}
|
|
</if>
|
|
<if test="xmid != null ">
|
|
and xmid = #{xmid}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<insert id="inserXmInter" parameterType="com.czlis.common.core.domain.entity.lis.XmInter">
|
|
insert into xm_inter (yq, tdh, xmdh, xmid)
|
|
values (#{yq}, #{tdh}, #{xmdh},#{xmid})
|
|
</insert>
|
|
<update id="updateXmInter" parameterType="com.czlis.common.core.domain.entity.lis.XmInter">
|
|
update xm_inter
|
|
<set>
|
|
<if test="xmdh != null and xmdh != ''">
|
|
xmdh = #{xmdh},
|
|
</if>
|
|
<if test="xmid != null ">
|
|
xmid = #{xmid},
|
|
</if>
|
|
</set>
|
|
where yq=#{yq} and tdh=#{tdh}
|
|
</update>
|
|
</mapper>
|