LinggangSchedulingMapper.xml 8.69 KB
<?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.mapper.scheduling.LinggangSchedulingMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.domain.scheduling.LinggangScheduling">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="schedule_date" jdbcType="DATE" property="scheduleDate"/>
        <result column="line_name" jdbcType="VARCHAR" property="lineName"/>
        <result column="job_code" jdbcType="VARCHAR" property="jobCode"/>
        <result column="name" jdbcType="VARCHAR" property="name"/>
        <result column="posts" jdbcType="VARCHAR" property="posts"/>
        <result column="lp_name" jdbcType="VARCHAR" property="lpName"/>
        <result column="nbbm" jdbcType="VARCHAR" property="nbbm"/>
        <result column="bc_type" jdbcType="VARCHAR" property="bcType"/>
        <result column="fcsj_t" jdbcType="BIGINT" property="fcsjT"/>
        <result column="zdsj_t" jdbcType="BIGINT" property="zdsjT"/>
        <result column="sign_in_id" jdbcType="INTEGER" property="signInId"/>
        <result column="ex_type" jdbcType="TINYINT" property="exType"/>
        <result column="sign_time" jdbcType="TIMESTAMP" property="signTime"/>
        <result column="sign_type" jdbcType="TINYINT" property="signType"/>
        <result column="alcohol_flag" jdbcType="TINYINT" property="alcoholFlag"/>
        <result column="alcohol_intake" jdbcType="DECIMAL" property="alcoholIntake"/>
        <result column="remark" jdbcType="VARCHAR" property="remark"/>
        <result column="key_info_id" jdbcType="INTEGER" property="keyInfoId"/>
    </resultMap>

    <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
            parameterType="com.ruoyi.domain.scheduling.LinggangScheduling">
        INSERT INTO scheduling
        <include refid="insertSelectiveColumn"></include>
        <include refid="insertSelectiveValue"></include>
    </insert>

    <sql id="columns">
        id
        ,  schedule_date   ,  line_name   ,  job_code   ,  name   ,  posts   ,  lp_name   ,  nbbm   ,  bc_type   ,  fcsj_t   ,  zdsj_t   ,  sign_in_id   ,  ex_type   ,  sign_time   ,  sign_type   ,  alcohol_flag   ,  alcohol_intake   ,  remark   ,  key_info_id
    </sql>

    <sql id="insert_columns">
        id
        ,  schedule_date  ,  line_name  ,  job_code  ,  name  ,  posts  ,  lp_name  ,  nbbm  ,  bc_type  ,  fcsj_t  ,  zdsj_t  ,  sign_in_id  ,  ex_type  ,  sign_time  ,  sign_type  ,  alcohol_flag  ,  alcohol_intake  ,  remark  ,  key_info_id
    </sql>

    <sql id="insert_values">
        #{id}
        ,
        #{scheduleDate},
        #{lineName},
        #{jobCode},
        #{name},
        #{posts},
        #{lpName},
        #{nbbm},
        #{bcType},
        #{fcsjT},
        #{zdsjT},
        #{signInId},
        #{exType},
        #{signTime},
        #{signType},
        #{alcoholFlag},
        #{alcoholIntake},
        #{remark},
        #{keyInfoId}
    </sql>

    <sql id="insertSelectiveColumn">
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="null!=id">id,</if>
            <if test="null!=scheduleDate">schedule_date,</if>
            <if test="null!=lineName">line_name,</if>
            <if test="null!=jobCode">job_code,</if>
            <if test="null!=name">name,</if>
            <if test="null!=posts">posts,</if>
            <if test="null!=lpName">lp_name,</if>
            <if test="null!=nbbm">nbbm,</if>
            <if test="null!=bcType">bc_type,</if>
            <if test="null!=fcsjT">fcsj_t,</if>
            <if test="null!=zdsjT">zdsj_t,</if>
            <if test="null!=signInId">sign_in_id,</if>
            <if test="null!=exType">ex_type,</if>
            <if test="null!=signTime">sign_time,</if>
            <if test="null!=signType">sign_type,</if>
            <if test="null!=alcoholFlag">alcohol_flag,</if>
            <if test="null!=alcoholIntake">alcohol_intake,</if>
            <if test="null!=remark">remark,</if>
            <if test="null!=keyInfoId">key_info_id,</if>
        </trim>
    </sql>

    <sql id="insertSelectiveValue">
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="null!=id">#{id,jdbcType=INTEGER},</if>
            <if test="null!=scheduleDate">#{scheduleDate,jdbcType=DATE},</if>
            <if test="null!=lineName">#{lineName,jdbcType=VARCHAR},</if>
            <if test="null!=jobCode">#{jobCode,jdbcType=VARCHAR},</if>
            <if test="null!=name">#{name,jdbcType=VARCHAR},</if>
            <if test="null!=posts">#{posts,jdbcType=VARCHAR},</if>
            <if test="null!=lpName">#{lpName,jdbcType=VARCHAR},</if>
            <if test="null!=nbbm">#{nbbm,jdbcType=VARCHAR},</if>
            <if test="null!=bcType">#{bcType,jdbcType=VARCHAR},</if>
            <if test="null!=fcsjT">#{fcsjT,jdbcType=BIGINT},</if>
            <if test="null!=zdsjT">#{zdsjT,jdbcType=BIGINT},</if>
            <if test="null!=signInId">#{signInId,jdbcType=INTEGER},</if>
            <if test="null!=exType">#{exType,jdbcType=TINYINT},</if>
            <if test="null!=signTime">#{signTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=signType">#{signType,jdbcType=TINYINT},</if>
            <if test="null!=alcoholFlag">#{alcoholFlag,jdbcType=TINYINT},</if>
            <if test="null!=alcoholIntake">#{alcoholIntake,jdbcType=DECIMAL},</if>
            <if test="null!=remark">#{remark,jdbcType=VARCHAR},</if>
            <if test="null!=keyInfoId">#{keyInfoId,jdbcType=INTEGER},</if>
        </trim>
    </sql>

    <sql id="updateByPrimaryKeySelectiveSql">
        <set>
            <if test="null!=id">id = #{id,jdbcType=INTEGER},</if>
            <if test="null!=scheduleDate">schedule_date = #{scheduleDate,jdbcType=DATE},</if>
            <if test="null!=lineName">line_name = #{lineName,jdbcType=VARCHAR},</if>
            <if test="null!=jobCode">job_code = #{jobCode,jdbcType=VARCHAR},</if>
            <if test="null!=name">name = #{name,jdbcType=VARCHAR},</if>
            <if test="null!=posts">posts = #{posts,jdbcType=VARCHAR},</if>
            <if test="null!=lpName">lp_name = #{lpName,jdbcType=VARCHAR},</if>
            <if test="null!=nbbm">nbbm = #{nbbm,jdbcType=VARCHAR},</if>
            <if test="null!=bcType">bc_type = #{bcType,jdbcType=VARCHAR},</if>
            <if test="null!=fcsjT">fcsj_t = #{fcsjT,jdbcType=BIGINT},</if>
            <if test="null!=zdsjT">zdsj_t = #{zdsjT,jdbcType=BIGINT},</if>
            <if test="null!=signInId">sign_in_id = #{signInId,jdbcType=INTEGER},</if>
            <if test="null!=exType">ex_type = #{exType,jdbcType=TINYINT},</if>
            <if test="null!=signTime">sign_time = #{signTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=signType">sign_type = #{signType,jdbcType=TINYINT},</if>
            <if test="null!=alcoholFlag">alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if>
            <if test="null!=alcoholIntake">alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if>
            <if test="null!=remark">remark = #{remark,jdbcType=VARCHAR},</if>
            <if test="null!=keyInfoId">key_info_id = #{keyInfoId,jdbcType=INTEGER},</if>
        </set>
    </sql>

    <sql id="where">
        <if test="null!=id">AND id = #{id,jdbcType=INTEGER},</if>
        <if test="null!=scheduleDate">AND schedule_date = #{scheduleDate,jdbcType=DATE},</if>
        <if test="null!=lineName">AND line_name = #{lineName,jdbcType=VARCHAR},</if>
        <if test="null!=jobCode">AND job_code = #{jobCode,jdbcType=VARCHAR},</if>
        <if test="null!=name">AND name = #{name,jdbcType=VARCHAR},</if>
        <if test="null!=posts">AND posts = #{posts,jdbcType=VARCHAR},</if>
        <if test="null!=lpName">AND lp_name = #{lpName,jdbcType=VARCHAR},</if>
        <if test="null!=nbbm">AND nbbm = #{nbbm,jdbcType=VARCHAR},</if>
        <if test="null!=bcType">AND bc_type = #{bcType,jdbcType=VARCHAR},</if>
        <if test="null!=fcsjT">AND fcsj_t = #{fcsjT,jdbcType=BIGINT},</if>
        <if test="null!=zdsjT">AND zdsj_t = #{zdsjT,jdbcType=BIGINT},</if>
        <if test="null!=signInId">AND sign_in_id = #{signInId,jdbcType=INTEGER},</if>
        <if test="null!=exType">AND ex_type = #{exType,jdbcType=TINYINT},</if>
        <if test="null!=signTime">AND sign_time = #{signTime,jdbcType=TIMESTAMP},</if>
        <if test="null!=signType">AND sign_type = #{signType,jdbcType=TINYINT},</if>
        <if test="null!=alcoholFlag">AND alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if>
        <if test="null!=alcoholIntake">AND alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if>
        <if test="null!=remark">AND remark = #{remark,jdbcType=VARCHAR},</if>
        <if test="null!=keyInfoId">AND key_info_id = #{keyInfoId,jdbcType=INTEGER},</if>
    </sql>
</mapper>