BisInspBaseExtDao.xml 16 KB

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