BisInspRssfdrRgstrImplmtDao.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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.BisInspRssfdrRgstrImplmtDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrImplmt" id="bisInspRssfdrRgstrImplmtResultMap">
  5. <result property="id" column="ID" />
  6. <result property="rgstrId" column="RGSTR_ID" />
  7. <result property="buildUnit" column="BUILD_UNIT" />
  8. <result property="safeIsSzup" column="SAFE_IS_SZUP" />
  9. <result property="hlsjIsSzup" column="HLSJ_IS_SZUP" />
  10. <result property="mopdIsSzup" column="MOPD_IS_SZUP" />
  11. <result property="brmIsSzup" column="BRM_IS_SZUP" />
  12. <result property="aowIsSzup" column="AOW_IS_SZUP" />
  13. <result property="isFwttl" column="IS_FWTTL" />
  14. <result property="note" column="NOTE" />
  15. <result property="fillUnit" column="FILL_UNIT" />
  16. <result property="fillPers" column="FILL_PERS" />
  17. <result property="fillChkPers" column="FILL_CHK_PERS" />
  18. <result property="fillTel" column="FILL_TEL" />
  19. <result property="fillTm" column="FILL_TM" />
  20. <result property="status" column="STATUS"/>
  21. <result property="recPersId" column="REC_PERS_ID" />
  22. <result property="intm" column="INTM" />
  23. <result property="uptm" column="UPTM" />
  24. <result property="AowIsOver" column="AOW_IS_OVER" />
  25. </resultMap>
  26. <sql id="table_columns">
  27. AOW_IS_OVER,
  28. ID,
  29. RGSTR_ID,
  30. BUILD_UNIT,
  31. SAFE_IS_SZUP,
  32. HLSJ_IS_SZUP,
  33. MOPD_IS_SZUP,
  34. BRM_IS_SZUP,
  35. AOW_IS_SZUP,
  36. IS_FWTTL,
  37. NOTE,
  38. FILL_UNIT,
  39. FILL_PERS,
  40. FILL_CHK_PERS,
  41. FILL_TEL,
  42. FILL_TM,
  43. STATUS,
  44. REC_PERS_ID,
  45. INTM,
  46. UPTM
  47. </sql>
  48. <sql id="entity_properties">
  49. #{AowIsOver},
  50. #{id},
  51. #{rgstrId},
  52. #{buildUnit},
  53. #{safeIsSzup},
  54. #{hlsjIsSzup},
  55. #{mopdIsSzup},
  56. #{brmIsSzup},
  57. #{aowIsSzup},
  58. #{isFwttl},
  59. #{note},
  60. #{fillUnit},
  61. #{fillPers},
  62. #{fillChkPers},
  63. #{fillTel},
  64. #{fillTm},
  65. #{status},
  66. #{recPersId},
  67. #{intm},
  68. #{uptm}
  69. </sql>
  70. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  71. <sql id="page_where">
  72. <trim prefix="where" prefixOverrides="and | or ">
  73. <if test="AowIsOver != null and AowIsOver != ''">and AOW_IS_OVER = #{AowIsOver}</if>
  74. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  75. <if test="buildUnit != null and buildUnit != ''">and BUILD_UNIT = #{buildUnit}</if>
  76. <if test="safeIsSzup != null and safeIsSzup != ''">and SAFE_IS_SZUP = #{safeIsSzup}</if>
  77. <if test="hlsjIsSzup != null and hlsjIsSzup != ''">and HLSJ_IS_SZUP = #{hlsjIsSzup}</if>
  78. <if test="mopdIsSzup != null and mopdIsSzup != ''">and MOPD_IS_SZUP = #{mopdIsSzup}</if>
  79. <if test="brmIsSzup != null and brmIsSzup != ''">and BRM_IS_SZUP = #{brmIsSzup}</if>
  80. <if test="aowIsSzup != null and aowIsSzup != ''">and AOW_IS_SZUP = #{aowIsSzup}</if>
  81. <if test="isFwttl != null and isFwttl != ''">and IS_FWTTL = #{isFwttl}</if>
  82. <if test="note != null and note != ''">and NOTE = #{note}</if>
  83. <if test="fillUnit != null and fillUnit != ''">and FILL_UNIT = #{fillUnit}</if>
  84. <if test="fillPers != null and fillPers != ''">and FILL_PERS = #{fillPers}</if>
  85. <if test="fillChkPers != null and fillChkPers != ''">and FILL_CHK_PERS = #{fillChkPers}</if>
  86. <if test="fillTel != null and fillTel != ''">and FILL_TEL = #{fillTel}</if>
  87. <if test="fillTm != null">and FILL_TM = #{fillTm}</if>
  88. <if test="status != null and status != ''">and STATUS = #{status}</if>
  89. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  90. <if test="intm != null">and INTM = #{intm}</if>
  91. <if test="uptm != null">and UPTM = #{uptm}</if>
  92. </trim>
  93. </sql>
  94. <select id="get" resultMap="bisInspRssfdrRgstrImplmtResultMap" parameterType="String" >
  95. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_IMPLMT where ID = #{id}
  96. </select>
  97. <select id="getBy" resultMap="bisInspRssfdrRgstrImplmtResultMap">
  98. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_IMPLMT <include refid="page_where" />
  99. </select>
  100. <select id="findAll" resultMap="bisInspRssfdrRgstrImplmtResultMap">
  101. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_IMPLMT
  102. </select>
  103. <select id="findList" resultMap="bisInspRssfdrRgstrImplmtResultMap">
  104. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_IMPLMT <include refid="page_where" />
  105. </select>
  106. <select id="selectCount" resultType="int" >
  107. select count(ID) from BIS_INSP_RSSFDR_RGSTR_IMPLMT <include refid="page_where" />
  108. </select>
  109. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrImplmt">
  110. insert into BIS_INSP_RSSFDR_RGSTR_IMPLMT( <include refid="table_columns" /> )
  111. values ( <include refid="entity_properties" /> )
  112. </insert>
  113. <delete id="delete" parameterType="java.lang.String">
  114. delete from BIS_INSP_RSSFDR_RGSTR_IMPLMT where ID = #{id}
  115. </delete>
  116. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrImplmt">
  117. delete from BIS_INSP_RSSFDR_RGSTR_IMPLMT <include refid="page_where" />
  118. </delete>
  119. <update id="deleteInFlag" parameterType="java.lang.String">
  120. update BIS_INSP_RSSFDR_RGSTR_IMPLMT set flag_valid = 0 where>ID = #{id}
  121. </update>
  122. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrImplmt">
  123. update BIS_INSP_RSSFDR_RGSTR_IMPLMT
  124. <trim prefix="set" suffixOverrides=",">
  125. <if test="AowIsOver != null and AowIsOver != ''">AOW_IS_OVER = #{AowIsOver},</if>
  126. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  127. <if test="buildUnit != null and buildUnit != ''">BUILD_UNIT = #{buildUnit},</if>
  128. <if test="safeIsSzup != null and safeIsSzup != ''">SAFE_IS_SZUP = #{safeIsSzup},</if>
  129. <if test="hlsjIsSzup != null and hlsjIsSzup != ''">HLSJ_IS_SZUP = #{hlsjIsSzup},</if>
  130. <if test="mopdIsSzup != null and mopdIsSzup != ''">MOPD_IS_SZUP = #{mopdIsSzup},</if>
  131. <if test="brmIsSzup != null and brmIsSzup != ''">BRM_IS_SZUP = #{brmIsSzup},</if>
  132. <if test="aowIsSzup != null and aowIsSzup != ''">AOW_IS_SZUP = #{aowIsSzup},</if>
  133. <if test="isFwttl != null and isFwttl != ''">IS_FWTTL = #{isFwttl},</if>
  134. <if test="note != null and note != ''">NOTE = #{note},</if>
  135. <if test="fillUnit != null and fillUnit != ''">FILL_UNIT = #{fillUnit},</if>
  136. <if test="fillPers != null and fillPers != ''">FILL_PERS = #{fillPers},</if>
  137. <if test="fillChkPers != null and fillChkPers != ''">FILL_CHK_PERS = #{fillChkPers},</if>
  138. <if test="fillTel != null and fillTel != ''">FILL_TEL = #{fillTel},</if>
  139. <if test="fillTm != null">FILL_TM = #{fillTm},</if>
  140. <if test="status != null and status != ''">STATUS = #{status},</if>
  141. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  142. <if test="intm != null">INTM = #{intm},</if>
  143. <if test="uptm != null">UPTM = #{uptm},</if>
  144. </trim>
  145. <where>ID = #{id}</where>
  146. </update>
  147. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrImplmt">
  148. update BIS_INSP_RSSFDR_RGSTR_IMPLMT
  149. <trim prefix="set" suffixOverrides=",">
  150. <if test="AowIsOver != null and AowIsOver != ''">AOW_IS_OVER = #{AowIsOver},</if>
  151. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  152. <if test="buildUnit != null and buildUnit != ''">BUILD_UNIT = #{buildUnit},</if>
  153. <if test="safeIsSzup != null and safeIsSzup != ''">SAFE_IS_SZUP = #{safeIsSzup},</if>
  154. <if test="hlsjIsSzup != null and hlsjIsSzup != ''">HLSJ_IS_SZUP = #{hlsjIsSzup},</if>
  155. <if test="mopdIsSzup != null and mopdIsSzup != ''">MOPD_IS_SZUP = #{mopdIsSzup},</if>
  156. <if test="brmIsSzup != null and brmIsSzup != ''">BRM_IS_SZUP = #{brmIsSzup},</if>
  157. <if test="aowIsSzup != null and aowIsSzup != ''">AOW_IS_SZUP = #{aowIsSzup},</if>
  158. <if test="isFwttl != null and isFwttl != ''">IS_FWTTL = #{isFwttl},</if>
  159. <if test="note != null and note != ''">NOTE = #{note},</if>
  160. <if test="fillUnit != null and fillUnit != ''">FILL_UNIT = #{fillUnit},</if>
  161. <if test="fillPers != null and fillPers != ''">FILL_PERS = #{fillPers},</if>
  162. <if test="fillChkPers != null and fillChkPers != ''">FILL_CHK_PERS = #{fillChkPers},</if>
  163. <if test="fillTel != null and fillTel != ''">FILL_TEL = #{fillTel},</if>
  164. <if test="fillTm != null">FILL_TM = #{fillTm},</if>
  165. <if test="status != null and status != ''">STATUS = #{status},</if>
  166. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  167. <if test="intm != null">INTM = #{intm},</if>
  168. <if test="uptm != null">UPTM = #{uptm},</if>
  169. </trim>
  170. <include refid="page_where" />
  171. </update>
  172. <!-- 其他自定义SQL -->
  173. </mapper>