BisInspBaseExtReaptDao.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.BisInspBaseExtReaptDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspBaseExt" id="bisInspBaseExtReaptResultMap">
  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="rainForc" column="RAIN_FORC"/>
  24. <result property="rainForcNote" column="RAIN_FORC_NOTE"/>
  25. <result property="recPersId" column="REC_PERS_ID"/>
  26. <result property="recPers2" column="REC_PERS2"/>
  27. <result property="recPersTel" column="REC_PERS_TEL"/>
  28. <result property="createTime" column="CREATE_TIME"/>
  29. <result property="updateTime" column="UPDATE_TIME"/>
  30. <result property="status" column="STATUS"/>
  31. <result property="schPlanSameSpeedNote" column="SCH_PLAN_SAME_SPEED_NOTE"/>
  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. RAIN_FORC,
  53. RAIN_FORC_NOTE,
  54. REC_PERS_ID,
  55. REC_PERS2,
  56. REC_PERS_TEL,
  57. CREATE_TIME,
  58. UPDATE_TIME,
  59. STATUS,
  60. SCH_PLAN_SAME_SPEED_NOTE
  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. #{rainForc},
  82. #{rainForcNote},
  83. #{recPersId},
  84. #{recPers2},
  85. #{recPersTel},
  86. #{createTime},
  87. #{updateTime},
  88. #{status},
  89. #{schPlanSameSpeedNote}
  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="emerPlanSameExta != null and emerPlanSameExta != ''">and EMER_PLAN_SAME_EXTA = #{emerPlanSameExta}</if>
  96. <if test="emerPlanSameExtaNote != null and emerPlanSameExtaNote != ''">and EMER_PLAN_SAME_EXTA_NOTE = #{emerPlanSameExtaNote}</if>
  97. <if test="emerPlanSameAppr != null and emerPlanSameAppr != ''">and EMER_PLAN_SAME_APPR = #{emerPlanSameAppr}</if>
  98. <if test="emerPlanSameApprNote != null and emerPlanSameApprNote != ''">and EMER_PLAN_SAME_APPR_NOTE = #{emerPlanSameApprNote}</if>
  99. <if test="emerPlanSamePert != null and emerPlanSamePert != ''">and EMER_PLAN_SAME_PERT = #{emerPlanSamePert}</if>
  100. <if test="emerPlanSamePertNote != null and emerPlanSamePertNote != ''">and EMER_PLAN_SAME_PERT_NOTE = #{emerPlanSamePertNote}</if>
  101. <if test="emerPlanSameEme != null and emerPlanSameEme != ''">and EMER_PLAN_SAME_EME = #{emerPlanSameEme}</if>
  102. <if test="emerPlanSameEmeNote != null and emerPlanSameEmeNote != ''">and EMER_PLAN_SAME_EME_NOTE = #{emerPlanSameEmeNote}</if>
  103. <if test="emerPlanSameSpeed != null and emerPlanSameSpeed != ''">and EMER_PLAN_SAME_SPEED = #{emerPlanSameSpeed}</if>
  104. <if test="schPlanSameExta != null and schPlanSameExta != ''">and SCH_PLAN_SAME_EXTA = #{schPlanSameExta}</if>
  105. <if test="schPlanSameExtaNote != null and schPlanSameExtaNote != ''">and SCH_PLAN_SAME_EXTA_NOTE = #{schPlanSameExtaNote}</if>
  106. <if test="schPlanSameAppr != null and schPlanSameAppr != ''">and SCH_PLAN_SAME_APPR = #{schPlanSameAppr}</if>
  107. <if test="schPlanSameApprNote != null and schPlanSameApprNote != ''">and SCH_PLAN_SAME_APPR_NOTE = #{schPlanSameApprNote}</if>
  108. <if test="schPlanSameEme != null and schPlanSameEme != ''">and SCH_PLAN_SAME_EME = #{schPlanSameEme}</if>
  109. <if test="schPlanSameEmeNote != null and schPlanSameEmeNote != ''">and SCH_PLAN_SAME_EME_NOTE = #{schPlanSameEmeNote}</if>
  110. <if test="schPlanSameSpeed != null and schPlanSameSpeed != ''">and SCH_PLAN_SAME_SPEED = #{schPlanSameSpeed}</if>
  111. <if test="rainForc != null and rainForc != ''">and RAIN_FORC = #{rainForc}</if>
  112. <if test="rainForcNote != null and rainForcNote != ''">and RAIN_FORC_NOTE = #{rainForcNote}</if>
  113. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  114. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  115. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  116. <if test="createTime != null">and CREATE_TIME = #{createTime}</if>
  117. <if test="updateTime != null">and UPDATE_TIME = #{updateTime}</if>
  118. <if test="status != null and status != ''">and STATUS = #{status}</if>
  119. <if test="schPlanSameSpeedNote != null and schPlanSameSpeedNote != ''">and SCH_PLAN_SAME_SPEED_NOTE = #{schPlanSameSpeedNote}</if>
  120. </trim>
  121. </sql>
  122. <select id="get" resultMap="bisInspBaseExtReaptResultMap" parameterType="String" >
  123. select <include refid="table_columns" /> from BIS_INSP_BASE_EXT_REAPT where ID = #{id}
  124. </select>
  125. <select id="getBy" resultMap="bisInspBaseExtReaptResultMap">
  126. select <include refid="table_columns" /> from BIS_INSP_BASE_EXT_REAPT <include refid="page_where" />
  127. </select>
  128. <select id="findAll" resultMap="bisInspBaseExtReaptResultMap">
  129. select <include refid="table_columns" /> from BIS_INSP_BASE_EXT_REAPT
  130. </select>
  131. <select id="findList" resultMap="bisInspBaseExtReaptResultMap">
  132. select <include refid="table_columns" /> from BIS_INSP_BASE_EXT_REAPT <include refid="page_where" />
  133. </select>
  134. <select id="selectCount" resultType="int" >
  135. select count(ID) from BIS_INSP_BASE_EXT_REAPT <include refid="page_where" />
  136. </select>
  137. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  138. insert into BIS_INSP_BASE_EXT_REAPT( <include refid="table_columns" /> )
  139. values ( <include refid="entity_properties" /> )
  140. </insert>
  141. <delete id="delete" parameterType="java.lang.String">
  142. delete from BIS_INSP_BASE_EXT_REAPT where ID = #{id}
  143. </delete>
  144. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  145. delete from BIS_INSP_BASE_EXT_REAPT <include refid="page_where" />
  146. </delete>
  147. <update id="deleteInFlag" parameterType="java.lang.String">
  148. update BIS_INSP_BASE_EXT_REAPT set flag_valid = 0 where ID = #{id}
  149. </update>
  150. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  151. update BIS_INSP_BASE_EXT_REAPT
  152. <trim prefix="set" suffixOverrides=",">
  153. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  154. <if test="emerPlanSameExta != null and emerPlanSameExta != ''">EMER_PLAN_SAME_EXTA = #{emerPlanSameExta},</if>
  155. <if test="emerPlanSameExtaNote != null and emerPlanSameExtaNote != ''">EMER_PLAN_SAME_EXTA_NOTE = #{emerPlanSameExtaNote},</if>
  156. <if test="emerPlanSameAppr != null and emerPlanSameAppr != ''">EMER_PLAN_SAME_APPR = #{emerPlanSameAppr},</if>
  157. <if test="emerPlanSameApprNote != null and emerPlanSameApprNote != ''">EMER_PLAN_SAME_APPR_NOTE = #{emerPlanSameApprNote},</if>
  158. <if test="emerPlanSamePert != null and emerPlanSamePert != ''">EMER_PLAN_SAME_PERT = #{emerPlanSamePert},</if>
  159. <if test="emerPlanSamePertNote != null and emerPlanSamePertNote != ''">EMER_PLAN_SAME_PERT_NOTE = #{emerPlanSamePertNote},</if>
  160. <if test="emerPlanSameEme != null and emerPlanSameEme != ''">EMER_PLAN_SAME_EME = #{emerPlanSameEme},</if>
  161. <if test="emerPlanSameEmeNote != null and emerPlanSameEmeNote != ''">EMER_PLAN_SAME_EME_NOTE = #{emerPlanSameEmeNote},</if>
  162. <if test="emerPlanSameSpeed != null and emerPlanSameSpeed != ''">EMER_PLAN_SAME_SPEED = #{emerPlanSameSpeed},</if>
  163. <if test="schPlanSameExta != null and schPlanSameExta != ''">SCH_PLAN_SAME_EXTA = #{schPlanSameExta},</if>
  164. <if test="schPlanSameExtaNote != null and schPlanSameExtaNote != ''">SCH_PLAN_SAME_EXTA_NOTE = #{schPlanSameExtaNote},</if>
  165. <if test="schPlanSameAppr != null and schPlanSameAppr != ''">SCH_PLAN_SAME_APPR = #{schPlanSameAppr},</if>
  166. <if test="schPlanSameApprNote != null and schPlanSameApprNote != ''">SCH_PLAN_SAME_APPR_NOTE = #{schPlanSameApprNote},</if>
  167. <if test="schPlanSameEme != null and schPlanSameEme != ''">SCH_PLAN_SAME_EME = #{schPlanSameEme},</if>
  168. <if test="schPlanSameEmeNote != null and schPlanSameEmeNote != ''">SCH_PLAN_SAME_EME_NOTE = #{schPlanSameEmeNote},</if>
  169. <if test="schPlanSameSpeed != null and schPlanSameSpeed != ''">SCH_PLAN_SAME_SPEED = #{schPlanSameSpeed},</if>
  170. <if test="rainForc != null and rainForc != ''">RAIN_FORC = #{rainForc},</if>
  171. <if test="rainForcNote != null and rainForcNote != ''">RAIN_FORC_NOTE = #{rainForcNote},</if>
  172. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  173. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  174. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  175. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  176. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  177. <if test="status != null and status != ''">STATUS = #{status},</if>
  178. <if test="schPlanSameSpeedNote != null and schPlanSameSpeedNote != ''">SCH_PLAN_SAME_SPEED_NOTE = #{schPlanSameSpeedNote},</if>
  179. </trim>
  180. <where>ID = #{id}</where>
  181. </update>
  182. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseExt">
  183. update BIS_INSP_BASE_EXT_REAPT
  184. <trim prefix="set" suffixOverrides=",">
  185. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  186. <if test="emerPlanSameExta != null and emerPlanSameExta != ''">EMER_PLAN_SAME_EXTA = #{emerPlanSameExta},</if>
  187. <if test="emerPlanSameExtaNote != null and emerPlanSameExtaNote != ''">EMER_PLAN_SAME_EXTA_NOTE = #{emerPlanSameExtaNote},</if>
  188. <if test="emerPlanSameAppr != null and emerPlanSameAppr != ''">EMER_PLAN_SAME_APPR = #{emerPlanSameAppr},</if>
  189. <if test="emerPlanSameApprNote != null and emerPlanSameApprNote != ''">EMER_PLAN_SAME_APPR_NOTE = #{emerPlanSameApprNote},</if>
  190. <if test="emerPlanSamePert != null and emerPlanSamePert != ''">EMER_PLAN_SAME_PERT = #{emerPlanSamePert},</if>
  191. <if test="emerPlanSamePertNote != null and emerPlanSamePertNote != ''">EMER_PLAN_SAME_PERT_NOTE = #{emerPlanSamePertNote},</if>
  192. <if test="emerPlanSameEme != null and emerPlanSameEme != ''">EMER_PLAN_SAME_EME = #{emerPlanSameEme},</if>
  193. <if test="emerPlanSameEmeNote != null and emerPlanSameEmeNote != ''">EMER_PLAN_SAME_EME_NOTE = #{emerPlanSameEmeNote},</if>
  194. <if test="emerPlanSameSpeed != null and emerPlanSameSpeed != ''">EMER_PLAN_SAME_SPEED = #{emerPlanSameSpeed},</if>
  195. <if test="schPlanSameExta != null and schPlanSameExta != ''">SCH_PLAN_SAME_EXTA = #{schPlanSameExta},</if>
  196. <if test="schPlanSameExtaNote != null and schPlanSameExtaNote != ''">SCH_PLAN_SAME_EXTA_NOTE = #{schPlanSameExtaNote},</if>
  197. <if test="schPlanSameAppr != null and schPlanSameAppr != ''">SCH_PLAN_SAME_APPR = #{schPlanSameAppr},</if>
  198. <if test="schPlanSameApprNote != null and schPlanSameApprNote != ''">SCH_PLAN_SAME_APPR_NOTE = #{schPlanSameApprNote},</if>
  199. <if test="schPlanSameEme != null and schPlanSameEme != ''">SCH_PLAN_SAME_EME = #{schPlanSameEme},</if>
  200. <if test="schPlanSameEmeNote != null and schPlanSameEmeNote != ''">SCH_PLAN_SAME_EME_NOTE = #{schPlanSameEmeNote},</if>
  201. <if test="schPlanSameSpeed != null and schPlanSameSpeed != ''">SCH_PLAN_SAME_SPEED = #{schPlanSameSpeed},</if>
  202. <if test="rainForc != null and rainForc != ''">RAIN_FORC = #{rainForc},</if>
  203. <if test="rainForcNote != null and rainForcNote != ''">RAIN_FORC_NOTE = #{rainForcNote},</if>
  204. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  205. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  206. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  207. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  208. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  209. <if test="status != null and status != ''">STATUS = #{status},</if>
  210. <if test="schPlanSameSpeedNote != null and schPlanSameSpeedNote != ''">SCH_PLAN_SAME_SPEED_NOTE = #{schPlanSameSpeedNote},</if>
  211. </trim>
  212. <include refid="page_where" />
  213. </update>
  214. <!-- 其他自定义SQL -->
  215. </mapper>