BisInspVillgdWtspCaseDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  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.BisInspVillgdWtspCaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspCase" id="bisInspVillgdWtspCaseResultMap">
  5. <result property="persId" column="PERS_ID"/>
  6. <result property="intm" column="INTM"/>
  7. <result property="uptm" column="UPTM"/>
  8. <result property="note" column="NOTE"/>
  9. <result property="dataStat" column="DATA_STAT"/>
  10. <result property="id" column="ID"/>
  11. <result property="wtspId" column="WTSP_ID"/>
  12. <result property="rgstrId" column="RGSTR_ID"/>
  13. <result property="isWfixPatrol" column="IS_WFIX_PATROL"/>
  14. <result property="isWfindMend" column="IS_WFIND_MEND"/>
  15. <result property="isNfixPatrol" column="IS_NFIX_PATROL"/>
  16. <result property="isNfindMend" column="IS_NFIND_MEND"/>
  17. <result property="isSetBurd" column="IS_SET_BURD"/>
  18. <result property="isSetBurdRoom" column="IS_SET_BURD_ROOM"/>
  19. <result property="isSetWind" column="IS_SET_WIND"/>
  20. <result property="isSetMsur" column="IS_SET_MSUR"/>
  21. <result property="isSureDep" column="IS_SURE_DEP"/>
  22. <result property="isSureDuty" column="IS_SURE_DUTY"/>
  23. <result property="isPubDuty" column="IS_PUB_DUTY"/>
  24. <result property="isBuldSys" column="IS_BULD_SYS"/>
  25. <result property="isSetProt" column="IS_SET_PROT"/>
  26. <result property="isRunNomal" column="IS_RUN_NOMAL"/>
  27. <result property="isPartSave" column="IS_PART_SAVE"/>
  28. <result property="isFixClean" column="IS_FIX_CLEAN"/>
  29. <result property="isRchStan" column="IS_RCH_STAN"/>
  30. <result property="isChkDev" column="IS_CHK_DEV"/>
  31. <result property="isBuldLog" column="IS_BULD_LOG"/>
  32. <result property="state" column="STATE"/>
  33. </resultMap>
  34. <sql id="table_columns">
  35. PERS_ID,
  36. INTM,
  37. UPTM,
  38. NOTE,
  39. DATA_STAT,
  40. ID,
  41. WTSP_ID,
  42. RGSTR_ID,
  43. IS_WFIX_PATROL,
  44. IS_WFIND_MEND,
  45. IS_NFIX_PATROL,
  46. IS_NFIND_MEND,
  47. IS_SET_BURD,
  48. IS_SET_BURD_ROOM,
  49. IS_SET_WIND,
  50. IS_SET_MSUR,
  51. IS_SURE_DEP,
  52. IS_SURE_DUTY,
  53. IS_PUB_DUTY,
  54. IS_BULD_SYS,
  55. IS_SET_PROT,
  56. IS_RUN_NOMAL,
  57. IS_PART_SAVE,
  58. IS_FIX_CLEAN,
  59. IS_RCH_STAN,
  60. IS_CHK_DEV,
  61. IS_BULD_LOG,
  62. STATE
  63. </sql>
  64. <sql id="entity_properties">
  65. #{persId},
  66. #{intm},
  67. #{uptm},
  68. #{note},
  69. #{dataStat},
  70. #{id},
  71. #{wtspId},
  72. #{rgstrId},
  73. #{isWfixPatrol},
  74. #{isWfindMend},
  75. #{isNfixPatrol},
  76. #{isNfindMend},
  77. #{isSetBurd},
  78. #{isSetBurdRoom},
  79. #{isSetWind},
  80. #{isSetMsur},
  81. #{isSureDep},
  82. #{isSureDuty},
  83. #{isPubDuty},
  84. #{isBuldSys},
  85. #{isSetProt},
  86. #{isRunNomal},
  87. #{isPartSave},
  88. #{isFixClean},
  89. #{isRchStan},
  90. #{isChkDev},
  91. #{isBuldLog},
  92. #{state}
  93. </sql>
  94. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  95. <sql id="page_where">
  96. <trim prefix="where" prefixOverrides="and | or ">
  97. <if test="persId != null and persId != ''">
  98. and PERS_ID = #{persId}
  99. </if>
  100. <if test="intm != null">
  101. and INTM = #{intm}
  102. </if>
  103. <if test="uptm != null">
  104. and UPTM = #{uptm}
  105. </if>
  106. <if test="note != null and note != ''">
  107. and NOTE = #{note}
  108. </if>
  109. <if test="dataStat != null and dataStat != ''">
  110. and DATA_STAT = #{dataStat}
  111. </if>
  112. <if test="wtspId != null and wtspId != ''">
  113. and WTSP_ID = #{wtspId}
  114. </if>
  115. <if test="rgstrId != null and rgstrId != ''">
  116. and RGSTR_ID = #{rgstrId}
  117. </if>
  118. <if test="isWfixPatrol != null and isWfixPatrol != ''">
  119. and IS_WFIX_PATROL = #{isWfixPatrol}
  120. </if>
  121. <if test="isWfindMend != null and isWfindMend != ''">
  122. and IS_WFIND_MEND = #{isWfindMend}
  123. </if>
  124. <if test="isNfixPatrol != null and isNfixPatrol != ''">
  125. and IS_NFIX_PATROL = #{isNfixPatrol}
  126. </if>
  127. <if test="isNfindMend != null and isNfindMend != ''">
  128. and IS_NFIND_MEND = #{isNfindMend}
  129. </if>
  130. <if test="isSetBurd != null and isSetBurd != ''">
  131. and IS_SET_BURD = #{isSetBurd}
  132. </if>
  133. <if test="isSetBurdRoom != null and isSetBurdRoom != ''">
  134. and IS_SET_BURD_ROOM = #{isSetBurdRoom}
  135. </if>
  136. <if test="isSetWind != null and isSetWind != ''">
  137. and IS_SET_WIND = #{isSetWind}
  138. </if>
  139. <if test="isSetMsur != null and isSetMsur != ''">
  140. and IS_SET_MSUR = #{isSetMsur}
  141. </if>
  142. <if test="isSureDep != null and isSureDep != ''">
  143. and IS_SURE_DEP = #{isSureDep}
  144. </if>
  145. <if test="isSureDuty != null and isSureDuty != ''">
  146. and IS_SURE_DUTY = #{isSureDuty}
  147. </if>
  148. <if test="isPubDuty != null and isPubDuty != ''">
  149. and IS_PUB_DUTY = #{isPubDuty}
  150. </if>
  151. <if test="isBuldSys != null and isBuldSys != ''">
  152. and IS_BULD_SYS = #{isBuldSys}
  153. </if>
  154. <if test="isSetProt != null and isSetProt != ''">
  155. and IS_SET_PROT = #{isSetProt}
  156. </if>
  157. <if test="isRunNomal != null and isRunNomal != ''">
  158. and IS_RUN_NOMAL = #{isRunNomal}
  159. </if>
  160. <if test="isPartSave != null and isPartSave != ''">
  161. and IS_PART_SAVE = #{isPartSave}
  162. </if>
  163. <if test="isFixClean != null and isFixClean != ''">
  164. and IS_FIX_CLEAN = #{isFixClean}
  165. </if>
  166. <if test="isRchStan != null and isRchStan != ''">
  167. and IS_RCH_STAN = #{isRchStan}
  168. </if>
  169. <if test="isChkDev != null and isChkDev != ''">
  170. and IS_CHK_DEV = #{isChkDev}
  171. </if>
  172. <if test="isBuldLog != null and isBuldLog != ''">
  173. and IS_BULD_LOG = #{isBuldLog}
  174. </if>
  175. <if test="state != null and state != ''">
  176. and STATE = #{state}
  177. </if>
  178. and DATA_STAT='0'
  179. </trim>
  180. </sql>
  181. <select id="get" resultMap="bisInspVillgdWtspCaseResultMap" parameterType="String">
  182. select
  183. <include refid="table_columns"/>
  184. from BIS_INSP_VILLGD_WTSP_CASE where WTSP_ID = #{id}
  185. </select>
  186. <select id="getBy" resultMap="bisInspVillgdWtspCaseResultMap">
  187. select
  188. <include refid="table_columns"/>
  189. from BIS_INSP_VILLGD_WTSP_CASE
  190. <include refid="page_where"/>
  191. </select>
  192. <select id="findAll" resultMap="bisInspVillgdWtspCaseResultMap">
  193. select
  194. <include refid="table_columns"/>
  195. from BIS_INSP_VILLGD_WTSP_CASE
  196. </select>
  197. <select id="findList" resultMap="bisInspVillgdWtspCaseResultMap">
  198. select
  199. <include refid="table_columns"/>
  200. from BIS_INSP_VILLGD_WTSP_CASE
  201. <include refid="page_where"/>
  202. </select>
  203. <select id="selectCount" resultType="int">
  204. select count(ID) from BIS_INSP_VILLGD_WTSP_CASE
  205. <include refid="page_where"/>
  206. </select>
  207. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspCase">
  208. insert into BIS_INSP_VILLGD_WTSP_CASE(
  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_VILLGD_WTSP_CASE set DATA_STAT='9' where ID = #{id}
  217. </delete>
  218. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspCase">
  219. update BIS_INSP_VILLGD_WTSP_CASE set DATA_STAT='9'
  220. <include refid="page_where"/>
  221. </delete>
  222. <update id="deleteInFlag" parameterType="java.lang.String">
  223. update BIS_INSP_VILLGD_WTSP_CASE set DATA_STAT = '9' where ID = #{id}
  224. </update>
  225. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspCase">
  226. update BIS_INSP_VILLGD_WTSP_CASE
  227. <trim prefix="set" suffixOverrides=",">
  228. <if test="persId != null and persId != ''">PERS_ID
  229. = #{persId},
  230. </if>
  231. <if test="intm != null">INTM
  232. = #{intm},
  233. </if>
  234. <if test="uptm != null">UPTM
  235. = #{uptm},
  236. </if>
  237. <if test="note != null and note != ''">NOTE
  238. = #{note},
  239. </if>
  240. <if test="dataStat != null and dataStat != ''">DATA_STAT
  241. = #{dataStat},
  242. </if>
  243. <if test="wtspId != null and wtspId != ''">WTSP_ID
  244. = #{wtspId},
  245. </if>
  246. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  247. = #{rgstrId},
  248. </if>
  249. <if test="isWfixPatrol != null and isWfixPatrol != ''">IS_WFIX_PATROL
  250. = #{isWfixPatrol},
  251. </if>
  252. <if test="isWfindMend != null and isWfindMend != ''">IS_WFIND_MEND
  253. = #{isWfindMend},
  254. </if>
  255. <if test="isNfixPatrol != null and isNfixPatrol != ''">IS_NFIX_PATROL
  256. = #{isNfixPatrol},
  257. </if>
  258. <if test="isNfindMend != null and isNfindMend != ''">IS_NFIND_MEND
  259. = #{isNfindMend},
  260. </if>
  261. <if test="isSetBurd != null and isSetBurd != ''">IS_SET_BURD
  262. = #{isSetBurd},
  263. </if>
  264. <if test="isSetBurdRoom != null and isSetBurdRoom != ''">IS_SET_BURD_ROOM
  265. = #{isSetBurdRoom},
  266. </if>
  267. <if test="isSetWind != null and isSetWind != ''">IS_SET_WIND
  268. = #{isSetWind},
  269. </if>
  270. <if test="isSetMsur != null and isSetMsur != ''">IS_SET_MSUR
  271. = #{isSetMsur},
  272. </if>
  273. <if test="isSureDep != null and isSureDep != ''">IS_SURE_DEP
  274. = #{isSureDep},
  275. </if>
  276. <if test="isSureDuty != null and isSureDuty != ''">IS_SURE_DUTY
  277. = #{isSureDuty},
  278. </if>
  279. <if test="isPubDuty != null and isPubDuty != ''">IS_PUB_DUTY
  280. = #{isPubDuty},
  281. </if>
  282. <if test="isBuldSys != null and isBuldSys != ''">IS_BULD_SYS
  283. = #{isBuldSys},
  284. </if>
  285. <if test="isSetProt != null and isSetProt != ''">IS_SET_PROT
  286. = #{isSetProt},
  287. </if>
  288. <if test="isRunNomal != null and isRunNomal != ''">IS_RUN_NOMAL
  289. = #{isRunNomal},
  290. </if>
  291. <if test="isPartSave != null and isPartSave != ''">IS_PART_SAVE
  292. = #{isPartSave},
  293. </if>
  294. <if test="isFixClean != null and isFixClean != ''">IS_FIX_CLEAN
  295. = #{isFixClean},
  296. </if>
  297. <if test="isRchStan != null and isRchStan != ''">IS_RCH_STAN
  298. = #{isRchStan},
  299. </if>
  300. <if test="isChkDev != null and isChkDev != ''">IS_CHK_DEV
  301. = #{isChkDev},
  302. </if>
  303. <if test="isBuldLog != null and isBuldLog != ''">IS_BULD_LOG
  304. = #{isBuldLog},
  305. </if>
  306. <if test="state != null and state != ''">
  307. STATE = #{state},
  308. </if>
  309. </trim>
  310. <where>ID = #{id}</where>
  311. </update>
  312. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspCase">
  313. update BIS_INSP_VILLGD_WTSP_CASE
  314. <trim prefix="set" suffixOverrides=",">
  315. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  316. <if test="intm != null">INTM = #{intm},</if>
  317. <if test="uptm != null">UPTM = #{uptm},</if>
  318. <if test="note != null and note != ''">NOTE = #{note},</if>
  319. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  320. <if test="wtspId != null and wtspId != ''">WTSP_ID
  321. = #{wtspId},
  322. </if>
  323. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  324. = #{rgstrId},
  325. </if>
  326. <if test="isWfixPatrol != null and isWfixPatrol != ''">IS_WFIX_PATROL
  327. = #{isWfixPatrol},
  328. </if>
  329. <if test="isWfindMend != null and isWfindMend != ''">IS_WFIND_MEND
  330. = #{isWfindMend},
  331. </if>
  332. <if test="isNfixPatrol != null and isNfixPatrol != ''">IS_NFIX_PATROL
  333. = #{isNfixPatrol},
  334. </if>
  335. <if test="isNfindMend != null and isNfindMend != ''">IS_NFIND_MEND
  336. = #{isNfindMend},
  337. </if>
  338. <if test="isSetBurd != null and isSetBurd != ''">IS_SET_BURD
  339. = #{isSetBurd},
  340. </if>
  341. <if test="isSetBurdRoom != null and isSetBurdRoom != ''">IS_SET_BURD_ROOM
  342. = #{isSetBurdRoom},
  343. </if>
  344. <if test="isSetWind != null and isSetWind != ''">IS_SET_WIND
  345. = #{isSetWind},
  346. </if>
  347. <if test="isSetMsur != null and isSetMsur != ''">IS_SET_MSUR
  348. = #{isSetMsur},
  349. </if>
  350. <if test="isSureDep != null and isSureDep != ''">IS_SURE_DEP
  351. = #{isSureDep},
  352. </if>
  353. <if test="isSureDuty != null and isSureDuty != ''">IS_SURE_DUTY
  354. = #{isSureDuty},
  355. </if>
  356. <if test="isPubDuty != null and isPubDuty != ''">IS_PUB_DUTY
  357. = #{isPubDuty},
  358. </if>
  359. <if test="isBuldSys != null and isBuldSys != ''">IS_BULD_SYS
  360. = #{isBuldSys},
  361. </if>
  362. <if test="isSetProt != null and isSetProt != ''">IS_SET_PROT
  363. = #{isSetProt},
  364. </if>
  365. <if test="isRunNomal != null and isRunNomal != ''">IS_RUN_NOMAL
  366. = #{isRunNomal},
  367. </if>
  368. <if test="isPartSave != null and isPartSave != ''">IS_PART_SAVE
  369. = #{isPartSave},
  370. </if>
  371. <if test="isFixClean != null and isFixClean != ''">IS_FIX_CLEAN
  372. = #{isFixClean},
  373. </if>
  374. <if test="isRchStan != null and isRchStan != ''">IS_RCH_STAN
  375. = #{isRchStan},
  376. </if>
  377. <if test="isChkDev != null and isChkDev != ''">IS_CHK_DEV
  378. = #{isChkDev},
  379. </if>
  380. <if test="isBuldLog != null and isBuldLog != ''">IS_BULD_LOG
  381. = #{isBuldLog},
  382. </if>
  383. <if test="state != null and state != ''">
  384. STATE = #{state},
  385. </if>
  386. </trim>
  387. <include refid="page_where"/>
  388. </update>
  389. <!-- 其他自定义SQL -->
  390. </mapper>