BisInspWagaPblmDao.xml 18 KB

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