BisInspEmpwtprjDao.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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.BisInspEmpwtprjDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspEmpwtprj" id="bisInspEmpwtprjResultMap">
  5. <result property="empwtprjId" column="EMPWTPRJ_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="visshdu" column="VISSHDU"/>
  13. <result property="dirunder" column="DIRUNDER"/>
  14. <result property="intm" column="INTM"/>
  15. <result property="uptm" column="UPTM"/>
  16. <result property="note" column="NOTE"/>
  17. <result property="pjLgtd" column="PJ_LGTD"/>
  18. <result property="pjLttd" column="PJ_LTTD"/>
  19. <result property="empwtprjPid" column="EMPWTPRJ_PID"/>
  20. </resultMap>
  21. <sql id="table_columns">
  22. EMPWTPRJ_ID,
  23. PTYPE,
  24. AD_CODE,
  25. NM,
  26. STWKTM,
  27. PLANTM,
  28. ESTAPP,
  29. VISSHDU,
  30. DIRUNDER,
  31. INTM,
  32. UPTM,
  33. NOTE,
  34. PJ_LGTD,
  35. PJ_LTTD,
  36. EMPWTPRJ_PID
  37. </sql>
  38. <sql id="entity_properties">
  39. #{empwtprjId},
  40. #{ptype},
  41. #{adCode},
  42. #{nm},
  43. #{stwktm},
  44. #{plantm},
  45. #{estapp},
  46. #{visshdu},
  47. #{dirunder},
  48. #{intm},
  49. #{uptm},
  50. #{note},
  51. #{pjLgtd},
  52. #{pjLttd},
  53. #{empwtprjPid}
  54. </sql>
  55. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  56. <sql id="page_where">
  57. <trim prefix="where" prefixOverrides="and | or ">
  58. <if test="ptype != null and ptype != ''">and PTYPE = #{ptype}</if>
  59. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  60. <if test="nm != null and nm != ''">and NM = #{nm}</if>
  61. <if test="stwktm != null and stwktm != ''">and STWKTM = #{stwktm}</if>
  62. <if test="plantm != null and plantm != ''">and PLANTM = #{plantm}</if>
  63. <if test="estapp != null and estapp != ''">and ESTAPP = #{estapp}</if>
  64. <if test="visshdu != null and visshdu != ''">and VISSHDU = #{visshdu}</if>
  65. <if test="dirunder != null and dirunder != ''">and DIRUNDER = #{dirunder}</if>
  66. <if test="intm != null">and INTM = #{intm}</if>
  67. <if test="uptm != null">and UPTM = #{uptm}</if>
  68. <if test="note != null and note != ''">and NOTE = #{note}</if>
  69. <if test="pjLgtd != null and pjLgtd != ''">and PJ_LGTD = #{pjLgtd}</if>
  70. <if test="pjLttd != null and pjLttd != ''">and PJ_LTTD = #{pjLttd}</if>
  71. <if test="empwtprjPid != null and empwtprjPid != ''">and EMPWTPRJ_PID = #{empwtprjPid}</if>
  72. </trim>
  73. </sql>
  74. <select id="get" resultMap="bisInspEmpwtprjResultMap" parameterType="String">
  75. select
  76. <include refid="table_columns"/>
  77. from BIS_INSP_EMPWTPRJ where ID = #{id}
  78. </select>
  79. <select id="getBy" resultMap="bisInspEmpwtprjResultMap">
  80. select
  81. <include refid="table_columns"/>
  82. from BIS_INSP_EMPWTPRJ
  83. <include refid="page_where"/>
  84. </select>
  85. <select id="findAll" resultMap="bisInspEmpwtprjResultMap">
  86. select
  87. <include refid="table_columns"/>
  88. from BIS_INSP_EMPWTPRJ
  89. </select>
  90. <select id="findList" resultMap="bisInspEmpwtprjResultMap">
  91. select
  92. <include refid="table_columns"/>
  93. from BIS_INSP_EMPWTPRJ
  94. <include refid="page_where"/>
  95. </select>
  96. <select id="selectCount" resultType="int">
  97. select count(ID) from BIS_INSP_EMPWTPRJ
  98. <include refid="page_where"/>
  99. </select>
  100. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspEmpwtprj">
  101. insert into BIS_INSP_EMPWTPRJ(
  102. <include refid="table_columns"/>
  103. )
  104. values (
  105. <include refid="entity_properties"/>
  106. )
  107. </insert>
  108. <delete id="delete" parameterType="java.lang.String">
  109. delete from BIS_INSP_EMPWTPRJ where ID = #{id}
  110. </delete>
  111. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspEmpwtprj">
  112. delete from BIS_INSP_EMPWTPRJ
  113. <include refid="page_where"/>
  114. </delete>
  115. <update id="deleteInFlag" parameterType="java.lang.String">
  116. update BIS_INSP_EMPWTPRJ set flag_valid = 0 where ID = #{id}
  117. </update>
  118. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspEmpwtprj">
  119. update BIS_INSP_EMPWTPRJ
  120. <trim prefix="set" suffixOverrides=",">
  121. <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
  122. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  123. <if test="nm != null and nm != ''">NM = #{nm},</if>
  124. <if test="stwktm != null and stwktm != ''">STWKTM = #{stwktm},</if>
  125. <if test="plantm != null and plantm != ''">PLANTM = #{plantm},</if>
  126. <if test="estapp != null and estapp != ''">ESTAPP = #{estapp},</if>
  127. <if test="visshdu != null and visshdu != ''">VISSHDU = #{visshdu},</if>
  128. <if test="dirunder != null and dirunder != ''">DIRUNDER = #{dirunder},</if>
  129. <if test="intm != null">INTM = #{intm},</if>
  130. <if test="uptm != null">UPTM = #{uptm},</if>
  131. <if test="note != null and note != ''">NOTE = #{note},</if>
  132. <if test="pjLgtd != null and pjLgtd != ''">PJ_LGTD = #{pjLgtd},</if>
  133. <if test="pjLttd != null and pjLttd != ''">PJ_LTTD = #{pjLttd},</if>
  134. <if test="empwtprjPid != null and empwtprjPid != ''">EMPWTPRJ_PID = #{empwtprjPid},</if>
  135. </trim>
  136. <where>ID = #{id}</where>
  137. </update>
  138. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspEmpwtprj">
  139. update BIS_INSP_EMPWTPRJ
  140. <trim prefix="set" suffixOverrides=",">
  141. <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
  142. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  143. <if test="nm != null and nm != ''">NM = #{nm},</if>
  144. <if test="stwktm != null and stwktm != ''">STWKTM = #{stwktm},</if>
  145. <if test="plantm != null and plantm != ''">PLANTM = #{plantm},</if>
  146. <if test="estapp != null and estapp != ''">ESTAPP = #{estapp},</if>
  147. <if test="visshdu != null and visshdu != ''">VISSHDU = #{visshdu},</if>
  148. <if test="dirunder != null and dirunder != ''">DIRUNDER = #{dirunder},</if>
  149. <if test="intm != null">INTM = #{intm},</if>
  150. <if test="uptm != null">UPTM = #{uptm},</if>
  151. <if test="note != null and note != ''">NOTE = #{note},</if>
  152. <if test="pjLgtd != null and pjLgtd != ''">PJ_LGTD = #{pjLgtd},</if>
  153. <if test="pjLttd != null and pjLttd != ''">PJ_LTTD = #{pjLttd},</if>
  154. <if test="empwtprjPid != null and empwtprjPid != ''">EMPWTPRJ_PID = #{empwtprjPid},</if>
  155. </trim>
  156. <include refid="page_where"/>
  157. </update>
  158. <!-- 其他自定义SQL -->
  159. </mapper>