BisInspRslkbkPblmDao.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  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.BisInspRslkbkPblmDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRslkbkPblm" id="bisInspRslkbkPblmResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="rsCode" column="RS_CODE"/>
  8. <result property="rsName" column="RS_NAME"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="proName" column="PRO_NAME"/>
  11. <result property="cityName" column="CITY_NAME"/>
  12. <result property="countyName" column="COUNTY_NAME"/>
  13. <result property="damRegCode" column="DAM_REG_CODE"/>
  14. <result property="engScal" column="ENG_SCAL"/>
  15. <result property="safeComment" column="SAFE_COMMENT"/>
  16. <result property="unit" column="UNIT"/>
  17. <result property="pblmType" column="PBLM_TYPE"/>
  18. <result property="pblmOption" column="PBLM_OPTION"/>
  19. <result property="pblmDesc" column="PBLM_DESC"/>
  20. <result property="pblmLevl" column="PBLM_LEVL"/>
  21. <result property="attach" column="ATTACH"/>
  22. <result property="pblmSn" column="PBLM_SN"/>
  23. <result property="rectConc" column="RECT_CONC"/>
  24. <result property="rectMsrs" column="RECT_MSRS"/>
  25. <result property="revwInfo" column="REVW_INFO"/>
  26. <result property="intm" column="INTM"/>
  27. <result property="uptm" column="UPTM"/>
  28. <result property="auditConc" column="AUDIT_CONC"/>
  29. <result property="auditNote" column="AUDIT_NOTE"/>
  30. <result property="column1" column="COLUMN1"/>
  31. <result property="column2" column="COLUMN2"/>
  32. <result property="revwRectConc" column="REVW_RECT_CONC"/>
  33. <result property="realPlanDt" column="REAL_PLAN_DT"/>
  34. <result property="revwRectPblm" column="REVW_RECT_PBLM"/>
  35. <result property="revwState" column="REVW_STATE"/>
  36. <result property="state" column="STATE"/>
  37. <result property="dataStat" column="DATA_STAT"/>
  38. </resultMap>
  39. <sql id="table_columns">
  40. ID,
  41. RGSTR_ID,
  42. RS_CODE,
  43. RS_NAME,
  44. AD_CODE,
  45. PRO_NAME,
  46. CITY_NAME,
  47. COUNTY_NAME,
  48. DAM_REG_CODE,
  49. ENG_SCAL,
  50. SAFE_COMMENT,
  51. UNIT,
  52. PBLM_TYPE,
  53. PBLM_OPTION,
  54. PBLM_DESC,
  55. PBLM_LEVL,
  56. ATTACH,
  57. PBLM_SN,
  58. RECT_CONC,
  59. RECT_MSRS,
  60. REVW_INFO,
  61. INTM,
  62. UPTM,
  63. AUDIT_CONC,
  64. AUDIT_NOTE,
  65. COLUMN1,
  66. COLUMN2,
  67. REVW_RECT_CONC,
  68. REAL_PLAN_DT,
  69. REVW_RECT_PBLM,
  70. REVW_STATE,
  71. STATE,
  72. DATA_STAT
  73. </sql>
  74. <sql id="entity_properties">
  75. #{id},
  76. #{rgstrId},
  77. #{rsCode},
  78. #{rsName},
  79. #{adCode},
  80. #{proName},
  81. #{cityName},
  82. #{countyName},
  83. #{damRegCode},
  84. #{engScal},
  85. #{safeComment},
  86. #{unit},
  87. #{pblmType},
  88. #{pblmOption},
  89. #{pblmDesc},
  90. #{pblmLevl},
  91. #{attach},
  92. #{pblmSn},
  93. #{rectConc},
  94. #{rectMsrs},
  95. #{revwInfo},
  96. #{intm},
  97. #{uptm},
  98. #{auditConc},
  99. #{auditNote},
  100. #{column1},
  101. #{column2},
  102. #{revwRectConc},
  103. #{realPlanDt},
  104. #{revwRectPblm},
  105. #{revwState},
  106. #{state},
  107. #{dataStat}
  108. </sql>
  109. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  110. <sql id="page_where">
  111. <trim prefix="where" prefixOverrides="and | or ">
  112. <if test="rgstrId != null and rgstrId != ''">
  113. and RGSTR_ID = #{rgstrId}
  114. </if>
  115. <if test="rsCode != null and rsCode != ''">
  116. and RS_CODE = #{rsCode}
  117. </if>
  118. <if test="rsName != null and rsName != ''">
  119. and RS_NAME = #{rsName}
  120. </if>
  121. <if test="adCode != null and adCode != ''">
  122. and AD_CODE = #{adCode}
  123. </if>
  124. <if test="proName != null and proName != ''">
  125. and PRO_NAME = #{proName}
  126. </if>
  127. <if test="cityName != null and cityName != ''">
  128. and CITY_NAME = #{cityName}
  129. </if>
  130. <if test="countyName != null and countyName != ''">
  131. and COUNTY_NAME = #{countyName}
  132. </if>
  133. <if test="damRegCode != null and damRegCode != ''">
  134. and DAM_REG_CODE = #{damRegCode}
  135. </if>
  136. <if test="engScal != null and engScal != ''">
  137. and ENG_SCAL = #{engScal}
  138. </if>
  139. <if test="safeComment != null and safeComment != ''">
  140. and SAFE_COMMENT = #{safeComment}
  141. </if>
  142. <if test="unit != null and unit != ''">
  143. and UNIT = #{unit}
  144. </if>
  145. <if test="pblmType != null and pblmType != ''">
  146. and PBLM_TYPE = #{pblmType}
  147. </if>
  148. <if test="pblmOption != null and pblmOption != ''">
  149. and PBLM_OPTION = #{pblmOption}
  150. </if>
  151. <if test="pblmDesc != null and pblmDesc != ''">
  152. and PBLM_DESC = #{pblmDesc}
  153. </if>
  154. <if test="pblmLevl != null and pblmLevl != ''">
  155. and PBLM_LEVL = #{pblmLevl}
  156. </if>
  157. <if test="attach != null and attach != ''">
  158. and ATTACH = #{attach}
  159. </if>
  160. <if test="pblmSn != null and pblmSn != ''">
  161. and PBLM_SN = #{pblmSn}
  162. </if>
  163. <if test="rectConc != null and rectConc != ''">
  164. and RECT_CONC = #{rectConc}
  165. </if>
  166. <if test="rectMsrs != null and rectMsrs != ''">
  167. and RECT_MSRS = #{rectMsrs}
  168. </if>
  169. <if test="revwInfo != null and revwInfo != ''">
  170. and REVW_INFO = #{revwInfo}
  171. </if>
  172. <if test="intm != null">
  173. and INTM = #{intm}
  174. </if>
  175. <if test="uptm != null">
  176. and UPTM = #{uptm}
  177. </if>
  178. <if test="auditConc != null and auditConc != ''">
  179. and AUDIT_CONC = #{auditConc}
  180. </if>
  181. <if test="auditNote != null and auditNote != ''">
  182. and AUDIT_NOTE = #{auditNote}
  183. </if>
  184. <if test="column1 != null and column1 != ''">
  185. and COLUMN1 = #{column1}
  186. </if>
  187. <if test="column2 != null and column2 != ''">
  188. and COLUMN2 = #{column2}
  189. </if>
  190. <if test="revwRectConc != null and revwRectConc != ''">
  191. and REVW_RECT_CONC = #{revwRectConc}
  192. </if>
  193. <if test="realPlanDt != null">
  194. and REAL_PLAN_DT = #{realPlanDt}
  195. </if>
  196. <if test="revwRectPblm != null and revwRectPblm != ''">
  197. and REVW_RECT_PBLM = #{revwRectPblm}
  198. </if>
  199. <if test="revwState != null and revwState != ''">
  200. and REVW_STATE = #{revwState}
  201. </if>
  202. <if test="state != null and state != ''">
  203. and STATE = #{state}
  204. </if>
  205. <if test="dataStat != null and dataStat != ''">
  206. and DATA_STAT = #{dataStat}
  207. </if>
  208. and DATA_STAT='0'
  209. </trim>
  210. </sql>
  211. <select id="get" resultMap="bisInspRslkbkPblmResultMap" parameterType="String">
  212. select
  213. <include refid="table_columns"/>
  214. from BIS_INSP_RSLKBK_PBLM where ID = #{id}
  215. </select>
  216. <select id="getBy" resultMap="bisInspRslkbkPblmResultMap">
  217. select
  218. <include refid="table_columns"/>
  219. from BIS_INSP_RSLKBK_PBLM
  220. <include refid="page_where"/>
  221. </select>
  222. <select id="findAll" resultMap="bisInspRslkbkPblmResultMap">
  223. select
  224. <include refid="table_columns"/>
  225. from BIS_INSP_RSLKBK_PBLM
  226. </select>
  227. <select id="findList" resultMap="bisInspRslkbkPblmResultMap">
  228. select
  229. <include refid="table_columns"/>
  230. from BIS_INSP_RSLKBK_PBLM
  231. <include refid="page_where"/>
  232. </select>
  233. <select id="selectCount" resultType="int">
  234. select count(ID) from BIS_INSP_RSLKBK_PBLM
  235. <include refid="page_where"/>
  236. </select>
  237. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRslkbkPblm">
  238. insert into BIS_INSP_RSLKBK_PBLM(
  239. <include refid="table_columns"/>
  240. )
  241. values (
  242. <include refid="entity_properties"/>
  243. )
  244. </insert>
  245. <delete id="delete" parameterType="java.lang.String">
  246. update BIS_INSP_RSLKBK_PBLM set DATA_STAT='9' where ID = #{id}
  247. </delete>
  248. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRslkbkPblm">
  249. update BIS_INSP_RSLKBK_PBLM set DATA_STAT='9'
  250. <include refid="page_where"/>
  251. </delete>
  252. <update id="deleteInFlag" parameterType="java.lang.String">
  253. update BIS_INSP_RSLKBK_PBLM set DATA_STAT = '9' where ID = #{id}
  254. </update>
  255. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRslkbkPblm">
  256. update BIS_INSP_RSLKBK_PBLM
  257. <trim prefix="set" suffixOverrides=",">
  258. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  259. = #{rgstrId},
  260. </if>
  261. <if test="rsCode != null and rsCode != ''">RS_CODE
  262. = #{rsCode},
  263. </if>
  264. <if test="rsName != null and rsName != ''">RS_NAME
  265. = #{rsName},
  266. </if>
  267. <if test="adCode != null and adCode != ''">AD_CODE
  268. = #{adCode},
  269. </if>
  270. <if test="proName != null and proName != ''">PRO_NAME
  271. = #{proName},
  272. </if>
  273. <if test="cityName != null and cityName != ''">CITY_NAME
  274. = #{cityName},
  275. </if>
  276. <if test="countyName != null and countyName != ''">COUNTY_NAME
  277. = #{countyName},
  278. </if>
  279. <if test="damRegCode != null and damRegCode != ''">DAM_REG_CODE
  280. = #{damRegCode},
  281. </if>
  282. <if test="engScal != null and engScal != ''">ENG_SCAL
  283. = #{engScal},
  284. </if>
  285. <if test="safeComment != null and safeComment != ''">SAFE_COMMENT
  286. = #{safeComment},
  287. </if>
  288. <if test="unit != null and unit != ''">UNIT
  289. = #{unit},
  290. </if>
  291. <if test="pblmType != null and pblmType != ''">PBLM_TYPE
  292. = #{pblmType},
  293. </if>
  294. <if test="pblmOption != null and pblmOption != ''">PBLM_OPTION
  295. = #{pblmOption},
  296. </if>
  297. <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC
  298. = #{pblmDesc},
  299. </if>
  300. <if test="pblmLevl != null and pblmLevl != ''">PBLM_LEVL
  301. = #{pblmLevl},
  302. </if>
  303. <if test="attach != null and attach != ''">ATTACH
  304. = #{attach},
  305. </if>
  306. <if test="pblmSn != null and pblmSn != ''">PBLM_SN
  307. = #{pblmSn},
  308. </if>
  309. <if test="rectConc != null and rectConc != ''">RECT_CONC
  310. = #{rectConc},
  311. </if>
  312. <if test="rectMsrs != null and rectMsrs != ''">RECT_MSRS
  313. = #{rectMsrs},
  314. </if>
  315. <if test="revwInfo != null and revwInfo != ''">REVW_INFO
  316. = #{revwInfo},
  317. </if>
  318. <if test="intm != null">INTM
  319. = #{intm},
  320. </if>
  321. <if test="uptm != null">UPTM
  322. = #{uptm},
  323. </if>
  324. <if test="auditConc != null and auditConc != ''">AUDIT_CONC
  325. = #{auditConc},
  326. </if>
  327. <if test="auditNote != null and auditNote != ''">AUDIT_NOTE
  328. = #{auditNote},
  329. </if>
  330. <if test="column1 != null and column1 != ''">COLUMN1
  331. = #{column1},
  332. </if>
  333. <if test="column2 != null and column2 != ''">COLUMN2
  334. = #{column2},
  335. </if>
  336. <if test="revwRectConc != null and revwRectConc != ''">REVW_RECT_CONC
  337. = #{revwRectConc},
  338. </if>
  339. <if test="realPlanDt != null">REAL_PLAN_DT
  340. = #{realPlanDt},
  341. </if>
  342. <if test="revwRectPblm != null and revwRectPblm != ''">REVW_RECT_PBLM
  343. = #{revwRectPblm},
  344. </if>
  345. <if test="revwState != null and revwState != ''">REVW_STATE
  346. = #{revwState},
  347. </if>
  348. <if test="state != null and state != ''">STATE
  349. = #{state},
  350. </if>
  351. <if test="dataStat != null and dataStat != ''">DATA_STAT
  352. = #{dataStat},
  353. </if>
  354. </trim>
  355. <where>ID = #{id}</where>
  356. </update>
  357. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRslkbkPblm">
  358. update BIS_INSP_RSLKBK_PBLM
  359. <trim prefix="set" suffixOverrides=",">
  360. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  361. = #{rgstrId},
  362. </if>
  363. <if test="rsCode != null and rsCode != ''">RS_CODE
  364. = #{rsCode},
  365. </if>
  366. <if test="rsName != null and rsName != ''">RS_NAME
  367. = #{rsName},
  368. </if>
  369. <if test="adCode != null and adCode != ''">AD_CODE
  370. = #{adCode},
  371. </if>
  372. <if test="proName != null and proName != ''">PRO_NAME
  373. = #{proName},
  374. </if>
  375. <if test="cityName != null and cityName != ''">CITY_NAME
  376. = #{cityName},
  377. </if>
  378. <if test="countyName != null and countyName != ''">COUNTY_NAME
  379. = #{countyName},
  380. </if>
  381. <if test="damRegCode != null and damRegCode != ''">DAM_REG_CODE
  382. = #{damRegCode},
  383. </if>
  384. <if test="engScal != null and engScal != ''">ENG_SCAL
  385. = #{engScal},
  386. </if>
  387. <if test="safeComment != null and safeComment != ''">SAFE_COMMENT
  388. = #{safeComment},
  389. </if>
  390. <if test="unit != null and unit != ''">UNIT
  391. = #{unit},
  392. </if>
  393. <if test="pblmType != null and pblmType != ''">PBLM_TYPE
  394. = #{pblmType},
  395. </if>
  396. <if test="pblmOption != null and pblmOption != ''">PBLM_OPTION
  397. = #{pblmOption},
  398. </if>
  399. <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC
  400. = #{pblmDesc},
  401. </if>
  402. <if test="pblmLevl != null and pblmLevl != ''">PBLM_LEVL
  403. = #{pblmLevl},
  404. </if>
  405. <if test="attach != null and attach != ''">ATTACH
  406. = #{attach},
  407. </if>
  408. <if test="pblmSn != null and pblmSn != ''">PBLM_SN
  409. = #{pblmSn},
  410. </if>
  411. <if test="rectConc != null and rectConc != ''">RECT_CONC
  412. = #{rectConc},
  413. </if>
  414. <if test="rectMsrs != null and rectMsrs != ''">RECT_MSRS
  415. = #{rectMsrs},
  416. </if>
  417. <if test="revwInfo != null and revwInfo != ''">REVW_INFO
  418. = #{revwInfo},
  419. </if>
  420. <if test="intm != null">INTM
  421. = #{intm},
  422. </if>
  423. <if test="uptm != null">UPTM
  424. = #{uptm},
  425. </if>
  426. <if test="auditConc != null and auditConc != ''">AUDIT_CONC
  427. = #{auditConc},
  428. </if>
  429. <if test="auditNote != null and auditNote != ''">AUDIT_NOTE
  430. = #{auditNote},
  431. </if>
  432. <if test="column1 != null and column1 != ''">COLUMN1
  433. = #{column1},
  434. </if>
  435. <if test="column2 != null and column2 != ''">COLUMN2
  436. = #{column2},
  437. </if>
  438. <if test="revwRectConc != null and revwRectConc != ''">REVW_RECT_CONC
  439. = #{revwRectConc},
  440. </if>
  441. <if test="realPlanDt != null">REAL_PLAN_DT
  442. = #{realPlanDt},
  443. </if>
  444. <if test="revwRectPblm != null and revwRectPblm != ''">REVW_RECT_PBLM
  445. = #{revwRectPblm},
  446. </if>
  447. <if test="revwState != null and revwState != ''">REVW_STATE
  448. = #{revwState},
  449. </if>
  450. <if test="state != null and state != ''">STATE
  451. = #{state},
  452. </if>
  453. <if test="dataStat != null and dataStat != ''">DATA_STAT
  454. = #{dataStat},
  455. </if>
  456. </trim>
  457. <include refid="page_where"/>
  458. </update>
  459. <!-- 其他自定义SQL -->
  460. </mapper>