lis8.0/liswork/src/main/resources/mapper/LisWorkMapper.xml

96 lines
4.5 KiB
XML
Raw Normal View History

2025-06-23 18:04:39 +08:00
<?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">
2025-07-04 00:22:41 +08:00
<sql id="selectLabPatVo">
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg from lab_pat
</sql>
2025-06-25 17:41:44 +08:00
<select id="getInstrdList" parameterType="string" resultType="map">
2025-06-23 18:04:39 +08:00
SELECT com_usrpower.yhdh,com_usrpower.yq ,com_usrpower.xtdh ,com_usrpower.yhqx , lab_instr.yqmc ,lab_instr.instrid
FROM com_usrpower , lab_instr WHERE ( com_usrpower.yq = lab_instr.yq ) and ( ( com_usrpower.yhdh = #{userId} ) and ( com_usrpower.xtdh = 'LIS' ) )
and lab_instr.useflag = '0'
</select>
2025-07-04 00:22:41 +08:00
<select id="getGroupInstrdList" parameterType="string" resultType="map">
SELECT com_usrpower.yhdh,com_usrpower.yq ,com_usrpower.xtdh ,com_usrpower.yhqx , lab_instr.yqmc ,lab_instr.instrid
FROM com_usrpower , lab_instr WHERE ( com_usrpower.yq = lab_instr.yq ) and ( ( com_usrpower.yhdh = #{userId} ) and ( com_usrpower.xtdh = 'LIS' ) )
and lab_instr.lisgroup = #{lisgroup} and lab_instr.useflag = '0'
</select>
2025-06-25 17:41:44 +08:00
<select id="getInstrdConfig" resultType="com.czlis.common.core.domain.entity.ComOpt">
2025-06-23 18:04:39 +08:00
select * from com_opt where yq = #{yq}
</select>
2025-06-25 17:41:44 +08:00
<select id="getLabResult" resultType="com.czlis.common.core.domain.entity.LabResult">
2025-06-23 18:04:39 +08:00
select * from lab_Result 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>
</select>
2025-07-04 00:22:41 +08:00
<select id="getSampleList" resultType="com.czlis.common.core.domain.entity.LabPat">
<include refid="selectLabPatVo"></include>
<where>
<if test="yq != null and yq !=''">and yq = #{yq}</if>
<if test="jyrq != null">and jyrq = #{jyrq}</if>
</where>
</select>
<select id="getSampleListday" resultType="com.czlis.common.core.domain.entity.LabPat">
<include refid="selectLabPatVo"></include>
<where>
<if test="days != null and days != 0">and jyrq >=CONVERT(varchar(10),getdate() - ${days},120)</if>
<if test="yq != null and yq !=''">and yq = #{yq}</if>
</where>
</select>
<select id="getLabPat" resultType="com.czlis.common.core.domain.entity.LabPat">
2025-06-23 18:04:39 +08:00
select * from lab_pat
<where>
<if test="jyrq != null">and jyrq = #{jyrq}</if>
<if test="yq != null and yq !=''">and yq = #{yq}</if>
<if test="ybh != null and ybh != ''">and ybh = #{ybh}</if>
</where>
</select>
2025-07-04 00:22:41 +08:00
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.LabPat">
select * from lab_pat
<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>
2025-06-25 17:41:44 +08:00
<select id="getLabPatInfo" resultType="com.czlis.liswork.pojo.LabPatInfo">
2025-06-23 18:04:39 +08:00
select * from lab_patinfo where jyrq = #{jyrq} and yq = #{yq}
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
</select>
2025-06-25 17:41:44 +08:00
<select id="getLabResultMedInfo" resultType="com.czlis.common.core.domain.entity.LabResultMed">
2025-06-23 18:04:39 +08:00
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>
2025-06-25 17:41:44 +08:00
<select id="getSysUser" resultType="com.czlis.common.core.domain.entity.SysUser">
2025-06-24 18:01:25 +08:00
select * from sys_user where user_id = #{userId} and password = #{mm}
</select>
2025-06-23 18:04:39 +08:00
</mapper>