BisInspStstnSafDao.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  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.BisInspStstnSafDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspStstnSaf" id="bisInspStstnSafResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="siteSaf" column="SITE_SAF"/>
  8. <result property="isHolePrct" column="IS_HOLE_PRCT"/>
  9. <result property="holePrctNum" column="HOLE_PRCT_NUM"/>
  10. <result property="isStarsPrct" column="IS_STARS_PRCT"/>
  11. <result property="starsPrctNum" column="STARS_PRCT_NUM"/>
  12. <result property="isTunnelPrct" column="IS_TUNNEL_PRCT"/>
  13. <result property="tunnelPrctNum" column="TUNNEL_PRCT_NUM"/>
  14. <result property="siteSysNum" column="SITE_SYS_NUM"/>
  15. <result property="siteFullNum" column="SITE_FULL_NUM"/>
  16. <result property="buldRuleNum" column="BULD_RULE_NUM"/>
  17. <result property="regSysNum" column="REG_SYS_NUM"/>
  18. <result property="isBimBuld" column="IS_BIM_BULD"/>
  19. <result property="bimBuldNum" column="BIM_BULD_NUM"/>
  20. <result property="isCommunistPartyRoom" column="IS_COMMUNIST_PARTY_ROOM"/>
  21. <result property="communistPartyRoomNum" column="COMMUNIST_PARTY_ROOM_NUM"/>
  22. <result property="isPartyBranch" column="IS_COMMUNIST_PARTY_ROOM"/>
  23. <result property="partyBranchNum" column="PARTY_BRANCH_NUM"/>
  24. <result property="isPartyActivity" column="IS_PARTY_ACTICITY"/>
  25. <result property="partyActivityNum" column="PARTY_ACTICITY_NUM"/>
  26. <result property="note" column="NOTE"/>
  27. <result property="persId" column="PERS_ID"/>
  28. <result property="intm" column="INTM"/>
  29. <result property="uptm" column="UPTM"/>
  30. <result property="dataStat" column="DATA_STAT"/>
  31. <result property="total" column="TOTAL"/>
  32. <result property="actualScore" column="ACTUAL_SCORE"/>
  33. </resultMap>
  34. <sql id="table_columns">
  35. ID,
  36. RGSTR_ID,
  37. SITE_SAF,
  38. IS_HOLE_PRCT,
  39. HOLE_PRCT_NUM,
  40. IS_STARS_PRCT,
  41. STARS_PRCT_NUM,
  42. IS_TUNNEL_PRCT,
  43. TUNNEL_PRCT_NUM,
  44. SITE_SYS_NUM,
  45. SITE_FULL_NUM,
  46. BULD_RULE_NUM,
  47. REG_SYS_NUM,
  48. IS_BIM_BULD,
  49. BIM_BULD_NUM,
  50. IS_COMMUNIST_PARTY_ROOM,
  51. COMMUNIST_PARTY_ROOM_NUM,
  52. IS_PARTY_BRANCH,
  53. PARTY_BRANCH_NUM,
  54. PARTY_ACTICITY_NUM,
  55. IS_PARTY_ACTICITY,
  56. NOTE,
  57. PERS_ID,
  58. INTM,
  59. UPTM,
  60. DATA_STAT,
  61. TOTAL,
  62. ACTUAL_SCORE
  63. </sql>
  64. <sql id="entity_properties">
  65. #{id},
  66. #{rgstrId},
  67. #{siteSaf},
  68. #{isHolePrct},
  69. #{holePrctNum},
  70. #{isStarsPrct},
  71. #{starsPrctNum},
  72. #{isTunnelPrct},
  73. #{tunnelPrctNum},
  74. #{siteSysNum},
  75. #{siteFullNum},
  76. #{buldRuleNum},
  77. #{regSysNum},
  78. #{isBimBuld},
  79. #{bimBuldNum},
  80. #{isCommunistPartyRoom},
  81. #{communistPartyRoomNum},
  82. #{isPartyBranch},
  83. #{partyBranchNum},
  84. #{partyActivityNum},
  85. #{isPartyActivity},
  86. #{note},
  87. #{persId},
  88. #{intm},
  89. #{uptm},
  90. #{dataStat},
  91. #{total},
  92. #{actualScore}
  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 != ''">
  98. and RGSTR_ID = #{rgstrId}
  99. </if>
  100. <if test="siteSaf != null and siteSaf != ''">
  101. and SITE_SAF = #{siteSaf}
  102. </if>
  103. <if test="isHolePrct != null and isHolePrct != ''">
  104. and IS_HOLE_PRCT = #{isHolePrct}
  105. </if>
  106. <if test="holePrctNum != null ">
  107. and HOLE_PRCT_NUM = #{holePrctNum}
  108. </if>
  109. <if test="isStarsPrct != null and isStarsPrct != ''">
  110. and IS_STARS_PRCT = #{isStarsPrct}
  111. </if>
  112. <if test="starsPrctNum != null ">
  113. and STARS_PRCT_NUM = #{starsPrctNum}
  114. </if>
  115. <if test="isTunnelPrct != null and isTunnelPrct != ''">
  116. and IS_TUNNEL_PRCT = #{isTunnelPrct}
  117. </if>
  118. <if test="tunnelPrctNum != null ">
  119. and TUNNEL_PRCT_NUM = #{tunnelPrctNum}
  120. </if>
  121. <if test="siteSysNum != null ">
  122. and SITE_SYS_NUM = #{siteSysNum}
  123. </if>
  124. <if test="siteFullNum != null ">
  125. and SITE_FULL_NUM = #{siteFullNum}
  126. </if>
  127. <if test="buldRuleNum != null ">
  128. and BULD_RULE_NUM = #{buldRuleNum}
  129. </if>
  130. <if test="regSysNum != null ">
  131. and REG_SYS_NUM = #{regSysNum}
  132. </if>
  133. <if test="isBimBuld != null and isBimBuld != ''">
  134. and IS_BIM_BULD = #{isBimBuld}
  135. </if>
  136. <if test="bimBuldNum != null ">
  137. and BIM_BULD_NUM = #{bimBuldNum}
  138. </if>
  139. <if test="isCommunistPartyRoom != null and isCommunistPartyRoom != ''">
  140. and IS_COMMUNIST_PARTY_ROOM = #{isCommunistPartyRoom}
  141. </if>
  142. <if test="communistPartyRoomNum != null ">
  143. and COMMUNIST_PARTY_ROOM_NUM = #{communistPartyRoomNum}
  144. </if>
  145. <if test="isPartyBranch != null and isPartyBranch != ''">
  146. and IS_PARTY_BRANCH = #{isPartyBranch}
  147. </if>
  148. <if test="partyBranchNum != null ">
  149. and PARTY_BRANCH_NUM = #{partyBranchNum}
  150. </if>
  151. <if test="partyActivityNum != null ">
  152. and PARTY_ACTICITY_NUM = #{partyActivityNum}
  153. </if>
  154. <if test="isPartyActivity != null and isPartyActivity !=''">
  155. and IS_PARTY_ACTICITY = #{isPartyActivity}
  156. </if>
  157. <if test="note != null and note != ''">
  158. and NOTE = #{note}
  159. </if>
  160. <if test="persId != null and persId != ''">
  161. and PERS_ID = #{persId}
  162. </if>
  163. <if test="intm != null">
  164. and INTM = #{intm}
  165. </if>
  166. <if test="uptm != null">
  167. and UPTM = #{uptm}
  168. </if>
  169. <if test="dataStat != null and dataStat != ''">
  170. and DATA_STAT = #{dataStat}
  171. </if>
  172. <if test="total != null and total != ''">
  173. and TOTAL = #{total}
  174. </if>
  175. <if test="actualScore != null and actualScore != ''">
  176. and ACTUAL_SCORE = #{actualScore}
  177. </if>
  178. and DATA_STAT='0'
  179. </trim>
  180. </sql>
  181. <select id="get" resultMap="bisInspStstnSafResultMap" parameterType="String">
  182. select
  183. <include refid="table_columns"/>
  184. from BIS_INSP_STSTN_SAF where RGSTR_ID = #{rgstrId}
  185. </select>
  186. <select id="getBy" resultMap="bisInspStstnSafResultMap">
  187. select
  188. <include refid="table_columns"/>
  189. from BIS_INSP_STSTN_SAF
  190. <include refid="page_where"/>
  191. </select>
  192. <select id="findAll" resultMap="bisInspStstnSafResultMap">
  193. select
  194. <include refid="table_columns"/>
  195. from BIS_INSP_STSTN_SAF
  196. </select>
  197. <select id="findList" resultMap="bisInspStstnSafResultMap">
  198. select
  199. <include refid="table_columns"/>
  200. from BIS_INSP_STSTN_SAF
  201. <include refid="page_where"/>
  202. </select>
  203. <select id="selectCount" resultType="int">
  204. select count(ID) from BIS_INSP_STSTN_SAF
  205. <include refid="page_where"/>
  206. </select>
  207. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
  208. insert into BIS_INSP_STSTN_SAF(
  209. <include refid="table_columns"/>
  210. )
  211. values (
  212. <include refid="entity_properties"/>
  213. )
  214. </insert>
  215. <delete id="delete" parameterType="java.lang.String">
  216. update BIS_INSP_STSTN_SAF set DATA_STAT='9' where ID = #{id}
  217. </delete>
  218. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
  219. update BIS_INSP_STSTN_SAF set DATA_STAT='9'
  220. <include refid="page_where"/>
  221. </delete>
  222. <update id="deleteInFlag" parameterType="java.lang.String">
  223. update BIS_INSP_STSTN_SAF set DATA_STAT = '9' where ID = #{id}
  224. </update>
  225. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
  226. update BIS_INSP_STSTN_SAF
  227. <trim prefix="set" suffixOverrides=",">
  228. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  229. = #{rgstrId},
  230. </if>
  231. <if test="siteSaf != null">SITE_SAF
  232. = #{siteSaf},
  233. </if>
  234. <if test="isHolePrct != null and isHolePrct != ''">IS_HOLE_PRCT
  235. = #{isHolePrct},
  236. </if>
  237. <if test="holePrctNum != null">HOLE_PRCT_NUM
  238. = #{holePrctNum},
  239. </if>
  240. <if test="isStarsPrct != null and isStarsPrct != ''">IS_STARS_PRCT
  241. = #{isStarsPrct},
  242. </if>
  243. <if test="starsPrctNum != null">STARS_PRCT_NUM
  244. = #{starsPrctNum},
  245. </if>
  246. <if test="isTunnelPrct != null and isTunnelPrct != ''">IS_TUNNEL_PRCT
  247. = #{isTunnelPrct},
  248. </if>
  249. <if test="tunnelPrctNum != null">TUNNEL_PRCT_NUM
  250. = #{tunnelPrctNum},
  251. </if>
  252. <if test="siteSysNum != null">SITE_SYS_NUM
  253. = #{siteSysNum},
  254. </if>
  255. <if test="siteFullNum != null">SITE_FULL_NUM
  256. = #{siteFullNum},
  257. </if>
  258. <if test="buldRuleNum != null">BULD_RULE_NUM
  259. = #{buldRuleNum},
  260. </if>
  261. <if test="regSysNum != null">REG_SYS_NUM
  262. = #{regSysNum},
  263. </if>
  264. <if test="isBimBuld != null and isBimBuld != ''">IS_BIM_BULD
  265. = #{isBimBuld},
  266. </if>
  267. <if test="bimBuldNum != null">BIM_BULD_NUM
  268. = #{bimBuldNum},
  269. </if>
  270. <if test="isCommunistPartyRoom != null and isCommunistPartyRoom != ''">IS_COMMUNIST_PARTY_ROOM
  271. = #{isCommunistPartyRoom},
  272. </if>
  273. <if test="communistPartyRoomNum != null ">COMMUNIST_PARTY_ROOM_NUM
  274. = #{communistPartyRoomNum},
  275. </if>
  276. <if test="isPartyBranch != null and isPartyBranch != ''">IS_PARTY_BRANCH
  277. = #{isPartyBranch},
  278. </if>
  279. <if test="partyBranchNum != null ">PARTY_BRANCH_NUM
  280. = #{partyBranchNum},
  281. </if>
  282. <if test="isPartyActivity != null and isPartyActivity !=''">IS_PARTY_ACTICITY
  283. = #{isPartyActivity},
  284. </if>
  285. <if test="partyActivityNum != null">PARTY_ACTICITY_NUM
  286. = #{partyActivityNum},
  287. </if>
  288. <if test="note != null and note != ''">NOTE
  289. = #{note},
  290. </if>
  291. <if test="persId != null and persId != ''">PERS_ID
  292. = #{persId},
  293. </if>
  294. <if test="intm != null">INTM
  295. = #{intm},
  296. </if>
  297. <if test="uptm != null">UPTM
  298. = #{uptm},
  299. </if>
  300. <if test="dataStat != null and dataStat != ''">DATA_STAT
  301. = #{dataStat},
  302. </if>
  303. <if test="total != null">TOTAL
  304. = #{total},
  305. </if>
  306. <if test="actualScore != null">ACTUAL_SCORE
  307. = #{actualScore},
  308. </if>
  309. </trim>
  310. <where>ID = #{id}</where>
  311. </update>
  312. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
  313. update BIS_INSP_STSTN_SAF
  314. <trim prefix="set" suffixOverrides=",">
  315. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  316. = #{rgstrId},
  317. </if>
  318. <if test="siteSaf != null and siteSaf != ''">SITE_SAF
  319. = #{siteSaf},
  320. </if>
  321. <if test="isHolePrct != null and isHolePrct != ''">IS_HOLE_PRCT
  322. = #{isHolePrct},
  323. </if>
  324. <if test="holePrctNum != null ">HOLE_PRCT_NUM
  325. = #{holePrctNum},
  326. </if>
  327. <if test="isStarsPrct != null and isStarsPrct != ''">IS_STARS_PRCT
  328. = #{isStarsPrct},
  329. </if>
  330. <if test="starsPrctNum != null ">STARS_PRCT_NUM
  331. = #{starsPrctNum},
  332. </if>
  333. <if test="isTunnelPrct != null and isTunnelPrct != ''">IS_TUNNEL_PRCT
  334. = #{isTunnelPrct},
  335. </if>
  336. <if test="tunnelPrctNum != null ">TUNNEL_PRCT_NUM
  337. = #{tunnelPrctNum},
  338. </if>
  339. <if test="siteSysNum != null ">SITE_SYS_NUM
  340. = #{siteSysNum},
  341. </if>
  342. <if test="siteFullNum != null ">SITE_FULL_NUM
  343. = #{siteFullNum},
  344. </if>
  345. <if test="buldRuleNum != null ">BULD_RULE_NUM
  346. = #{buldRuleNum},
  347. </if>
  348. <if test="regSysNum != null ">REG_SYS_NUM
  349. = #{regSysNum},
  350. </if>
  351. <if test="isBimBuld != null and isBimBuld != ''">IS_BIM_BULD
  352. = #{isBimBuld},
  353. </if>
  354. <if test="bimBuldNum != null ">BIM_BULD_NUM
  355. = #{bimBuldNum},
  356. </if>
  357. <if test="isCommunistPartyRoom != null and isCommunistPartyRoom != ''">IS_COMMUNIST_PARTY_ROOM
  358. = #{isCommunistPartyRoom},
  359. </if>
  360. <if test="communistPartyRoomNum != null ">COMMUNIST_PARTY_ROOM_NUM
  361. = #{communistPartyRoomNum},
  362. </if>
  363. <if test="isPartyBranch != null and isPartyBranch != ''">IS_PARTY_BRANCH
  364. = #{isPartyBranch},
  365. </if>
  366. <if test="partyBranchNum != null ">PARTY_BRANCH_NUM
  367. = #{partyBranchNum},
  368. </if>
  369. <if test="isPartyActivity != null and isPartyActivity !=''">IS_PARTY_ACTICITY
  370. = #{isPartyActivity},
  371. </if>
  372. <if test="partyActivityNum != null ">PARTY_ACTICITY_NUM
  373. = #{partyActivityNum},
  374. </if>
  375. <if test="note != null and note != ''">NOTE
  376. = #{note},
  377. </if>
  378. <if test="persId != null and persId != ''">PERS_ID
  379. = #{persId},
  380. </if>
  381. <if test="intm != null">INTM
  382. = #{intm},
  383. </if>
  384. <if test="uptm != null">UPTM
  385. = #{uptm},
  386. </if>
  387. <if test="dataStat != null and dataStat != ''">DATA_STAT
  388. = #{dataStat},
  389. </if>
  390. <if test="total != null and total != ''">TOTAL
  391. = #{total},
  392. </if>
  393. <if test="actualScore != null and actualScore != ''">ACTUAL_SCORE
  394. = #{actualScore},
  395. </if>
  396. </trim>
  397. <include refid="page_where"/>
  398. </update>
  399. <!-- 其他自定义SQL -->
  400. </mapper>