39ebbc676ca38ab182ca3e1f112dddc0bb88cc8e.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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.BisInspFloodqhCaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspFloodqhCase" id="bisInspFloodqhCaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="chkType" column="CHK_TYPE"/>
  8. <result property="isMakPlan" column="IS_MAK_PLAN"/>
  9. <result property="planNm" column="PLAN_NM"/>
  10. <result property="planApp" column="PLAN_APP"/>
  11. <result property="appOrg" column="APP_ORG"/>
  12. <result property="appTm" column="APP_TM"/>
  13. <result property="isDrill" column="IS_DRILL"/>
  14. <result property="drillTm" column="DRILL_TM"/>
  15. <result property="isPubDuty" column="IS_PUB_DUTY"/>
  16. <result property="isChkLog" column="IS_CHK_LOG"/>
  17. <result property="chkPers" column="CHK_PERS"/>
  18. <result property="chkTm" column="CHK_TM"/>
  19. <result property="manUnit" column="MAN_UNIT"/>
  20. <result property="cntPers" column="CNT_PERS"/>
  21. <result property="cntPersTel" column="CNT_PERS_TEL"/>
  22. <result property="ackNote" column="ACK_NOTE"/>
  23. <result property="nappNote" column="NAPP_NOTE"/>
  24. <result property="persId" column="PERS_ID"/>
  25. <result property="intm" column="INTM"/>
  26. <result property="uptm" column="UPTM"/>
  27. <result property="note" column="NOTE"/>
  28. <result property="dataStat" column="DATA_STAT"/>
  29. </resultMap>
  30. <sql id="table_columns">
  31. ID,
  32. RGSTR_ID,
  33. CHK_TYPE,
  34. IS_MAK_PLAN,
  35. PLAN_NM,
  36. PLAN_APP,
  37. APP_ORG,
  38. APP_TM,
  39. IS_DRILL,
  40. DRILL_TM,
  41. IS_PUB_DUTY,
  42. IS_CHK_LOG,
  43. CHK_PERS,
  44. CHK_TM,
  45. MAN_UNIT,
  46. CNT_PERS,
  47. CNT_PERS_TEL,
  48. ACK_NOTE,
  49. NAPP_NOTE,
  50. PERS_ID,
  51. INTM,
  52. UPTM,
  53. NOTE,
  54. DATA_STAT
  55. </sql>
  56. <sql id="entity_properties">
  57. #{id},
  58. #{rgstrId},
  59. #{chkType},
  60. #{isMakPlan},
  61. #{planNm},
  62. #{planApp},
  63. #{appOrg},
  64. #{appTm},
  65. #{isDrill},
  66. #{drillTm},
  67. #{isPubDuty},
  68. #{isChkLog},
  69. #{chkPers},
  70. #{chkTm},
  71. #{manUnit},
  72. #{cntPers},
  73. #{cntPersTel},
  74. #{ackNote},
  75. #{nappNote},
  76. #{persId},
  77. #{intm},
  78. #{uptm},
  79. #{note},
  80. #{dataStat}
  81. </sql>
  82. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  83. <sql id="page_where">
  84. <trim prefix="where" prefixOverrides="and | or ">
  85. <if test="rgstrId != null and rgstrId != ''">
  86. and RGSTR_ID = #{rgstrId}
  87. </if>
  88. <if test="chkType != null and chkType != ''">
  89. and CHK_TYPE = #{chkType}
  90. </if>
  91. <if test="isMakPlan != null and isMakPlan != ''">
  92. and IS_MAK_PLAN = #{isMakPlan}
  93. </if>
  94. <if test="planNm != null and planNm != ''">
  95. and PLAN_NM = #{planNm}
  96. </if>
  97. <if test="planApp != null and planApp != ''">
  98. and PLAN_APP = #{planApp}
  99. </if>
  100. <if test="appOrg != null and appOrg != ''">
  101. and APP_ORG = #{appOrg}
  102. </if>
  103. <if test="appTm != null">
  104. and APP_TM = #{appTm}
  105. </if>
  106. <if test="isDrill != null and isDrill != ''">
  107. and IS_DRILL = #{isDrill}
  108. </if>
  109. <if test="drillTm != null and drillTm != ''">
  110. and DRILL_TM = #{drillTm}
  111. </if>
  112. <if test="isPubDuty != null and isPubDuty != ''">
  113. and IS_PUB_DUTY = #{isPubDuty}
  114. </if>
  115. <if test="isChkLog != null and isChkLog != ''">
  116. and IS_CHK_LOG = #{isChkLog}
  117. </if>
  118. <if test="chkPers != null and chkPers != ''">
  119. and CHK_PERS = #{chkPers}
  120. </if>
  121. <if test="chkTm != null">
  122. and CHK_TM = #{chkTm}
  123. </if>
  124. <if test="manUnit != null and manUnit != ''">
  125. and MAN_UNIT = #{manUnit}
  126. </if>
  127. <if test="cntPers != null and cntPers != ''">
  128. and CNT_PERS = #{cntPers}
  129. </if>
  130. <if test="cntPersTel != null and cntPersTel != ''">
  131. and CNT_PERS_TEL = #{cntPersTel}
  132. </if>
  133. <if test="ackNote != null and ackNote != ''">
  134. and ACK_NOTE = #{ackNote}
  135. </if>
  136. <if test="nappNote != null and nappNote != ''">
  137. and NAPP_NOTE = #{nappNote}
  138. </if>
  139. <if test="persId != null and persId != ''">
  140. and PERS_ID = #{persId}
  141. </if>
  142. <if test="intm != null">
  143. and INTM = #{intm}
  144. </if>
  145. <if test="uptm != null">
  146. and UPTM = #{uptm}
  147. </if>
  148. <if test="note != null and note != ''">
  149. and NOTE = #{note}
  150. </if>
  151. <if test="dataStat != null and dataStat != ''">
  152. and DATA_STAT = #{dataStat}
  153. </if>
  154. and DATA_STAT='0'
  155. </trim>
  156. </sql>
  157. <select id="get" resultMap="bisInspFloodqhCaseResultMap" parameterType="String">
  158. select
  159. <include refid="table_columns"/>
  160. from BIS_INSP_FLOODQH_CASE where RGSTR_ID = #{id}
  161. </select>
  162. <select id="getBy" resultMap="bisInspFloodqhCaseResultMap">
  163. select
  164. <include refid="table_columns"/>
  165. from BIS_INSP_FLOODQH_CASE
  166. <include refid="page_where"/>
  167. </select>
  168. <select id="findAll" resultMap="bisInspFloodqhCaseResultMap">
  169. select
  170. <include refid="table_columns"/>
  171. from BIS_INSP_FLOODQH_CASE
  172. </select>
  173. <select id="findList" resultMap="bisInspFloodqhCaseResultMap">
  174. select
  175. <include refid="table_columns"/>
  176. from BIS_INSP_FLOODQH_CASE
  177. <include refid="page_where"/>
  178. </select>
  179. <select id="selectCount" resultType="int">
  180. select count(ID) from BIS_INSP_FLOODQH_CASE
  181. <include refid="page_where"/>
  182. </select>
  183. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspFloodqhCase">
  184. insert into BIS_INSP_FLOODQH_CASE(
  185. <include refid="table_columns"/>
  186. )
  187. values (
  188. <include refid="entity_properties"/>
  189. )
  190. </insert>
  191. <delete id="delete" parameterType="java.lang.String">
  192. update BIS_INSP_FLOODQH_CASE set DATA_STAT='9' where ID = #{id}
  193. </delete>
  194. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFloodqhCase">
  195. update BIS_INSP_FLOODQH_CASE set DATA_STAT='9'
  196. <include refid="page_where"/>
  197. </delete>
  198. <update id="deleteInFlag" parameterType="java.lang.String">
  199. update BIS_INSP_FLOODQH_CASE set DATA_STAT = '9' where ID = #{id}
  200. </update>
  201. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspFloodqhCase">
  202. update BIS_INSP_FLOODQH_CASE
  203. <trim prefix="set" suffixOverrides=",">
  204. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  205. = #{rgstrId},
  206. </if>
  207. <if test="chkType != null and chkType != ''">CHK_TYPE
  208. = #{chkType},
  209. </if>
  210. <if test="isMakPlan != null and isMakPlan != ''">IS_MAK_PLAN
  211. = #{isMakPlan},
  212. </if>
  213. <if test="planNm != null and planNm != ''">PLAN_NM
  214. = #{planNm},
  215. </if>
  216. <if test="planApp != null and planApp != ''">PLAN_APP
  217. = #{planApp},
  218. </if>
  219. <if test="appOrg != null and appOrg != ''">APP_ORG
  220. = #{appOrg},
  221. </if>
  222. <if test="appTm != null">APP_TM
  223. = #{appTm},
  224. </if>
  225. <if test="isDrill != null and isDrill != ''">IS_DRILL
  226. = #{isDrill},
  227. </if>
  228. <if test="drillTm != null and drillTm != ''">DRILL_TM
  229. = #{drillTm},
  230. </if>
  231. <if test="isPubDuty != null and isPubDuty != ''">IS_PUB_DUTY
  232. = #{isPubDuty},
  233. </if>
  234. <if test="isChkLog != null and isChkLog != ''">IS_CHK_LOG
  235. = #{isChkLog},
  236. </if>
  237. <if test="chkPers != null and chkPers != ''">CHK_PERS
  238. = #{chkPers},
  239. </if>
  240. <if test="chkTm != null">CHK_TM
  241. = #{chkTm},
  242. </if>
  243. <if test="manUnit != null and manUnit != ''">MAN_UNIT
  244. = #{manUnit},
  245. </if>
  246. <if test="cntPers != null and cntPers != ''">CNT_PERS
  247. = #{cntPers},
  248. </if>
  249. <if test="cntPersTel != null and cntPersTel != ''">CNT_PERS_TEL
  250. = #{cntPersTel},
  251. </if>
  252. <if test="ackNote != null and ackNote != ''">ACK_NOTE
  253. = #{ackNote},
  254. </if>
  255. <if test="nappNote != null and nappNote != ''">NAPP_NOTE
  256. = #{nappNote},
  257. </if>
  258. <if test="persId != null and persId != ''">PERS_ID
  259. = #{persId},
  260. </if>
  261. <if test="intm != null">INTM
  262. = #{intm},
  263. </if>
  264. <if test="uptm != null">UPTM
  265. = #{uptm},
  266. </if>
  267. <if test="note != null and note != ''">NOTE
  268. = #{note},
  269. </if>
  270. <if test="dataStat != null and dataStat != ''">DATA_STAT
  271. = #{dataStat},
  272. </if>
  273. </trim>
  274. <where>ID = #{id}</where>
  275. </update>
  276. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFloodqhCase">
  277. update BIS_INSP_FLOODQH_CASE
  278. <trim prefix="set" suffixOverrides=",">
  279. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  280. = #{rgstrId},
  281. </if>
  282. <if test="chkType != null and chkType != ''">CHK_TYPE
  283. = #{chkType},
  284. </if>
  285. <if test="isMakPlan != null and isMakPlan != ''">IS_MAK_PLAN
  286. = #{isMakPlan},
  287. </if>
  288. <if test="planNm != null and planNm != ''">PLAN_NM
  289. = #{planNm},
  290. </if>
  291. <if test="planApp != null and planApp != ''">PLAN_APP
  292. = #{planApp},
  293. </if>
  294. <if test="appOrg != null and appOrg != ''">APP_ORG
  295. = #{appOrg},
  296. </if>
  297. <if test="appTm != null">APP_TM
  298. = #{appTm},
  299. </if>
  300. <if test="isDrill != null and isDrill != ''">IS_DRILL
  301. = #{isDrill},
  302. </if>
  303. <if test="drillTm != null and drillTm != ''">DRILL_TM
  304. = #{drillTm},
  305. </if>
  306. <if test="isPubDuty != null and isPubDuty != ''">IS_PUB_DUTY
  307. = #{isPubDuty},
  308. </if>
  309. <if test="isChkLog != null and isChkLog != ''">IS_CHK_LOG
  310. = #{isChkLog},
  311. </if>
  312. <if test="chkPers != null and chkPers != ''">CHK_PERS
  313. = #{chkPers},
  314. </if>
  315. <if test="chkTm != null">CHK_TM
  316. = #{chkTm},
  317. </if>
  318. <if test="manUnit != null and manUnit != ''">MAN_UNIT
  319. = #{manUnit},
  320. </if>
  321. <if test="cntPers != null and cntPers != ''">CNT_PERS
  322. = #{cntPers},
  323. </if>
  324. <if test="cntPersTel != null and cntPersTel != ''">CNT_PERS_TEL
  325. = #{cntPersTel},
  326. </if>
  327. <if test="ackNote != null and ackNote != ''">ACK_NOTE
  328. = #{ackNote},
  329. </if>
  330. <if test="nappNote != null and nappNote != ''">NAPP_NOTE
  331. = #{nappNote},
  332. </if>
  333. <if test="persId != null and persId != ''">PERS_ID
  334. = #{persId},
  335. </if>
  336. <if test="intm != null">INTM
  337. = #{intm},
  338. </if>
  339. <if test="uptm != null">UPTM
  340. = #{uptm},
  341. </if>
  342. <if test="note != null and note != ''">NOTE
  343. = #{note},
  344. </if>
  345. <if test="dataStat != null and dataStat != ''">DATA_STAT
  346. = #{dataStat},
  347. </if>
  348. </trim>
  349. <include refid="page_where"/>
  350. </update>
  351. <!-- 其他自定义SQL -->
  352. </mapper>