lis8.0/liswork/src/main/resources/mapper/ComLocalconfigMapper.xml
2026-07-10 18:05:35 +08:00

92 lines
3.9 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.xtwh.LocalconfigMapper">
<select id="selectComLocalconfigList" parameterType="com.czlis.common.core.domain.entity.lis.ComLocalconfig" >
select * from com_localconfig
<where>
<if test="sid != null and sid != 0">
and sid = #{sid}
</if>
<if test="smac != null and smac != ''">
and smac = #{smac}
</if>
<if test="sip != null and sip != ''">
and sip = #{sip}
</if>
<if test="sname != null and sname != ''">
and sname = #{sname}
</if>
</where>
order by sid ASC
</select>
<select id="selectComLocalconfigById" resultType="com.czlis.common.core.domain.entity.lis.ComLocalconfig">
select * from com_localconfig where sid = #{sid}
</select>
<select id="getCountBymic" resultType="Long">
select count(1) from com_localconfig where smac = #{smac}
</select>
<select id="getsid" resultType="Long">
select MAX(sid) from com_localconfig where smac = #{smac}
</select>
<select id="selectComLocalconfigAll" resultType="ComLocalconfig">
select * from com_localconfig
order by sid
</select>
<select id="selectinstrgroupmain" resultType="map">
select fzdh,fzmc from lab_instrgroupmain
</select>
<select id="selectxmfee" resultType="map">
select sfxmdh,sfxmmc from xm_fee
</select>
<select id="selectzt" resultType="map">
select dict_value,dict_label from sys_dict_data where dict_type='lis_req_type'
</select>
<insert id="insertComLocalconfig" parameterType="com.czlis.common.core.domain.entity.lis.ComLocalconfig" useGeneratedKeys="true" keyProperty="sid">
insert into com_localconfig(
<if test="sid != null and sid != 0">sid,</if>
<if test="smac != null and smac != ''">smac,</if>
<if test="sip != null and sip != ''">sip,</if>
<if test="sname != null and sname != ''">sname,</if>
<if test="configvalue != null and configvalue != ''">configvalue,</if>
<if test="create_by != null and create_by != ''">create_by,</if>
create_time
)values(
<if test="sid != null and sid != 0">#{sid},</if>
<if test="smac != null and smac != ''">#{smac},</if>
<if test="sip != null and sip != ''">#{sip},</if>
<if test="sname != null and sname != ''">#{sname},</if>
<if test="configvalue != null and configvalue != ''">#{configvalue},</if>
<if test="create_by != null and create_by != ''">#{create_by},</if>
getdate()
)
</insert>
<delete id="delComLocalconfigById" parameterType="Long">
delete from com_localconfig where sid = #{sid}
</delete>
<delete id="delComLocalconfigBymac" parameterType="String">
delete from com_localconfig where smac = #{smac}
</delete>
<delete id="delComLocalconfigByIds" parameterType="Long">
delete from com_localconfig where sid in
<foreach collection="array" item="sid" open="(" separator="," close=")">
#{sid}
</foreach>
</delete>
<update id="updateComLocalconfig" parameterType="com.czlis.common.core.domain.entity.lis.ComLocalconfig">
update com_localconfig
<set>
<if test="smac != null and smac != ''">smac = #{smac},</if>
<if test="sip != null and sip != ''">sip = #{sip},</if>
<if test="sname != null and sname != ''">sname = #{sname},</if>
<if test="configvalue != null and configvalue != ''">configvalue = #{configvalue},</if>
<if test="update_by != null and update_by != ''">update_by = #{update_by},</if>
update_time = getdate()
</set>
where sid = #{sid}
</update>
</mapper>