BisInspRsvrRgstrChkInfoDao.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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.BisInspRsvrRgstrChkInfoDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstrChkInfo" id="bisInspRsvrRgstrChkInfoResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="inspYear" column="INSP_YEAR"/>
  8. <result property="wcEvltOld" column="WC_EVLT_OLD"/>
  9. <result property="wcEvltNow" column="WC_EVLT_NOW"/>
  10. <result property="mshTmp" column="MSH_TMP"/>
  11. <result property="chkType" column="CHK_TYPE"/>
  12. <result property="isTrhbco" column="IS_TRHBCO"/>
  13. <result property="trhbcoInfo" column="TRHBCO_INFO"/>
  14. <result property="trhbcoSttm" column="TRHBCO_STTM"/>
  15. <result property="trhbcoEntm" column="TRHBCO_ENTM"/>
  16. <result property="mngUnit" column="MNG_UNIT"/>
  17. <result property="dutyUnit" column="DUTY_UNIT"/>
  18. <result property="note" column="NOTE"/>
  19. <result property="status" column="STATUS"/>
  20. <result property="persId" column="PERS_ID"/>
  21. <result property="intm" column="INTM"/>
  22. <result property="uptm" column="UPTM"/>
  23. <result property="isSite" column="IS_SITE"/>
  24. <result property="chkDesc" column="CHK_DESC"/>
  25. </resultMap>
  26. <sql id="table_columns">
  27. ID,
  28. RGSTR_ID,
  29. INSP_YEAR,
  30. WC_EVLT_OLD,
  31. WC_EVLT_NOW,
  32. MSH_TMP,
  33. CHK_TYPE,
  34. IS_TRHBCO,
  35. TRHBCO_INFO,
  36. TRHBCO_STTM,
  37. TRHBCO_ENTM,
  38. MNG_UNIT,
  39. DUTY_UNIT,
  40. NOTE,
  41. STATUS,
  42. PERS_ID,
  43. INTM,
  44. UPTM,
  45. IS_SITE,
  46. CHK_DESC
  47. </sql>
  48. <sql id="entity_properties">
  49. #{id},
  50. #{rgstrId},
  51. #{inspYear},
  52. #{wcEvltOld},
  53. #{wcEvltNow},
  54. #{mshTmp},
  55. #{chkType},
  56. #{isTrhbco},
  57. #{trhbcoInfo},
  58. #{trhbcoSttm},
  59. #{trhbcoEntm},
  60. #{mngUnit},
  61. #{dutyUnit},
  62. #{note},
  63. #{status},
  64. #{persId},
  65. #{intm},
  66. #{uptm},
  67. #{isSite},
  68. #{chkDesc}
  69. </sql>
  70. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  71. <sql id="page_where">
  72. <trim prefix="where" prefixOverrides="and | or ">
  73. <if test="chkDesc != null and chkDesc != ''">and CHK_DESC = #{chkDesc}</if>
  74. <if test="isSite != null and isSite != ''">and IS_SITE = #{isSite}</if>
  75. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  76. <if test="inspYear != null and inspYear != ''">and INSP_YEAR = #{inspYear}</if>
  77. <if test="wcEvltOld != null and wcEvltOld != ''">and WC_EVLT_OLD = #{wcEvltOld}</if>
  78. <if test="wcEvltNow != null and wcEvltNow != ''">and WC_EVLT_NOW = #{wcEvltNow}</if>
  79. <if test="mshTmp != null and mshTmp != ''">and MSH_TMP = #{mshTmp}</if>
  80. <if test="chkType != null and chkType != ''">and CHK_TYPE = #{chkType}</if>
  81. <if test="isTrhbco != null and isTrhbco != ''">and IS_TRHBCO = #{isTrhbco}</if>
  82. <if test="trhbcoInfo != null and trhbcoInfo != ''">and TRHBCO_INFO = #{trhbcoInfo}</if>
  83. <if test="trhbcoSttm != null">and TRHBCO_STTM = #{trhbcoSttm}</if>
  84. <if test="trhbcoEntm != null">and TRHBCO_ENTM = #{trhbcoEntm}</if>
  85. <if test="mngUnit != null and mngUnit != ''">and MNG_UNIT = #{mngUnit}</if>
  86. <if test="dutyUnit != null and dutyUnit != ''">and DUTY_UNIT = #{dutyUnit}</if>
  87. <if test="note != null and note != ''">and NOTE = #{note}</if>
  88. <if test="status != null and status != ''">and STATUS = #{status}</if>
  89. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</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="bisInspRsvrRgstrChkInfoResultMap" parameterType="String">
  95. select
  96. <include refid="table_columns"/>
  97. from BIS_INSP_RSVR_RGSTR_CHK_INFO where ID = #{id}
  98. </select>
  99. <select id="getBy" resultMap="bisInspRsvrRgstrChkInfoResultMap">
  100. select
  101. <include refid="table_columns"/>
  102. from BIS_INSP_RSVR_RGSTR_CHK_INFO
  103. <include refid="page_where"/>
  104. </select>
  105. <select id="findAll" resultMap="bisInspRsvrRgstrChkInfoResultMap">
  106. select
  107. <include refid="table_columns"/>
  108. from BIS_INSP_RSVR_RGSTR_CHK_INFO
  109. </select>
  110. <select id="findList" resultMap="bisInspRsvrRgstrChkInfoResultMap">
  111. select
  112. <include refid="table_columns"/>
  113. from BIS_INSP_RSVR_RGSTR_CHK_INFO
  114. <include refid="page_where"/>
  115. </select>
  116. <select id="selectCount" resultType="int">
  117. select count(ID) from BIS_INSP_RSVR_RGSTR_CHK_INFO
  118. <include refid="page_where"/>
  119. </select>
  120. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstrChkInfo">
  121. insert into BIS_INSP_RSVR_RGSTR_CHK_INFO(
  122. <include refid="table_columns"/>
  123. )
  124. values (
  125. <include refid="entity_properties"/>
  126. )
  127. </insert>
  128. <delete id="delete" parameterType="java.lang.String">
  129. delete from BIS_INSP_RSVR_RGSTR_CHK_INFO where ID = #{id}
  130. </delete>
  131. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstrChkInfo">
  132. delete from BIS_INSP_RSVR_RGSTR_CHK_INFO
  133. <include refid="page_where"/>
  134. </delete>
  135. <update id="deleteInFlag" parameterType="java.lang.String">
  136. update BIS_INSP_RSVR_RGSTR_CHK_INFO set flag_valid = 0 where ID = #{id}
  137. </update>
  138. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstrChkInfo">
  139. update BIS_INSP_RSVR_RGSTR_CHK_INFO
  140. <trim prefix="set" suffixOverrides=",">
  141. <if test="chkDesc != null and chkDesc != ''">CHK_DESC = #{chkDesc},</if>
  142. <if test="isSite != null and isSite != ''">IS_SITE = #{isSite},</if>
  143. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  144. <if test="inspYear != null and inspYear != ''">INSP_YEAR = #{inspYear},</if>
  145. <if test="wcEvltOld != null and wcEvltOld != ''">WC_EVLT_OLD = #{wcEvltOld},</if>
  146. <if test="wcEvltNow != null and wcEvltNow != ''">WC_EVLT_NOW = #{wcEvltNow},</if>
  147. <if test="mshTmp != null and mshTmp != ''">MSH_TMP = #{mshTmp},</if>
  148. <if test="chkType != null and chkType != ''">CHK_TYPE = #{chkType},</if>
  149. <if test="isTrhbco != null and isTrhbco != ''">IS_TRHBCO = #{isTrhbco},</if>
  150. <if test="trhbcoInfo != null and trhbcoInfo != ''">TRHBCO_INFO = #{trhbcoInfo},</if>
  151. <if test="trhbcoSttm != null">TRHBCO_STTM = #{trhbcoSttm},</if>
  152. <if test="trhbcoEntm != null">TRHBCO_ENTM = #{trhbcoEntm},</if>
  153. <if test="mngUnit != null and mngUnit != ''">MNG_UNIT = #{mngUnit},</if>
  154. <if test="dutyUnit != null and dutyUnit != ''">DUTY_UNIT = #{dutyUnit},</if>
  155. <if test="note != null and note != ''">NOTE = #{note},</if>
  156. <if test="status != null and status != ''">STATUS = #{status},</if>
  157. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  158. <if test="intm != null">INTM = #{intm},</if>
  159. <if test="uptm != null">UPTM = #{uptm},</if>
  160. </trim>
  161. <where>ID = #{id}</where>
  162. </update>
  163. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstrChkInfo">
  164. update BIS_INSP_RSVR_RGSTR_CHK_INFO
  165. <trim prefix="set" suffixOverrides=",">
  166. <if test="chkDesc != null and chkDesc != ''">CHK_DESC = #{chkDesc},</if>
  167. <if test="isSite != null and isSite != ''">IS_SITE = #{isSite},</if>
  168. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  169. <if test="inspYear != null and inspYear != ''">INSP_YEAR = #{inspYear},</if>
  170. <if test="wcEvltOld != null and wcEvltOld != ''">WC_EVLT_OLD = #{wcEvltOld},</if>
  171. <if test="wcEvltNow != null and wcEvltNow != ''">WC_EVLT_NOW = #{wcEvltNow},</if>
  172. <if test="mshTmp != null and mshTmp != ''">MSH_TMP = #{mshTmp},</if>
  173. <if test="chkType != null and chkType != ''">CHK_TYPE = #{chkType},</if>
  174. <if test="isTrhbco != null and isTrhbco != ''">IS_TRHBCO = #{isTrhbco},</if>
  175. <if test="trhbcoInfo != null and trhbcoInfo != ''">TRHBCO_INFO = #{trhbcoInfo},</if>
  176. <if test="trhbcoSttm != null">TRHBCO_STTM = #{trhbcoSttm},</if>
  177. <if test="trhbcoEntm != null">TRHBCO_ENTM = #{trhbcoEntm},</if>
  178. <if test="mngUnit != null and mngUnit != ''">MNG_UNIT = #{mngUnit},</if>
  179. <if test="dutyUnit != null and dutyUnit != ''">DUTY_UNIT = #{dutyUnit},</if>
  180. <if test="note != null and note != ''">NOTE = #{note},</if>
  181. <if test="status != null and status != ''">STATUS = #{status},</if>
  182. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  183. <if test="intm != null">INTM = #{intm},</if>
  184. <if test="uptm != null">UPTM = #{uptm},</if>
  185. </trim>
  186. <include refid="page_where"/>
  187. </update>
  188. <!-- 其他自定义SQL -->
  189. </mapper>