AttEmpwtprjTrackDao.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.AttEmpwtprjTrackDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack" id="attEmpwtprjTrackResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="ptype" column="PTYPE"/>
  7. <result property="adCode" column="AD_CODE"/>
  8. <result property="nm" column="NM"/>
  9. <result property="stwktm" column="STWKTM"/>
  10. <result property="plantm" column="PLANTM"/>
  11. <result property="estapp" column="ESTAPP"/>
  12. <result property="lgtd" column="LGTD"/>
  13. <result property="lttd" column="LTTD"/>
  14. <result property="lgtdPc" column="LGTD_PC"/>
  15. <result property="lttdPc" column="LTTD_PC"/>
  16. <result property="unitId" column="UNIT_ID"/>
  17. <result property="unitNm" column="UNIT_NM"/>
  18. <result property="persId" column="PERS_ID"/>
  19. <result property="intm" column="INTM"/>
  20. <result property="uptm" column="UPTM"/>
  21. <result property="note" column="NOTE"/>
  22. <result property="adName" column="AD_NAME"/>
  23. <result property="engProfil" column="ENG_PROFIL"/>
  24. <result property="engBuild" column="ENG_BUILD"/>
  25. </resultMap>
  26. <sql id="table_columns">
  27. ID,ENG_PROFIL,ENG_BUILD,
  28. PTYPE,
  29. AD_CODE,
  30. NM,
  31. STWKTM,
  32. PLANTM,
  33. ESTAPP,
  34. LGTD,
  35. LTTD,
  36. LGTD_PC,
  37. LTTD_PC,
  38. UNIT_ID,
  39. UNIT_NM,
  40. PERS_ID,
  41. INTM,
  42. UPTM,
  43. NOTE,
  44. AD_NAME
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},#{engProfil},#{engBuild},
  48. #{ptype},
  49. #{adCode},
  50. #{nm},
  51. #{stwktm},
  52. #{plantm},
  53. #{estapp},
  54. #{lgtd},
  55. #{lttd},
  56. #{lgtdPc},
  57. #{lttdPc},
  58. #{unitId},
  59. #{unitNm},
  60. #{persId},
  61. #{intm},
  62. #{uptm},
  63. #{note},
  64. #{adName}
  65. </sql>
  66. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  67. <sql id="page_where">
  68. <trim prefix="where" prefixOverrides="and | or ">
  69. <if test="ptype != null and ptype != ''">and PTYPE = #{ptype}</if>
  70. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  71. <if test="nm != null and nm != ''">and NM = #{nm}</if>
  72. <if test="stwktm != null and stwktm != ''">and STWKTM = #{stwktm}</if>
  73. <if test="plantm != null and plantm != ''">and PLANTM = #{plantm}</if>
  74. <if test="estapp != null and estapp != ''">and ESTAPP = #{estapp}</if>
  75. <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
  76. <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
  77. <if test="lgtdPc != null and lgtdPc != ''">and LGTD_PC = #{lgtdPc}</if>
  78. <if test="lttdPc != null and lttdPc != ''">and LTTD_PC = #{lttdPc}</if>
  79. <if test="unitId != null and unitId != ''">and UNIT_ID = #{unitId}</if>
  80. <if test="unitNm != null and unitNm != ''">and UNIT_NM = #{unitNm}</if>
  81. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  82. <if test="intm != null">and INTM = #{intm}</if>
  83. <if test="uptm != null">and UPTM = #{uptm}</if>
  84. <if test="note != null and note != ''">and NOTE = #{note}</if>
  85. <if test="engProfil != null and engProfil != ''">and eng_Profil = #{engProfil}</if>
  86. <if test="engBuild != null and engBuild != ''">and eng_Build = #{engBuild}</if>
  87. </trim>
  88. </sql>
  89. <select id="get" resultMap="attEmpwtprjTrackResultMap" parameterType="String">
  90. select
  91. <include refid="table_columns"/>
  92. from ATT_EMPWTPRJ_TRACK where ID = #{id}
  93. </select>
  94. <select id="getBy" resultMap="attEmpwtprjTrackResultMap">
  95. select
  96. <include refid="table_columns"/>
  97. from ATT_EMPWTPRJ_TRACK
  98. <include refid="page_where"/>
  99. </select>
  100. <select id="findAll" resultMap="attEmpwtprjTrackResultMap">
  101. select
  102. <include refid="table_columns"/>
  103. from ATT_EMPWTPRJ_TRACK
  104. </select>
  105. <select id="findList" resultMap="attEmpwtprjTrackResultMap">
  106. select
  107. <include refid="table_columns"/>
  108. from ATT_EMPWTPRJ_TRACK
  109. <include refid="page_where"/>
  110. </select>
  111. <select id="selectCount" resultType="int">
  112. select count(ID) from ATT_EMPWTPRJ_TRACK
  113. <include refid="page_where"/>
  114. </select>
  115. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
  116. insert into ATT_EMPWTPRJ_TRACK(
  117. <include refid="table_columns"/>
  118. )
  119. values (
  120. <include refid="entity_properties"/>
  121. )
  122. </insert>
  123. <insert id="insertBase" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjBase">
  124. insert into ATT_EMPWTPRJ_TRACK(
  125. <include refid="table_columns"/>
  126. )
  127. values (
  128. <include refid="entity_properties"/>
  129. )
  130. </insert>
  131. <delete id="delete" parameterType="java.lang.String">
  132. delete from ATT_EMPWTPRJ_TRACK where ID = #{id}
  133. </delete>
  134. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
  135. delete from ATT_EMPWTPRJ_TRACK
  136. <include refid="page_where"/>
  137. </delete>
  138. <update id="deleteInFlag" parameterType="java.lang.String">
  139. update ATT_EMPWTPRJ_TRACK set flag_valid = 0 where ID = #{id}
  140. </update>
  141. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
  142. update ATT_EMPWTPRJ_TRACK
  143. <trim prefix="set" suffixOverrides=",">
  144. <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
  145. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  146. <if test="nm != null and nm != ''">NM = #{nm},</if>
  147. <if test="stwktm != null and stwktm != ''">STWKTM = #{stwktm},</if>
  148. <if test="plantm != null and plantm != ''">PLANTM = #{plantm},</if>
  149. <if test="estapp != null and estapp != ''">ESTAPP = #{estapp},</if>
  150. <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
  151. <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
  152. <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC = #{lgtdPc},</if>
  153. <if test="lttdPc != null and lttdPc != ''">LTTD_PC = #{lttdPc},</if>
  154. <if test="unitId != null and unitId != ''">UNIT_ID = #{unitId},</if>
  155. <if test="unitNm != null and unitNm != ''">UNIT_NM = #{unitNm},</if>
  156. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  157. <if test="intm != null">INTM = #{intm},</if>
  158. <if test="uptm != null">UPTM = #{uptm},</if>
  159. <if test="note != null and note != ''">NOTE = #{note},</if>
  160. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  161. <if test="engProfil != null and engProfil != ''"> eng_Profil = #{engProfil},</if>
  162. <if test="engBuild != null and engBuild != ''"> eng_Build = #{engBuild},</if>
  163. </trim>
  164. <where>ID = #{id}</where>
  165. </update>
  166. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEmpwtprjTrack">
  167. update ATT_EMPWTPRJ_TRACK
  168. <trim prefix="set" suffixOverrides=",">
  169. <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
  170. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  171. <if test="nm != null and nm != ''">NM = #{nm},</if>
  172. <if test="stwktm != null and stwktm != ''">STWKTM = #{stwktm},</if>
  173. <if test="plantm != null and plantm != ''">PLANTM = #{plantm},</if>
  174. <if test="estapp != null and estapp != ''">ESTAPP = #{estapp},</if>
  175. <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
  176. <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
  177. <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC = #{lgtdPc},</if>
  178. <if test="lttdPc != null and lttdPc != ''">LTTD_PC = #{lttdPc},</if>
  179. <if test="unitId != null and unitId != ''">UNIT_ID = #{unitId},</if>
  180. <if test="unitNm != null and unitNm != ''">UNIT_NM = #{unitNm},</if>
  181. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  182. <if test="intm != null">INTM = #{intm},</if>
  183. <if test="uptm != null">UPTM = #{uptm},</if>
  184. <if test="note != null and note != ''">NOTE = #{note},</if>
  185. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  186. <if test="engProfil != null and engProfil != ''"> eng_Profil = #{engProfil},</if>
  187. <if test="engBuild != null and engBuild != ''"> eng_Build = #{engBuild},</if>
  188. </trim>
  189. <include refid="page_where"/>
  190. </update>
  191. <!-- 其他自定义SQL -->
  192. </mapper>