BisInspBaseExtDao.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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.BisInspBaseExtDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspBaseExt" id="bisInspBaseExtResultMap">
  5. <result property="thrqId" column="THRQ_ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="emerPlanSameExta" column="EMER_PLAN_SAME_EXTA"/>
  8. <result property="emerPlanSameExtaNote" column="EMER_PLAN_SAME_EXTA_NOTE"/>
  9. <result property="emerPlanSameAppr" column="EMER_PLAN_SAME_APPR"/>
  10. <result property="emerPlanSameApprNote" column="EMER_PLAN_SAME_APPR_NOTE"/>
  11. <result property="emerPlanSamePert" column="EMER_PLAN_SAME_PERT"/>
  12. <result property="emerPlanSamePertNote" column="EMER_PLAN_SAME_PERT_NOTE"/>
  13. <result property="emerPlanSameEme" column="EMER_PLAN_SAME_EME"/>
  14. <result property="emerPlanSameEmeNote" column="EMER_PLAN_SAME_EME_NOTE"/>
  15. <result property="emerPlanSameSpeed" column="EMER_PLAN_SAME_SPEED"/>
  16. <result property="schPlanSameExta" column="SCH_PLAN_SAME_EXTA"/>
  17. <result property="schPlanSameExtaNote" column="SCH_PLAN_SAME_EXTA_NOTE"/>
  18. <result property="schPlanSameAppr" column="SCH_PLAN_SAME_APPR"/>
  19. <result property="schPlanSameApprNote" column="SCH_PLAN_SAME_APPR_NOTE"/>
  20. <result property="schPlanSameEme" column="SCH_PLAN_SAME_EME"/>
  21. <result property="schPlanSameEmeNote" column="SCH_PLAN_SAME_EME_NOTE"/>
  22. <result property="schPlanSameSpeed" column="SCH_PLAN_SAME_SPEED"/>
  23. <result property="schPlanSameSpeedNote" column="SCH_PLAN_SAME_SPEED_NOTE"/>
  24. <result property="rainForc" column="RAIN_FORC"/>
  25. <result property="rainForcNote" column="RAIN_FORC_NOTE"/>
  26. <result property="recPersId" column="REC_PERS_ID"/>
  27. <result property="recPers2" column="REC_PERS2"/>
  28. <result property="recPersTel" column="REC_PERS_TEL"/>
  29. <result property="createTime" column="CREATE_TIME"/>
  30. <result property="updateTime" column="UPDATE_TIME"/>
  31. <result property="status" column="STATUS"/>
  32. <result property="staSour" column="STA_SOUR"/>
  33. </resultMap>
  34. <sql id="table_columns">
  35. THRQ_ID,
  36. RGSTR_ID,
  37. STA_SOUR,
  38. EMER_PLAN_SAME_EXTA,
  39. EMER_PLAN_SAME_EXTA_NOTE,
  40. EMER_PLAN_SAME_APPR,
  41. EMER_PLAN_SAME_APPR_NOTE,
  42. EMER_PLAN_SAME_PERT,
  43. EMER_PLAN_SAME_PERT_NOTE,
  44. EMER_PLAN_SAME_EME,
  45. EMER_PLAN_SAME_EME_NOTE,
  46. EMER_PLAN_SAME_SPEED,
  47. SCH_PLAN_SAME_EXTA,
  48. SCH_PLAN_SAME_EXTA_NOTE,
  49. SCH_PLAN_SAME_APPR,
  50. SCH_PLAN_SAME_APPR_NOTE,
  51. SCH_PLAN_SAME_EME,
  52. SCH_PLAN_SAME_EME_NOTE,
  53. SCH_PLAN_SAME_SPEED,
  54. SCH_PLAN_SAME_SPEED_NOTE,
  55. RAIN_FORC,
  56. RAIN_FORC_NOTE,
  57. REC_PERS_ID,
  58. REC_PERS2,
  59. REC_PERS_TEL,
  60. CREATE_TIME,
  61. UPDATE_TIME,
  62. STATUS
  63. </sql>
  64. <sql id="entity_properties">
  65. #{thrqId},
  66. #{rgstrId},
  67. #{staSour},
  68. #{emerPlanSameExta},
  69. #{emerPlanSameExtaNote},
  70. #{emerPlanSameAppr},
  71. #{emerPlanSameApprNote},
  72. #{emerPlanSamePert},
  73. #{emerPlanSamePertNote},
  74. #{emerPlanSameEme},
  75. #{emerPlanSameEmeNote},
  76. #{emerPlanSameSpeed},
  77. #{schPlanSameExta},
  78. #{schPlanSameExtaNote},
  79. #{schPlanSameAppr},
  80. #{schPlanSameApprNote},
  81. #{schPlanSameEme},
  82. #{schPlanSameEmeNote},
  83. #{schPlanSameSpeed},
  84. #{schPlanSameSpeedNote},
  85. #{rainForc},
  86. #{rainForcNote},
  87. #{recPersId},
  88. #{recPers2},
  89. #{recPersTel},
  90. #{createTime},
  91. #{updateTime},
  92. #{status}
  93. </sql>
  94. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  95. <sql id="page_where">
  96. <trim prefix="where" prefixOverrides="and | or ">
  97. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  98. <if test="staSour != null and staSour != ''">and STA_SOUR = #{staSour}</if>
  99. <if test="schPlanSameSpeedNote != null and schPlanSameSpeedNote != ''">and SCH_PLAN_SAME_SPEED_NOTE =
  100. #{schPlanSameSpeedNote}
  101. </if>
  102. <if test="emerPlanSameExta != null and emerPlanSameExta != ''">and EMER_PLAN_SAME_EXTA =
  103. #{emerPlanSameExta}
  104. </if>
  105. <if test="emerPlanSameExtaNote != null and emerPlanSameExtaNote != ''">and EMER_PLAN_SAME_EXTA_NOTE =
  106. #{emerPlanSameExtaNote}
  107. </if>
  108. <if test="emerPlanSameAppr != null and emerPlanSameAppr != ''">and EMER_PLAN_SAME_APPR =
  109. #{emerPlanSameAppr}
  110. </if>
  111. <if test="emerPlanSameApprNote != null and emerPlanSameApprNote != ''">and EMER_PLAN_SAME_APPR_NOTE =
  112. #{emerPlanSameApprNote}
  113. </if>
  114. <if test="emerPlanSamePert != null and emerPlanSamePert != ''">and EMER_PLAN_SAME_PERT =
  115. #{emerPlanSamePert}
  116. </if>
  117. <if test="emerPlanSamePertNote != null and emerPlanSamePertNote != ''">and EMER_PLAN_SAME_PERT_NOTE =
  118. #{emerPlanSamePertNote}
  119. </if>
  120. <if test="emerPlanSameEme != null and emerPlanSameEme != ''">and EMER_PLAN_SAME_EME = #{emerPlanSameEme}
  121. </if>
  122. <if test="emerPlanSameEmeNote != null and emerPlanSameEmeNote != ''">and EMER_PLAN_SAME_EME_NOTE =
  123. #{emerPlanSameEmeNote}
  124. </if>
  125. <if test="emerPlanSameSpeed != null and emerPlanSameSpeed != ''">and EMER_PLAN_SAME_SPEED =
  126. #{emerPlanSameSpeed}
  127. </if>
  128. <if test="schPlanSameExta != null and schPlanSameExta != ''">and SCH_PLAN_SAME_EXTA = #{schPlanSameExta}
  129. </if>
  130. <if test="schPlanSameExtaNote != null and schPlanSameExtaNote != ''">and SCH_PLAN_SAME_EXTA_NOTE =
  131. #{schPlanSameExtaNote}
  132. </if>
  133. <if test="schPlanSameAppr != null and schPlanSameAppr != ''">and SCH_PLAN_SAME_APPR = #{schPlanSameAppr}
  134. </if>
  135. <if test="schPlanSameApprNote != null and schPlanSameApprNote != ''">and SCH_PLAN_SAME_APPR_NOTE =
  136. #{schPlanSameApprNote}
  137. </if>
  138. <if test="schPlanSameEme != null and schPlanSameEme != ''">and SCH_PLAN_SAME_EME = #{schPlanSameEme}</if>
  139. <if test="schPlanSameEmeNote != null and schPlanSameEmeNote != ''">and SCH_PLAN_SAME_EME_NOTE =
  140. #{schPlanSameEmeNote}
  141. </if>
  142. <if test="schPlanSameSpeed != null and schPlanSameSpeed != ''">and SCH_PLAN_SAME_SPEED =
  143. #{schPlanSameSpeed}
  144. </if>
  145. <if test="rainForc != null and rainForc != ''">and RAIN_FORC = #{rainForc}</if>
  146. <if test="rainForcNote != null and rainForcNote != ''">and RAIN_FORC_NOTE = #{rainForcNote}</if>
  147. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  148. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  149. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  150. </trim>
  151. </sql>
  152. <select id="get" resultMap="bisInspBaseExtResultMap" parameterType="String">
  153. select
  154. <include refid="table_columns"/>
  155. from bis_insp_base_ext where THRQ_ID = #{id}
  156. </select>
  157. <select id="getBy" resultMap="bisInspBaseExtResultMap">
  158. select
  159. <include refid="table_columns"/>
  160. from bis_insp_base_ext
  161. <include refid="page_where"/>
  162. </select>
  163. <select id="findAll" resultMap="bisInspBaseExtResultMap">
  164. select
  165. <include refid="table_columns"/>
  166. from bis_insp_base_ext
  167. </select>
  168. <select id="findList" resultMap="bisInspBaseExtResultMap">
  169. select
  170. <include refid="table_columns"/>
  171. from bis_insp_base_ext
  172. <include refid="page_where"/>
  173. </select>
  174. <select id="selectCount" resultType="int">
  175. select count(THRQ_ID) from bis_insp_base_ext
  176. <include refid="page_where"/>
  177. </select>
  178. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  179. insert into bis_insp_base_ext(
  180. <include refid="table_columns"/>
  181. )
  182. values (
  183. <include refid="entity_properties"/>
  184. )
  185. </insert>
  186. <delete id="delete" parameterType="java.lang.String">
  187. delete from bis_insp_base_ext where THRQ_ID = #{id}
  188. </delete>
  189. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  190. delete from bis_insp_base_ext
  191. <include refid="page_where"/>
  192. </delete>
  193. <update id="deleteInFlag" parameterType="java.lang.String">
  194. update bis_insp_base_ext set flag_valid = 0 where THRQ_ID = #{id}
  195. </update>
  196. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  197. update bis_insp_base_ext
  198. <trim prefix="set" suffixOverrides=",">
  199. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  200. <if test="staSour != null and staSour != ''">STA_SOUR = #{staSour},</if>
  201. <if test="emerPlanSameExta != null and emerPlanSameExta != ''">EMER_PLAN_SAME_EXTA = #{emerPlanSameExta},
  202. </if>
  203. <if test="emerPlanSameExtaNote != null and emerPlanSameExtaNote != ''">EMER_PLAN_SAME_EXTA_NOTE =
  204. #{emerPlanSameExtaNote},
  205. </if>
  206. <if test="emerPlanSameAppr != null and emerPlanSameAppr != ''">EMER_PLAN_SAME_APPR = #{emerPlanSameAppr},
  207. </if>
  208. <if test="emerPlanSameApprNote != null and emerPlanSameApprNote != ''">EMER_PLAN_SAME_APPR_NOTE =
  209. #{emerPlanSameApprNote},
  210. </if>
  211. <if test="emerPlanSamePert != null and emerPlanSamePert != ''">EMER_PLAN_SAME_PERT = #{emerPlanSamePert},
  212. </if>
  213. <if test="emerPlanSamePertNote != null and emerPlanSamePertNote != ''">EMER_PLAN_SAME_PERT_NOTE =
  214. #{emerPlanSamePertNote},
  215. </if>
  216. <if test="emerPlanSameEme != null and emerPlanSameEme != ''">EMER_PLAN_SAME_EME = #{emerPlanSameEme},</if>
  217. <if test="emerPlanSameEmeNote != null and emerPlanSameEmeNote != ''">EMER_PLAN_SAME_EME_NOTE =
  218. #{emerPlanSameEmeNote},
  219. </if>
  220. <if test="emerPlanSameSpeed != null and emerPlanSameSpeed != ''">EMER_PLAN_SAME_SPEED =
  221. #{emerPlanSameSpeed},
  222. </if>
  223. <if test="schPlanSameExta != null and schPlanSameExta != ''">SCH_PLAN_SAME_EXTA = #{schPlanSameExta},</if>
  224. <if test="schPlanSameExtaNote != null and schPlanSameExtaNote != ''">SCH_PLAN_SAME_EXTA_NOTE =
  225. #{schPlanSameExtaNote},
  226. </if>
  227. <if test="schPlanSameAppr != null and schPlanSameAppr != ''">SCH_PLAN_SAME_APPR = #{schPlanSameAppr},</if>
  228. <if test="schPlanSameApprNote != null and schPlanSameApprNote != ''">SCH_PLAN_SAME_APPR_NOTE =
  229. #{schPlanSameApprNote},
  230. </if>
  231. <if test="schPlanSameEme != null and schPlanSameEme != ''">SCH_PLAN_SAME_EME = #{schPlanSameEme},</if>
  232. <if test="schPlanSameEmeNote != null and schPlanSameEmeNote != ''">SCH_PLAN_SAME_EME_NOTE =
  233. #{schPlanSameEmeNote},
  234. </if>
  235. <if test="schPlanSameSpeed != null and schPlanSameSpeed != ''">SCH_PLAN_SAME_SPEED = #{schPlanSameSpeed},
  236. </if>
  237. <if test="rainForc != null and rainForc != ''">RAIN_FORC = #{rainForc},</if>
  238. <if test="rainForcNote != null and rainForcNote != ''">RAIN_FORC_NOTE = #{rainForcNote},</if>
  239. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  240. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  241. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  242. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  243. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  244. <if test="status != null and status != ''">STATUS = #{status},</if>
  245. <if test="schPlanSameSpeedNote != null and schPlanSameSpeedNote != ''">SCH_PLAN_SAME_SPEED_NOTE =
  246. #{schPlanSameSpeedNote},
  247. </if>
  248. </trim>
  249. <where>THRQ_ID = #{thrqId}</where>
  250. </update>
  251. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  252. update bis_insp_base_ext
  253. <trim prefix="set" suffixOverrides=",">
  254. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  255. <if test="staSour != null and staSour != ''">STA_SOUR = #{staSour},</if>
  256. <if test="emerPlanSameExta != null and emerPlanSameExta != ''">EMER_PLAN_SAME_EXTA = #{emerPlanSameExta},
  257. </if>
  258. <if test="emerPlanSameExtaNote != null and emerPlanSameExtaNote != ''">EMER_PLAN_SAME_EXTA_NOTE =
  259. #{emerPlanSameExtaNote},
  260. </if>
  261. <if test="emerPlanSameAppr != null and emerPlanSameAppr != ''">EMER_PLAN_SAME_APPR = #{emerPlanSameAppr},
  262. </if>
  263. <if test="emerPlanSameApprNote != null and emerPlanSameApprNote != ''">EMER_PLAN_SAME_APPR_NOTE =
  264. #{emerPlanSameApprNote},
  265. </if>
  266. <if test="emerPlanSamePert != null and emerPlanSamePert != ''">EMER_PLAN_SAME_PERT = #{emerPlanSamePert},
  267. </if>
  268. <if test="emerPlanSamePertNote != null and emerPlanSamePertNote != ''">EMER_PLAN_SAME_PERT_NOTE =
  269. #{emerPlanSamePertNote},
  270. </if>
  271. <if test="emerPlanSameEme != null and emerPlanSameEme != ''">EMER_PLAN_SAME_EME = #{emerPlanSameEme},</if>
  272. <if test="emerPlanSameEmeNote != null and emerPlanSameEmeNote != ''">EMER_PLAN_SAME_EME_NOTE =
  273. #{emerPlanSameEmeNote},
  274. </if>
  275. <if test="emerPlanSameSpeed != null and emerPlanSameSpeed != ''">EMER_PLAN_SAME_SPEED =
  276. #{emerPlanSameSpeed},
  277. </if>
  278. <if test="schPlanSameExta != null and schPlanSameExta != ''">SCH_PLAN_SAME_EXTA = #{schPlanSameExta},</if>
  279. <if test="schPlanSameExtaNote != null and schPlanSameExtaNote != ''">SCH_PLAN_SAME_EXTA_NOTE =
  280. #{schPlanSameExtaNote},
  281. </if>
  282. <if test="schPlanSameAppr != null and schPlanSameAppr != ''">SCH_PLAN_SAME_APPR = #{schPlanSameAppr},</if>
  283. <if test="schPlanSameApprNote != null and schPlanSameApprNote != ''">SCH_PLAN_SAME_APPR_NOTE =
  284. #{schPlanSameApprNote},
  285. </if>
  286. <if test="schPlanSameEme != null and schPlanSameEme != ''">SCH_PLAN_SAME_EME = #{schPlanSameEme},</if>
  287. <if test="schPlanSameEmeNote != null and schPlanSameEmeNote != ''">SCH_PLAN_SAME_EME_NOTE =
  288. #{schPlanSameEmeNote},
  289. </if>
  290. <if test="schPlanSameSpeed != null and schPlanSameSpeed != ''">SCH_PLAN_SAME_SPEED = #{schPlanSameSpeed},
  291. </if>
  292. <if test="rainForc != null and rainForc != ''">RAIN_FORC = #{rainForc},</if>
  293. <if test="rainForcNote != null and rainForcNote != ''">RAIN_FORC_NOTE = #{rainForcNote},</if>
  294. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  295. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  296. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  297. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  298. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  299. <if test="status != null and status != ''">STATUS = #{status},</if>
  300. <if test="schPlanSameSpeedNote != null and schPlanSameSpeedNote != ''">SCH_PLAN_SAME_SPEED_NOTE =
  301. #{schPlanSameSpeedNote},
  302. </if>
  303. </trim>
  304. <include refid="page_where"/>
  305. </update>
  306. <!-- 其他自定义SQL -->
  307. </mapper>