AttRsBaseDao.xml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  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.AttRsBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttRsBase" id="attRsBaseResultMap">
  5. <result property="engScal" column="ENG_SCAL"/>
  6. <result property="limStag" column="LIM_STAG"/>
  7. <result property="totCap" column="TOT_CAP"/>
  8. <result property="rsAdmName" column="RS_ADM_NAME"/>
  9. <result property="rsAdmCode" column="RS_ADM_CODE"/>
  10. <result property="rsAdmDep" column="RS_ADM_DEP"/>
  11. <result property="admAttRel" column="ADM_ATT_REL"/>
  12. <result property="rsCode" column="RS_CODE"/>
  13. <result property="rsName" column="RS_NAME"/>
  14. <result property="longitude" column="LONGITUDE"/>
  15. <result property="latitude" column="LATITUDE"/>
  16. <result property="location" column="LOCATION"/>
  17. <result property="admDiv" column="ADM_DIV"/>
  18. <result property="rsType" column="RS_TYPE"/>
  19. <result property="damTypeMat" column="DAM_TYPE_MAT"/>
  20. <result property="damTypeStr" column="DAM_TYPE_STR"/>
  21. <result property="damSizeHig" column="DAM_SIZE_HIG"/>
  22. <result property="centerX" column="CENTER_X"/>
  23. <result property="centerY" column="CENTER_Y"/>
  24. <result property="rsLoc" column="RS_LOC"/>
  25. <result property="regCode" column="REG_CODE"/>
  26. <result property="compDate" column="COMP_DATE"/>
  27. <result property="centerXGd" column="CENTER_X_GD"/>
  28. <result property="centerYGd" column="CENTER_Y_GD"/>
  29. <result property="uptm" column="UPTM"/>
  30. <result property="edtrPesr" column="EDTR_PESR"/>
  31. <result property="hstInsp" column="HST_INSP"/>
  32. <result property="chkState" column="CHK_STATE"/>
  33. <result property="persId" column="PERS_ID"/>
  34. <result property="compDateStr" column="COMP_DATE_STR"/>
  35. <result property="displayLevel" column="DISPLAY_LEVEL"/>
  36. <result property="rsClass" column="RS_CLASS"/>
  37. <result property="impdDt" column="IMPD_DT"/>
  38. <result property="rnfcImpdDt" column="RNFC_IMPD_DT"/>
  39. <result property="desFlStag" column="DES_FL_STAG"/>
  40. <result property="flConTopStag" column="FL_CON_TOP_STAG"/>
  41. <result property="wiunWaoLegPers" column="WIUN_WAO_LEG_PERS"/>
  42. <result property="wiunWaoLegPersUnit" column="WIUN_WAO_LEG_PERS_UNIT"/>
  43. <result property="wiunWaoLegPersDuty" column="WIUN_WAO_LEG_PERS_DUTY"/>
  44. <result property="wiunWaoLegPersTel" column="WIUN_WAO_LEG_PERS_TEL"/>
  45. <result property="techPers" column="TECH_PERS"/>
  46. <result property="techPersUnit" column="TECH_PERS_UNIT"/>
  47. <result property="techPersDuty" column="TECH_PERS_DUTY"/>
  48. <result property="techPersTel" column="TECH_PERS_TEL"/>
  49. <result property="patrolPers" column="PATROL_PERS"/>
  50. <result property="patrolPersUnit" column="PATROL_PERS_UNIT"/>
  51. <result property="patrolPersDuty" column="PATROL_PERS_DUTY"/>
  52. <result property="patrolPersTel" column="PATROL_PERS_TEL"/>
  53. <result property="damType" column="DAM_TYPE"/>
  54. <result property="jxDuty" column="JX_DUTY"/>
  55. <result property="jxDutyPhone" column="JX_DUTY_PHONE"/>
  56. <result property="jxRsvrType" column="JX_RSVR_TYPE"/>
  57. <result property="jxRsvrStndLev" column="JX_RSVR_STND_LEV"/>
  58. </resultMap>
  59. <sql id="table_columns">
  60. CENTER_X_GD,CENTER_Y_GD,UPTM,EDTR_PESR,HST_INSP,COMP_DATE_STR,
  61. ENG_SCAL,
  62. LIM_STAG,
  63. TOT_CAP,
  64. RS_ADM_NAME,
  65. RS_ADM_CODE,
  66. RS_ADM_DEP,
  67. ADM_ATT_REL,
  68. RS_CODE,
  69. RS_NAME,
  70. LONGITUDE,
  71. LATITUDE,
  72. LOCATION,
  73. ADM_DIV,
  74. RS_TYPE,
  75. DAM_TYPE_MAT,
  76. DAM_TYPE_STR,
  77. DAM_SIZE_HIG,
  78. CENTER_X,
  79. CENTER_Y,RS_LOC,REG_CODE,COMP_DATE,CHK_STATE,PERS_ID,DISPLAY_LEVEL,
  80. RS_CLASS,
  81. IMPD_DT,
  82. RNFC_IMPD_DT,
  83. DES_FL_STAG,
  84. FL_CON_TOP_STAG,
  85. WIUN_WAO_LEG_PERS,
  86. WIUN_WAO_LEG_PERS_UNIT,
  87. WIUN_WAO_LEG_PERS_DUTY,
  88. WIUN_WAO_LEG_PERS_TEL,
  89. TECH_PERS,
  90. TECH_PERS_UNIT,
  91. TECH_PERS_DUTY,
  92. TECH_PERS_TEL,
  93. PATROL_PERS,
  94. PATROL_PERS_UNIT,
  95. PATROL_PERS_DUTY,
  96. PATROL_PERS_TEL,DAM_TYPE,
  97. JX_DUTY,
  98. JX_DUTY_PHONE,
  99. JX_RSVR_TYPE,
  100. JX_RSVR_STND_LEV
  101. </sql>
  102. <sql id="entity_properties">
  103. #{centerXGd},#{centerYGd},#{uptm},#{edtrPesr},#{hstInsp},#{compDateStr},
  104. #{engScal},
  105. #{limStag},
  106. #{totCap},
  107. #{rsAdmName},
  108. #{rsAdmCode},
  109. #{rsAdmDep},
  110. #{admAttRel},
  111. #{rsCode},
  112. #{rsName},
  113. #{longitude},
  114. #{latitude},
  115. #{location},
  116. #{admDiv},
  117. #{rsType},
  118. #{damTypeMat},
  119. #{damTypeStr},
  120. #{damSizeHig},
  121. #{centerX},
  122. #{centerY},#{rsLoc},#{regCode},#{compDate},#{chkState},#{persId},#{displayLevel},
  123. #{rsClass},
  124. #{impdDt},
  125. #{rnfcImpdDt},
  126. #{desFlStag},
  127. #{flConTopStag},
  128. #{wiunWaoLegPers},
  129. #{wiunWaoLegPersUnit},
  130. #{wiunWaoLegPersDuty},
  131. #{wiunWaoLegPersTel},
  132. #{techPers},
  133. #{techPersUnit},
  134. #{techPersDuty},
  135. #{techPersTel},
  136. #{patrolPers},
  137. #{patrolPersUnit},
  138. #{patrolPersDuty},
  139. #{patrolPersTel},
  140. #{damType},
  141. #{jxDuty},
  142. #{jxDutyPhone},
  143. #{jxRsvrType},
  144. #{jxRsvrStndLev}
  145. </sql>
  146. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  147. <sql id="page_where">
  148. <trim prefix="where" prefixOverrides="and | or ">
  149. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  150. <if test="limStag != null and limStag != ''">and LIM_STAG = #{limStag}</if>
  151. <if test="totCap != null and totCap != ''">and TOT_CAP = #{totCap}</if>
  152. <if test="rsAdmName != null and rsAdmName != ''">and RS_ADM_NAME like '%${rsAdmName}%'</if>
  153. <if test="rsAdmCode != null and rsAdmCode != ''">and RS_ADM_CODE = #{rsAdmCode}</if>
  154. <if test="rsAdmDep != null and rsAdmDep != ''">and RS_ADM_DEP = #{rsAdmDep}</if>
  155. <if test="admAttRel != null and admAttRel != ''">and ADM_ATT_REL = #{admAttRel}</if>
  156. <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
  157. <if test="rsName != null and rsName != ''">and RS_NAME like '%${rsName}%'</if>
  158. <if test="longitude != null and longitude != ''">and LONGITUDE = #{longitude}</if>
  159. <if test="latitude != null and latitude != ''">and LATITUDE = #{latitude}</if>
  160. <if test="location != null and location != ''">and LOCATION like '${location}%'</if>
  161. <if test="admDiv != null and admDiv != ''">and ADM_DIV like '${admDiv}%'</if>
  162. <if test="rsType != null and rsType != ''">and RS_TYPE = #{rsType}</if>
  163. <if test="damTypeMat != null and damTypeMat != ''">and DAM_TYPE_MAT = #{damTypeMat}</if>
  164. <if test="damTypeStr != null and damTypeStr != ''">and DAM_TYPE_STR = #{damTypeStr}</if>
  165. <if test="damSizeHig != null and damSizeHig != ''">and DAM_SIZE_HIG = #{damSizeHig}</if>
  166. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  167. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  168. <if test="rsLoc != null and rsLoc != ''">and RS_LOC = #{rsLoc}</if>
  169. <if test="regCode != null and regCode != ''">and REG_CODE = #{regCode}</if>
  170. <if test="compDate != null">and COMP_DATE = #{compDate}</if>
  171. <if test="uptm != null">and UPTM = #{uptm}</if>
  172. <if test="edtrPesr != null and edtrPesr !=''">and EDTR_PESR = #{edtrPesr}</if>
  173. <if test="hstInsp != null and hstInsp !=''">and HST_INSP = #{hstInsp}</if>
  174. <if test="compDateStr != null">and COMP_DATE_STR = #{compDateStr}</if>
  175. <if test="admDivName != null and admDivName != ''">and ADM_DIV_NAME like '${admDivName}%'</if>
  176. <if test="rsClass != null">and RS_CLASS = #{rsClass}</if>
  177. <if test="impdDt != null">and IMPD_DT = #{impdDt}</if>
  178. <if test="rnfcImpdDt != null">and RNFC_IMPD_DT = #{rnfcImpdDt}</if>
  179. <if test="desFlStag != null and desFlStag != ''">and DES_FL_STAG = #{desFlStag}</if>
  180. <if test="flConTopStag != null and flConTopStag != ''">and FL_CON_TOP_STAG = #{flConTopStag}</if>
  181. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
  182. <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">and WIUN_WAO_LEG_PERS_UNIT =
  183. #{wiunWaoLegPersUnit}
  184. </if>
  185. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and WIUN_WAO_LEG_PERS_DUTY =
  186. #{wiunWaoLegPersDuty}
  187. </if>
  188. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and WIUN_WAO_LEG_PERS_TEL =
  189. #{wiunWaoLegPersTel}
  190. </if>
  191. <if test="techPers != null and techPers != ''">and TECH_PERS = #{techPers}</if>
  192. <if test="techPersUnit != null and techPersUnit != ''">and TECH_PERS_UNIT = #{techPersUnit}</if>
  193. <if test="techPersDuty != null and techPersDuty != ''">and TECH_PERS_DUTY = #{techPersDuty}</if>
  194. <if test="techPersTel != null and techPersTel != ''">and TECH_PERS_TEL = #{techPersTel}</if>
  195. <if test="patrolPers != null and patrolPers != ''">and PATROL_PERS = #{patrolPers}</if>
  196. <if test="patrolPersUnit != null and patrolPersUnit != ''">and PATROL_PERS_UNIT = #{patrolPersUnit}</if>
  197. <if test="patrolPersDuty != null and patrolPersDuty != ''">and PATROL_PERS_DUTY = #{patrolPersDuty}</if>
  198. <if test="patrolPersTel != null and patrolPersTel != ''">and PATROL_PERS_TEL = #{patrolPersTel}</if>
  199. <if test="damType != null and damType != ''">and DAM_TYPE = #{damType}</if>
  200. <if test="jxDuty != null and jxDuty != ''">and JX_DUTY = #{jxDuty}</if>
  201. <if test="jxDutyPhone != null and jxDutyPhone != ''">and JX_DUTY_PHONE = #{jxDutyPhone}</if>
  202. <if test="jxRsvrType != null and jxRsvrType != ''">and JX_RSVR_TYPE = #{jxRsvrType}</if>
  203. <if test="jxRsvrStndLev != null and jxRsvrStndLev != ''">and JX_RSVR_STND_LEV = #{jxRsvrStndLev}</if>
  204. </trim>
  205. </sql>
  206. <select id="get" resultMap="attRsBaseResultMap" parameterType="String">
  207. select
  208. <include refid="table_columns"/>
  209. from ATT_RS_BASE where RS_CODE = #{rsCode}
  210. </select>
  211. <select id="getBy" resultMap="attRsBaseResultMap">
  212. select
  213. <include refid="table_columns"/>
  214. from ATT_RS_BASE
  215. <include refid="page_where"/>
  216. </select>
  217. <select id="findEqRsList" resultMap="attRsBaseResultMap">
  218. select
  219. <include refid="table_columns"/>
  220. from ATT_RS_BASE b where 1=1
  221. <if test="rsName != null and rsName != ''">and b.RS_NAME = #{rsName}</if>
  222. <if test="admDivName != null and admDivName != ''">and b.ADM_DIV_NAME = #{admDivName}</if>
  223. </select>
  224. <select id="findRsList" resultMap="attRsBaseResultMap">
  225. select
  226. <include refid="table_columns"/>
  227. from ATT_RS_BASE b where 1=1
  228. <if test="limStag != null and limStag != ''">and b.LIM_STAG = #{limStag}</if>
  229. <if test="totCap != null and totCap != ''">and b.TOT_CAP = #{totCap}</if>
  230. <if test="rsAdmName != null and rsAdmName != ''">and b.RS_ADM_NAME like '%${rsAdmName}%'</if>
  231. <if test="rsAdmCode != null and rsAdmCode != ''">and b.RS_ADM_CODE = #{rsAdmCode}</if>
  232. <if test="admDivName != null and admDivName != ''">and b.ADM_DIV_NAME = #{admDivName}</if>
  233. <if test="rsAdmDep != null and rsAdmDep != ''">and b.RS_ADM_DEP = #{rsAdmDep}</if>
  234. <if test="admAttRel != null and admAttRel != ''">and b.ADM_ATT_REL = #{admAttRel}</if>
  235. <if test="rsName != null and rsName != ''">and b.RS_NAME like '%${rsName}%'</if>
  236. <if test="rsType != null and rsType != ''">and b.RS_TYPE in (${rsType})</if>
  237. <if test="engScal != null and engScal != ''">and b.ENG_SCAL in (${engScal})</if>
  238. <if test="admDiv != null and admDiv != ''">and b.ADM_DIV like CONCAT(#{admDiv}, '%')</if>
  239. <if test="edtrPesr != null and edtrPesr !=''">and b.EDTR_PESR = #{edtrPesr}</if>
  240. <if test="hstInsp != null and hstInsp !=''">and b.HST_INSP = #{hstInsp}</if>
  241. <if test="compDateStr != null">and b.COMP_DATE_STR = #{compDateStr}</if>
  242. <if test="location != null">and b.LOCATION like '%${location}%'</if>
  243. <if test="rsClass != null">and b.RS_CLASS = #{rsClass}</if>
  244. <if test="impdDt != null">and b.IMPD_DT = #{impdDt}</if>
  245. <if test="rnfcImpdDt != null">and b.RNFC_IMPD_DT = #{rnfcImpdDt}</if>
  246. <if test="desFlStag != null and desFlStag != ''">and b.DES_FL_STAG = #{desFlStag}</if>
  247. <if test="flConTopStag != null and flConTopStag != ''">and b.FL_CON_TOP_STAG = #{flConTopStag}</if>
  248. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and b.WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
  249. <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">and b.WIUN_WAO_LEG_PERS_UNIT =
  250. #{wiunWaoLegPersUnit}
  251. </if>
  252. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and b.WIUN_WAO_LEG_PERS_DUTY =
  253. #{wiunWaoLegPersDuty}
  254. </if>
  255. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and b.WIUN_WAO_LEG_PERS_TEL =
  256. #{wiunWaoLegPersTel}
  257. </if>
  258. <if test="techPers != null and techPers != ''">and b.TECH_PERS = #{techPers}</if>
  259. <if test="techPersUnit != null and techPersUnit != ''">and b.TECH_PERS_UNIT = #{techPersUnit}</if>
  260. <if test="techPersDuty != null and techPersDuty != ''">and b.TECH_PERS_DUTY = #{techPersDuty}</if>
  261. <if test="techPersTel != null and techPersTel != ''">and b.TECH_PERS_TEL = #{techPersTel}</if>
  262. <if test="patrolPers != null and patrolPers != ''">and b.PATROL_PERS = #{patrolPers}</if>
  263. <if test="patrolPersUnit != null and patrolPersUnit != ''">and b.PATROL_PERS_UNIT = #{patrolPersUnit}</if>
  264. <if test="patrolPersDuty != null and patrolPersDuty != ''">and b.PATROL_PERS_DUTY = #{patrolPersDuty}</if>
  265. <if test="patrolPersTel != null and patrolPersTel != ''">and b.PATROL_PERS_TEL = #{patrolPersTel}</if>
  266. <if test="damType != null and damType != ''">and b.DAM_TYPE = #{damType}</if>
  267. </select>
  268. <select id="findAll" resultMap="attRsBaseResultMap">
  269. select
  270. <include refid="table_columns"/>
  271. from ATT_RS_BASE
  272. </select>
  273. <select id="findList" resultType="cn.com.goldenwater.dcproj.dto.AttRsBaseRgstrDto">
  274. select B.RS_CODE,B.RS_NAME,B.LONGITUDE,B.LATITUDE,B.LOCATION,B.ENG_SCAL,B.LIM_STAG,B.TOT_CAP,B.RS_ADM_NAME,B.RS_ADM_CODE,B.RS_ADM_DEP,
  275. B.ADM_ATT_REL,B.ADM_DIV,B.RS_TYPE,B.DAM_TYPE_MAT,B.DAM_TYPE_STR,B.DAM_SIZE_HIG,B.CENTER_X,B.CENTER_Y,B.SRC,B.DATA_QUALITY,
  276. B.CENTER_X_GD,B.CENTER_Y_GD,B.RS_LOC,B.REG_CODE,B.COMP_DATE,B.INTM,B.REG_NO,B.HST_INSP,B.PERS_ID,B.UPTM,B.CHK_STATE,B.EDTR_PESR,
  277. B.SLPC_ADM_DIV,B.ADM_DIV_NAME,B.COMP_DATE_STR,B.DISPLAY_LEVEL,B.RS_CLASS,B.IMPD_DT,B.RNFC_IMPD_DT,B.DES_FL_STAG,B.FL_CON_TOP_STAG,
  278. B.WIUN_WAO_LEG_PERS_UNIT,B.TECH_PERS_UNIT,B.PATROL_PERS_UNIT,B.DAM_TYPE,r.rgstr_id,t.WIUN_WAO_LEG_PERS AS WIUN_WAO_LEG_PERS1,t.WIUN_WAO_LEG_PERS_TEL AS
  279. WIUN_WAO_LEG_PERS_TEL1,t.WIUN_WAO_LEG_PERS_DUTY AS WIUN_WAO_LEG_PERS_DUTY1,
  280. t.TECH_PERS AS TECH_PERS1,t.TECH_PERS_TEL AS TECH_PERS_TEL1,t.TECH_PERS_DUTY AS TECH_PERS_DUTY1,
  281. t.PATROL_PERS AS PATROL_PERS1,t.PATROL_PERS_TEL AS PATROL_PERS_TEL1,t.PATROL_PERS_DUTY AS PATROL_PERS_DUTY1
  282. from ATT_RS_BASE b
  283. LEFT JOIN
  284. (
  285. SELECT
  286. *
  287. FROM
  288. (
  289. SELECT
  290. a.*, @rank :=IF( @rs_code = rs_code, @rank + 1, 1 ) AS rn, @rs_code := rs_code
  291. FROM
  292. BIS_INSP_RSVR_RGSTR a ,(SELECT @rank := 0, @rs_code := NULL) c
  293. ORDER BY rs_code, state DESC, uptm DESC
  294. ) AS t1 WHERE rn = 1
  295. ) r on b.rs_code = r.rs_code
  296. LEFT JOIN BIS_INSP_BASE_PRES_EXT t on r.rgstr_id = t.rgstr_id
  297. <trim prefix="where" prefixOverrides="and | or ">
  298. <if test="limStag != null and limStag != ''">and b.LIM_STAG = #{limStag}</if>
  299. <if test="totCap != null and totCap != ''">and b.TOT_CAP = #{totCap}</if>
  300. <if test="rsAdmName != null and rsAdmName != ''">and b.RS_ADM_NAME like '%${rsAdmName}%'</if>
  301. <if test="rsAdmCode != null and rsAdmCode != ''">and b.RS_ADM_CODE = #{rsAdmCode}</if>
  302. <if test="admDivName != null and admDivName != ''">and b.ADM_DIV_NAME = #{admDivName}</if>
  303. <if test="rsAdmDep != null and rsAdmDep != ''">and b.RS_ADM_DEP = #{rsAdmDep}</if>
  304. <if test="admAttRel != null and admAttRel != ''">and b.ADM_ATT_REL = #{admAttRel}</if>
  305. <if test="rsName != null and rsName != ''">and b.RS_NAME like '%${rsName}%'</if>
  306. <if test="rsType != null and rsType != ''">and b.RS_TYPE in (${rsType})</if>
  307. <if test="engScal != null and engScal != ''">and b.ENG_SCAL in (${engScal})</if>
  308. <if test="admDiv != null and admDiv != ''">and b.ADM_DIV like CONCAT(#{admDiv},'%')</if>
  309. <if test="edtrPesr != null and edtrPesr !=''">and b.EDTR_PESR = #{edtrPesr}</if>
  310. <if test="hstInsp != null and hstInsp !=''">and b.HST_INSP = #{hstInsp}</if>
  311. <if test="compDateStr != null">and b.COMP_DATE_STR = #{compDateStr}</if>
  312. <if test="location != null">and b.LOCATION like '%${location}%'</if>
  313. <if test="rsClass != null">and b.RS_CLASS = #{rsClass}</if>
  314. <if test="impdDt != null">and b.IMPD_DT = #{impdDt}</if>
  315. <if test="rnfcImpdDt != null">and b.RNFC_IMPD_DT = #{rnfcImpdDt}</if>
  316. <if test="desFlStag != null and desFlStag != ''">and b.DES_FL_STAG = #{desFlStag}</if>
  317. <if test="flConTopStag != null and flConTopStag != ''">and b.FL_CON_TOP_STAG = #{flConTopStag}</if>
  318. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and b.WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
  319. <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">and b.WIUN_WAO_LEG_PERS_UNIT =
  320. #{wiunWaoLegPersUnit}
  321. </if>
  322. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and b.WIUN_WAO_LEG_PERS_DUTY =
  323. #{wiunWaoLegPersDuty}
  324. </if>
  325. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and b.WIUN_WAO_LEG_PERS_TEL =
  326. #{wiunWaoLegPersTel}
  327. </if>
  328. <if test="techPers != null and techPers != ''">and b.TECH_PERS = #{techPers}</if>
  329. <if test="techPersUnit != null and techPersUnit != ''">and b.TECH_PERS_UNIT = #{techPersUnit}</if>
  330. <if test="techPersDuty != null and techPersDuty != ''">and b.TECH_PERS_DUTY = #{techPersDuty}</if>
  331. <if test="techPersTel != null and techPersTel != ''">and b.TECH_PERS_TEL = #{techPersTel}</if>
  332. <if test="patrolPers != null and patrolPers != ''">and b.PATROL_PERS = #{patrolPers}</if>
  333. <if test="patrolPersUnit != null and patrolPersUnit != ''">and b.PATROL_PERS_UNIT = #{patrolPersUnit}</if>
  334. <if test="patrolPersDuty != null and patrolPersDuty != ''">and b.PATROL_PERS_DUTY = #{patrolPersDuty}</if>
  335. <if test="patrolPersTel != null and patrolPersTel != ''">and b.PATROL_PERS_TEL = #{patrolPersTel}</if>
  336. <if test="damType != null and damType != ''">and b.DAM_TYPE = #{damType}</if>
  337. </trim>
  338. ORDER BY b.RS_CODE ASC
  339. </select>
  340. <select id="selectCount" resultType="int">
  341. select count(rs_code) from ATT_RS_BASE
  342. <include refid="page_where"/>
  343. </select>
  344. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
  345. insert into ATT_RS_BASE(
  346. <include refid="table_columns"/>
  347. )
  348. values (
  349. <include refid="entity_properties"/>
  350. )
  351. </insert>
  352. <delete id="delete" parameterType="java.lang.String">
  353. delete from ATT_RS_BASE where RS_CODE = #{rsCode}
  354. </delete>
  355. <select id="findMax" parameterType="String" resultType="String">
  356. select max(rs_code) as rs_code from ATT_RS_BASE where rs_code like '${location}%'
  357. </select>
  358. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
  359. delete from ATT_RS_BASE
  360. <include refid="page_where"/>
  361. </delete>
  362. <update id="deleteInFlag" parameterType="java.lang.String">
  363. update ATT_RS_BASE set flag_valid = 0 where RS_CODE = #{rsCode}
  364. </update>
  365. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
  366. update ATT_RS_BASE
  367. <trim prefix="set" suffixOverrides=",">
  368. <if test="limStag != null and limStag != ''">LIM_STAG = #{limStag},</if>
  369. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  370. <if test="rsAdmName != null and rsAdmName != ''">RS_ADM_NAME = #{rsAdmName},</if>
  371. <if test="rsAdmCode != null and rsAdmCode != ''">RS_ADM_CODE = #{rsAdmCode},</if>
  372. <if test="rsAdmDep != null and rsAdmDep != ''">RS_ADM_DEP = #{rsAdmDep},</if>
  373. <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
  374. <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
  375. <if test="longitude != null and longitude != ''">LONGITUDE = #{longitude},</if>
  376. <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
  377. <if test="location != null and location != ''">LOCATION = #{location},</if>
  378. <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
  379. <if test="rsType != null and rsType != ''">RS_TYPE = #{rsType},</if>
  380. <if test="damTypeMat != null and damTypeMat != ''">DAM_TYPE_MAT = #{damTypeMat},</if>
  381. <if test="damTypeStr != null and damTypeStr != ''">DAM_TYPE_STR = #{damTypeStr},</if>
  382. <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
  383. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  384. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  385. <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
  386. <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
  387. <if test="rsLoc != null and rsLoc != ''">RS_LOC = #{rsLoc},</if>
  388. <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
  389. <if test="compDate != null ">COMP_DATE = #{compDate},</if>
  390. <if test="uptm != null">UPTM = #{uptm},</if>
  391. <if test="edtrPesr != null and edtrPesr !=''">EDTR_PESR = #{edtrPesr},</if>
  392. <if test="hstInsp != null and hstInsp !=''">HST_INSP = #{hstInsp},</if>
  393. <if test="chkState != null and chkState !=''">CHK_STATE = #{chkState},</if>
  394. <if test="persId != null and persId !=''">PERS_ID = #{persId},</if>
  395. <if test="compDateStr != null">COMP_DATE_STR = #{compDateStr},</if>
  396. <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
  397. <if test="rsClass != null">RS_CLASS = #{rsClass},</if>
  398. <if test="impdDt != null">IMPD_DT = #{impdDt},</if>
  399. <if test="rnfcImpdDt != null">RNFC_IMPD_DT = #{rnfcImpdDt},</if>
  400. <if test="desFlStag != null and desFlStag != ''">DES_FL_STAG = #{desFlStag},</if>
  401. <if test="flConTopStag != null and flConTopStag != ''">FL_CON_TOP_STAG = #{flConTopStag},</if>
  402. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">WIUN_WAO_LEG_PERS = #{wiunWaoLegPers},</if>
  403. <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">WIUN_WAO_LEG_PERS_UNIT =
  404. #{wiunWaoLegPersUnit},
  405. </if>
  406. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">WIUN_WAO_LEG_PERS_DUTY =
  407. #{wiunWaoLegPersDuty},
  408. </if>
  409. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">WIUN_WAO_LEG_PERS_TEL =
  410. #{wiunWaoLegPersTel},
  411. </if>
  412. <if test="techPers != null and techPers != ''">TECH_PERS = #{techPers},</if>
  413. <if test="techPersUnit != null and techPersUnit != ''">TECH_PERS_UNIT = #{techPersUnit},</if>
  414. <if test="techPersDuty != null and techPersDuty != ''">TECH_PERS_DUTY = #{techPersDuty},</if>
  415. <if test="techPersTel != null and techPersTel != ''">TECH_PERS_TEL = #{techPersTel},</if>
  416. <if test="patrolPers != null and patrolPers != ''">PATROL_PERS = #{patrolPers},</if>
  417. <if test="patrolPersUnit != null and patrolPersUnit != ''">PATROL_PERS_UNIT = #{patrolPersUnit},</if>
  418. <if test="patrolPersDuty != null and patrolPersDuty != ''">PATROL_PERS_DUTY = #{patrolPersDuty},</if>
  419. <if test="patrolPersTel != null and patrolPersTel != ''">PATROL_PERS_TEL = #{patrolPersTel},</if>
  420. <if test="damType != null and damType != ''">DAM_TYPE = #{damType},</if>
  421. <if test="jxDuty != null and jxDuty != ''">JX_DUTY = #{jxDuty},</if>
  422. <if test="jxDutyPhone != null and jxDutyPhone != ''">JX_DUTY_PHONE = #{jxDutyPhone},</if>
  423. <if test="jxRsvrType != null and jxRsvrType != ''">JX_RSVR_TYPE = #{jxRsvrType},</if>
  424. <if test="jxRsvrStndLev != null and jxRsvrStndLev != ''">JX_RSVR_STND_LEV = #{jxRsvrStndLev},</if>
  425. </trim>
  426. <where>RS_CODE = #{rsCode}</where>
  427. </update>
  428. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
  429. update ATT_RS_BASE
  430. <trim prefix="set" suffixOverrides=",">
  431. <if test="limStag != null and limStag != ''">LIM_STAG = #{limStag},</if>
  432. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  433. <if test="rsAdmName != null and rsAdmName != ''">RS_ADM_NAME = #{rsAdmName},</if>
  434. <if test="rsAdmCode != null and rsAdmCode != ''">RS_ADM_CODE = #{rsAdmCode},</if>
  435. <if test="rsAdmDep != null and rsAdmDep != ''">RS_ADM_DEP = #{rsAdmDep},</if>
  436. <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
  437. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  438. <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
  439. <if test="longitude != null and longitude != ''">LONGITUDE = #{longitude},</if>
  440. <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
  441. <if test="location != null and location != ''">LOCATION = #{location},</if>
  442. <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
  443. <if test="rsType != null and rsType != ''">RS_TYPE = #{rsType},</if>
  444. <if test="damTypeMat != null and damTypeMat != ''">DAM_TYPE_MAT = #{damTypeMat},</if>
  445. <if test="damTypeStr != null and damTypeStr != ''">DAM_TYPE_STR = #{damTypeStr},</if>
  446. <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
  447. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  448. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  449. <if test="rsLoc != null and rsLoc != ''">RS_LOC = #{rsLoc},</if>
  450. <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
  451. <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
  452. <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
  453. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  454. <if test="uptm != null">UPTM = #{uptm},</if>
  455. <if test="edtrPesr != null and edtrPesr !=''">EDTR_PESR = #{edtrPesr},</if>
  456. <if test="hstInsp != null and hstInsp !=''">HST_INSP = #{hstInsp},</if>
  457. <if test="compDateStr != null">COMP_DATE_STR = #{compDateStr},</if>
  458. <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
  459. <if test="rsClass != null">RS_CLASS = #{rsClass},</if>
  460. <if test="impdDt != null">IMPD_DT = #{impdDt},</if>
  461. <if test="rnfcImpdDt != null">RNFC_IMPD_DT = #{rnfcImpdDt},</if>
  462. <if test="desFlStag != null and desFlStag != ''">DES_FL_STAG = #{desFlStag},</if>
  463. <if test="flConTopStag != null and flConTopStag != ''">FL_CON_TOP_STAG = #{flConTopStag},</if>
  464. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">WIUN_WAO_LEG_PERS = #{wiunWaoLegPers},</if>
  465. <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">WIUN_WAO_LEG_PERS_UNIT =
  466. #{wiunWaoLegPersUnit},
  467. </if>
  468. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">WIUN_WAO_LEG_PERS_DUTY =
  469. #{wiunWaoLegPersDuty},
  470. </if>
  471. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">WIUN_WAO_LEG_PERS_TEL =
  472. #{wiunWaoLegPersTel},
  473. </if>
  474. <if test="techPers != null and techPers != ''">TECH_PERS = #{techPers},</if>
  475. <if test="techPersUnit != null and techPersUnit != ''">TECH_PERS_UNIT = #{techPersUnit},</if>
  476. <if test="techPersDuty != null and techPersDuty != ''">TECH_PERS_DUTY = #{techPersDuty},</if>
  477. <if test="techPersTel != null and techPersTel != ''">TECH_PERS_TEL = #{techPersTel},</if>
  478. <if test="patrolPers != null and patrolPers != ''">PATROL_PERS = #{patrolPers},</if>
  479. <if test="patrolPersUnit != null and patrolPersUnit != ''">PATROL_PERS_UNIT = #{patrolPersUnit},</if>
  480. <if test="patrolPersDuty != null and patrolPersDuty != ''">PATROL_PERS_DUTY = #{patrolPersDuty},</if>
  481. <if test="patrolPersTel != null and patrolPersTel != ''">PATROL_PERS_TEL = #{patrolPersTel},</if>
  482. <if test="damType != null and damType != ''">DAM_TYPE = #{damType},</if>
  483. <if test="jxDuty != null and jxDuty != ''">JX_DUTY = #{jxDuty},</if>
  484. <if test="jxDutyPhone != null and jxDutyPhone != ''">JX_DUTY_PHONE = #{jxDutyPhone},</if>
  485. <if test="jxRsvrType != null and jxRsvrType != ''">JX_RSVR_TYPE = #{jxRsvrType},</if>
  486. <if test="jxRsvrStndLev != null and jxRsvrStndLev != ''">JX_RSVR_STND_LEV = #{jxRsvrStndLev},</if>
  487. </trim>
  488. <include refid="page_where"/>
  489. </update>
  490. <!-- 其他自定义SQL -->
  491. <!--根据督查组查询范围内的对象-->
  492. <select id="getListByInspGroupIdObjType" parameterType="cn.com.goldenwater.dcproj.param.PagePersObjParam"
  493. resultType="cn.com.goldenwater.dcproj.vo.AttRsBaseVo">
  494. select t.*,C.id,C.PNM,o.obj_id
  495. from ATT_RS_BASE t
  496. left join BIS_INSP_ALL_OBJ o
  497. on o.CODE = t.rs_code LEFT JOIN BIS_INSP_ALL C ON o.ID = C.ID
  498. and o.ptype = #{objType}
  499. where 1 = 1
  500. <if test='isAll == "0"'>and o.ID = #{inspGroupId}</if>
  501. <if test='isAll == "1"'>and o.ID LIKE '${inspGroupId}%'</if>
  502. <if test="rsName != null and rsName != ''">and t.RS_NAME LIKE '%${rsName}%'</if>
  503. <if test="engScal != null and engScal != ''">and t.ENG_SCAL = #{engScal}</if>
  504. <if test="rsAdmDep != null and rsAdmDep != ''">and t.RS_ADM_DEP = #{rsAdmDep}</if>
  505. <if test="adCode != null and adCode != ''">and t.ADM_DIV LIKE '${adCode}%'</if>
  506. <choose>
  507. <when test="province !=null and province !=''">
  508. and o.ad_code like '${province}%'
  509. </when>
  510. <otherwise>
  511. and o.ad_code is null
  512. </otherwise>
  513. </choose>
  514. <if test="objType =='1'.toString()">
  515. AND t.ENG_SCAL in(4,5)
  516. </if>
  517. <if test="objType =='36'.toString()">
  518. AND t.ENG_SCAL in(1,2,3)
  519. </if>
  520. <if test="objType == '26'.toString()">
  521. and t.ENG_SCAL in (1,2,3)
  522. </if>
  523. </select>
  524. <!--查询不在范围内的对象-->
  525. <select id="getObjListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
  526. select *
  527. from ATT_RS_BASE t
  528. where t.rs_code not in (
  529. select CODE from BIS_INSP_ALL_OBJ where id like concat(#{inspGroupId},'%'))
  530. <if test="rsName != null and rsName != ''">and t.RS_NAME LIKE '%${rsName}%'</if>
  531. <if test="adCode != null and adCode != ''">and t.ADM_DIV LIKE '${adCode}%'</if>
  532. <if test="engScal != null and engScal != ''">and t.ENG_SCAL = #{engScal}</if>
  533. <if test="rsAdmDep != null and rsAdmDep != ''">and t.RS_ADM_DEP = #{rsAdmDep}</if>
  534. <if test="province != null and province != ''">and t.ADM_DIV LIKE '${province}%'</if>
  535. <if test="objType =='1'.toString()">
  536. AND t.ENG_SCAL in(4,5)
  537. </if>
  538. <if test="objType =='36'.toString()">
  539. AND t.ENG_SCAL in(1,2,3)
  540. </if>
  541. <if test="objType =='26'.toString()">
  542. AND t.ENG_SCAL in(1,2,3)
  543. </if>
  544. </select>
  545. <select id="getObjByPersId" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
  546. resultType="cn.com.goldenwater.dcproj.model.AttPersRs">
  547. SELECT A.ENG_SCAL,R.RGSTR_ID,A.HST_INSP,
  548. A.LIM_STAG,
  549. A.TOT_CAP,
  550. A.RS_ADM_NAME,
  551. A.RS_ADM_CODE,
  552. A.RS_ADM_DEP,
  553. A.ADM_ATT_REL,
  554. A.RS_CODE,
  555. A.RS_NAME,
  556. A.LONGITUDE,
  557. A.LATITUDE,
  558. A.LOCATION,
  559. A.ADM_DIV,
  560. A.RS_TYPE,
  561. A.DAM_TYPE_MAT,
  562. A.DAM_TYPE_STR,
  563. A.DAM_SIZE_HIG,
  564. A.CENTER_X,
  565. A.CENTER_Y,A.CENTER_X_GD,
  566. A.CENTER_Y_GD,
  567. A.RS_CLASS,
  568. A.IMPD_DT,
  569. A.RNFC_IMPD_DT,
  570. A.DES_FL_STAG,
  571. A.FL_CON_TOP_STAG,
  572. A.WIUN_WAO_LEG_PERS,
  573. A.WIUN_WAO_LEG_PERS_UNIT,
  574. A.WIUN_WAO_LEG_PERS_DUTY,
  575. A.WIUN_WAO_LEG_PERS_TEL,
  576. A.TECH_PERS,
  577. A.TECH_PERS_UNIT,
  578. A.TECH_PERS_DUTY,
  579. A.TECH_PERS_TEL,
  580. A.PATROL_PERS,
  581. A.PATROL_PERS_UNIT,
  582. A.PATROL_PERS_DUTY,
  583. A.PATROL_PERS_TEL,
  584. B.ID,
  585. B.NM,
  586. B.PTYPE,
  587. B.LGTD,
  588. B.LTTD,AD.AD_NAME adName,
  589. B.OBJ_ID FROM ATT_RS_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.RS_CODE = B.CODE
  590. LEFT JOIN BIS_INSP_RSVR_RGSTR R on B.Obj_Id=R.Obj_Id
  591. LEFT JOIN ATT_AD_BASE AD ON A.ADM_DIV = AD.AD_CODE
  592. WHERE B.PTYPE = #{objType}
  593. <choose>
  594. <when test="province !=null and province !=''">
  595. and B.AD_CODE=#{province}
  596. </when>
  597. <otherwise>
  598. and B.AD_CODE is null
  599. </otherwise>
  600. </choose>
  601. AND
  602. B.id in (${inIdsSql})
  603. and R.RGSTR_ID is not null
  604. <if test="rsName != null and rsName != ''">and A.RS_NAME LIKE '%${rsName}%'</if>
  605. <if test="adCode != null and adCode != ''">and A.ADM_DIV LIKE '${adCode}%'</if>
  606. <if test="objType =='1'.toString()">
  607. AND A.ENG_SCAL in(4,5)
  608. </if>
  609. <if test="objType =='36'.toString()">
  610. AND A.ENG_SCAL in(1,2,3)
  611. </if>
  612. ORDER BY A.RS_CODE
  613. </select>
  614. <sql id="orgIdSql">
  615. <choose>
  616. <when test="orgId !=null and orgId !=''">
  617. and ORG_ID=#{orgId}
  618. </when>
  619. <otherwise>
  620. and ORG_ID is null
  621. </otherwise>
  622. </choose>
  623. </sql>
  624. <select id="getRsCountByGrad" resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
  625. SELECT AD.AD_CODE,AD.AD_NAME,AD.LGTD lgtd,AD.LTTD lttd,t1.rsCount FROM
  626. ATT_AD_X_BASE AD LEFT JOIN
  627. (SELECT SUBSTR(ADM_DIV,1,${sub}) subAd,count(RS_CODE) rsCount FROM ATT_RS_BASE t where 1=1
  628. <if test="objType =='1'.toString()">
  629. AND t.ENG_SCAL in(4,5)
  630. </if>
  631. <if test="objType =='36'.toString()">
  632. AND t.ENG_SCAL in(1,2,3)
  633. </if>
  634. GROUP BY SUBSTR(ADM_DIV,1,${sub})) t1
  635. ON CONCAT(t1.subAd,'${con}') = AD.AD_CODE
  636. WHERE AD.AD_GRAD = #{adGrad}
  637. <if test="adCode != null and adCode != ''">and AD.AD_CODE LIKE '${adCode}%'</if>
  638. ORDER BY AD.AD_CODE
  639. </select>
  640. <select id="getRsListByNodeIdsAndAdCodes" resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
  641. select DISTINCT t.*
  642. from ATT_RS_BASE t
  643. left join BIS_INSP_ALL_OBJ o
  644. on o.code = t.rs_code
  645. where o.ptype = #{pType}
  646. AND
  647. o.id in (${inIdsSql})
  648. <if test="nodes != null and nodes != ''">
  649. AND
  650. <foreach collection="nodes" index="index" item="item" separator="or">
  651. o.id like CONCAT(#{item},'%')
  652. </foreach>
  653. </if>
  654. <if test="ads != null and ads != ''">
  655. AND
  656. <foreach collection="ads" index="index" item="item1" separator="or">
  657. t.adm_div like #{item1}
  658. </foreach>
  659. </if>
  660. <if test="pType =='1'.toString()">
  661. AND t.ENG_SCAL in(4,5)
  662. </if>
  663. <if test="pType =='36'.toString()">
  664. AND t.ENG_SCAL in(1,2,3)
  665. </if>
  666. order by t.rs_code asc
  667. </select>
  668. <update id="updateRegCodeByCode" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr">
  669. update ATT_RS_BASE
  670. set REG_CODE = #{regCode} ,UPTM = #{uptm}
  671. where RS_CODE = #{rsCode}
  672. </update>
  673. </mapper>