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

26 lines
1.0 KiB
XML
Raw Normal View History

2025-12-26 17:30:48 +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.xtwh.ComUsrpowerMapper">
<select id="query" resultType="com.czlis.liswork.pojo.DTO.ComUsrpowerDTO">
select b.*,a.yq as instr_yq,a.yqmc,(case when isnull(b.yhdh,'') = '' then '0' else '1' end) as syqx,a.useflag from lab_instr a left join com_usrpower b on (a.yq = b.yq and b.yhdh = #{yhdh} and b.xtdh = 'LIS')
<where>
<if test="yq != null and yq = ''"> and yq = #{yq}</if>
</where>
</select>
<insert id ="insert">
insert into com_usrpower (yhdh, yq, xtdh, yhqx)
values ( #{yhdh},#{yq},#{xtdh},#{yhqx})
</insert>
<update id="update">
update com_usrpower set yhqx = #{yhqx} where yhdh = #{yhdh} and yq = #{yq} and xtdh = #{xtdh}
</update>
<delete id="delete">
delete from com_usrpower where yhdh = #{yhdh} and yq = #{yq} and xtdh = #{xtdh}
</delete>
</mapper>