BisInspRsfcoRgstrBaseInfoDao.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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.BisInspRsfcoRgstrBaseInfoDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBaseInfo" id="bisInspRsfcoRgstrBaseInfoResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="rsName" column="RS_NAME"/>
  8. <result property="engScal" column="ENG_SCAL"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="location" column="LOCATION"/>
  11. <result property="basNm" column="BAS_NM"/>
  12. <result property="sbjctn" column="SBJCTN"/>
  13. <result property="inspType" column="INSP_TYPE"/>
  14. <result property="isVlts" column="IS_VLTS"/>
  15. <result property="isBack" column="IS_BACK"/>
  16. <result property="backPblmOne" column="BACK_PBLM_ONE"/>
  17. <result property="backPblmTwo" column="BACK_PBLM_TWO"/>
  18. <result property="status" column="STATUS"/>
  19. <result property="recPersId" column="REC_PERS_ID"/>
  20. <result property="recPers" column="REC_PERS"/>
  21. <result property="recPersTel" column="REC_PERS_TEL"/>
  22. <result property="intm" column="INTM"/>
  23. <result property="uptm" column="UPTM"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ID,
  27. RGSTR_ID,
  28. RS_NAME,
  29. ENG_SCAL,
  30. AD_CODE,
  31. LOCATION,
  32. BAS_NM,
  33. SBJCTN,
  34. INSP_TYPE,
  35. IS_VLTS,
  36. IS_BACK,
  37. BACK_PBLM_ONE,
  38. BACK_PBLM_TWO,
  39. STATUS,
  40. REC_PERS_ID,
  41. REC_PERS,
  42. REC_PERS_TEL,
  43. INTM,
  44. UPTM
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},
  48. #{rgstrId},
  49. #{rsName},
  50. #{engScal},
  51. #{adCode},
  52. #{location},
  53. #{basNm},
  54. #{sbjctn},
  55. #{inspType},
  56. #{isVlts},
  57. #{isBack},
  58. #{backPblmOne},
  59. #{backPblmTwo},
  60. #{status},
  61. #{recPersId},
  62. #{recPers},
  63. #{recPersTel},
  64. #{intm},
  65. #{uptm}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  71. <if test="rsName != null and rsName != ''">and RS_NAME = #{rsName}</if>
  72. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  73. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  74. <if test="location != null and location != ''">and LOCATION = #{location}</if>
  75. <if test="basNm != null and basNm != ''">and BAS_NM = #{basNm}</if>
  76. <if test="sbjctn != null and sbjctn != ''">and SBJCTN = #{sbjctn}</if>
  77. <if test="inspType != null and inspType != ''">and INSP_TYPE = #{inspType}</if>
  78. <if test="isVlts != null and isVlts != ''">and IS_VLTS = #{isVlts}</if>
  79. <if test="isBack != null and isBack != ''">and IS_BACK = #{isBack}</if>
  80. <if test="backPblmOne != null and backPblmOne != ''">and BACK_PBLM_ONE = #{backPblmOne}</if>
  81. <if test="backPblmTwo != null and backPblmTwo != ''">and BACK_PBLM_TWO = #{backPblmTwo}</if>
  82. <if test="status != null and status != ''">and STATUS = #{status}</if>
  83. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  84. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  85. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  86. <if test="intm != null">and INTM = #{intm}</if>
  87. <if test="uptm != null">and UPTM = #{uptm}</if>
  88. </trim>
  89. </sql>
  90. <select id="get" resultMap="bisInspRsfcoRgstrBaseInfoResultMap" parameterType="String" >
  91. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE_INFO where ID = #{id}
  92. </select>
  93. <select id="getBy" resultMap="bisInspRsfcoRgstrBaseInfoResultMap">
  94. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE_INFO <include refid="page_where" />
  95. </select>
  96. <select id="findAll" resultMap="bisInspRsfcoRgstrBaseInfoResultMap">
  97. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE_INFO
  98. </select>
  99. <select id="findList" resultMap="bisInspRsfcoRgstrBaseInfoResultMap">
  100. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE_INFO <include refid="page_where" />
  101. </select>
  102. <select id="selectCount" resultType="int" >
  103. select count(ID) from BIS_INSP_RSFCO_RGSTR_BASE_INFO <include refid="page_where" />
  104. </select>
  105. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBaseInfo">
  106. insert into BIS_INSP_RSFCO_RGSTR_BASE_INFO( <include refid="table_columns" /> )
  107. values ( <include refid="entity_properties" /> )
  108. </insert>
  109. <delete id="delete" parameterType="java.lang.String">
  110. delete from BIS_INSP_RSFCO_RGSTR_BASE_INFO where ID = #{id}
  111. </delete>
  112. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBaseInfo">
  113. delete from BIS_INSP_RSFCO_RGSTR_BASE_INFO <include refid="page_where" />
  114. </delete>
  115. <update id="deleteInFlag" parameterType="java.lang.String">
  116. update BIS_INSP_RSFCO_RGSTR_BASE_INFO set flag_valid = 0 where ID = #{id}
  117. </update>
  118. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBaseInfo">
  119. update BIS_INSP_RSFCO_RGSTR_BASE_INFO
  120. <trim prefix="set" suffixOverrides=",">
  121. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  122. <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
  123. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  124. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  125. <if test="location != null and location != ''">LOCATION = #{location},</if>
  126. <if test="basNm != null and basNm != ''">BAS_NM = #{basNm},</if>
  127. <if test="sbjctn != null and sbjctn != ''">SBJCTN = #{sbjctn},</if>
  128. <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
  129. <if test="isVlts != null and isVlts != ''">IS_VLTS = #{isVlts},</if>
  130. <if test="isBack != null and isBack != ''">IS_BACK = #{isBack},</if>
  131. <if test="backPblmOne != null and backPblmOne != ''">BACK_PBLM_ONE = #{backPblmOne},</if>
  132. <if test="backPblmTwo != null and backPblmTwo != ''">BACK_PBLM_TWO = #{backPblmTwo},</if>
  133. <if test="status != null and status != ''">STATUS = #{status},</if>
  134. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  135. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  136. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  137. <if test="intm != null">INTM = #{intm},</if>
  138. <if test="uptm != null">UPTM = #{uptm},</if>
  139. </trim>
  140. <where>ID = #{id}</where>
  141. </update>
  142. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBaseInfo">
  143. update BIS_INSP_RSFCO_RGSTR_BASE_INFO
  144. <trim prefix="set" suffixOverrides=",">
  145. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  146. <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
  147. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  148. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  149. <if test="location != null and location != ''">LOCATION = #{location},</if>
  150. <if test="basNm != null and basNm != ''">BAS_NM = #{basNm},</if>
  151. <if test="sbjctn != null and sbjctn != ''">SBJCTN = #{sbjctn},</if>
  152. <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
  153. <if test="isVlts != null and isVlts != ''">IS_VLTS = #{isVlts},</if>
  154. <if test="isBack != null and isBack != ''">IS_BACK = #{isBack},</if>
  155. <if test="backPblmOne != null and backPblmOne != ''">BACK_PBLM_ONE = #{backPblmOne},</if>
  156. <if test="backPblmTwo != null and backPblmTwo != ''">BACK_PBLM_TWO = #{backPblmTwo},</if>
  157. <if test="status != null and status != ''">STATUS = #{status},</if>
  158. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  159. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  160. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  161. <if test="intm != null">INTM = #{intm},</if>
  162. <if test="uptm != null">UPTM = #{uptm},</if>
  163. </trim>
  164. <include refid="page_where" />
  165. </update>
  166. <!-- 其他自定义SQL -->
  167. </mapper>