xkrs_ms/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml
2021-04-09 16:55:48 +08:00

160 lines
8.3 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.ruoyi.project.benyi.mapper.ByDayflowassessmentMapper">
<resultMap type="ByDayflowassessment" id="ByDayflowassessmentResult">
<result property="id" column="id"/>
<result property="planid" column="planid"/>
<result property="deptId" column="dept_id"/>
<result property="classid" column="classid"/>
<result property="bzbh" column="bzbh"/>
<result property="bzxm" column="bzxm"/>
<result property="pbbh" column="pbbh"/>
<result property="pbxm" column="pbxm"/>
<result property="zlbh" column="zlbh"/>
<result property="zlxm" column="zlxm"/>
<result property="xnxq" column="xnxq"/>
<result property="bzid" column="bzid"/>
<result property="bzmf" column="bzmf"/>
<result property="zzdf" column="zzdf"/>
<result property="kfz" column="kfz"/>
<result property="classdf" column="classdf"/>
<result property="items" column="items"/>
<result property="values" column="values"/>
<result property="kfcs" column="kfcs"/>
<result property="pgdx" column="pgdx"/>
<result property="pgdxxm" column="pgdxxm"/>
<result property="createUserid" column="create_userid"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectByDayflowassessmentVo">
select d.id, d.planid, d.dept_id, d.classid, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, d.pgdxxm, d.create_userid, d.create_time from by_dayflowassessment d
</sql>
<select id="selectByDayflowassessmentList" parameterType="ByDayflowassessment"
resultMap="ByDayflowassessmentResult">
<include refid="selectByDayflowassessmentVo"/>
<where>
<if test="planid != null ">and d.planid = #{planid}</if>
<if test="classid != null and classid != ''">and d.classid = #{classid}</if>
<if test="bzbh != null ">and d.bzbh = #{bzbh}</if>
<if test="bzxm != null and bzxm != ''">and d.bzxm = #{bzxm}</if>
<if test="pbbh != null ">and d.pbbh = #{pbbh}</if>
<if test="pbxm != null and pbxm != ''">and d.pbxm = #{pbxm}</if>
<if test="zlbh != null ">and d.zlbh = #{zlbh}</if>
<if test="zlxm != null and zlxm != ''">and d.zlxm = #{zlxm}</if>
<if test="xnxq != null and xnxq != ''">and d.xnxq = #{xnxq}</if>
<if test="bzid != null ">and d.bzid = #{bzid}</if>
<if test="kfz != null ">and d.kfz = #{kfz}</if>
<if test="classdf != null ">and d.classdf = #{classdf}</if>
<if test="bzmf != null ">and d.bzmf = #{bzmf}</if>
<if test="zzdf != null ">and d.zzdf = #{zzdf}</if>
<if test="kfcs != null ">and d.kfcs = #{kfcs}</if>
<if test="pgdx != null ">and d.pgdx = #{pgdx}</if>
<if test="createUserid != null ">and d.create_userid = #{createUserid}</if>
<!-- 数据范围过滤 -->
${dataScope}
</where>
</select>
<select id="selectByDayflowassessmentById" parameterType="Long" resultMap="ByDayflowassessmentResult">
<include refid="selectByDayflowassessmentVo"/>
where d.id = #{id}
</select>
<insert id="insertByDayflowassessment" parameterType="ByDayflowassessment" useGeneratedKeys="true" keyProperty="id">
insert into by_dayflowassessment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planid != null ">planid,</if>
<if test="deptId != null ">dept_id,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="bzbh != null ">bzbh,</if>
<if test="bzxm != null and bzxm != ''">bzxm,</if>
<if test="pbbh != null ">pbbh,</if>
<if test="pbxm != null and pbxm != ''">pbxm,</if>
<if test="zlbh != null ">zlbh,</if>
<if test="zlxm != null and zlxm != ''">zlxm,</if>
<if test="xnxq != null and xnxq != ''">xnxq,</if>
<if test="bzid != null ">bzid,</if>
<if test="kfz != null ">kfz,</if>
<if test="classdf != null ">classdf,</if>
<if test="items != null and items != ''">items,</if>
<if test="values != null and values != ''">values,</if>
<if test="bzmf != null ">bzmf,</if>
<if test="zzdf != null ">zzdf,</if>
<if test="kfcs != null ">kfcs,</if>
<if test="pgdx != null ">pgdx,</if>
<if test="pgdxxm != null ">pgdxxm,</if>
<if test="createUserid != null ">create_userid,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="planid != null ">#{planid},</if>
<if test="deptId != null ">#{deptId},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="bzbh != null ">#{bzbh},</if>
<if test="bzxm != null and bzxm != ''">#{bzxm},</if>
<if test="pbbh != null ">#{pbbh},</if>
<if test="pbxm != null and pbxm != ''">#{pbxm},</if>
<if test="zlbh != null ">#{zlbh},</if>
<if test="zlxm != null and zlxm != ''">#{zlxm},</if>
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
<if test="bzid != null ">#{bzid},</if>
<if test="kfz != null ">#{kfz},</if>
<if test="classdf != null ">#{classdf},</if>
<if test="items != null and items != ''">#{items},</if>
<if test="values != null and values != ''">#{values},</if>
<if test="bzmf != null ">#{bzmf},</if>
<if test="zzdf != null ">#{zzdf},</if>
<if test="kfcs != null ">#{kfcs},</if>
<if test="pgdx != null ">#{pgdx},</if>
<if test="pgdxxm != null ">#{pgdxxm},</if>
<if test="createUserid != null ">#{createUserid},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateByDayflowassessment" parameterType="ByDayflowassessment">
update by_dayflowassessment
<trim prefix="SET" suffixOverrides=",">
<if test="planid != null ">planid = #{planid},</if>
<if test="deptId != null ">dept_id = #{deptId},</if>
<if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="bzbh != null ">bzbh = #{bzbh},</if>
<if test="bzxm != null and bzxm != ''">bzxm = #{bzxm},</if>
<if test="pbbh != null ">pbbh = #{pbbh},</if>
<if test="pbxm != null and pbxm != ''">pbxm = #{pbxm},</if>
<if test="zlbh != null ">zlbh = #{zlbh},</if>
<if test="zlxm != null and zlxm != ''">zlxm = #{zlxm},</if>
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
<if test="bzid != null ">bzid = #{bzid},</if>
<if test="kfz != null ">kfz = #{kfz},</if>
<if test="classdf != null ">classdf = #{classdf},</if>
<if test="items != null and items != ''">items = #{items},</if>
<if test="values != null and values != ''">values = #{values},</if>
<if test="bzmf != null ">bzmf = #{bzmf},</if>
<if test="zzdf != null ">zzdf = #{zzdf},</if>
<if test="kfcs != null ">kfcs = #{kfcs},</if>
<if test="pgdx != null ">pgdx = #{pgdx},</if>
<if test="pgdxxm != null ">pgdxxm = #{pgdxxm},</if>
<if test="createUserid != null ">create_userid = #{createUserid},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByDayflowassessmentById" parameterType="Long">
delete from by_dayflowassessment where id = #{id}
</delete>
<delete id="deleteByDayflowassessmentByIds" parameterType="String">
delete from by_dayflowassessment where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>