weaver-hrm-salary/src/com/engine/salary/mapper/ly/LySocialReportMapper.xml

619 lines
19 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.engine.salary.mapper.ly.LySocialReportMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.ly.po.LySocialReportPO">
<result column="id" property="id" />
<result column="salary_month" property="salaryMonth" />
<result column="gmgsqc" property="gmgsqc" />
<result column="fycdgsqc" property="fycdgsqc" />
<result column="znxmmc" property="znxmmc" />
<result column="ftemp_num" property="ftempNum" />
<result column="yl_gsbf" property="ylGsbf" />
<result column="yl_grbf" property="ylGrbf" />
<result column="yiliao_gsbf" property="yiliaoGsbf" />
<result column="yiliao_grbf" property="yiliaoGrbf" />
<result column="sy_gsbf" property="syGsbf" />
<result column="sy_grbf" property="syGrbf" />
<result column="shengy_gsbf" property="shengyGsbf" />
<result column="gs_gsbf" property="gsGsbf" />
<result column="bcyljqt_gsbf" property="bcyljqtGsbf" />
<result column="sb_gsbf" property="sbGsbf" />
<result column="sb_grbf" property="sbGrbf" />
<result column="sb_sbhj" property="sbSbhj" />
<result column="gjj_gsbf" property="gjjGsbf" />
<result column="gjj_grbf" property="gjjGrbf" />
<result column="gjj_gjjhj" property="gjjGjjhj" />
<result column="fwf" property="fwf" />
<result column="gkgrygzhje" property="gkgrygzhje" />
<result column="data_sorce" property="dataSorce" />
<result column="xzjtpz_flag" property="xzjtpzFlag" />
<result column="xzffpz_flag" property="xzffpzFlag" />
<result column="sbjtpz_flag" property="sbjtpzFlag" />
<result column="sbffpz_flag" property="sbffpzFlag" />
<result column="gjjjtpz_flag" property="gjjjtpzFlag" />
<result column="gjjffpz_flag" property="gjjffpzFlag" />
<result column="creator" property="creator" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_type" property="deleteType" />
<result column="znxmlx" property="znxmlx" />
<result column="subcompany_id" property="subcompanyId" />
<result column="department_id" property="departmentId" />
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.id
, t.salary_month
, t.gmgsqc
, t.fycdgsqc
, t.znxmmc
, t.ftemp_num
, t.yl_gsbf
, t.yl_grbf
, t.yiliao_gsbf
, t.yiliao_grbf
, t.sy_gsbf
, t.sy_grbf
, t.shengy_gsbf
, t.gs_gsbf
, t.bcyljqt_gsbf
, t.sb_gsbf
, t.sb_grbf
, t.sb_sbhj
, t.gjj_gsbf
, t.gjj_grbf
, t.gjj_gjjhj
, t.fwf
, t.gkgrygzhje
, t.data_sorce
, t.xzjtpz_flag
, t.xzffpz_flag
, t.sbjtpz_flag
, t.sbffpz_flag
, t.gjjjtpz_flag
, t.gjjffpz_flag
, t.creator
, t.create_time
, t.update_time
, t.delete_type
, t.znxmlx
, t.subcompany_id
, t.department_id
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns" />
FROM hrsa_ly_social_report t
WHERE delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns" />
FROM hrsa_ly_social_report t
WHERE id = #{id} AND delete_type = 0
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.ly.po.LySocialReportPO">
SELECT
<include refid="baseColumns" />
FROM hrsa_ly_social_report t
WHERE delete_type = 0
<if test="id != null">
AND id = #{id}
</if>
<if test="salaryMonth != null">
AND salary_month = #{salaryMonth}
</if>
<if test="gmgsqc != null">
AND gmgsqc = #{gmgsqc}
</if>
<if test="fycdgsqc != null">
AND fycdgsqc = #{fycdgsqc}
</if>
<if test="znxmmc != null">
AND znxmmc = #{znxmmc}
</if>
<if test="ftempNum != null">
AND ftemp_num = #{ftempNum}
</if>
<if test="ylGsbf != null">
AND yl_gsbf = #{ylGsbf}
</if>
<if test="ylGrbf != null">
AND yl_grbf = #{ylGrbf}
</if>
<if test="yiliaoGsbf != null">
AND yiliao_gsbf = #{yiliaoGsbf}
</if>
<if test="yiliaoGrbf != null">
AND yiliao_grbf = #{yiliaoGrbf}
</if>
<if test="syGsbf != null">
AND sy_gsbf = #{syGsbf}
</if>
<if test="syGrbf != null">
AND sy_grbf = #{syGrbf}
</if>
<if test="shengyGsbf != null">
AND shengy_gsbf = #{shengyGsbf}
</if>
<if test="gsGsbf != null">
AND gs_gsbf = #{gsGsbf}
</if>
<if test="bcyljqtGsbf != null">
AND bcyljqt_gsbf = #{bcyljqtGsbf}
</if>
<if test="sbGsbf != null">
AND sb_gsbf = #{sbGsbf}
</if>
<if test="sbGrbf != null">
AND sb_grbf = #{sbGrbf}
</if>
<if test="sbSbhj != null">
AND sb_sbhj = #{sbSbhj}
</if>
<if test="gjjGsbf != null">
AND gjj_gsbf = #{gjjGsbf}
</if>
<if test="gjjGrbf != null">
AND gjj_grbf = #{gjjGrbf}
</if>
<if test="gjjGjjhj != null">
AND gjj_gjjhj = #{gjjGjjhj}
</if>
<if test="fwf != null">
AND fwf = #{fwf}
</if>
<if test="gkgrygzhje != null">
AND gkgrygzhje = #{gkgrygzhje}
</if>
<if test="dataSorce != null">
AND data_sorce = #{dataSorce}
</if>
<if test="xzjtpzFlag != null">
AND xzjtpz_flag = #{xzjtpzFlag}
</if>
<if test="xzffpzFlag != null">
AND xzffpz_flag = #{xzffpzFlag}
</if>
<if test="sbjtpzFlag != null">
AND sbjtpz_flag = #{sbjtpzFlag}
</if>
<if test="sbffpzFlag != null">
AND sbffpz_flag = #{sbffpzFlag}
</if>
<if test="gjjjtpzFlag != null">
AND gjjjtpz_flag = #{gjjjtpzFlag}
</if>
<if test="gjjffpzFlag != null">
AND gjjffpz_flag = #{gjjffpzFlag}
</if>
<if test="creator != null">
AND creator = #{creator}
</if>
<if test="createTime != null">
AND create_time = #{createTime}
</if>
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="deleteType != null">
AND delete_type = #{deleteType}
</if>
<if test="ids != null and ids.size()>0">
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.ly.po.LySocialReportPO">
INSERT INTO hrsa_ly_social_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="subcompanyId != null">
subcompany_id,
</if>
<if test="departmentId != null">
department_id,
</if>
<if test="znxmlx != null">
znxmlx,
</if>
<if test="salaryMonth != null">
salary_month,
</if>
<if test="gmgsqc != null">
gmgsqc,
</if>
<if test="fycdgsqc != null">
fycdgsqc,
</if>
<if test="znxmmc != null">
znxmmc,
</if>
<if test="ftempNum != null">
ftemp_num,
</if>
<if test="ylGsbf != null">
yl_gsbf,
</if>
<if test="ylGrbf != null">
yl_grbf,
</if>
<if test="yiliaoGsbf != null">
yiliao_gsbf,
</if>
<if test="yiliaoGrbf != null">
yiliao_grbf,
</if>
<if test="syGsbf != null">
sy_gsbf,
</if>
<if test="syGrbf != null">
sy_grbf,
</if>
<if test="shengyGsbf != null">
shengy_gsbf,
</if>
<if test="gsGsbf != null">
gs_gsbf,
</if>
<if test="bcyljqtGsbf != null">
bcyljqt_gsbf,
</if>
<if test="sbGsbf != null">
sb_gsbf,
</if>
<if test="sbGrbf != null">
sb_grbf,
</if>
<if test="sbSbhj != null">
sb_sbhj,
</if>
<if test="gjjGsbf != null">
gjj_gsbf,
</if>
<if test="gjjGrbf != null">
gjj_grbf,
</if>
<if test="gjjGjjhj != null">
gjj_gjjhj,
</if>
<if test="fwf != null">
fwf,
</if>
<if test="gkgrygzhje != null">
gkgrygzhje,
</if>
<if test="dataSorce != null">
data_sorce,
</if>
<if test="xzjtpzFlag != null">
xzjtpz_flag,
</if>
<if test="xzffpzFlag != null">
xzffpz_flag,
</if>
<if test="sbjtpzFlag != null">
sbjtpz_flag,
</if>
<if test="sbffpzFlag != null">
sbffpz_flag,
</if>
<if test="gjjjtpzFlag != null">
gjjjtpz_flag,
</if>
<if test="gjjffpzFlag != null">
gjjffpz_flag,
</if>
<if test="creator != null">
creator,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deleteType != null">
delete_type,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null" >
#{id},
</if>
<if test="subcompanyId != null" >
#{subcompanyId},
</if>
<if test="departmentId != null">
#{departmentId},
</if>
<if test="znxmlx != null" >
#{znxmlx},
</if>
<if test="salaryMonth != null" >
#{salaryMonth},
</if>
<if test="gmgsqc != null" >
#{gmgsqc},
</if>
<if test="fycdgsqc != null" >
#{fycdgsqc},
</if>
<if test="znxmmc != null" >
#{znxmmc},
</if>
<if test="ftempNum != null" >
#{ftempNum},
</if>
<if test="ylGsbf != null" >
#{ylGsbf},
</if>
<if test="ylGrbf != null" >
#{ylGrbf},
</if>
<if test="yiliaoGsbf != null" >
#{yiliaoGsbf},
</if>
<if test="yiliaoGrbf != null" >
#{yiliaoGrbf},
</if>
<if test="syGsbf != null" >
#{syGsbf},
</if>
<if test="syGrbf != null" >
#{syGrbf},
</if>
<if test="shengyGsbf != null" >
#{shengyGsbf},
</if>
<if test="gsGsbf != null" >
#{gsGsbf},
</if>
<if test="bcyljqtGsbf != null" >
#{bcyljqtGsbf},
</if>
<if test="sbGsbf != null" >
#{sbGsbf},
</if>
<if test="sbGrbf != null" >
#{sbGrbf},
</if>
<if test="sbSbhj != null" >
#{sbSbhj},
</if>
<if test="gjjGsbf != null" >
#{gjjGsbf},
</if>
<if test="gjjGrbf != null" >
#{gjjGrbf},
</if>
<if test="gjjGjjhj != null" >
#{gjjGjjhj},
</if>
<if test="fwf != null" >
#{fwf},
</if>
<if test="gkgrygzhje != null" >
#{gkgrygzhje},
</if>
<if test="dataSorce != null" >
#{dataSorce},
</if>
<if test="xzjtpzFlag != null" >
#{xzjtpzFlag},
</if>
<if test="xzffpzFlag != null" >
#{xzffpzFlag},
</if>
<if test="sbjtpzFlag != null" >
#{sbjtpzFlag},
</if>
<if test="sbffpzFlag != null" >
#{sbffpzFlag},
</if>
<if test="gjjjtpzFlag != null" >
#{gjjjtpzFlag},
</if>
<if test="gjjffpzFlag != null" >
#{gjjffpzFlag},
</if>
<if test="creator != null" >
#{creator},
</if>
<if test="createTime != null" >
#{createTime},
</if>
<if test="updateTime != null" >
#{updateTime},
</if>
<if test="deleteType != null" >
#{deleteType},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.ly.po.LySocialReportPO">
UPDATE hrsa_ly_social_report
<set>
salary_month=#{salaryMonth},
gmgsqc=#{gmgsqc},
fycdgsqc=#{fycdgsqc},
znxmmc=#{znxmmc},
ftemp_num=#{ftempNum},
yl_gsbf=#{ylGsbf},
yl_grbf=#{ylGrbf},
yiliao_gsbf=#{yiliaoGsbf},
yiliao_grbf=#{yiliaoGrbf},
sy_gsbf=#{syGsbf},
sy_grbf=#{syGrbf},
shengy_gsbf=#{shengyGsbf},
gs_gsbf=#{gsGsbf},
bcyljqt_gsbf=#{bcyljqtGsbf},
sb_gsbf=#{sbGsbf},
sb_grbf=#{sbGrbf},
sb_sbhj=#{sbSbhj},
gjj_gsbf=#{gjjGsbf},
gjj_grbf=#{gjjGrbf},
gjj_gjjhj=#{gjjGjjhj},
fwf=#{fwf},
gkgrygzhje=#{gkgrygzhje},
data_sorce=#{dataSorce},
xzjtpz_flag=#{xzjtpzFlag},
xzffpz_flag=#{xzffpzFlag},
sbjtpz_flag=#{sbjtpzFlag},
sbffpz_flag=#{sbffpzFlag},
gjjjtpz_flag=#{gjjjtpzFlag},
gjjffpz_flag=#{gjjffpzFlag},
creator=#{creator},
create_time=#{createTime},
update_time=#{updateTime},
delete_type=#{deleteType},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.ly.po.LySocialReportPO">
UPDATE hrsa_ly_social_report
<set>
<if test="salaryMonth != null" >
salary_month=#{salaryMonth},
</if>
<if test="gmgsqc != null" >
gmgsqc=#{gmgsqc},
</if>
<if test="fycdgsqc != null" >
fycdgsqc=#{fycdgsqc},
</if>
<if test="znxmmc != null" >
znxmmc=#{znxmmc},
</if>
<if test="ftempNum != null" >
ftemp_num=#{ftempNum},
</if>
<if test="ylGsbf != null" >
yl_gsbf=#{ylGsbf},
</if>
<if test="ylGrbf != null" >
yl_grbf=#{ylGrbf},
</if>
<if test="yiliaoGsbf != null" >
yiliao_gsbf=#{yiliaoGsbf},
</if>
<if test="yiliaoGrbf != null" >
yiliao_grbf=#{yiliaoGrbf},
</if>
<if test="syGsbf != null" >
sy_gsbf=#{syGsbf},
</if>
<if test="syGrbf != null" >
sy_grbf=#{syGrbf},
</if>
<if test="shengyGsbf != null" >
shengy_gsbf=#{shengyGsbf},
</if>
<if test="gsGsbf != null" >
gs_gsbf=#{gsGsbf},
</if>
<if test="bcyljqtGsbf != null" >
bcyljqt_gsbf=#{bcyljqtGsbf},
</if>
<if test="sbGsbf != null" >
sb_gsbf=#{sbGsbf},
</if>
<if test="sbGrbf != null" >
sb_grbf=#{sbGrbf},
</if>
<if test="sbSbhj != null" >
sb_sbhj=#{sbSbhj},
</if>
<if test="gjjGsbf != null" >
gjj_gsbf=#{gjjGsbf},
</if>
<if test="gjjGrbf != null" >
gjj_grbf=#{gjjGrbf},
</if>
<if test="gjjGjjhj != null" >
gjj_gjjhj=#{gjjGjjhj},
</if>
<if test="fwf != null" >
fwf=#{fwf},
</if>
<if test="gkgrygzhje != null" >
gkgrygzhje=#{gkgrygzhje},
</if>
<if test="dataSorce != null" >
data_sorce=#{dataSorce},
</if>
<if test="xzjtpzFlag != null" >
xzjtpz_flag=#{xzjtpzFlag},
</if>
<if test="xzffpzFlag != null" >
xzffpz_flag=#{xzffpzFlag},
</if>
<if test="sbjtpzFlag != null" >
sbjtpz_flag=#{sbjtpzFlag},
</if>
<if test="sbffpzFlag != null" >
sbffpz_flag=#{sbffpzFlag},
</if>
<if test="gjjjtpzFlag != null" >
gjjjtpz_flag=#{gjjjtpzFlag},
</if>
<if test="gjjffpzFlag != null" >
gjjffpz_flag=#{gjjffpzFlag},
</if>
<if test="creator != null" >
creator=#{creator},
</if>
<if test="createTime != null" >
create_time=#{createTime},
</if>
<if test="updateTime != null" >
update_time=#{updateTime},
</if>
<if test="deleteType != null" >
delete_type=#{deleteType},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 根据主键删除记录 -->
<delete id="delete" parameterType="com.engine.salary.entity.ly.po.LySocialReportPO">
UPDATE hrsa_ly_social_report
SET delete_type=1
WHERE id = #{id} AND delete_type = 0
</delete>
<delete id="deleteByIds">
UPDATE hrsa_ly_social_report
SET delete_type=1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>