AttWuntBaseDao.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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.AttWuntBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWuntBase" id="attWuntBaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="utName" column="UT_NAME"/>
  7. <result property="utCode" column="UT_CODE"/>
  8. <result property="adName" column="AD_NAME"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="utType" column="UT_TYPE"/>
  11. <result property="utPpt" column="UT_PPT"/>
  12. <result property="openName" column="OPEN_NAME"/>
  13. <result property="utAttn" column="UT_ATTN"/>
  14. <result property="utCont" column="UT_CONT"/>
  15. <result property="signAddr" column="SIGN_ADDR"/>
  16. <result property="utAddr" column="UT_ADDR"/>
  17. <result property="pcX" column="PC_X"/>
  18. <result property="pcY" column="PC_Y"/>
  19. <result property="gdX" column="GD_X"/>
  20. <result property="gdY" column="GD_Y"/>
  21. <result property="trdType" column="TRD_TYPE"/>
  22. <result property="greenArea" column="GREEN_AREA"/>
  23. <result property="wsTw" column="WS_TW"/>
  24. <result property="wsBw" column="WS_BW"/>
  25. <result property="wsOth" column="WS_OTH"/>
  26. <result property="payWb" column="PAY_WB"/>
  27. <result property="wbPer" column="WB_PER"/>
  28. <result property="hotlLev" column="HOTL_LEV"/>
  29. <result property="bedNum" column="BED_NUM"/>
  30. <result property="occRate" column="OCC_RATE"/>
  31. <result property="wuUnit" column="WU_UNIT"/>
  32. <result property="wuUnitOut" column="WU_UNIT_OUT"/>
  33. <result property="mainPrd" column="MAIN_PRD"/>
  34. <result property="wipaa" column="WIPAA"/>
  35. <result property="hasWrmrms" column="HAS_WRMRMS"/>
  36. <result property="isKmwuul" column="IS_KMWUUL"/>
  37. <result property="kmwuulLev" column="KMWUUL_LEV"/>
  38. <result property="wuUt" column="WU_UT"/>
  39. <result property="wuUtAttn" column="WU_UT_ATTN"/>
  40. <result property="wuUtCont" column="WU_UT_CONT"/>
  41. <result property="utPersNum" column="UT_PERS_NUM"/>
  42. <result property="workNum" column="WORK_NUM"/>
  43. <result property="workNotNum" column="WORK_NOT_NUM"/>
  44. <result property="totArea" column="TOT_AREA"/>
  45. <result property="buldArea" column="BULD_AREA"/>
  46. <result property="schCla" column="SCH_CLA"/>
  47. <result property="uniCla" column="UNI_CLA"/>
  48. <result property="teachNum" column="TEACH_NUM"/>
  49. <result property="teachLvNum" column="TEACH_LV_NUM"/>
  50. <result property="stuNum" column="STU_NUM"/>
  51. <result property="stuLvNum" column="STU_LV_NUM"/>
  52. <result property="isLchCwsm" column="IS_LCH_CWSM"/>
  53. <result property="persId" column="PERS_ID"/>
  54. <result property="inTm" column="IN_TM"/>
  55. <result property="upTm" column="UP_TM"/>
  56. </resultMap>
  57. <sql id="table_columns">
  58. ID,
  59. UT_NAME,
  60. UT_CODE,
  61. AD_NAME,
  62. AD_CODE,
  63. UT_TYPE,
  64. UT_PPT,
  65. OPEN_NAME,
  66. UT_ATTN,
  67. UT_CONT,
  68. SIGN_ADDR,
  69. UT_ADDR,
  70. PC_X,
  71. PC_Y,
  72. GD_X,
  73. GD_Y,
  74. TRD_TYPE,
  75. GREEN_AREA,
  76. WS_TW,
  77. WS_BW,
  78. WS_OTH,
  79. PAY_WB,
  80. WB_PER,
  81. HOTL_LEV,
  82. BED_NUM,
  83. OCC_RATE,
  84. WU_UNIT,
  85. WU_UNIT_OUT,
  86. MAIN_PRD,
  87. WIPAA,
  88. HAS_WRMRMS,
  89. IS_KMWUUL,
  90. KMWUUL_LEV,
  91. WU_UT,
  92. WU_UT_ATTN,
  93. WU_UT_CONT,
  94. UT_PERS_NUM,
  95. WORK_NUM,
  96. WORK_NOT_NUM,
  97. TOT_AREA,
  98. BULD_AREA,
  99. SCH_CLA,
  100. UNI_CLA,
  101. TEACH_NUM,
  102. TEACH_LV_NUM,
  103. STU_NUM,
  104. STU_LV_NUM,
  105. IS_LCH_CWSM,
  106. PERS_ID,
  107. IN_TM,
  108. UP_TM
  109. </sql>
  110. <sql id="entity_properties">
  111. #{id},
  112. #{utName},
  113. #{utCode},
  114. #{adName},
  115. #{adCode},
  116. #{utType},
  117. #{utPpt},
  118. #{openName},
  119. #{utAttn},
  120. #{utCont},
  121. #{signAddr},
  122. #{utAddr},
  123. #{pcX},
  124. #{pcY},
  125. #{gdX},
  126. #{gdY},
  127. #{trdType},
  128. #{greenArea},
  129. #{wsTw},
  130. #{wsBw},
  131. #{wsOth},
  132. #{payWb},
  133. #{wbPer},
  134. #{hotlLev},
  135. #{bedNum},
  136. #{occRate},
  137. #{wuUnit},
  138. #{wuUnitOut},
  139. #{mainPrd},
  140. #{wipaa},
  141. #{hasWrmrms},
  142. #{isKmwuul},
  143. #{kmwuulLev},
  144. #{wuUt},
  145. #{wuUtAttn},
  146. #{wuUtCont},
  147. #{utPersNum},
  148. #{workNum},
  149. #{workNotNum},
  150. #{totArea},
  151. #{buldArea},
  152. #{schCla},
  153. #{uniCla},
  154. #{teachNum},
  155. #{teachLvNum},
  156. #{stuNum},
  157. #{stuLvNum},
  158. #{isLchCwsm},
  159. #{persId},
  160. #{inTm},
  161. #{upTm}
  162. </sql>
  163. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  164. <sql id="page_where">
  165. <trim prefix="where" prefixOverrides="and | or ">
  166. <if test="utName != null and utName != ''">and UT_NAME like '%${utName}%'</if>
  167. <if test="utCode != null and utCode != ''">and UT_CODE = #{utCode}</if>
  168. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  169. <if test="adCode != null and adCode != ''">and AD_CODE like '${adCode}%'</if>
  170. <if test="utType != null and utType != ''">and UT_TYPE = #{utType}</if>
  171. <if test="utPpt != null and utPpt != ''">and UT_PPT = #{utPpt}</if>
  172. <if test="openName != null and openName != ''">and OPEN_NAME = #{openName}</if>
  173. <if test="utAttn != null and utAttn != ''">and UT_ATTN = #{utAttn}</if>
  174. <if test="utCont != null and utCont != ''">and UT_CONT = #{utCont}</if>
  175. <if test="signAddr != null and signAddr != ''">and SIGN_ADDR = #{signAddr}</if>
  176. <if test="utAddr != null and utAddr != ''">and UT_ADDR = #{utAddr}</if>
  177. <if test="pcX != null and pcX != ''">and PC_X = #{pcX}</if>
  178. <if test="pcY != null and pcY != ''">and PC_Y = #{pcY}</if>
  179. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  180. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  181. <if test="trdType != null and trdType != ''">and TRD_TYPE = #{trdType}</if>
  182. <if test="greenArea != null and greenArea != ''">and GREEN_AREA = #{greenArea}</if>
  183. <if test="wsTw != null and wsTw != ''">and WS_TW = #{wsTw}</if>
  184. <if test="wsBw != null and wsBw != ''">and WS_BW = #{wsBw}</if>
  185. <if test="wsOth != null and wsOth != ''">and WS_OTH = #{wsOth}</if>
  186. <if test="payWb != null and payWb != ''">and PAY_WB = #{payWb}</if>
  187. <if test="wbPer != null and wbPer != ''">and WB_PER = #{wbPer}</if>
  188. <if test="hotlLev != null and hotlLev != ''">and HOTL_LEV = #{hotlLev}</if>
  189. <if test="bedNum != null and bedNum != ''">and BED_NUM = #{bedNum}</if>
  190. <if test="occRate != null and occRate != ''">and OCC_RATE = #{occRate}</if>
  191. <if test="wuUnit != null and wuUnit != ''">and WU_UNIT = #{wuUnit}</if>
  192. <if test="wuUnitOut != null and wuUnitOut != ''">and WU_UNIT_OUT = #{wuUnitOut}</if>
  193. <if test="mainPrd != null and mainPrd != ''">and MAIN_PRD = #{mainPrd}</if>
  194. <if test="wipaa != null and wipaa != ''">and WIPAA = #{wipaa}</if>
  195. <if test="hasWrmrms != null and hasWrmrms != ''">and HAS_WRMRMS = #{hasWrmrms}</if>
  196. <if test="isKmwuul != null and isKmwuul != ''">and IS_KMWUUL = #{isKmwuul}</if>
  197. <if test="kmwuulLev != null and kmwuulLev != ''">and KMWUUL_LEV = #{kmwuulLev}</if>
  198. <if test="wuUt != null and wuUt != ''">and WU_UT = #{wuUt}</if>
  199. <if test="wuUtAttn != null and wuUtAttn != ''">and WU_UT_ATTN = #{wuUtAttn}</if>
  200. <if test="wuUtCont != null and wuUtCont != ''">and WU_UT_CONT = #{wuUtCont}</if>
  201. <if test="utPersNum != null and utPersNum != ''">and UT_PERS_NUM = #{utPersNum}</if>
  202. <if test="workNum != null and workNum != ''">and WORK_NUM = #{workNum}</if>
  203. <if test="workNotNum != null and workNotNum != ''">and WORK_NOT_NUM = #{workNotNum}</if>
  204. <if test="totArea != null and totArea != ''">and TOT_AREA = #{totArea}</if>
  205. <if test="buldArea != null and buldArea != ''">and BULD_AREA = #{buldArea}</if>
  206. <if test="schCla != null and schCla != ''">and SCH_CLA = #{schCla}</if>
  207. <if test="uniCla != null and uniCla != ''">and UNI_CLA = #{uniCla}</if>
  208. <if test="teachNum != null and teachNum != ''">and TEACH_NUM = #{teachNum}</if>
  209. <if test="teachLvNum != null and teachLvNum != ''">and TEACH_LV_NUM = #{teachLvNum}</if>
  210. <if test="stuNum != null and stuNum != ''">and STU_NUM = #{stuNum}</if>
  211. <if test="stuLvNum != null and stuLvNum != ''">and STU_LV_NUM = #{stuLvNum}</if>
  212. <if test="isLchCwsm != null and isLchCwsm != ''">and IS_LCH_CWSM = #{isLchCwsm}</if>
  213. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  214. <if test="inTm != null">and IN_TM = #{inTm}</if>
  215. <if test="upTm != null">and UP_TM = #{upTm}</if>
  216. </trim>
  217. </sql>
  218. <select id="get" resultMap="attWuntBaseResultMap" parameterType="String" >
  219. select <include refid="table_columns" /> from ATT_WUNT_BASE where ID = #{id}
  220. </select>
  221. <select id="getBy" resultMap="attWuntBaseResultMap">
  222. select <include refid="table_columns" /> from ATT_WUNT_BASE <include refid="page_where" />
  223. </select>
  224. <select id="findAll" resultMap="attWuntBaseResultMap">
  225. select <include refid="table_columns" /> from ATT_WUNT_BASE
  226. </select>
  227. <select id="findList" resultMap="attWuntBaseResultMap">
  228. select <include refid="table_columns" /> from ATT_WUNT_BASE <include refid="page_where" />
  229. </select>
  230. <select id="selectCount" resultType="int" >
  231. select count(ID) from ATT_WUNT_BASE <include refid="page_where" />
  232. </select>
  233. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWuntBase">
  234. insert into ATT_WUNT_BASE( <include refid="table_columns" /> )
  235. values ( <include refid="entity_properties" /> )
  236. </insert>
  237. <delete id="delete" parameterType="java.lang.String">
  238. delete from ATT_WUNT_BASE where ID = #{id}
  239. </delete>
  240. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWuntBase">
  241. delete from ATT_WUNT_BASE <include refid="page_where" />
  242. </delete>
  243. <update id="deleteInFlag" parameterType="java.lang.String">
  244. update ATT_WUNT_BASE set flag_valid = 0 where ID = #{id}
  245. </update>
  246. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWuntBase">
  247. update ATT_WUNT_BASE
  248. <trim prefix="set" suffixOverrides=",">
  249. <if test="utName != null and utName != ''">UT_NAME = #{utName},</if>
  250. <if test="utCode != null and utCode != ''">UT_CODE = #{utCode},</if>
  251. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  252. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  253. <if test="utType != null and utType != ''">UT_TYPE = #{utType},</if>
  254. <if test="utPpt != null and utPpt != ''">UT_PPT = #{utPpt},</if>
  255. <if test="openName != null and openName != ''">OPEN_NAME = #{openName},</if>
  256. <if test="utAttn != null and utAttn != ''">UT_ATTN = #{utAttn},</if>
  257. <if test="utCont != null and utCont != ''">UT_CONT = #{utCont},</if>
  258. <if test="signAddr != null and signAddr != ''">SIGN_ADDR = #{signAddr},</if>
  259. <if test="utAddr != null and utAddr != ''">UT_ADDR = #{utAddr},</if>
  260. <if test="pcX != null and pcX != ''">PC_X = #{pcX},</if>
  261. <if test="pcY != null and pcY != ''">PC_Y = #{pcY},</if>
  262. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  263. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  264. <if test="trdType != null and trdType != ''">TRD_TYPE = #{trdType},</if>
  265. <if test="greenArea != null and greenArea != ''">GREEN_AREA = #{greenArea},</if>
  266. <if test="wsTw != null and wsTw != ''">WS_TW = #{wsTw},</if>
  267. <if test="wsBw != null and wsBw != ''">WS_BW = #{wsBw},</if>
  268. <if test="wsOth != null and wsOth != ''">WS_OTH = #{wsOth},</if>
  269. <if test="payWb != null and payWb != ''">PAY_WB = #{payWb},</if>
  270. <if test="wbPer != null and wbPer != ''">WB_PER = #{wbPer},</if>
  271. <if test="hotlLev != null and hotlLev != ''">HOTL_LEV = #{hotlLev},</if>
  272. <if test="bedNum != null and bedNum != ''">BED_NUM = #{bedNum},</if>
  273. <if test="occRate != null and occRate != ''">OCC_RATE = #{occRate},</if>
  274. <if test="wuUnit != null and wuUnit != ''">WU_UNIT = #{wuUnit},</if>
  275. <if test="wuUnitOut != null and wuUnitOut != ''">WU_UNIT_OUT = #{wuUnitOut},</if>
  276. <if test="mainPrd != null and mainPrd != ''">MAIN_PRD = #{mainPrd},</if>
  277. <if test="wipaa != null and wipaa != ''">WIPAA = #{wipaa},</if>
  278. <if test="hasWrmrms != null and hasWrmrms != ''">HAS_WRMRMS = #{hasWrmrms},</if>
  279. <if test="isKmwuul != null and isKmwuul != ''">IS_KMWUUL = #{isKmwuul},</if>
  280. <if test="kmwuulLev != null and kmwuulLev != ''">KMWUUL_LEV = #{kmwuulLev},</if>
  281. <if test="wuUt != null and wuUt != ''">WU_UT = #{wuUt},</if>
  282. <if test="wuUtAttn != null and wuUtAttn != ''">WU_UT_ATTN = #{wuUtAttn},</if>
  283. <if test="wuUtCont != null and wuUtCont != ''">WU_UT_CONT = #{wuUtCont},</if>
  284. <if test="utPersNum != null and utPersNum != ''">UT_PERS_NUM = #{utPersNum},</if>
  285. <if test="workNum != null and workNum != ''">WORK_NUM = #{workNum},</if>
  286. <if test="workNotNum != null and workNotNum != ''">WORK_NOT_NUM = #{workNotNum},</if>
  287. <if test="totArea != null and totArea != ''">TOT_AREA = #{totArea},</if>
  288. <if test="buldArea != null and buldArea != ''">BULD_AREA = #{buldArea},</if>
  289. <if test="schCla != null and schCla != ''">SCH_CLA = #{schCla},</if>
  290. <if test="uniCla != null and uniCla != ''">UNI_CLA = #{uniCla},</if>
  291. <if test="teachNum != null and teachNum != ''">TEACH_NUM = #{teachNum},</if>
  292. <if test="teachLvNum != null and teachLvNum != ''">TEACH_LV_NUM = #{teachLvNum},</if>
  293. <if test="stuNum != null and stuNum != ''">STU_NUM = #{stuNum},</if>
  294. <if test="stuLvNum != null and stuLvNum != ''">STU_LV_NUM = #{stuLvNum},</if>
  295. <if test="isLchCwsm != null and isLchCwsm != ''">IS_LCH_CWSM = #{isLchCwsm},</if>
  296. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  297. <if test="inTm != null">IN_TM = #{inTm},</if>
  298. <if test="upTm != null">UP_TM = #{upTm},</if>
  299. </trim>
  300. <where>ID = #{id}</where>
  301. </update>
  302. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWuntBase">
  303. update ATT_WUNT_BASE
  304. <trim prefix="set" suffixOverrides=",">
  305. <if test="utName != null and utName != ''">UT_NAME = #{utName},</if>
  306. <if test="utCode != null and utCode != ''">UT_CODE = #{utCode},</if>
  307. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  308. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  309. <if test="utType != null and utType != ''">UT_TYPE = #{utType},</if>
  310. <if test="utPpt != null and utPpt != ''">UT_PPT = #{utPpt},</if>
  311. <if test="openName != null and openName != ''">OPEN_NAME = #{openName},</if>
  312. <if test="utAttn != null and utAttn != ''">UT_ATTN = #{utAttn},</if>
  313. <if test="utCont != null and utCont != ''">UT_CONT = #{utCont},</if>
  314. <if test="signAddr != null and signAddr != ''">SIGN_ADDR = #{signAddr},</if>
  315. <if test="utAddr != null and utAddr != ''">UT_ADDR = #{utAddr},</if>
  316. <if test="pcX != null and pcX != ''">PC_X = #{pcX},</if>
  317. <if test="pcY != null and pcY != ''">PC_Y = #{pcY},</if>
  318. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  319. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  320. <if test="trdType != null and trdType != ''">TRD_TYPE = #{trdType},</if>
  321. <if test="greenArea != null and greenArea != ''">GREEN_AREA = #{greenArea},</if>
  322. <if test="wsTw != null and wsTw != ''">WS_TW = #{wsTw},</if>
  323. <if test="wsBw != null and wsBw != ''">WS_BW = #{wsBw},</if>
  324. <if test="wsOth != null and wsOth != ''">WS_OTH = #{wsOth},</if>
  325. <if test="payWb != null and payWb != ''">PAY_WB = #{payWb},</if>
  326. <if test="wbPer != null and wbPer != ''">WB_PER = #{wbPer},</if>
  327. <if test="hotlLev != null and hotlLev != ''">HOTL_LEV = #{hotlLev},</if>
  328. <if test="bedNum != null and bedNum != ''">BED_NUM = #{bedNum},</if>
  329. <if test="occRate != null and occRate != ''">OCC_RATE = #{occRate},</if>
  330. <if test="wuUnit != null and wuUnit != ''">WU_UNIT = #{wuUnit},</if>
  331. <if test="wuUnitOut != null and wuUnitOut != ''">WU_UNIT_OUT = #{wuUnitOut},</if>
  332. <if test="mainPrd != null and mainPrd != ''">MAIN_PRD = #{mainPrd},</if>
  333. <if test="wipaa != null and wipaa != ''">WIPAA = #{wipaa},</if>
  334. <if test="hasWrmrms != null and hasWrmrms != ''">HAS_WRMRMS = #{hasWrmrms},</if>
  335. <if test="isKmwuul != null and isKmwuul != ''">IS_KMWUUL = #{isKmwuul},</if>
  336. <if test="kmwuulLev != null and kmwuulLev != ''">KMWUUL_LEV = #{kmwuulLev},</if>
  337. <if test="wuUt != null and wuUt != ''">WU_UT = #{wuUt},</if>
  338. <if test="wuUtAttn != null and wuUtAttn != ''">WU_UT_ATTN = #{wuUtAttn},</if>
  339. <if test="wuUtCont != null and wuUtCont != ''">WU_UT_CONT = #{wuUtCont},</if>
  340. <if test="utPersNum != null and utPersNum != ''">UT_PERS_NUM = #{utPersNum},</if>
  341. <if test="workNum != null and workNum != ''">WORK_NUM = #{workNum},</if>
  342. <if test="workNotNum != null and workNotNum != ''">WORK_NOT_NUM = #{workNotNum},</if>
  343. <if test="totArea != null and totArea != ''">TOT_AREA = #{totArea},</if>
  344. <if test="buldArea != null and buldArea != ''">BULD_AREA = #{buldArea},</if>
  345. <if test="schCla != null and schCla != ''">SCH_CLA = #{schCla},</if>
  346. <if test="uniCla != null and uniCla != ''">UNI_CLA = #{uniCla},</if>
  347. <if test="teachNum != null and teachNum != ''">TEACH_NUM = #{teachNum},</if>
  348. <if test="teachLvNum != null and teachLvNum != ''">TEACH_LV_NUM = #{teachLvNum},</if>
  349. <if test="stuNum != null and stuNum != ''">STU_NUM = #{stuNum},</if>
  350. <if test="stuLvNum != null and stuLvNum != ''">STU_LV_NUM = #{stuLvNum},</if>
  351. <if test="isLchCwsm != null and isLchCwsm != ''">IS_LCH_CWSM = #{isLchCwsm},</if>
  352. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  353. <if test="inTm != null">IN_TM = #{inTm},</if>
  354. <if test="upTm != null">UP_TM = #{upTm},</if>
  355. </trim>
  356. <include refid="page_where" />
  357. </update>
  358. <!-- 其他自定义SQL -->
  359. <select id="getObjByPersId" resultType="cn.com.goldenwater.dcproj.model.AttWuntBase" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam">
  360. SELECT A.* ,B.OBJ_ID,B.ID groupId,C.ID rgstrId FROM ATT_WUNT_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.id = B.CODE
  361. LEFT JOIN BIS_INSP_SVWT_WUNT_RGSTR C ON B.OBJ_ID = C.OBJ_ID
  362. WHERE B.PTYPE = #{objType} AND
  363. B.id in (${inIdsSql})
  364. <choose>
  365. <when test="province !=null and province !=''">
  366. and B.AD_CODE =#{province}
  367. </when>
  368. <otherwise>
  369. and B.AD_CODE is null
  370. </otherwise>
  371. </choose>
  372. <if test="adName != null and adName != ''">and A.NAME LIKE '%${adName}%'</if>
  373. <if test="adCode != null and adCode != ''">and A.AD_CODE LIKE '${adCode}%'</if>
  374. </select>
  375. <select id="getObjListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttWuntBase" parameterType="String">
  376. select t.*
  377. from ATT_WUNT_BASE t
  378. where t.id not in (
  379. select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%') and B.obj_type=#{objType}
  380. <choose>
  381. <when test="province !=null and province !=''">
  382. and B.AD_CODE =#{province}
  383. </when>
  384. <otherwise>
  385. and B.AD_CODE is null
  386. </otherwise>
  387. </choose>
  388. )
  389. <if test="adName != null and adName != ''">and t.nm LIKE '%${adName}%'</if>
  390. <if test="adCode != null and adCode != ''">and t.AD_CODE LIKE '${adCode}%'</if>
  391. </select>
  392. </mapper>