BisInspSvwtWuntRgstrDao.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  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.BisInspSvwtWuntRgstrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr" id="bisInspSvwtWuntRgstrResultMap">
  5. <result property="wuUtAttn" column="WU_UT_ATTN"/>
  6. <result property="wuUtCont" column="WU_UT_CONT"/>
  7. <result property="utPersNum" column="UT_PERS_NUM"/>
  8. <result property="workNum" column="WORK_NUM"/>
  9. <result property="workNotNum" column="WORK_NOT_NUM"/>
  10. <result property="totArea" column="TOT_AREA"/>
  11. <result property="buldArea" column="BULD_AREA"/>
  12. <result property="schCla" column="SCH_CLA"/>
  13. <result property="uniCla" column="UNI_CLA"/>
  14. <result property="teachNum" column="TEACH_NUM"/>
  15. <result property="teachLvNum" column="TEACH_LV_NUM"/>
  16. <result property="stuNum" column="STU_NUM"/>
  17. <result property="stuLvNum" column="STU_LV_NUM"/>
  18. <result property="isLchCwsm" column="IS_LCH_CWSM"/>
  19. <result property="state" column="STATE"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. <result property="chkUnit" column="CHK_UNIT"/>
  22. <result property="chkPers" column="CHK_PERS"/>
  23. <result property="chkTm" column="CHK_TM"/>
  24. <result property="wuuswInfoStat" column="WUUSW_INFO_STAT"/>
  25. <result property="wsuswInfoStat" column="WSUSW_INFO_STAT"/>
  26. <result property="persId" column="PERS_ID"/>
  27. <result property="groupId" column="GROUP_ID"/>
  28. <result property="inTm" column="IN_TM"/>
  29. <result property="upTm" column="UP_TM"/>
  30. <result property="id" column="ID"/>
  31. <result property="objId" column="OBJ_ID"/>
  32. <result property="utName" column="UT_NAME"/>
  33. <result property="utCode" column="UT_CODE"/>
  34. <result property="adName" column="AD_NAME"/>
  35. <result property="adCode" column="AD_CODE"/>
  36. <result property="utType" column="UT_TYPE"/>
  37. <result property="utPpt" column="UT_PPT"/>
  38. <result property="openName" column="OPEN_NAME"/>
  39. <result property="utAttn" column="UT_ATTN"/>
  40. <result property="utCont" column="UT_CONT"/>
  41. <result property="signAddr" column="SIGN_ADDR"/>
  42. <result property="utAddr" column="UT_ADDR"/>
  43. <result property="pcX" column="PC_X"/>
  44. <result property="pcY" column="PC_Y"/>
  45. <result property="gdX" column="GD_X"/>
  46. <result property="gdY" column="GD_Y"/>
  47. <result property="trdType" column="TRD_TYPE"/>
  48. <result property="greenArea" column="GREEN_AREA"/>
  49. <result property="wsTw" column="WS_TW"/>
  50. <result property="wsBw" column="WS_BW"/>
  51. <result property="wsOth" column="WS_OTH"/>
  52. <result property="payWb" column="PAY_WB"/>
  53. <result property="wbPer" column="WB_PER"/>
  54. <result property="hotlLev" column="HOTL_LEV"/>
  55. <result property="bedNum" column="BED_NUM"/>
  56. <result property="occRate" column="OCC_RATE"/>
  57. <result property="wuUnit" column="WU_UNIT"/>
  58. <result property="wuUnitOut" column="WU_UNIT_OUT"/>
  59. <result property="mainPrd" column="MAIN_PRD"/>
  60. <result property="wipaa" column="WIPAA"/>
  61. <result property="hasWrmrms" column="HAS_WRMRMS"/>
  62. <result property="isKmwuul" column="IS_KMWUUL"/>
  63. <result property="kmwuulLev" column="KMWUUL_LEV"/>
  64. <result property="wuUt" column="WU_UT"/>
  65. <result property="utLead" column="UT_LEAD"/>
  66. <result property="province" column="PROVINCE"/>
  67. </resultMap>
  68. <sql id="table_columns">
  69. WU_UT_ATTN,PROVINCE,
  70. WU_UT_CONT,
  71. UT_PERS_NUM,
  72. WORK_NUM,
  73. WORK_NOT_NUM,
  74. TOT_AREA,
  75. BULD_AREA,
  76. SCH_CLA,
  77. UNI_CLA,
  78. TEACH_NUM,
  79. TEACH_LV_NUM,
  80. STU_NUM,
  81. STU_LV_NUM,
  82. IS_LCH_CWSM,
  83. STATE,
  84. DATA_STAT,
  85. CHK_UNIT,
  86. CHK_PERS,
  87. CHK_TM,
  88. WUUSW_INFO_STAT,
  89. WSUSW_INFO_STAT,
  90. PERS_ID,
  91. GROUP_ID,
  92. IN_TM,
  93. UP_TM,
  94. ID,
  95. OBJ_ID,
  96. UT_NAME,
  97. UT_CODE,
  98. AD_NAME,
  99. AD_CODE,
  100. UT_TYPE,
  101. UT_PPT,
  102. OPEN_NAME,
  103. UT_ATTN,
  104. UT_CONT,
  105. SIGN_ADDR,
  106. UT_ADDR,
  107. PC_X,
  108. PC_Y,
  109. GD_X,
  110. GD_Y,
  111. TRD_TYPE,
  112. GREEN_AREA,
  113. WS_TW,
  114. WS_BW,
  115. WS_OTH,
  116. PAY_WB,
  117. WB_PER,
  118. HOTL_LEV,
  119. BED_NUM,
  120. OCC_RATE,
  121. WU_UNIT,
  122. WU_UNIT_OUT,
  123. MAIN_PRD,
  124. WIPAA,
  125. HAS_WRMRMS,
  126. IS_KMWUUL,
  127. KMWUUL_LEV,
  128. WU_UT,
  129. UT_LEAD
  130. </sql>
  131. <sql id="entity_properties">
  132. #{wuUtAttn},#{province},
  133. #{wuUtCont},
  134. #{utPersNum},
  135. #{workNum},
  136. #{workNotNum},
  137. #{totArea},
  138. #{buldArea},
  139. #{schCla},
  140. #{uniCla},
  141. #{teachNum},
  142. #{teachLvNum},
  143. #{stuNum},
  144. #{stuLvNum},
  145. #{isLchCwsm},
  146. #{state},
  147. #{dataStat},
  148. #{chkUnit},
  149. #{chkPers},
  150. #{chkTm},
  151. #{wuuswInfoStat},
  152. #{wsuswInfoStat},
  153. #{persId},
  154. #{groupId},
  155. #{inTm},
  156. #{upTm},
  157. #{id},
  158. #{objId},
  159. #{utName},
  160. #{utCode},
  161. #{adName},
  162. #{adCode},
  163. #{utType},
  164. #{utPpt},
  165. #{openName},
  166. #{utAttn},
  167. #{utCont},
  168. #{signAddr},
  169. #{utAddr},
  170. #{pcX},
  171. #{pcY},
  172. #{gdX},
  173. #{gdY},
  174. #{trdType},
  175. #{greenArea},
  176. #{wsTw},
  177. #{wsBw},
  178. #{wsOth},
  179. #{payWb},
  180. #{wbPer},
  181. #{hotlLev},
  182. #{bedNum},
  183. #{occRate},
  184. #{wuUnit},
  185. #{wuUnitOut},
  186. #{mainPrd},
  187. #{wipaa},
  188. #{hasWrmrms},
  189. #{isKmwuul},
  190. #{kmwuulLev},
  191. #{wuUt},
  192. #{utLead}
  193. </sql>
  194. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  195. <sql id="page_where">
  196. <trim prefix="where" prefixOverrides="and | or ">
  197. <if test="wuUtAttn != null and wuUtAttn != ''">and WU_UT_ATTN = #{wuUtAttn}</if>
  198. <if test="wuUtCont != null and wuUtCont != ''">and WU_UT_CONT = #{wuUtCont}</if>
  199. <if test="utPersNum != null and utPersNum != ''">and UT_PERS_NUM = #{utPersNum}</if>
  200. <if test="workNum != null and workNum != ''">and WORK_NUM = #{workNum}</if>
  201. <if test="workNotNum != null and workNotNum != ''">and WORK_NOT_NUM = #{workNotNum}</if>
  202. <if test="totArea != null and totArea != ''">and TOT_AREA = #{totArea}</if>
  203. <if test="buldArea != null and buldArea != ''">and BULD_AREA = #{buldArea}</if>
  204. <if test="schCla != null and schCla != ''">and SCH_CLA = #{schCla}</if>
  205. <if test="uniCla != null and uniCla != ''">and UNI_CLA = #{uniCla}</if>
  206. <if test="teachNum != null and teachNum != ''">and TEACH_NUM = #{teachNum}</if>
  207. <if test="teachLvNum != null and teachLvNum != ''">and TEACH_LV_NUM = #{teachLvNum}</if>
  208. <if test="stuNum != null and stuNum != ''">and STU_NUM = #{stuNum}</if>
  209. <if test="stuLvNum != null and stuLvNum != ''">and STU_LV_NUM = #{stuLvNum}</if>
  210. <if test="isLchCwsm != null and isLchCwsm != ''">and IS_LCH_CWSM = #{isLchCwsm}</if>
  211. <if test="state != null and state != ''">and STATE = #{state}</if>
  212. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  213. <if test="chkUnit != null and chkUnit != ''">and CHK_UNIT = #{chkUnit}</if>
  214. <if test="chkPers != null and chkPers != ''">and CHK_PERS = #{chkPers}</if>
  215. <if test="chkTm != null">and CHK_TM = #{chkTm}</if>
  216. <if test="wuuswInfoStat != null and wuuswInfoStat != ''">and WUUSW_INFO_STAT = #{wuuswInfoStat}</if>
  217. <if test="wsuswInfoStat != null and wsuswInfoStat != ''">and WSUSW_INFO_STAT = #{wsuswInfoStat}</if>
  218. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  219. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  220. <if test="inTm != null">and IN_TM = #{inTm}</if>
  221. <if test="upTm != null">and UP_TM = #{upTm}</if>
  222. <if test="id != null and id != ''">and ID = #{id}</if>
  223. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  224. <if test="utName != null and utName != ''">and UT_NAME = #{utName}</if>
  225. <if test="utCode != null and utCode != ''">and UT_CODE = #{utCode}</if>
  226. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  227. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  228. <if test="utType != null and utType != ''">and UT_TYPE = #{utType}</if>
  229. <if test="utPpt != null and utPpt != ''">and UT_PPT = #{utPpt}</if>
  230. <if test="openName != null and openName != ''">and OPEN_NAME = #{openName}</if>
  231. <if test="utAttn != null and utAttn != ''">and UT_ATTN = #{utAttn}</if>
  232. <if test="utCont != null and utCont != ''">and UT_CONT = #{utCont}</if>
  233. <if test="signAddr != null and signAddr != ''">and SIGN_ADDR = #{signAddr}</if>
  234. <if test="utAddr != null and utAddr != ''">and UT_ADDR = #{utAddr}</if>
  235. <if test="pcX != null and pcX != ''">and PC_X = #{pcX}</if>
  236. <if test="pcY != null and pcY != ''">and PC_Y = #{pcY}</if>
  237. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  238. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  239. <if test="trdType != null and trdType != ''">and TRD_TYPE = #{trdType}</if>
  240. <if test="greenArea != null and greenArea != ''">and GREEN_AREA = #{greenArea}</if>
  241. <if test="wsTw != null and wsTw != ''">and WS_TW = #{wsTw}</if>
  242. <if test="wsBw != null and wsBw != ''">and WS_BW = #{wsBw}</if>
  243. <if test="wsOth != null and wsOth != ''">and WS_OTH = #{wsOth}</if>
  244. <if test="payWb != null and payWb != ''">and PAY_WB = #{payWb}</if>
  245. <if test="wbPer != null and wbPer != ''">and WB_PER = #{wbPer}</if>
  246. <if test="hotlLev != null and hotlLev != ''">and HOTL_LEV = #{hotlLev}</if>
  247. <if test="bedNum != null and bedNum != ''">and BED_NUM = #{bedNum}</if>
  248. <if test="occRate != null and occRate != ''">and OCC_RATE = #{occRate}</if>
  249. <if test="wuUnit != null and wuUnit != ''">and WU_UNIT = #{wuUnit}</if>
  250. <if test="wuUnitOut != null and wuUnitOut != ''">and WU_UNIT_OUT = #{wuUnitOut}</if>
  251. <if test="mainPrd != null and mainPrd != ''">and MAIN_PRD = #{mainPrd}</if>
  252. <if test="wipaa != null and wipaa != ''">and WIPAA = #{wipaa}</if>
  253. <if test="hasWrmrms != null and hasWrmrms != ''">and HAS_WRMRMS = #{hasWrmrms}</if>
  254. <if test="isKmwuul != null and isKmwuul != ''">and IS_KMWUUL = #{isKmwuul}</if>
  255. <if test="kmwuulLev != null and kmwuulLev != ''">and KMWUUL_LEV = #{kmwuulLev}</if>
  256. <if test="wuUt != null and wuUt != ''">and WU_UT = #{wuUt}</if>
  257. <if test="utLead != null and utLead != ''"> and UT_LEAD = #{utLead}</if>
  258. <if test="province != null and province != ''"> and PROVINCE = #{province}</if>
  259. </trim>
  260. </sql>
  261. <select id="get" resultMap="bisInspSvwtWuntRgstrResultMap" parameterType="String" >
  262. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR where ID = #{id}
  263. </select>
  264. <select id="getBy" resultMap="bisInspSvwtWuntRgstrResultMap">
  265. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR <include refid="page_where" />
  266. </select>
  267. <select id="findAll" resultMap="bisInspSvwtWuntRgstrResultMap">
  268. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR
  269. </select>
  270. <select id="findList" resultMap="bisInspSvwtWuntRgstrResultMap">
  271. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR <include refid="page_where" />
  272. </select>
  273. <select id="selectCount" resultType="int" >
  274. select count(ID) from BIS_INSP_SVWT_WUNT_RGSTR <include refid="page_where" />
  275. </select>
  276. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr">
  277. insert into BIS_INSP_SVWT_WUNT_RGSTR( <include refid="table_columns" /> )
  278. values ( <include refid="entity_properties" /> )
  279. </insert>
  280. <delete id="delete" parameterType="java.lang.String">
  281. delete from BIS_INSP_SVWT_WUNT_RGSTR where ID = #{id}
  282. </delete>
  283. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr">
  284. delete from BIS_INSP_SVWT_WUNT_RGSTR <include refid="page_where" />
  285. </delete>
  286. <update id="deleteInFlag" parameterType="java.lang.String">
  287. update BIS_INSP_SVWT_WUNT_RGSTR set flag_valid = 0 where ID = #{id}
  288. </update>
  289. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr">
  290. update BIS_INSP_SVWT_WUNT_RGSTR
  291. <trim prefix="set" suffixOverrides=",">
  292. <if test="wuUtAttn != null and wuUtAttn != ''">WU_UT_ATTN = #{wuUtAttn},</if>
  293. <if test="wuUtCont != null and wuUtCont != ''">WU_UT_CONT = #{wuUtCont},</if>
  294. <if test="province != null and province != ''"> PROVINCE = #{province},</if>
  295. <if test="utPersNum != null and utPersNum != ''">UT_PERS_NUM = #{utPersNum},</if>
  296. <if test="workNum != null and workNum != ''">WORK_NUM = #{workNum},</if>
  297. <if test="workNotNum != null and workNotNum != ''">WORK_NOT_NUM = #{workNotNum},</if>
  298. <if test="totArea != null and totArea != ''">TOT_AREA = #{totArea},</if>
  299. <if test="buldArea != null and buldArea != ''">BULD_AREA = #{buldArea},</if>
  300. <if test="schCla != null and schCla != ''">SCH_CLA = #{schCla},</if>
  301. <if test="uniCla != null and uniCla != ''">UNI_CLA = #{uniCla},</if>
  302. <if test="teachNum != null and teachNum != ''">TEACH_NUM = #{teachNum},</if>
  303. <if test="teachLvNum != null and teachLvNum != ''">TEACH_LV_NUM = #{teachLvNum},</if>
  304. <if test="stuNum != null and stuNum != ''">STU_NUM = #{stuNum},</if>
  305. <if test="stuLvNum != null and stuLvNum != ''">STU_LV_NUM = #{stuLvNum},</if>
  306. <if test="isLchCwsm != null and isLchCwsm != ''">IS_LCH_CWSM = #{isLchCwsm},</if>
  307. <if test="state != null and state != ''">STATE = #{state},</if>
  308. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  309. <if test="chkUnit != null and chkUnit != ''">CHK_UNIT = #{chkUnit},</if>
  310. <if test="chkPers != null and chkPers != ''">CHK_PERS = #{chkPers},</if>
  311. <if test="chkTm != null">CHK_TM = #{chkTm},</if>
  312. <if test="wuuswInfoStat != null and wuuswInfoStat != ''">WUUSW_INFO_STAT = #{wuuswInfoStat},</if>
  313. <if test="wsuswInfoStat != null and wsuswInfoStat != ''">WSUSW_INFO_STAT = #{wsuswInfoStat},</if>
  314. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  315. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  316. <if test="inTm != null">IN_TM = #{inTm},</if>
  317. <if test="upTm != null">UP_TM = #{upTm},</if>
  318. <if test="id != null and id != ''">ID = #{id},</if>
  319. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  320. <if test="utName != null and utName != ''">UT_NAME = #{utName},</if>
  321. <if test="utCode != null and utCode != ''">UT_CODE = #{utCode},</if>
  322. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  323. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  324. <if test="utType != null and utType != ''">UT_TYPE = #{utType},</if>
  325. <if test="utPpt != null and utPpt != ''">UT_PPT = #{utPpt},</if>
  326. <if test="openName != null and openName != ''">OPEN_NAME = #{openName},</if>
  327. <if test="utAttn != null and utAttn != ''">UT_ATTN = #{utAttn},</if>
  328. <if test="utCont != null and utCont != ''">UT_CONT = #{utCont},</if>
  329. <if test="signAddr != null and signAddr != ''">SIGN_ADDR = #{signAddr},</if>
  330. <if test="utAddr != null and utAddr != ''">UT_ADDR = #{utAddr},</if>
  331. <if test="pcX != null and pcX != ''">PC_X = #{pcX},</if>
  332. <if test="pcY != null and pcY != ''">PC_Y = #{pcY},</if>
  333. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  334. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  335. <if test="trdType != null and trdType != ''">TRD_TYPE = #{trdType},</if>
  336. <if test="greenArea != null and greenArea != ''">GREEN_AREA = #{greenArea},</if>
  337. <if test="wsTw != null and wsTw != ''">WS_TW = #{wsTw},</if>
  338. <if test="wsBw != null and wsBw != ''">WS_BW = #{wsBw},</if>
  339. <if test="wsOth != null and wsOth != ''">WS_OTH = #{wsOth},</if>
  340. <if test="payWb != null and payWb != ''">PAY_WB = #{payWb},</if>
  341. <if test="wbPer != null and wbPer != ''">WB_PER = #{wbPer},</if>
  342. <if test="hotlLev != null and hotlLev != ''">HOTL_LEV = #{hotlLev},</if>
  343. <if test="bedNum != null and bedNum != ''">BED_NUM = #{bedNum},</if>
  344. <if test="occRate != null and occRate != ''">OCC_RATE = #{occRate},</if>
  345. <if test="wuUnit != null and wuUnit != ''">WU_UNIT = #{wuUnit},</if>
  346. <if test="wuUnitOut != null and wuUnitOut != ''">WU_UNIT_OUT = #{wuUnitOut},</if>
  347. <if test="mainPrd != null and mainPrd != ''">MAIN_PRD = #{mainPrd},</if>
  348. <if test="wipaa != null and wipaa != ''">WIPAA = #{wipaa},</if>
  349. <if test="hasWrmrms != null and hasWrmrms != ''">HAS_WRMRMS = #{hasWrmrms},</if>
  350. <if test="isKmwuul != null and isKmwuul != ''">IS_KMWUUL = #{isKmwuul},</if>
  351. <if test="kmwuulLev != null and kmwuulLev != ''">KMWUUL_LEV = #{kmwuulLev},</if>
  352. <if test="wuUt != null and wuUt != ''">WU_UT = #{wuUt},</if>
  353. <if test="utLead != null and utLead != ''">UT_LEAD = #{utLead},</if>
  354. </trim>
  355. <where>ID = #{id}</where>
  356. </update>
  357. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr">
  358. update BIS_INSP_SVWT_WUNT_RGSTR
  359. <trim prefix="set" suffixOverrides=",">
  360. <if test="wuUtAttn != null and wuUtAttn != ''">WU_UT_ATTN = #{wuUtAttn},</if>
  361. <if test="wuUtCont != null and wuUtCont != ''">WU_UT_CONT = #{wuUtCont},</if>
  362. <if test="province != null and province != ''"> PROVINCE = #{province},</if>
  363. <if test="utPersNum != null and utPersNum != ''">UT_PERS_NUM = #{utPersNum},</if>
  364. <if test="workNum != null and workNum != ''">WORK_NUM = #{workNum},</if>
  365. <if test="workNotNum != null and workNotNum != ''">WORK_NOT_NUM = #{workNotNum},</if>
  366. <if test="totArea != null and totArea != ''">TOT_AREA = #{totArea},</if>
  367. <if test="buldArea != null and buldArea != ''">BULD_AREA = #{buldArea},</if>
  368. <if test="schCla != null and schCla != ''">SCH_CLA = #{schCla},</if>
  369. <if test="uniCla != null and uniCla != ''">UNI_CLA = #{uniCla},</if>
  370. <if test="teachNum != null and teachNum != ''">TEACH_NUM = #{teachNum},</if>
  371. <if test="teachLvNum != null and teachLvNum != ''">TEACH_LV_NUM = #{teachLvNum},</if>
  372. <if test="stuNum != null and stuNum != ''">STU_NUM = #{stuNum},</if>
  373. <if test="stuLvNum != null and stuLvNum != ''">STU_LV_NUM = #{stuLvNum},</if>
  374. <if test="isLchCwsm != null and isLchCwsm != ''">IS_LCH_CWSM = #{isLchCwsm},</if>
  375. <if test="state != null and state != ''">STATE = #{state},</if>
  376. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  377. <if test="chkUnit != null and chkUnit != ''">CHK_UNIT = #{chkUnit},</if>
  378. <if test="chkPers != null and chkPers != ''">CHK_PERS = #{chkPers},</if>
  379. <if test="chkTm != null">CHK_TM = #{chkTm},</if>
  380. <if test="wuuswInfoStat != null and wuuswInfoStat != ''">WUUSW_INFO_STAT = #{wuuswInfoStat},</if>
  381. <if test="wsuswInfoStat != null and wsuswInfoStat != ''">WSUSW_INFO_STAT = #{wsuswInfoStat},</if>
  382. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  383. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  384. <if test="inTm != null">IN_TM = #{inTm},</if>
  385. <if test="upTm != null">UP_TM = #{upTm},</if>
  386. <if test="id != null and id != ''">ID = #{id},</if>
  387. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  388. <if test="utName != null and utName != ''">UT_NAME = #{utName},</if>
  389. <if test="utCode != null and utCode != ''">UT_CODE = #{utCode},</if>
  390. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  391. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  392. <if test="utType != null and utType != ''">UT_TYPE = #{utType},</if>
  393. <if test="utPpt != null and utPpt != ''">UT_PPT = #{utPpt},</if>
  394. <if test="openName != null and openName != ''">OPEN_NAME = #{openName},</if>
  395. <if test="utAttn != null and utAttn != ''">UT_ATTN = #{utAttn},</if>
  396. <if test="utCont != null and utCont != ''">UT_CONT = #{utCont},</if>
  397. <if test="signAddr != null and signAddr != ''">SIGN_ADDR = #{signAddr},</if>
  398. <if test="utAddr != null and utAddr != ''">UT_ADDR = #{utAddr},</if>
  399. <if test="pcX != null and pcX != ''">PC_X = #{pcX},</if>
  400. <if test="pcY != null and pcY != ''">PC_Y = #{pcY},</if>
  401. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  402. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  403. <if test="trdType != null and trdType != ''">TRD_TYPE = #{trdType},</if>
  404. <if test="greenArea != null and greenArea != ''">GREEN_AREA = #{greenArea},</if>
  405. <if test="wsTw != null and wsTw != ''">WS_TW = #{wsTw},</if>
  406. <if test="wsBw != null and wsBw != ''">WS_BW = #{wsBw},</if>
  407. <if test="wsOth != null and wsOth != ''">WS_OTH = #{wsOth},</if>
  408. <if test="payWb != null and payWb != ''">PAY_WB = #{payWb},</if>
  409. <if test="wbPer != null and wbPer != ''">WB_PER = #{wbPer},</if>
  410. <if test="hotlLev != null and hotlLev != ''">HOTL_LEV = #{hotlLev},</if>
  411. <if test="bedNum != null and bedNum != ''">BED_NUM = #{bedNum},</if>
  412. <if test="occRate != null and occRate != ''">OCC_RATE = #{occRate},</if>
  413. <if test="wuUnit != null and wuUnit != ''">WU_UNIT = #{wuUnit},</if>
  414. <if test="wuUnitOut != null and wuUnitOut != ''">WU_UNIT_OUT = #{wuUnitOut},</if>
  415. <if test="mainPrd != null and mainPrd != ''">MAIN_PRD = #{mainPrd},</if>
  416. <if test="wipaa != null and wipaa != ''">WIPAA = #{wipaa},</if>
  417. <if test="hasWrmrms != null and hasWrmrms != ''">HAS_WRMRMS = #{hasWrmrms},</if>
  418. <if test="isKmwuul != null and isKmwuul != ''">IS_KMWUUL = #{isKmwuul},</if>
  419. <if test="kmwuulLev != null and kmwuulLev != ''">KMWUUL_LEV = #{kmwuulLev},</if>
  420. <if test="wuUt != null and wuUt != ''">WU_UT = #{wuUt},</if>
  421. <if test="utLead != null and utLead != ''">UT_LEAD = #{utLead},</if>
  422. </trim>
  423. <include refid="page_where" />
  424. </update>
  425. <sql id="choseSql">
  426. <choose>
  427. <when test="province !=null and province !=''">
  428. and B.province like '${province}%'
  429. </when>
  430. <otherwise>
  431. and B.province is null
  432. </otherwise>
  433. </choose>
  434. </sql>
  435. <select id="getListByInspGroupIdObjType" resultType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr" parameterType="cn.com.goldenwater.dcproj.param.PagePersObjParam">
  436. select t.*,C.id groupId,C.PNM groupName,B.obj_id
  437. from att_wunt_base t
  438. left join BIS_INSP_ALL_OBJ B
  439. on B.CODE = t.ID
  440. LEFT JOIN BIS_INSP_ALL C ON B.ID = C.ID
  441. and B.ptype = #{objType}
  442. where 1 = 1
  443. <if test='isAll == "0"'>and B.ID = #{inspGroupId}</if>
  444. <if test='isAll == "1"'>and B.ID LIKE '${inspGroupId}%'</if>
  445. <if test="adCode != null and adCode != ''">
  446. and t.AD_CODE like '${adCode}%'
  447. </if>
  448. <choose>
  449. <when test="province != null and province != ''">
  450. and B.AD_CODE LIKE '${province}%'
  451. </when>
  452. <otherwise>
  453. and B.AD_CODE is null
  454. </otherwise>
  455. </choose>
  456. </select>
  457. <sql id="orgIdSql">
  458. <choose>
  459. <when test="orgId !=null and orgId !=''">
  460. and ORG_ID=#{orgId}
  461. </when>
  462. <otherwise>
  463. and ORG_ID is null
  464. </otherwise>
  465. </choose>
  466. </sql>
  467. <!-- 其他自定义SQL -->
  468. <select id="findSvwtWuntList" parameterType="cn.com.goldenwater.dcproj.param.TypeParam" resultType="cn.com.goldenwater.dcproj.dto.BisInspRgstrDto">
  469. SELECT * FROM (
  470. select A.CODE,A.ID nodeId,
  471. A.NM,
  472. #{pType} PTYPE,
  473. B.pc_x,
  474. B.pc_y,
  475. B.GD_X,
  476. B.GD_y,
  477. A.OBJ_ID,B.ID ID,
  478. b.UT_TYPE as type,
  479. b.UT_PPT as utPpt,
  480. b.ut_lead as lead,
  481. b.ut_attn as attn,
  482. b.ut_cont as cont,
  483. (case when b.UT_ADDR is null then c.ad_full_name else b.UT_ADDR end) as location,
  484. (case when b.State is null then '0' else b.state end)STATE
  485. ,B.IN_TM,
  486. B.WUUSW_INFO_STAT,
  487. B.WSUSW_INFO_STAT,
  488. c.ad_full_name as adName,
  489. ia.pnm groupName
  490. from BIS_INSP_ALL_OBJ
  491. A LEFT JOIN BIS_INSP_SVWT_WUNT_RGSTR B ON A.OBJ_ID=B.OBJ_ID
  492. LEFT JOIN ATT_AD_X_BASE C ON B.Ad_CODE=C.AD_CODE
  493. LEFT JOIN BIS_INSP_ALL ia on A.ID = ia.id
  494. where A.ptype= #{pType}
  495. <if test="tabType =='2'.toString()">
  496. and ia.entm &lt; DATE_ADD(STR_TO_DATE(#{nowTime},'%Y-%m-%d'), INTERVAL 1 DAY)
  497. </if>
  498. <if test="tabType =='1'.toString()">
  499. and ia.entm &gt;=STR_TO_DATE(#{nowTime},'%Y-%m-%d')
  500. </if>
  501. <include refid="choseSql"/>
  502. and A.id in (${inIdsSql})
  503. ) A WHERE a.PTYPE=#{pType}
  504. <if test="plnaId !=null and plnaId !=''">
  505. and a.nodeId like '${plnaId}%'
  506. </if>
  507. <if test="state !=null and state !=''">
  508. and STATE=#{state}
  509. </if>
  510. <if test="rsName !=null and rsName !=''">
  511. and a.nm like '%${rsName}%'
  512. </if>
  513. <if test="code !=null and code !=''">
  514. and a.code = #{code}
  515. </if>
  516. <if test="adName != null and adName != ''">and a.adName like '%${adName}%'</if>
  517. <if test="sttm != null and sttm != ''">and a.IN_TM&gt;= STR_TO_DATE(#{sttm},'%Y-%m-%d')</if>
  518. <if test="entm != null and entm != ''">and a.IN_TM &lt; DATE_ADD(STR_TO_DATE(#{entm},'%Y-%m-%d') , INTERVAL 1 DAY)</if>
  519. <if test="groupId != null and groupId != ''">and a.nodeId = #{groupId}</if>
  520. order by nodeId asc
  521. <if test="orderBy != null and orderBy != ''">
  522. ,CONVERT( nm USING gbk ) COLLATE gbk_chinese_ci ASC
  523. </if>
  524. </select>
  525. </mapper>