BisInspVill2021PblmDao.xml 13 KB

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