468 lines
16 KiB
XML
468 lines
16 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.adc.da.slrs.wgdCensusZ.dao.WgdAssocInfoDao">
|
|
|
|
<sql id="pages">
|
|
<if test=" null != pageSize ">
|
|
LIMIT ${(page-1) * pageSize},${pageSize}
|
|
</if>
|
|
</sql>
|
|
<sql id="BaseInfo">
|
|
id,sc_name,ssc_name,wg_name,role,attend,standard,charge,leader,ini_time,
|
|
cur_time,cost_standard,cost_outlay,last_pay_time,pay_period,handler,
|
|
department,as_proper,as_status,as_contact,tel,mail,
|
|
p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32
|
|
</sql>
|
|
<sql id="Conditions">
|
|
WHERE 1=1
|
|
<if test="id != null and id != ''">
|
|
and id = #{id}
|
|
</if>
|
|
<if test="scName != null and scName != ''">
|
|
and (
|
|
sc_name like concat('%',#{scName} ,'%') or
|
|
ssc_name like concat('%',#{scName} ,'%') or
|
|
wg_name like concat('%',#{scName} ,'%')
|
|
)
|
|
</if>
|
|
<if test="role != null and role != ''">
|
|
and role = #{role}
|
|
</if>
|
|
<if test="attend != null and attend != ''">
|
|
and attend = #{attend}
|
|
</if>
|
|
<if test="standard != null and standard != ''">
|
|
and standard = #{standard}
|
|
</if>
|
|
<if test="charge != null and charge != ''">
|
|
and charge = #{charge}
|
|
</if>
|
|
<if test="leader != null and leader != ''">
|
|
and leader = #{leader}
|
|
</if>
|
|
<if test="iniTime != null">
|
|
and DATE_FORMAT(ini_time,'%Y%m%d') = DATE_FORMAT(iniTime,'%Y%m%d')
|
|
</if>
|
|
<if test="curTime != null">
|
|
and DATE_FORMAT(cur_time,'%Y%m%d') = DATE_FORMAT(curTime,'%Y%m%d')
|
|
</if>
|
|
<if test="costStandard != null and costStandard != ''">
|
|
and cost_standard = #{costStandard}
|
|
</if>
|
|
<if test="costOutlay != null and costOutlay != ''">
|
|
and cost_outlay = #{costOutlay}
|
|
</if>
|
|
<if test="lastPayTime != null">
|
|
and DATE_FORMAT(last_pay_time,'%Y%m%d') = DATE_FORMAT(lastPayTime,'%Y%m%d')
|
|
</if>
|
|
<if test="payPeriod != null and payPeriod != ''">
|
|
and pay_period = #{payPeriod}
|
|
</if>
|
|
<if test="handler != null and handler != ''">
|
|
and handler = #{handler}
|
|
</if>
|
|
<if test="department != null and department != ''">
|
|
and department = #{department}
|
|
</if>
|
|
<if test="asProper != null and asProper != ''">
|
|
and as_proper = #{asProper}
|
|
</if>
|
|
<if test="asStatus != null and asStatus != ''">
|
|
and as_status = #{asStatus}
|
|
</if>
|
|
<if test="asContact != null and asContact != ''">
|
|
and as_contact = #{asContact}
|
|
</if>
|
|
<if test="tel != null and tel != ''">
|
|
and tel = #{tel}
|
|
</if>
|
|
<if test="mail != null and mail != ''">
|
|
and mail = #{mail}
|
|
</if>
|
|
|
|
</sql>
|
|
<select id="getQueryTotal" parameterType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo" resultType="java.lang.Integer">
|
|
select count(*) from wgd_assoc_info
|
|
<include refid="Conditions"></include>
|
|
</select>
|
|
<select id="selectAll" resultType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo">
|
|
select <include refid="BaseInfo"></include> from wgd_assoc_info
|
|
</select>
|
|
<!-- 查询-->
|
|
<select id="queryAll" parameterType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo" resultType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo">
|
|
select <include refid="BaseInfo"></include> from wgd_assoc_info
|
|
<include refid="Conditions"></include>
|
|
<include refid="pages"></include>
|
|
</select>
|
|
<select id="selectOne" parameterType="java.lang.String" resultType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo">
|
|
select <include refid="BaseInfo"></include> from wgd_assoc_info
|
|
where id = #{id}
|
|
</select>
|
|
<!-- 更新-->
|
|
<update id="updateOne" parameterType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo">
|
|
update wgd_assoc_info
|
|
<set>
|
|
<if test="scName != null and scName != ''">
|
|
sc_name = #{scName},
|
|
</if>
|
|
<if test="sscName != null and sscName != ''">
|
|
ssc_name = #{sscName},
|
|
</if>
|
|
<if test="wgName != null and wgName != ''">
|
|
wg_name = #{wgName},
|
|
</if>
|
|
<if test="role != null and role != ''">
|
|
role = #{role},
|
|
</if>
|
|
<if test="attend != null and attend != ''">
|
|
attend = #{attend},
|
|
</if>
|
|
<if test="standard != null and standard != ''">
|
|
standard = #{standard},
|
|
</if>
|
|
<if test="charge != null and charge != ''">
|
|
charge = #{charge},
|
|
</if>
|
|
<if test="leader != null and leader != ''">
|
|
leader = #{leader},
|
|
</if>
|
|
<if test="iniTime != null">
|
|
ini_time = #{iniTime},
|
|
</if>
|
|
<if test="curTime != null">
|
|
cur_time = #{curTime},
|
|
</if>
|
|
<if test="costStandard != null and costStandard != ''">
|
|
cost_standard = #{costStandard},
|
|
</if>
|
|
<if test="costOutlay != null and costOutlay != ''">
|
|
cost_outlay = #{costOutlay},
|
|
</if>
|
|
<if test="lastPayTime != null">
|
|
last_pay_time = #{lastPayTime},
|
|
</if>
|
|
<if test="payPeriod != null and payPeriod != ''">
|
|
pay_period = #{payPeriod},
|
|
</if>
|
|
<if test="handler != null and handler != ''">
|
|
handler = #{handler},
|
|
</if>
|
|
<if test="department != null and department != ''">
|
|
department = #{department},
|
|
</if>
|
|
<if test="asProper != null and asProper != ''">
|
|
as_proper = #{asProper},
|
|
</if>
|
|
<if test="asStatus != null and asStatus != ''">
|
|
as_status = #{asStatus},
|
|
</if>
|
|
<if test="asContact != null and asContact != ''">
|
|
as_contact = #{asContact},
|
|
</if>
|
|
<if test="tel != null and tel != ''">
|
|
tel = #{tel},
|
|
</if>
|
|
<if test="mail != null and mail != ''">
|
|
mail = #{mail},
|
|
</if>
|
|
<if test="p17 != null and p17 != ''">
|
|
p17 = #{p17},
|
|
</if>
|
|
<if test="p18 != null and p18 != ''">
|
|
p18 = #{p18},
|
|
</if>
|
|
<if test="p19 != null and p19 != ''">
|
|
p19 = #{p19},
|
|
</if>
|
|
<if test="p20 != null and p20 != ''">
|
|
p20 = #{p20},
|
|
</if>
|
|
<if test="p21 != null and p21 != ''">
|
|
p21 = #{p21},
|
|
</if>
|
|
<if test="p22 != null and p22 != ''">
|
|
p22 = #{p22},
|
|
</if>
|
|
<if test="p23 != null and p23 != ''">
|
|
p23 = #{p23},
|
|
</if>
|
|
<if test="p24 != null and p24 != ''">
|
|
p24 = #{p24},
|
|
</if>
|
|
<if test="p25 != null and p25 != ''">
|
|
p25 = #{p25},
|
|
</if>
|
|
<if test="p26 != null and p26 != ''">
|
|
p26 = #{p26},
|
|
</if>
|
|
<if test="p27 != null and p27 != ''">
|
|
p27 = #{p27},
|
|
</if>
|
|
<if test="p28 != null and p28 != ''">
|
|
p28 = #{p28},
|
|
</if>
|
|
<if test="p29 != null and p29 != ''">
|
|
p29 = #{p29},
|
|
</if>
|
|
<if test="p30 != null and p30 != ''">
|
|
p30 = #{p30},
|
|
</if>
|
|
<if test="p31 != null and p31 != ''">
|
|
p31 = #{p31},
|
|
</if>
|
|
<if test="p32 != null and p32 != ''">
|
|
p32 = #{p32},
|
|
</if>
|
|
</set>
|
|
where id = #{id}
|
|
</update>
|
|
<!-- 新增-->
|
|
<insert id="insertOne" parameterType="com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo">
|
|
insert into wgd_assoc_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">
|
|
id,
|
|
</if>
|
|
<if test="scName != null and scName != ''">
|
|
sc_name,
|
|
</if>
|
|
<if test="sscName != null and sscName != ''">
|
|
ssc_name,
|
|
</if>
|
|
<if test="wgName != null and wgName != ''">
|
|
wg_name,
|
|
</if>
|
|
<if test="role != null and role != ''">
|
|
role,
|
|
</if>
|
|
<if test="attend != null and attend != ''">
|
|
attend,
|
|
</if>
|
|
<if test="standard != null and standard != ''">
|
|
standard,
|
|
</if>
|
|
<if test="charge != null and charge != ''">
|
|
charge,
|
|
</if>
|
|
<if test="leader != null and leader != ''">
|
|
leader,
|
|
</if>
|
|
<if test="iniTime != null">
|
|
ini_time,
|
|
</if>
|
|
<if test="curTime != null">
|
|
cur_time,
|
|
</if>
|
|
<if test="costStandard != null and costStandard != ''">
|
|
cost_standard,
|
|
</if>
|
|
<if test="costOutlay != null and costOutlay != ''">
|
|
cost_outlay,
|
|
</if>
|
|
<if test="lastPayTime != null">
|
|
last_pay_time,
|
|
</if>
|
|
<if test="payPeriod != null and payPeriod != ''">
|
|
pay_period,
|
|
</if>
|
|
<if test="handler != null and handler != ''">
|
|
handler,
|
|
</if>
|
|
<if test="department != null and department != ''">
|
|
department,
|
|
</if>
|
|
<if test="asProper != null and asProper != ''">
|
|
as_proper,
|
|
</if>
|
|
<if test="asStatus != null and asStatus != ''">
|
|
as_status,
|
|
</if>
|
|
<if test="asContact != null and asContact != ''">
|
|
as_contact,
|
|
</if>
|
|
<if test="tel != null and tel != ''">
|
|
tel,
|
|
</if>
|
|
<if test="mail != null and mail != ''">
|
|
mail,
|
|
</if>
|
|
<if test="p17 != null and p17 != ''">
|
|
p17,
|
|
</if>
|
|
<if test="p18 != null and p18 != ''">
|
|
p18,
|
|
</if>
|
|
<if test="p19 != null and p19 != ''">
|
|
p19,
|
|
</if>
|
|
<if test="p20 != null and p20 != ''">
|
|
p20,
|
|
</if>
|
|
<if test="p21 != null and p21 != ''">
|
|
p21,
|
|
</if>
|
|
<if test="p22 != null and p22 != ''">
|
|
p22,
|
|
</if>
|
|
<if test="p23 != null and p23 != ''">
|
|
p23,
|
|
</if>
|
|
<if test="p24 != null and p24 != ''">
|
|
p24,
|
|
</if>
|
|
<if test="p25 != null and p25 != ''">
|
|
p25,
|
|
</if>
|
|
<if test="p26 != null and p26 != ''">
|
|
p26,
|
|
</if>
|
|
<if test="p27 != null and p27 != ''">
|
|
p27,
|
|
</if>
|
|
<if test="p28 != null and p28 != ''">
|
|
p28,
|
|
</if>
|
|
<if test="p29 != null and p29 != ''">
|
|
p29,
|
|
</if>
|
|
<if test="p30 != null and p30 != ''">
|
|
p30,
|
|
</if>
|
|
<if test="p31 != null and p31 != ''">
|
|
p31,
|
|
</if>
|
|
<if test="p32 != null and p32 != ''">
|
|
p32,
|
|
</if>
|
|
</trim>
|
|
values
|
|
<trim suffixOverrides="," suffix=")" prefix="(">
|
|
<if test="id != null and id != ''">
|
|
#{id},
|
|
</if>
|
|
<if test="scName != null and scName != ''">
|
|
#{scName},
|
|
</if>
|
|
<if test="sscName != null and sscName != ''">
|
|
#{sscName},
|
|
</if>
|
|
<if test="wgName != null and wgName != ''">
|
|
#{wgName},
|
|
</if>
|
|
<if test="role != null and role != ''">
|
|
#{role},
|
|
</if>
|
|
<if test="attend != null and attend != ''">
|
|
#{attend},
|
|
</if>
|
|
<if test="standard != null and standard != ''">
|
|
#{standard},
|
|
</if>
|
|
<if test="charge != null and charge != ''">
|
|
#{charge},
|
|
</if>
|
|
<if test="leader != null and leader != ''">
|
|
#{leader},
|
|
</if>
|
|
<if test="iniTime != null">
|
|
#{iniTime},
|
|
</if>
|
|
<if test="curTime != null">
|
|
#{curTime},
|
|
</if>
|
|
<if test="costStandard != null and costStandard != ''">
|
|
#{costStandard},
|
|
</if>
|
|
<if test="costOutlay != null and costOutlay != ''">
|
|
#{costOutlay},
|
|
</if>
|
|
<if test="lastPayTime != null">
|
|
#{lastPayTime},
|
|
</if>
|
|
<if test="payPeriod != null and payPeriod != ''">
|
|
#{payPeriod},
|
|
</if>
|
|
<if test="handler != null and handler != ''">
|
|
#{handler},
|
|
</if>
|
|
<if test="department != null and department != ''">
|
|
#{department},
|
|
</if>
|
|
<if test="asProper != null and asProper != ''">
|
|
#{asProper},
|
|
</if>
|
|
<if test="asStatus != null and asStatus != ''">
|
|
#{asStatus},
|
|
</if>
|
|
<if test="asContact != null and asContact != ''">
|
|
#{asContact},
|
|
</if>
|
|
<if test="tel != null and tel != ''">
|
|
#{tel},
|
|
</if>
|
|
<if test="mail != null and mail != ''">
|
|
#{mail},
|
|
</if>
|
|
<if test="p17 != null and p17 != ''">
|
|
#{p17},
|
|
</if>
|
|
<if test="p18 != null and p18 != ''">
|
|
#{p18},
|
|
</if>
|
|
<if test="p19 != null and p19 != ''">
|
|
#{p19},
|
|
</if>
|
|
<if test="p20 != null and p20 != ''">
|
|
#{p20},
|
|
</if>
|
|
<if test="p21 != null and p21 != ''">
|
|
#{p21},
|
|
</if>
|
|
<if test="p22 != null and p22 != ''">
|
|
#{p22},
|
|
</if>
|
|
<if test="p23 != null and p23 != ''">
|
|
#{p23},
|
|
</if>
|
|
<if test="p24 != null and p24 != ''">
|
|
#{p24},
|
|
</if>
|
|
<if test="p25 != null and p25 != ''">
|
|
#{p25},
|
|
</if>
|
|
<if test="p26 != null and p26 != ''">
|
|
#{p26},
|
|
</if>
|
|
<if test="p27 != null and p27 != ''">
|
|
#{p27},
|
|
</if>
|
|
<if test="p28 != null and p28 != ''">
|
|
#{p28},
|
|
</if>
|
|
<if test="p29 != null and p29 != ''">
|
|
#{p29},
|
|
</if>
|
|
<if test="p30 != null and p30 != ''">
|
|
#{p30},
|
|
</if>
|
|
<if test="p31 != null and p31 != ''">
|
|
#{p31},
|
|
</if>
|
|
<if test="p32 != null and p32 != ''">
|
|
#{p32},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<delete id="deleteOne" parameterType="java.lang.String">
|
|
delete from wgd_assoc_info where id = #{id}
|
|
</delete>
|
|
<!-- 删除-->
|
|
<delete id="deleteBatch" parameterType="java.lang.String">
|
|
delete from wgd_assoc_info where id in
|
|
<foreach item="id" collection="array" open="(" close=")" separator=",">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|