63 lines
2.1 KiB
XML
63 lines
2.1 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.dict.XmFeeInstrMapper">
|
|
|
|
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmFeeInstr">
|
|
select a.*,(a.sfxmdh+' '+b.sfxmmc) as sfxmmc from xm_feeinstr a,xm_fee b where a.sfxmdh = b.sfxmdh
|
|
<if test="yq != null and yq != ''"> and a.yq = #{yq}</if>
|
|
<if test="sfxmdh != null and sfxmdh != ''">and a.sfxmdh = #{sfxmdh}</if>
|
|
</select>
|
|
|
|
<insert id="add">
|
|
insert into xm_feeinstr(
|
|
<if test="mrz != null and mrz != ''">mrz,</if>
|
|
<if test="xh != null ">xh,</if>
|
|
yq,sfxmdh
|
|
)values (
|
|
<if test="mrz != null and mrz != ''">#{mrz},</if>
|
|
<if test="xh != null ">#{xh},</if>
|
|
#{yq},#{sfxmdh}
|
|
)
|
|
</insert>
|
|
|
|
<update id="update">
|
|
update xm_feeinstr
|
|
<set>
|
|
<if test="mrz != null and mrz != ''">mrz = #{mrz},</if>
|
|
<if test="xh != null ">xh = #{xh},</if>
|
|
yq = #{yq},sfxmdh = #{sfxmdh}
|
|
</set>
|
|
where yq = #{yq} and sfxmdh = #{sfxmdh}
|
|
</update>
|
|
|
|
<delete id="delete">
|
|
delete from xm_feeinstr where yq = #{yq} and sfxmdh = #{sfxmdh}
|
|
</delete>
|
|
|
|
<select id="queryXm" resultType="map">
|
|
SELECT xm_fee.sfxmdh,
|
|
xm_fee.sfxmmc,
|
|
xm_fee.xmlb,
|
|
xm_fee.dj,
|
|
xm_fee.zjf,
|
|
'0' as cp_flag,'' as cp_yq
|
|
FROM xm_fee
|
|
WHERE xm_fee.yljg=#{yljg} and not exists
|
|
( select * from xm_feeinstr
|
|
where xm_feeinstr.yq = #{yq}
|
|
and xm_feeinstr.sfxmdh = xm_fee.sfxmdh)
|
|
<if test="queryValue != null and queryValue != ''">and (sfxmmc like '%'+#{queryValue}+'%' or zjf like '%'+#{queryValue}+'%') </if>
|
|
</select>
|
|
|
|
<select id="queryYQData" resultType="map">
|
|
<![CDATA[select a.sfxmdh,b.yqmc from xm_feeinstr a,lab_instr b where a.yq<>'_KNXM_' and a.yq<>'_yljg_'
|
|
and a.yq = b.yq and b.useflag = '1'
|
|
]]>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|