BisInspWrmWtuntPblmDao.xml 9.5 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.BisInspWrmWtuntPblmDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrmWtuntPblm" id="bisInspWrmWtuntPblmResultMap">
  5. <result property="id" column="ID" />
  6. <result property="rgstrId" column="RGSTR_ID" />
  7. <result property="objType" column="OBJ_TYPE" />
  8. <result property="objNm" column="OBJ_NM" />
  9. <result property="adName" column="AD_NAME" />
  10. <result property="adCode" column="AD_CODE" />
  11. <result property="centerX" column="CENTER_X" />
  12. <result property="centerY" column="CENTER_Y" />
  13. <result property="gdX" column="GD_X" />
  14. <result property="gdY" column="GD_Y" />
  15. <result property="pblmType" column="PBLM_TYPE" />
  16. <result property="pblmDesc" column="PBLM_DESC" />
  17. <result property="rectMsrs" column="RECT_MSRS" />
  18. <result property="rectConc" column="RECT_CONC" />
  19. <result property="rectOpin" column="RECT_OPIN" />
  20. <result property="bChkUnit" column="B_CHK_UNIT" />
  21. <result property="contact" column="CONTACT" />
  22. <result property="principal" column="PRINCIPAL" />
  23. <result property="principalTel" column="PRINCIPAL_TEL" />
  24. <result property="persId" column="PERS_ID" />
  25. <result property="groupId" column="GROUP_ID" />
  26. <result property="intm" column="INTM" />
  27. <result property="uptm" column="UPTM" />
  28. </resultMap>
  29. <sql id="table_columns">
  30. ID,
  31. RGSTR_ID,
  32. OBJ_TYPE,
  33. OBJ_NM,
  34. AD_NAME,
  35. AD_CODE,
  36. CENTER_X,
  37. CENTER_Y,
  38. GD_X,
  39. GD_Y,
  40. PBLM_TYPE,
  41. PBLM_DESC,
  42. RECT_MSRS,
  43. RECT_CONC,
  44. RECT_OPIN,
  45. B_CHK_UNIT,
  46. CONTACT,
  47. PRINCIPAL,
  48. PRINCIPAL_TEL,
  49. PERS_ID,
  50. GROUP_ID,
  51. INTM,
  52. UPTM
  53. </sql>
  54. <sql id="entity_properties">
  55. #{id},
  56. #{rgstrId},
  57. #{objType},
  58. #{objNm},
  59. #{adName},
  60. #{adCode},
  61. #{centerX},
  62. #{centerY},
  63. #{gdX},
  64. #{gdY},
  65. #{pblmType},
  66. #{pblmDesc},
  67. #{rectMsrs},
  68. #{rectConc},
  69. #{rectOpin},
  70. #{bChkUnit},
  71. #{contact},
  72. #{principal},
  73. #{principalTel},
  74. #{persId},
  75. #{groupId},
  76. #{intm},
  77. #{uptm}
  78. </sql>
  79. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  80. <sql id="page_where">
  81. <trim prefix="where" prefixOverrides="and | or ">
  82. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  83. <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
  84. <if test="objNm != null and objNm != ''">and OBJ_NM = #{objNm}</if>
  85. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  86. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  87. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  88. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  89. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  90. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  91. <if test="pblmType != null and pblmType != ''">and PBLM_TYPE = #{pblmType}</if>
  92. <if test="pblmDesc != null and pblmDesc != ''">and PBLM_DESC = #{pblmDesc}</if>
  93. <if test="rectMsrs != null and rectMsrs != ''">and RECT_MSRS = #{rectMsrs}</if>
  94. <if test="rectConc != null and rectConc != ''">and RECT_CONC = #{rectConc}</if>
  95. <if test="rectOpin != null and rectOpin != ''">and RECT_OPIN = #{rectOpin}</if>
  96. <if test="bChkUnit != null and bChkUnit != ''">and B_CHK_UNIT = #{bChkUnit}</if>
  97. <if test="contact != null and contact != ''">and CONTACT = #{contact}</if>
  98. <if test="principal != null and principal != ''">and PRINCIPAL = #{principal}</if>
  99. <if test="principalTel != null and principalTel != ''">and PRINCIPAL_TEL = #{principalTel}</if>
  100. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  101. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  102. <if test="intm != null">and INTM = #{intm}</if>
  103. <if test="uptm != null">and UPTM = #{uptm}</if>
  104. </trim>
  105. </sql>
  106. <select id="get" resultMap="bisInspWrmWtuntPblmResultMap" parameterType="String" >
  107. select <include refid="table_columns" /> from BIS_INSP_WRM_WTUNT_PBLM where ID = #{id}
  108. </select>
  109. <select id="getBy" resultMap="bisInspWrmWtuntPblmResultMap">
  110. select <include refid="table_columns" /> from BIS_INSP_WRM_WTUNT_PBLM <include refid="page_where" />
  111. </select>
  112. <select id="findAll" resultMap="bisInspWrmWtuntPblmResultMap">
  113. select <include refid="table_columns" /> from BIS_INSP_WRM_WTUNT_PBLM
  114. </select>
  115. <select id="findList" resultMap="bisInspWrmWtuntPblmResultMap">
  116. select <include refid="table_columns" /> from BIS_INSP_WRM_WTUNT_PBLM <include refid="page_where" />
  117. </select>
  118. <select id="selectCount" resultType="int" >
  119. select count(ID) from BIS_INSP_WRM_WTUNT_PBLM <include refid="page_where" />
  120. </select>
  121. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmWtuntPblm">
  122. insert into BIS_INSP_WRM_WTUNT_PBLM( <include refid="table_columns" /> )
  123. values ( <include refid="entity_properties" /> )
  124. </insert>
  125. <delete id="delete" parameterType="java.lang.String">
  126. delete from BIS_INSP_WRM_WTUNT_PBLM where ID = #{id}
  127. </delete>
  128. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmWtuntPblm">
  129. delete from BIS_INSP_WRM_WTUNT_PBLM <include refid="page_where" />
  130. </delete>
  131. <update id="deleteInFlag" parameterType="java.lang.String">
  132. update BIS_INSP_WRM_WTUNT_PBLM set flag_valid = 0 where>ID = #{id}
  133. </update>
  134. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmWtuntPblm">
  135. update BIS_INSP_WRM_WTUNT_PBLM
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  138. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  139. <if test="objNm != null and objNm != ''">OBJ_NM = #{objNm},</if>
  140. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  141. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  142. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  143. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  144. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  145. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  146. <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
  147. <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
  148. <if test="rectMsrs != null and rectMsrs != ''">RECT_MSRS = #{rectMsrs},</if>
  149. <if test="rectConc != null and rectConc != ''">RECT_CONC = #{rectConc},</if>
  150. <if test="rectOpin != null and rectOpin != ''">RECT_OPIN = #{rectOpin},</if>
  151. <if test="bChkUnit != null and bChkUnit != ''">B_CHK_UNIT = #{bChkUnit},</if>
  152. <if test="contact != null and contact != ''">CONTACT = #{contact},</if>
  153. <if test="principal != null and principal != ''">PRINCIPAL = #{principal},</if>
  154. <if test="principalTel != null and principalTel != ''">PRINCIPAL_TEL = #{principalTel},</if>
  155. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  156. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  157. <if test="intm != null">INTM = #{intm},</if>
  158. <if test="uptm != null">UPTM = #{uptm},</if>
  159. </trim>
  160. <where>ID = #{id}</where>
  161. </update>
  162. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmWtuntPblm">
  163. update BIS_INSP_WRM_WTUNT_PBLM
  164. <trim prefix="set" suffixOverrides=",">
  165. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  166. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  167. <if test="objNm != null and objNm != ''">OBJ_NM = #{objNm},</if>
  168. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  169. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  170. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  171. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  172. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  173. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  174. <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
  175. <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
  176. <if test="rectMsrs != null and rectMsrs != ''">RECT_MSRS = #{rectMsrs},</if>
  177. <if test="rectConc != null and rectConc != ''">RECT_CONC = #{rectConc},</if>
  178. <if test="rectOpin != null and rectOpin != ''">RECT_OPIN = #{rectOpin},</if>
  179. <if test="bChkUnit != null and bChkUnit != ''">B_CHK_UNIT = #{bChkUnit},</if>
  180. <if test="contact != null and contact != ''">CONTACT = #{contact},</if>
  181. <if test="principal != null and principal != ''">PRINCIPAL = #{principal},</if>
  182. <if test="principalTel != null and principalTel != ''">PRINCIPAL_TEL = #{principalTel},</if>
  183. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  184. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  185. <if test="intm != null">INTM = #{intm},</if>
  186. <if test="uptm != null">UPTM = #{uptm},</if>
  187. </trim>
  188. <include refid="page_where" />
  189. </update>
  190. <!-- 其他自定义SQL -->
  191. </mapper>