AttWiuqhBaseDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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.AttWiuqhBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWiuqhBase" id="attWiuqhBaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="nm" column="NM"/>
  7. <result property="adCode" column="AD_CODE"/>
  8. <result property="adName" column="AD_NAME"/>
  9. <result property="loc" column="LOC"/>
  10. <result property="appNo" column="APP_NO"/>
  11. <result property="wtAppNo" column="WT_APP_NO"/>
  12. <result property="appDep" column="APP_DEP"/>
  13. <result property="wtType" column="WT_TYPE"/>
  14. <result property="wtMsr" column="WT_MSR"/>
  15. <result property="wtTm" column="WT_TM"/>
  16. <result property="wtEntm" column="WT_ENTM"/>
  17. <result property="wtSur" column="WT_SUR"/>
  18. <result property="wtUsr" column="WT_USR"/>
  19. <result property="depPers" column="DEP_PERS"/>
  20. <result property="persPhone" column="PERS_PHONE"/>
  21. <result property="depCntPers" column="DEP_CNT_PERS"/>
  22. <result property="depCntPersPhone" column="DEP_CNT_PERS_PHONE"/>
  23. <result property="note" column="NOTE"/>
  24. <result property="centerX" column="CENTER_X"/>
  25. <result property="centerY" column="CENTER_Y"/>
  26. <result property="gdX" column="GD_X"/>
  27. <result property="gdY" column="GD_Y"/>
  28. <result property="intm" column="INTM"/>
  29. <result property="uptm" column="UPTM"/>
  30. <result property="dataStat" column="DATA_STAT"/>
  31. </resultMap>
  32. <sql id="table_columns">
  33. ID,
  34. NM,
  35. AD_CODE,
  36. AD_NAME,
  37. LOC,
  38. APP_NO,
  39. WT_APP_NO,
  40. APP_DEP,
  41. WT_TYPE,
  42. WT_MSR,
  43. WT_TM,
  44. WT_ENTM,
  45. WT_SUR,
  46. WT_USR,
  47. DEP_PERS,
  48. PERS_PHONE,
  49. DEP_CNT_PERS,
  50. DEP_CNT_PERS_PHONE,
  51. NOTE,
  52. CENTER_X,
  53. CENTER_Y,
  54. GD_X,
  55. GD_Y,
  56. INTM,
  57. UPTM,
  58. DATA_STAT
  59. </sql>
  60. <sql id="entity_properties">
  61. #{id},
  62. #{nm},
  63. #{adCode},
  64. #{adName},
  65. #{loc},
  66. #{appNo},
  67. #{wtAppNo},
  68. #{appDep},
  69. #{wtType},
  70. #{wtMsr},
  71. #{wtTm},
  72. #{wtEntm},
  73. #{wtSur},
  74. #{wtUsr},
  75. #{depPers},
  76. #{persPhone},
  77. #{depCntPers},
  78. #{depCntPersPhone},
  79. #{note},
  80. #{centerX},
  81. #{centerY},
  82. #{gdX},
  83. #{gdY},
  84. #{intm},
  85. #{uptm},
  86. #{dataStat}
  87. </sql>
  88. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  89. <sql id="page_where">
  90. <trim prefix="where" prefixOverrides="and | or ">
  91. <if test="nm != null and nm != ''">
  92. and NM = #{nm}
  93. </if>
  94. <if test="adCode != null and adCode != ''">
  95. and AD_CODE = #{adCode}
  96. </if>
  97. <if test="adName != null and adName != ''">
  98. and AD_NAME = #{adName}
  99. </if>
  100. <if test="loc != null and loc != ''">
  101. and LOC = #{loc}
  102. </if>
  103. <if test="appNo != null and appNo != ''">
  104. and APP_NO = #{appNo}
  105. </if>
  106. <if test="wtAppNo != null and wtAppNo != ''">
  107. and WT_APP_NO = #{wtAppNo}
  108. </if>
  109. <if test="appDep != null and appDep != ''">
  110. and APP_DEP = #{appDep}
  111. </if>
  112. <if test="wtType != null and wtType != ''">
  113. and WT_TYPE = #{wtType}
  114. </if>
  115. <if test="wtMsr != null and wtMsr != ''">
  116. and WT_MSR = #{wtMsr}
  117. </if>
  118. <if test="wtTm != null">
  119. and WT_TM = #{wtTm}
  120. </if>
  121. <if test="wtEntm != null">
  122. and WT_ENTM = #{wtEntm}
  123. </if>
  124. <if test="wtSur != null and wtSur != ''">
  125. and WT_SUR = #{wtSur}
  126. </if>
  127. <if test="wtUsr != null and wtUsr != ''">
  128. and WT_USR = #{wtUsr}
  129. </if>
  130. <if test="depPers != null and depPers != ''">
  131. and DEP_PERS = #{depPers}
  132. </if>
  133. <if test="persPhone != null and persPhone != ''">
  134. and PERS_PHONE = #{persPhone}
  135. </if>
  136. <if test="depCntPers != null and depCntPers != ''">
  137. and DEP_CNT_PERS = #{depCntPers}
  138. </if>
  139. <if test="depCntPersPhone != null and depCntPersPhone != ''">
  140. and DEP_CNT_PERS_PHONE = #{depCntPersPhone}
  141. </if>
  142. <if test="note != null and note != ''">
  143. and NOTE = #{note}
  144. </if>
  145. <if test="centerX != null and centerX != ''">
  146. and CENTER_X = #{centerX}
  147. </if>
  148. <if test="centerY != null and centerY != ''">
  149. and CENTER_Y = #{centerY}
  150. </if>
  151. <if test="gdX != null and gdX != ''">
  152. and GD_X = #{gdX}
  153. </if>
  154. <if test="gdY != null and gdY != ''">
  155. and GD_Y = #{gdY}
  156. </if>
  157. <if test="intm != null">
  158. and INTM = #{intm}
  159. </if>
  160. <if test="uptm != null">
  161. and UPTM = #{uptm}
  162. </if>
  163. <if test="dataStat != null and dataStat != ''">
  164. and DATA_STAT = #{dataStat}
  165. </if>
  166. and DATA_STAT='0'
  167. </trim>
  168. </sql>
  169. <select id="get" resultMap="attWiuqhBaseResultMap" parameterType="String">
  170. select
  171. <include refid="table_columns"/>
  172. from ATT_WIUQH_BASE where ID = #{id}
  173. </select>
  174. <select id="getBy" resultMap="attWiuqhBaseResultMap">
  175. select
  176. <include refid="table_columns"/>
  177. from ATT_WIUQH_BASE
  178. <include refid="page_where"/>
  179. </select>
  180. <select id="findAll" resultMap="attWiuqhBaseResultMap">
  181. select
  182. <include refid="table_columns"/>
  183. from ATT_WIUQH_BASE
  184. </select>
  185. <select id="findList" resultMap="attWiuqhBaseResultMap">
  186. select
  187. <include refid="table_columns"/>
  188. from ATT_WIUQH_BASE
  189. <include refid="page_where"/>
  190. </select>
  191. <select id="selectCount" resultType="int">
  192. select count(ID) from ATT_WIUQH_BASE
  193. <include refid="page_where"/>
  194. </select>
  195. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWiuqhBase">
  196. insert into ATT_WIUQH_BASE(
  197. <include refid="table_columns"/>
  198. )
  199. values (
  200. <include refid="entity_properties"/>
  201. )
  202. </insert>
  203. <delete id="delete" parameterType="java.lang.String">
  204. update ATT_WIUQH_BASE set DATA_STAT='9' where ID = #{id}
  205. </delete>
  206. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuqhBase">
  207. update ATT_WIUQH_BASE set DATA_STAT='9'
  208. <include refid="page_where"/>
  209. </delete>
  210. <update id="deleteInFlag" parameterType="java.lang.String">
  211. update ATT_WIUQH_BASE set DATA_STAT = '9' where ID = #{id}
  212. </update>
  213. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWiuqhBase">
  214. update ATT_WIUQH_BASE
  215. <trim prefix="set" suffixOverrides=",">
  216. <if test="nm != null and nm != ''">NM
  217. = #{nm},
  218. </if>
  219. <if test="adCode != null and adCode != ''">AD_CODE
  220. = #{adCode},
  221. </if>
  222. <if test="adName != null and adName != ''">AD_NAME
  223. = #{adName},
  224. </if>
  225. <if test="loc != null and loc != ''">LOC
  226. = #{loc},
  227. </if>
  228. <if test="appNo != null and appNo != ''">APP_NO
  229. = #{appNo},
  230. </if>
  231. <if test="wtAppNo != null and wtAppNo != ''">WT_APP_NO
  232. = #{wtAppNo},
  233. </if>
  234. <if test="appDep != null and appDep != ''">APP_DEP
  235. = #{appDep},
  236. </if>
  237. <if test="wtType != null and wtType != ''">WT_TYPE
  238. = #{wtType},
  239. </if>
  240. <if test="wtMsr != null and wtMsr != ''">WT_MSR
  241. = #{wtMsr},
  242. </if>
  243. <if test="wtTm != null">WT_TM = #{wtTm},</if>
  244. <if test="wtEntm != null">WT_ENTM = #{wtEntm},</if>
  245. <if test="wtSur != null and wtSur != ''">WT_SUR
  246. = #{wtSur},
  247. </if>
  248. <if test="wtUsr != null and wtUsr != ''">WT_USR
  249. = #{wtUsr},
  250. </if>
  251. <if test="depPers != null and depPers != ''">DEP_PERS
  252. = #{depPers},
  253. </if>
  254. <if test="persPhone != null and persPhone != ''">PERS_PHONE
  255. = #{persPhone},
  256. </if>
  257. <if test="depCntPers != null and depCntPers != ''">DEP_CNT_PERS
  258. = #{depCntPers},
  259. </if>
  260. <if test="depCntPersPhone != null and depCntPersPhone != ''">DEP_CNT_PERS_PHONE
  261. = #{depCntPersPhone},
  262. </if>
  263. <if test="note != null and note != ''">NOTE
  264. = #{note},
  265. </if>
  266. <if test="centerX != null and centerX != ''">CENTER_X
  267. = #{centerX},
  268. </if>
  269. <if test="centerY != null and centerY != ''">CENTER_Y
  270. = #{centerY},
  271. </if>
  272. <if test="gdX != null and gdX != ''">GD_X
  273. = #{gdX},
  274. </if>
  275. <if test="gdY != null and gdY != ''">GD_Y
  276. = #{gdY},
  277. </if>
  278. <if test="intm != null">INTM
  279. = #{intm},
  280. </if>
  281. <if test="uptm != null">UPTM
  282. = #{uptm},
  283. </if>
  284. <if test="dataStat != null and dataStat != ''">DATA_STAT
  285. = #{dataStat},
  286. </if>
  287. </trim>
  288. <where>ID = #{id}</where>
  289. </update>
  290. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuqhBase">
  291. update ATT_WIUQH_BASE
  292. <trim prefix="set" suffixOverrides=",">
  293. <if test="nm != null and nm != ''">NM
  294. = #{nm},
  295. </if>
  296. <if test="adCode != null and adCode != ''">AD_CODE
  297. = #{adCode},
  298. </if>
  299. <if test="adName != null and adName != ''">AD_NAME
  300. = #{adName},
  301. </if>
  302. <if test="loc != null and loc != ''">LOC
  303. = #{loc},
  304. </if>
  305. <if test="appNo != null and appNo != ''">APP_NO
  306. = #{appNo},
  307. </if>
  308. <if test="wtAppNo != null and wtAppNo != ''">WT_APP_NO
  309. = #{wtAppNo},
  310. </if>
  311. <if test="appDep != null and appDep != ''">APP_DEP
  312. = #{appDep},
  313. </if>
  314. <if test="wtType != null and wtType != ''">WT_TYPE
  315. = #{wtType},
  316. </if>
  317. <if test="wtMsr != null and wtMsr != ''">WT_MSR
  318. = #{wtMsr},
  319. </if>
  320. <if test="wtTm != null">WT_TM
  321. = #{wtTm},
  322. </if>
  323. <if test="wtEntm != null">WT_ENTM = #{wtEntm},</if>
  324. <if test="wtSur != null and wtSur != ''">WT_SUR
  325. = #{wtSur},
  326. </if>
  327. <if test="wtUsr != null and wtUsr != ''">WT_USR
  328. = #{wtUsr},
  329. </if>
  330. <if test="depPers != null and depPers != ''">DEP_PERS
  331. = #{depPers},
  332. </if>
  333. <if test="persPhone != null and persPhone != ''">PERS_PHONE
  334. = #{persPhone},
  335. </if>
  336. <if test="depCntPers != null and depCntPers != ''">DEP_CNT_PERS
  337. = #{depCntPers},
  338. </if>
  339. <if test="depCntPersPhone != null and depCntPersPhone != ''">DEP_CNT_PERS_PHONE
  340. = #{depCntPersPhone},
  341. </if>
  342. <if test="note != null and note != ''">NOTE
  343. = #{note},
  344. </if>
  345. <if test="centerX != null and centerX != ''">CENTER_X
  346. = #{centerX},
  347. </if>
  348. <if test="centerY != null and centerY != ''">CENTER_Y
  349. = #{centerY},
  350. </if>
  351. <if test="gdX != null and gdX != ''">GD_X
  352. = #{gdX},
  353. </if>
  354. <if test="gdY != null and gdY != ''">GD_Y
  355. = #{gdY},
  356. </if>
  357. <if test="intm != null">INTM
  358. = #{intm},
  359. </if>
  360. <if test="uptm != null">UPTM
  361. = #{uptm},
  362. </if>
  363. <if test="dataStat != null and dataStat != ''">DATA_STAT
  364. = #{dataStat},
  365. </if>
  366. </trim>
  367. <include refid="page_where"/>
  368. </update>
  369. <!-- 其他自定义SQL -->
  370. <select id="getObjId" resultType="cn.com.goldenwater.dcproj.model.AttWiuqhBase">
  371. SELECT
  372. <include refid="table_columns"/>
  373. FROM ATT_WIUQH_BASE
  374. WHERE ID = (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE OBJ_ID = #{objId})
  375. </select>
  376. </mapper>