<?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.chinaitop.depot.intelligent.ventilation.mapper.TJobApplicationMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.TJobApplication" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
    <result column="aid" property="aid" jdbcType="VARCHAR" />
    <result column="apply_person" property="applyPerson" jdbcType="VARCHAR" />
    <result column="apply_time" property="applyTime" jdbcType="TIMESTAMP" />
    <result column="test_time" property="testTime" jdbcType="TIMESTAMP" />
    <result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
    <result column="ventilation_mode" property="ventilationMode" jdbcType="VARCHAR" />
    <result column="aeration_target" property="aerationTarget" jdbcType="VARCHAR" />
    <result column="state" property="state" jdbcType="INTEGER" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="packingmode" property="packingmode" jdbcType="INTEGER" />
    <result column="max_ater" property="maxAter" jdbcType="DECIMAL" />
    <result column="min_water" property="minWater" jdbcType="DECIMAL" />
    <result column="avg_water" property="avgWater" jdbcType="DECIMAL" />
    <result column="areation_plan_number" property="areationPlanNumber" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="INTEGER" />
    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
    <result column="ldkxd" property="ldkxd" jdbcType="VARCHAR" />
    <result column="tflx" property="tflx" jdbcType="VARCHAR" />
    <result column="fwlx" property="fwlx" jdbcType="VARCHAR" />
    <result column="fwszfs" property="fwszfs" jdbcType="VARCHAR" />
    <result column="zfdjmj" property="zfdjmj" jdbcType="VARCHAR" />
    <result column="fwkkl" property="fwkkl" jdbcType="VARCHAR" />
    <result column="kqtjb" property="kqtjb" jdbcType="VARCHAR" />
    <result column="tfkszgs" property="tfkszgs" jdbcType="VARCHAR" />
    <result column="tfjxh" property="tfjxh" jdbcType="VARCHAR" />
    <result column="tfjts" property="tfjts" jdbcType="VARCHAR" />
    <result column="dtfjedqy" property="dtfjedqy" jdbcType="VARCHAR" />
    <result column="dtfjedfl" property="dtfjedfl" jdbcType="VARCHAR" />
    <result column="dtfjedgl" property="dtfjedgl" jdbcType="VARCHAR" />
    <result column="sffs" property="sffs" jdbcType="VARCHAR" />
    <result column="dtfjscfl" property="dtfjscfl" jdbcType="VARCHAR" />
    <result column="dtfjzgl" property="dtfjzgl" jdbcType="VARCHAR" />
    <result column="zfl" property="zfl" jdbcType="VARCHAR" />
    <result column="dwtfl" property="dwtfl" jdbcType="VARCHAR" />
    <result column="scxtzl" property="scxtzl" jdbcType="VARCHAR" />
    <result column="tfzyfzr" property="tfzyfzr" jdbcType="VARCHAR" />
  </resultMap>
  
  <resultMap id="approvalResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.TJobApplicationAudit" extends="BaseResultMap">
    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
    <result column="result" property="result" jdbcType="VARCHAR" />
    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
    <result column="auditId" property="auditId" jdbcType="INTEGER" />
  </resultMap>
  
  <sql id="Example_Where_Clause" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    <where >
      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    id, v_cf_code, aid, apply_person, apply_time, test_time, end_time, ventilation_mode, 
    aeration_target, state, remark, packingmode, max_ater, min_water, avg_water, areation_plan_number, 
    org_id, updatetime, ldkxd, tflx, fwlx, fwszfs, zfdjmj, fwkkl, kqtjb, tfkszgs, tfjxh, 
    tfjts, dtfjedqy, dtfjedfl, dtfjedgl, sffs, dtfjscfl, dtfjzgl, zfl, dwtfl, scxtzl, 
    tfzyfzr,tfzyry
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplicationExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_job_application
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    select 
    <include refid="Base_Column_List" />
    from t_job_application
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    delete from t_job_application
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplicationExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    delete from t_job_application
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplication" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    insert into t_job_application (id, v_cf_code, aid, 
      apply_person, apply_time, test_time, 
      end_time, ventilation_mode, aeration_target, 
      state, remark, packingmode, 
      max_ater, min_water, avg_water, 
      areation_plan_number, org_id, updatetime, 
      ldkxd, tflx, fwlx, 
      fwszfs, zfdjmj, fwkkl, 
      kqtjb, tfkszgs, tfjxh, 
      tfjts, dtfjedqy, dtfjedfl, 
      dtfjedgl, sffs, dtfjscfl, 
      dtfjzgl, zfl, dwtfl, 
      scxtzl, tfzyfzr,tfzyry)
    values (#{id,jdbcType=VARCHAR}, #{vCfCode,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
      #{applyPerson,jdbcType=VARCHAR}, #{applyTime,jdbcType=TIMESTAMP}, #{testTime,jdbcType=TIMESTAMP}, 
      #{endTime,jdbcType=TIMESTAMP}, #{ventilationMode,jdbcType=VARCHAR}, #{aerationTarget,jdbcType=VARCHAR}, 
      #{state,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{packingmode,jdbcType=INTEGER}, 
      #{maxAter,jdbcType=DECIMAL}, #{minWater,jdbcType=DECIMAL}, #{avgWater,jdbcType=DECIMAL}, 
      #{areationPlanNumber,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
      #{ldkxd,jdbcType=VARCHAR}, #{tflx,jdbcType=VARCHAR}, #{fwlx,jdbcType=VARCHAR}, 
      #{fwszfs,jdbcType=VARCHAR}, #{zfdjmj,jdbcType=VARCHAR}, #{fwkkl,jdbcType=VARCHAR}, 
      #{kqtjb,jdbcType=VARCHAR}, #{tfkszgs,jdbcType=VARCHAR}, #{tfjxh,jdbcType=VARCHAR}, 
      #{tfjts,jdbcType=VARCHAR}, #{dtfjedqy,jdbcType=VARCHAR}, #{dtfjedfl,jdbcType=VARCHAR}, 
      #{dtfjedgl,jdbcType=VARCHAR}, #{sffs,jdbcType=VARCHAR}, #{dtfjscfl,jdbcType=VARCHAR}, 
      #{dtfjzgl,jdbcType=VARCHAR}, #{zfl,jdbcType=VARCHAR}, #{dwtfl,jdbcType=VARCHAR}, 
      #{scxtzl,jdbcType=VARCHAR}, #{tfzyfzr,jdbcType=VARCHAR},#{tfzyry,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplication" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    insert into t_job_application
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="vCfCode != null" >
        v_cf_code,
      </if>
      <if test="aid != null" >
        aid,
      </if>
      <if test="applyPerson != null" >
        apply_person,
      </if>
      <if test="applyTime != null" >
        apply_time,
      </if>
      <if test="testTime != null" >
        test_time,
      </if>
      <if test="endTime != null" >
        end_time,
      </if>
      <if test="ventilationMode != null" >
        ventilation_mode,
      </if>
      <if test="aerationTarget != null" >
        aeration_target,
      </if>
      <if test="state != null" >
        state,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="packingmode != null" >
        packingmode,
      </if>
      <if test="maxAter != null" >
        max_ater,
      </if>
      <if test="minWater != null" >
        min_water,
      </if>
      <if test="avgWater != null" >
        avg_water,
      </if>
      <if test="areationPlanNumber != null" >
        areation_plan_number,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="updatetime != null" >
        updatetime,
      </if>
      <if test="ldkxd != null" >
        ldkxd,
      </if>
      <if test="tflx != null" >
        tflx,
      </if>
      <if test="fwlx != null" >
        fwlx,
      </if>
      <if test="fwszfs != null" >
        fwszfs,
      </if>
      <if test="zfdjmj != null" >
        zfdjmj,
      </if>
      <if test="fwkkl != null" >
        fwkkl,
      </if>
      <if test="kqtjb != null" >
        kqtjb,
      </if>
      <if test="tfkszgs != null" >
        tfkszgs,
      </if>
      <if test="tfjxh != null" >
        tfjxh,
      </if>
      <if test="tfjts != null" >
        tfjts,
      </if>
      <if test="dtfjedqy != null" >
        dtfjedqy,
      </if>
      <if test="dtfjedfl != null" >
        dtfjedfl,
      </if>
      <if test="dtfjedgl != null" >
        dtfjedgl,
      </if>
      <if test="sffs != null" >
        sffs,
      </if>
      <if test="dtfjscfl != null" >
        dtfjscfl,
      </if>
      <if test="dtfjzgl != null" >
        dtfjzgl,
      </if>
      <if test="zfl != null" >
        zfl,
      </if>
      <if test="dwtfl != null" >
        dwtfl,
      </if>
      <if test="scxtzl != null" >
        scxtzl,
      </if>
      <if test="tfzyfzr != null" >
        tfzyfzr,
      </if>
      <if test="tfzyry != null" >
        tfzyry,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="aid != null" >
        #{aid,jdbcType=VARCHAR},
      </if>
      <if test="applyPerson != null" >
        #{applyPerson,jdbcType=VARCHAR},
      </if>
      <if test="applyTime != null" >
        #{applyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="testTime != null" >
        #{testTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null" >
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ventilationMode != null" >
        #{ventilationMode,jdbcType=VARCHAR},
      </if>
      <if test="aerationTarget != null" >
        #{aerationTarget,jdbcType=VARCHAR},
      </if>
      <if test="state != null" >
        #{state,jdbcType=INTEGER},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="packingmode != null" >
        #{packingmode,jdbcType=INTEGER},
      </if>
      <if test="maxAter != null" >
        #{maxAter,jdbcType=DECIMAL},
      </if>
      <if test="minWater != null" >
        #{minWater,jdbcType=DECIMAL},
      </if>
      <if test="avgWater != null" >
        #{avgWater,jdbcType=DECIMAL},
      </if>
      <if test="areationPlanNumber != null" >
        #{areationPlanNumber,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="updatetime != null" >
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="ldkxd != null" >
        #{ldkxd,jdbcType=VARCHAR},
      </if>
      <if test="tflx != null" >
        #{tflx,jdbcType=VARCHAR},
      </if>
      <if test="fwlx != null" >
        #{fwlx,jdbcType=VARCHAR},
      </if>
      <if test="fwszfs != null" >
        #{fwszfs,jdbcType=VARCHAR},
      </if>
      <if test="zfdjmj != null" >
        #{zfdjmj,jdbcType=VARCHAR},
      </if>
      <if test="fwkkl != null" >
        #{fwkkl,jdbcType=VARCHAR},
      </if>
      <if test="kqtjb != null" >
        #{kqtjb,jdbcType=VARCHAR},
      </if>
      <if test="tfkszgs != null" >
        #{tfkszgs,jdbcType=VARCHAR},
      </if>
      <if test="tfjxh != null" >
        #{tfjxh,jdbcType=VARCHAR},
      </if>
      <if test="tfjts != null" >
        #{tfjts,jdbcType=VARCHAR},
      </if>
      <if test="dtfjedqy != null" >
        #{dtfjedqy,jdbcType=VARCHAR},
      </if>
      <if test="dtfjedfl != null" >
        #{dtfjedfl,jdbcType=VARCHAR},
      </if>
      <if test="dtfjedgl != null" >
        #{dtfjedgl,jdbcType=VARCHAR},
      </if>
      <if test="sffs != null" >
        #{sffs,jdbcType=VARCHAR},
      </if>
      <if test="dtfjscfl != null" >
        #{dtfjscfl,jdbcType=VARCHAR},
      </if>
      <if test="dtfjzgl != null" >
        #{dtfjzgl,jdbcType=VARCHAR},
      </if>
      <if test="zfl != null" >
        #{zfl,jdbcType=VARCHAR},
      </if>
      <if test="dwtfl != null" >
        #{dwtfl,jdbcType=VARCHAR},
      </if>
      <if test="scxtzl != null" >
        #{scxtzl,jdbcType=VARCHAR},
      </if>
      <if test="tfzyfzr != null" >
        #{tfzyfzr,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplicationExample" resultType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    select count(*) from t_job_application
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    update t_job_application
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfCode != null" >
        v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="record.aid != null" >
        aid = #{record.aid,jdbcType=VARCHAR},
      </if>
      <if test="record.applyPerson != null" >
        apply_person = #{record.applyPerson,jdbcType=VARCHAR},
      </if>
      <if test="record.applyTime != null" >
        apply_time = #{record.applyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.testTime != null" >
        test_time = #{record.testTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.endTime != null" >
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.ventilationMode != null" >
        ventilation_mode = #{record.ventilationMode,jdbcType=VARCHAR},
      </if>
      <if test="record.aerationTarget != null" >
        aeration_target = #{record.aerationTarget,jdbcType=VARCHAR},
      </if>
      <if test="record.state != null" >
        state = #{record.state,jdbcType=INTEGER},
      </if>
      <if test="record.remark != null" >
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.packingmode != null" >
        packingmode = #{record.packingmode,jdbcType=INTEGER},
      </if>
      <if test="record.maxAter != null" >
        max_ater = #{record.maxAter,jdbcType=DECIMAL},
      </if>
      <if test="record.minWater != null" >
        min_water = #{record.minWater,jdbcType=DECIMAL},
      </if>
      <if test="record.avgWater != null" >
        avg_water = #{record.avgWater,jdbcType=DECIMAL},
      </if>
      <if test="record.areationPlanNumber != null" >
        areation_plan_number = #{record.areationPlanNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null" >
        org_id = #{record.orgId,jdbcType=INTEGER},
      </if>
      <if test="record.updatetime != null" >
        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.ldkxd != null" >
        ldkxd = #{record.ldkxd,jdbcType=VARCHAR},
      </if>
      <if test="record.tflx != null" >
        tflx = #{record.tflx,jdbcType=VARCHAR},
      </if>
      <if test="record.fwlx != null" >
        fwlx = #{record.fwlx,jdbcType=VARCHAR},
      </if>
      <if test="record.fwszfs != null" >
        fwszfs = #{record.fwszfs,jdbcType=VARCHAR},
      </if>
      <if test="record.zfdjmj != null" >
        zfdjmj = #{record.zfdjmj,jdbcType=VARCHAR},
      </if>
      <if test="record.fwkkl != null" >
        fwkkl = #{record.fwkkl,jdbcType=VARCHAR},
      </if>
      <if test="record.kqtjb != null" >
        kqtjb = #{record.kqtjb,jdbcType=VARCHAR},
      </if>
      <if test="record.tfkszgs != null" >
        tfkszgs = #{record.tfkszgs,jdbcType=VARCHAR},
      </if>
      <if test="record.tfjxh != null" >
        tfjxh = #{record.tfjxh,jdbcType=VARCHAR},
      </if>
      <if test="record.tfjts != null" >
        tfjts = #{record.tfjts,jdbcType=VARCHAR},
      </if>
      <if test="record.dtfjedqy != null" >
        dtfjedqy = #{record.dtfjedqy,jdbcType=VARCHAR},
      </if>
      <if test="record.dtfjedfl != null" >
        dtfjedfl = #{record.dtfjedfl,jdbcType=VARCHAR},
      </if>
      <if test="record.dtfjedgl != null" >
        dtfjedgl = #{record.dtfjedgl,jdbcType=VARCHAR},
      </if>
      <if test="record.sffs != null" >
        sffs = #{record.sffs,jdbcType=VARCHAR},
      </if>
      <if test="record.dtfjscfl != null" >
        dtfjscfl = #{record.dtfjscfl,jdbcType=VARCHAR},
      </if>
      <if test="record.dtfjzgl != null" >
        dtfjzgl = #{record.dtfjzgl,jdbcType=VARCHAR},
      </if>
      <if test="record.zfl != null" >
        zfl = #{record.zfl,jdbcType=VARCHAR},
      </if>
      <if test="record.dwtfl != null" >
        dwtfl = #{record.dwtfl,jdbcType=VARCHAR},
      </if>
      <if test="record.scxtzl != null" >
        scxtzl = #{record.scxtzl,jdbcType=VARCHAR},
      </if>
      <if test="record.tfzyfzr != null" >
        tfzyfzr = #{record.tfzyfzr,jdbcType=VARCHAR},
      </if>
      <if test="record.tfzyry != null" >
        tfzyfzr = #{record.tfzyry,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    update t_job_application
    set id = #{record.id,jdbcType=VARCHAR},
      v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      aid = #{record.aid,jdbcType=VARCHAR},
      apply_person = #{record.applyPerson,jdbcType=VARCHAR},
      apply_time = #{record.applyTime,jdbcType=TIMESTAMP},
      test_time = #{record.testTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      ventilation_mode = #{record.ventilationMode,jdbcType=VARCHAR},
      aeration_target = #{record.aerationTarget,jdbcType=VARCHAR},
      state = #{record.state,jdbcType=INTEGER},
      remark = #{record.remark,jdbcType=VARCHAR},
      packingmode = #{record.packingmode,jdbcType=INTEGER},
      max_ater = #{record.maxAter,jdbcType=DECIMAL},
      min_water = #{record.minWater,jdbcType=DECIMAL},
      avg_water = #{record.avgWater,jdbcType=DECIMAL},
      areation_plan_number = #{record.areationPlanNumber,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=INTEGER},
      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      ldkxd = #{record.ldkxd,jdbcType=VARCHAR},
      tflx = #{record.tflx,jdbcType=VARCHAR},
      fwlx = #{record.fwlx,jdbcType=VARCHAR},
      fwszfs = #{record.fwszfs,jdbcType=VARCHAR},
      zfdjmj = #{record.zfdjmj,jdbcType=VARCHAR},
      fwkkl = #{record.fwkkl,jdbcType=VARCHAR},
      kqtjb = #{record.kqtjb,jdbcType=VARCHAR},
      tfkszgs = #{record.tfkszgs,jdbcType=VARCHAR},
      tfjxh = #{record.tfjxh,jdbcType=VARCHAR},
      tfjts = #{record.tfjts,jdbcType=VARCHAR},
      dtfjedqy = #{record.dtfjedqy,jdbcType=VARCHAR},
      dtfjedfl = #{record.dtfjedfl,jdbcType=VARCHAR},
      dtfjedgl = #{record.dtfjedgl,jdbcType=VARCHAR},
      sffs = #{record.sffs,jdbcType=VARCHAR},
      dtfjscfl = #{record.dtfjscfl,jdbcType=VARCHAR},
      dtfjzgl = #{record.dtfjzgl,jdbcType=VARCHAR},
      zfl = #{record.zfl,jdbcType=VARCHAR},
      dwtfl = #{record.dwtfl,jdbcType=VARCHAR},
      scxtzl = #{record.scxtzl,jdbcType=VARCHAR},
      tfzyfzr = #{record.tfzyfzr,jdbcType=VARCHAR},
      tfzyry = #{record.tfzyry,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplication" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    update t_job_application
    <set >
      <if test="vCfCode != null" >
        v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="aid != null" >
        aid = #{aid,jdbcType=VARCHAR},
      </if>
      <if test="applyPerson != null" >
        apply_person = #{applyPerson,jdbcType=VARCHAR},
      </if>
      <if test="applyTime != null" >
        apply_time = #{applyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="testTime != null" >
        test_time = #{testTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null" >
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ventilationMode != null" >
        ventilation_mode = #{ventilationMode,jdbcType=VARCHAR},
      </if>
      <if test="aerationTarget != null" >
        aeration_target = #{aerationTarget,jdbcType=VARCHAR},
      </if>
      <if test="state != null" >
        state = #{state,jdbcType=INTEGER},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="packingmode != null" >
        packingmode = #{packingmode,jdbcType=INTEGER},
      </if>
      <if test="maxAter != null" >
        max_ater = #{maxAter,jdbcType=DECIMAL},
      </if>
      <if test="minWater != null" >
        min_water = #{minWater,jdbcType=DECIMAL},
      </if>
      <if test="avgWater != null" >
        avg_water = #{avgWater,jdbcType=DECIMAL},
      </if>
      <if test="areationPlanNumber != null" >
        areation_plan_number = #{areationPlanNumber,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="updatetime != null" >
        updatetime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="ldkxd != null" >
        ldkxd = #{ldkxd,jdbcType=VARCHAR},
      </if>
      <if test="tflx != null" >
        tflx = #{tflx,jdbcType=VARCHAR},
      </if>
      <if test="fwlx != null" >
        fwlx = #{fwlx,jdbcType=VARCHAR},
      </if>
      <if test="fwszfs != null" >
        fwszfs = #{fwszfs,jdbcType=VARCHAR},
      </if>
      <if test="zfdjmj != null" >
        zfdjmj = #{zfdjmj,jdbcType=VARCHAR},
      </if>
      <if test="fwkkl != null" >
        fwkkl = #{fwkkl,jdbcType=VARCHAR},
      </if>
      <if test="kqtjb != null" >
        kqtjb = #{kqtjb,jdbcType=VARCHAR},
      </if>
      <if test="tfkszgs != null" >
        tfkszgs = #{tfkszgs,jdbcType=VARCHAR},
      </if>
      <if test="tfjxh != null" >
        tfjxh = #{tfjxh,jdbcType=VARCHAR},
      </if>
      <if test="tfjts != null" >
        tfjts = #{tfjts,jdbcType=VARCHAR},
      </if>
      <if test="dtfjedqy != null" >
        dtfjedqy = #{dtfjedqy,jdbcType=VARCHAR},
      </if>
      <if test="dtfjedfl != null" >
        dtfjedfl = #{dtfjedfl,jdbcType=VARCHAR},
      </if>
      <if test="dtfjedgl != null" >
        dtfjedgl = #{dtfjedgl,jdbcType=VARCHAR},
      </if>
      <if test="sffs != null" >
        sffs = #{sffs,jdbcType=VARCHAR},
      </if>
      <if test="dtfjscfl != null" >
        dtfjscfl = #{dtfjscfl,jdbcType=VARCHAR},
      </if>
      <if test="dtfjzgl != null" >
        dtfjzgl = #{dtfjzgl,jdbcType=VARCHAR},
      </if>
      <if test="zfl != null" >
        zfl = #{zfl,jdbcType=VARCHAR},
      </if>
      <if test="dwtfl != null" >
        dwtfl = #{dwtfl,jdbcType=VARCHAR},
      </if>
      <if test="scxtzl != null" >
        scxtzl = #{scxtzl,jdbcType=VARCHAR},
      </if>
      <if test="tfzyfzr != null" >
        tfzyfzr = #{tfzyfzr,jdbcType=VARCHAR},
      </if>
      <if test="tfzyry != null" >
        tfzyry = #{tfzyry,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplication" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 09 10:55:51 CST 2020.
    -->
    update t_job_application
    set v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      aid = #{aid,jdbcType=VARCHAR},
      apply_person = #{applyPerson,jdbcType=VARCHAR},
      apply_time = #{applyTime,jdbcType=TIMESTAMP},
      test_time = #{testTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      ventilation_mode = #{ventilationMode,jdbcType=VARCHAR},
      aeration_target = #{aerationTarget,jdbcType=VARCHAR},
      state = #{state,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      packingmode = #{packingmode,jdbcType=INTEGER},
      max_ater = #{maxAter,jdbcType=DECIMAL},
      min_water = #{minWater,jdbcType=DECIMAL},
      avg_water = #{avgWater,jdbcType=DECIMAL},
      areation_plan_number = #{areationPlanNumber,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=INTEGER},
      updatetime = #{updatetime,jdbcType=TIMESTAMP},
      ldkxd = #{ldkxd,jdbcType=VARCHAR},
      tflx = #{tflx,jdbcType=VARCHAR},
      fwlx = #{fwlx,jdbcType=VARCHAR},
      fwszfs = #{fwszfs,jdbcType=VARCHAR},
      zfdjmj = #{zfdjmj,jdbcType=VARCHAR},
      fwkkl = #{fwkkl,jdbcType=VARCHAR},
      kqtjb = #{kqtjb,jdbcType=VARCHAR},
      tfkszgs = #{tfkszgs,jdbcType=VARCHAR},
      tfjxh = #{tfjxh,jdbcType=VARCHAR},
      tfjts = #{tfjts,jdbcType=VARCHAR},
      dtfjedqy = #{dtfjedqy,jdbcType=VARCHAR},
      dtfjedfl = #{dtfjedfl,jdbcType=VARCHAR},
      dtfjedgl = #{dtfjedgl,jdbcType=VARCHAR},
      sffs = #{sffs,jdbcType=VARCHAR},
      dtfjscfl = #{dtfjscfl,jdbcType=VARCHAR},
      dtfjzgl = #{dtfjzgl,jdbcType=VARCHAR},
      zfl = #{zfl,jdbcType=VARCHAR},
      dwtfl = #{dwtfl,jdbcType=VARCHAR},
      scxtzl = #{scxtzl,jdbcType=VARCHAR},
      tfzyfzr = #{tfzyfzr,jdbcType=VARCHAR},
      tfzyry = #{tfzyry,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  
  <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
    SELECT
		a.*, b.id auditId,
		b.result result,
		b.task_id task_id,
		b.task_name task_name,
		b.operator operator
	FROM
		t_job_application a,
		business_approval b
	<where>
		a.id = b.task_id
	AND(a.state = 2 OR a.state = 3)
	    <if test="result != null">
           and b.result = #{result}
        </if>
	    <if test="userId != null">
           and b.operator = #{userId}
        </if>
         order by  a.apply_time desc
    </where>
  </select>
  
  
  <select id="getJobCtrlList" parameterType="java.util.Map" resultMap="approvalResultMap">
  	select * from t_job_application t
  	where areation_plan_number in 
  	(select aeration_plan_number from t_job) 
  	 <if test="vcfCode != null">
  	 	and	t.v_cf_code= #{vcfCode}
  	 </if>
  	order by apply_time desc

  </select>
  
  
  <select id="getHouseByNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
  	select 
    <include refid="Base_Column_List" />
    from t_job_application
    where areation_plan_number = #{aerationPlanNumber,jdbcType=VARCHAR} 
  </select>
</mapper>