| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?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="cn.com.goldenwater.dcproj.dao.AttEmpwtprjTrackDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack" id="attEmpwtprjTrackResultMap">
- <result property="id" column="ID"/>
- <result property="ptype" column="PTYPE"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="nm" column="NM"/>
- <result property="stwktm" column="STWKTM"/>
- <result property="plantm" column="PLANTM"/>
- <result property="estapp" column="ESTAPP"/>
- <result property="lgtd" column="LGTD"/>
- <result property="lttd" column="LTTD"/>
- <result property="lgtdPc" column="LGTD_PC"/>
- <result property="lttdPc" column="LTTD_PC"/>
- <result property="unitId" column="UNIT_ID"/>
- <result property="unitNm" column="UNIT_NM"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="note" column="NOTE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="engProfil" column="ENG_PROFIL"/>
- <result property="engBuild" column="ENG_BUILD"/>
- </resultMap>
- <sql id="table_columns">
- ID,ENG_PROFIL,ENG_BUILD,
- PTYPE,
- AD_CODE,
- NM,
- STWKTM,
- PLANTM,
- ESTAPP,
- LGTD,
- LTTD,
- LGTD_PC,
- LTTD_PC,
- UNIT_ID,
- UNIT_NM,
- PERS_ID,
- INTM,
- UPTM,
- NOTE,
- AD_NAME
- </sql>
- <sql id="entity_properties">
- #{id},#{engProfil},#{engBuild},
- #{ptype},
- #{adCode},
- #{nm},
- #{stwktm},
- #{plantm},
- #{estapp},
- #{lgtd},
- #{lttd},
- #{lgtdPc},
- #{lttdPc},
- #{unitId},
- #{unitNm},
- #{persId},
- #{intm},
- #{uptm},
- #{note},
- #{adName}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="ptype != null and ptype != ''">and PTYPE = #{ptype}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="nm != null and nm != ''">and NM = #{nm}</if>
- <if test="stwktm != null and stwktm != ''">and STWKTM = #{stwktm}</if>
- <if test="plantm != null and plantm != ''">and PLANTM = #{plantm}</if>
- <if test="estapp != null and estapp != ''">and ESTAPP = #{estapp}</if>
- <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
- <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
- <if test="lgtdPc != null and lgtdPc != ''">and LGTD_PC = #{lgtdPc}</if>
- <if test="lttdPc != null and lttdPc != ''">and LTTD_PC = #{lttdPc}</if>
- <if test="unitId != null and unitId != ''">and UNIT_ID = #{unitId}</if>
- <if test="unitNm != null and unitNm != ''">and UNIT_NM = #{unitNm}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="engProfil != null and engProfil != ''">and eng_Profil = #{engProfil}</if>
- <if test="engBuild != null and engBuild != ''">and eng_Build = #{engBuild}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attEmpwtprjTrackResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_EMPWTPRJ_TRACK where ID = #{id}
- </select>
- <select id="getBy" resultMap="attEmpwtprjTrackResultMap">
- select
- <include refid="table_columns"/>
- from ATT_EMPWTPRJ_TRACK
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attEmpwtprjTrackResultMap">
- select
- <include refid="table_columns"/>
- from ATT_EMPWTPRJ_TRACK
- </select>
- <select id="findList" resultMap="attEmpwtprjTrackResultMap">
- select
- <include refid="table_columns"/>
- from ATT_EMPWTPRJ_TRACK
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ATT_EMPWTPRJ_TRACK
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
- insert into ATT_EMPWTPRJ_TRACK(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <insert id="insertBase" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjBase">
- insert into ATT_EMPWTPRJ_TRACK(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_EMPWTPRJ_TRACK where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
- delete from ATT_EMPWTPRJ_TRACK
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_EMPWTPRJ_TRACK set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
- update ATT_EMPWTPRJ_TRACK
- <trim prefix="set" suffixOverrides=",">
- <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="nm != null and nm != ''">NM = #{nm},</if>
- <if test="stwktm != null and stwktm != ''">STWKTM = #{stwktm},</if>
- <if test="plantm != null and plantm != ''">PLANTM = #{plantm},</if>
- <if test="estapp != null and estapp != ''">ESTAPP = #{estapp},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC = #{lgtdPc},</if>
- <if test="lttdPc != null and lttdPc != ''">LTTD_PC = #{lttdPc},</if>
- <if test="unitId != null and unitId != ''">UNIT_ID = #{unitId},</if>
- <if test="unitNm != null and unitNm != ''">UNIT_NM = #{unitNm},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="engProfil != null and engProfil != ''"> eng_Profil = #{engProfil},</if>
- <if test="engBuild != null and engBuild != ''"> eng_Build = #{engBuild},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
- update ATT_EMPWTPRJ_TRACK
- <trim prefix="set" suffixOverrides=",">
- <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="nm != null and nm != ''">NM = #{nm},</if>
- <if test="stwktm != null and stwktm != ''">STWKTM = #{stwktm},</if>
- <if test="plantm != null and plantm != ''">PLANTM = #{plantm},</if>
- <if test="estapp != null and estapp != ''">ESTAPP = #{estapp},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC = #{lgtdPc},</if>
- <if test="lttdPc != null and lttdPc != ''">LTTD_PC = #{lttdPc},</if>
- <if test="unitId != null and unitId != ''">UNIT_ID = #{unitId},</if>
- <if test="unitNm != null and unitNm != ''">UNIT_NM = #{unitNm},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="engProfil != null and engProfil != ''"> eng_Profil = #{engProfil},</if>
- <if test="engBuild != null and engBuild != ''"> eng_Build = #{engBuild},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|