AttWagaRgstrDao.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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.AttWagaRgstrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWagaRgstr" id="attWagaRgstrResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="objId" column="OBJ_ID"/>
  7. <result property="objCode" column="OBJ_CODE"/>
  8. <result property="gateName" column="GATE_NAME"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="gateType" column="GATE_TYPE"/>
  11. <result property="gateFlow" column="GATE_FLOW"/>
  12. <result property="engScal" column="ENG_SCAL"/>
  13. <result property="engSta" column="ENG_STA"/>
  14. <result property="buidTimeYear" column="BUID_TIME_YEAR"/>
  15. <result property="buidTimeMon" column="BUID_TIME_MON"/>
  16. <result property="staTimeYear" column="STA_TIME_YEAR"/>
  17. <result property="staTimeMon" column="STA_TIME_MON"/>
  18. <result property="location" column="LOCATION"/>
  19. <result property="locationXiang" column="LOCATION_XIANG"/>
  20. <result property="gateAdmName" column="GATE_ADM_NAME"/>
  21. <result property="gateAdmOrg" column="GATE_ADM_ORG"/>
  22. <result property="centerX" column="CENTER_X"/>
  23. <result property="centerY" column="CENTER_Y"/>
  24. <result property="gdX" column="GD_X"/>
  25. <result property="gdY" column="GD_Y"/>
  26. <result property="note" column="NOTE"/>
  27. <result property="state" column="STATE"/>
  28. <result property="dataStat" column="DATA_STAT"/>
  29. <result property="mrsCiStat" column="MRS_CI_STAT"/>
  30. <result property="safeStat" column="SAFE_STAT"/>
  31. <result property="dmamStat" column="DMAM_STAT"/>
  32. <result property="proenStat" column="PROEN_STAT"/>
  33. <result property="persId" column="PERS_ID"/>
  34. <result property="groupId" column="GROUP_ID"/>
  35. <result property="intm" column="INTM"/>
  36. <result property="uptm" column="UPTM"/>
  37. <result property="baseStat" column="BASE_STAT"/>
  38. <result property="orgId" column="ORG_ID"/>
  39. <result property="province" column="PROVINCE"/>
  40. </resultMap>
  41. <sql id="table_columns">
  42. ID,PROVINCE,
  43. OBJ_ID,
  44. OBJ_CODE,
  45. GATE_NAME,
  46. AD_CODE,
  47. GATE_TYPE,
  48. GATE_FLOW,
  49. ENG_SCAL,
  50. ENG_STA,
  51. BUID_TIME_YEAR,
  52. BUID_TIME_MON,
  53. STA_TIME_YEAR,
  54. STA_TIME_MON,
  55. LOCATION,
  56. GATE_ADM_NAME,
  57. GATE_ADM_ORG,
  58. CENTER_X,
  59. CENTER_Y,
  60. GD_X,
  61. GD_Y,
  62. NOTE,
  63. STATE,
  64. DATA_STAT,
  65. MRS_CI_STAT,
  66. SAFE_STAT,
  67. DMAM_STAT,
  68. PROEN_STAT,
  69. PERS_ID,
  70. GROUP_ID,
  71. INTM,
  72. UPTM,LOCATION_XIANG,BASE_STAT,ORG_ID
  73. </sql>
  74. <sql id="entity_properties">
  75. #{id},#{province},
  76. #{objId},
  77. #{objCode},
  78. #{gateName},
  79. #{adCode},
  80. #{gateType},
  81. #{gateFlow},
  82. #{engScal},
  83. #{engSta},
  84. #{buidTimeYear},
  85. #{buidTimeMon},
  86. #{staTimeYear},
  87. #{staTimeMon},
  88. #{location},
  89. #{gateAdmName},
  90. #{gateAdmOrg},
  91. #{centerX},
  92. #{centerY},
  93. #{gdX},
  94. #{gdY},
  95. #{note},
  96. #{state},
  97. #{dataStat},
  98. #{mrsCiStat},
  99. #{safeStat},
  100. #{dmamStat},
  101. #{proenStat},
  102. #{persId},
  103. #{groupId},
  104. #{intm},
  105. #{uptm},#{locationXiang},#{baseStat},#{orgId}
  106. </sql>
  107. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  108. <sql id="page_where">
  109. <trim prefix="where" prefixOverrides="and | or ">
  110. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  111. <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
  112. <if test="province != null and province != ''">and PROVINCE = #{province}</if>
  113. <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
  114. <if test="gateName != null and gateName != ''">and GATE_NAME = #{gateName}</if>
  115. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  116. <if test="gateType != null and gateType != ''">and GATE_TYPE = #{gateType}</if>
  117. <if test="gateFlow != null and gateFlow != ''">and GATE_FLOW = #{gateFlow}</if>
  118. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  119. <if test="engSta != null and engSta != ''">and ENG_STA = #{engSta}</if>
  120. <if test="buidTimeYear != null and buidTimeYear != ''">and BUID_TIME_YEAR = #{buidTimeYear}</if>
  121. <if test="buidTimeMon != null and buidTimeMon != ''">and BUID_TIME_MON = #{buidTimeMon}</if>
  122. <if test="staTimeYear != null and staTimeYear != ''">and STA_TIME_YEAR = #{staTimeYear}</if>
  123. <if test="staTimeMon != null and staTimeMon != ''">and STA_TIME_MON = #{staTimeMon}</if>
  124. <if test="location != null and location != ''">and LOCATION = #{location}</if>
  125. <if test="gateAdmName != null and gateAdmName != ''">and GATE_ADM_NAME = #{gateAdmName}</if>
  126. <if test="gateAdmOrg != null and gateAdmOrg != ''">and GATE_ADM_ORG = #{gateAdmOrg}</if>
  127. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  128. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  129. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  130. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  131. <if test="note != null and note != ''">and NOTE = #{note}</if>
  132. <if test="state != null and state != ''">and STATE = #{state}</if>
  133. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  134. <if test="mrsCiStat != null and mrsCiStat != ''">and MRS_CI_STAT = #{mrsCiStat}</if>
  135. <if test="safeStat != null and safeStat != ''">and SAFE_STAT = #{safeStat}</if>
  136. <if test="dmamStat != null and dmamStat != ''">and DMAM_STAT = #{dmamStat}</if>
  137. <if test="proenStat != null and proenStat != ''">and PROEN_STAT = #{proenStat}</if>
  138. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  139. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  140. <if test="intm != null">and INTM = #{intm}</if>
  141. <if test="uptm != null">and UPTM = #{uptm}</if>
  142. <if test="locationXiang != null">and location_Xiang = #{locationXiang}</if>
  143. <if test="baseStat != null and baseStat != ''">and BASE_STAT = #{baseStat}</if>
  144. </trim>
  145. </sql>
  146. <!--pc端数据列表-->
  147. <select id="findPcWagaPage" resultType="cn.com.goldenwater.dcproj.model.BisInspWagaRgstrDto"
  148. parameterType="cn.com.goldenwater.dcproj.param.TypeParam">
  149. select * from (SELECT A.id,A.code,A.nm,A.obj_id,A.pType,CASE WHEN B.STATE IS NULL THEN '0' ELSE B.STATE END AS
  150. wtdstState,(case when
  151. b.eng_scal is null then cast(e.eng_scal as char) else b.eng_scal end) as eng_scal,
  152. b.state,b.location_Xiang,BB.BUILD_STAT,
  153. b.safe_stat,b.dmam_stat,b.ad_code,b.proen_stat,b.mrs_ci_stat,b.base_stat,b.location,b.intm,b.buid_time_year,b.buid_time_mon,b.data_stat,
  154. b.gate_type,b.id as rgstr_Id,b.gate_adm_org,ad.Ad_Full_Name,ia.pnm groupName,(case when b.group_id is null then
  155. ia.id else b.group_id end) group_id,ria.pnm riverName,
  156. (case when b.gate_name is null then cast(e.gate_name as char) else b.gate_name end) as
  157. gate_name,b.sta_time_year,b.sta_time_mon,
  158. (case when b.gate_adm_name is null then e.gate_adm_name else b.gate_adm_name end)
  159. gate_adm_name,b.center_x,b.center_y
  160. FROM BIS_INSP_ALL_OBJ A
  161. left join ATT_WAGA_RGSTR B
  162. ON A.Obj_Id = B.OBJ_ID
  163. left join Att_Waga_Base e
  164. on A.code=e.obj_code
  165. left join ATT_AD_X_BASE ad on B.ad_code = ad.ad_code
  166. LEFT JOIN BIS_INSP_ALL ia on A.ID = ia.id
  167. LEFT JOIN BIS_INSP_WAGA_BASE BB on BB.RGSTR_ID = B.id
  168. left join BIS_INSP_ALL ria on substr(A.ID,1,6) = ria.id
  169. where 1=1
  170. <if test="tabType =='2'.toString()">
  171. and ia.entm &lt;DATE_ADD(STR_TO_DATE(#{nowTime},'%Y-%m-%d') ,INTERVAL 1 DAY)
  172. </if>
  173. <if test="tabType =='1'.toString()">
  174. and ia.entm &gt;=STR_TO_DATE(#{nowTime},'%Y-%m-%d')
  175. </if>
  176. <include refid="choseSql"/>
  177. <if test="adCodes ==null or adCodes ==''">
  178. and
  179. A.Id in (
  180. select distinct id from (
  181. SELECT P.id FROM BIS_INSP_ALL P
  182. WHERE FIND_IN_SET(P.id, getSubNodes_bis_insp_all( (SELECT group_concat(A.id) FROM BIS_INSP_ALL_RLATION A
  183. WHERE A.PERSID = #{presId} and length(A.id) in (3,6,9) group by A.PERSID ),0,0) ) &gt; 0
  184. union all
  185. SELECT P.id FROM BIS_INSP_ALL P where p.id in (SELECT id FROM BIS_INSP_ALL_RLATION A
  186. WHERE A.PERSID =#{presId} and length(id)=12 )
  187. ) w
  188. )
  189. </if>
  190. ) a where a.PTYPE='6'
  191. <if test="year != null and year != ''">
  192. and DATE_FORMAT(a.obj_intm,'%Y') = #{year}
  193. </if>
  194. <if test="id !=null and id !=''">
  195. and id like '${id}%'
  196. </if>
  197. <if test="state !=null and state !=''">
  198. AND wtdstState in (${state})
  199. </if>
  200. <if test="code !=null and code !=''">
  201. and code like '${code}%'
  202. </if>
  203. <if test="sttm != null and sttm != ''">
  204. AND intm &gt;= STR_TO_DATE(#{sttm},'%Y-%m-%d')
  205. </if>
  206. <if test="findTime != null and findTime != ''">and intm= STR_TO_DATE(#{findTime},'%Y-%m-%d')</if>
  207. <if test="entm != null and entm != ''">
  208. AND intm &lt; DATE_ADD(STR_TO_DATE(#{entm},'%Y-%m-%d') ,INTERVAL 1 DAY)
  209. </if>
  210. <if test="rsName !=null and rsName !=''">
  211. and gate_name like '%${rsName}%'
  212. </if>
  213. <if test="adName !=null and adName !=''">
  214. and ad_full_name like '%${adName}%'
  215. </if>
  216. <if test="rsvrAdmName !=null and rsvrAdmName !=''">
  217. and gate_adm_name like '%${rsvrAdmName}%'
  218. </if>
  219. <if test="engScal !=null and engScal !=''">
  220. and case when eng_scal is NULL then '4' else eng_scal END =#{engScal}
  221. </if>
  222. <if test="groupId !=null and groupId !=''">
  223. and group_id = #{groupId}
  224. </if>
  225. <if test="adCodes !=null and adCodes !=''">
  226. and
  227. <foreach item="item" index="index" collection="adCodes.split(',')" open="(" separator="or" close=")">
  228. ad_code like concat('${item}','%')
  229. </foreach>
  230. </if>
  231. <choose>
  232. <when test="sortSql !=null and sortSql !=''">
  233. ${sortSql}
  234. </when>
  235. <otherwise>
  236. ORDER BY a.state
  237. </otherwise>
  238. </choose>
  239. </select>
  240. <sql id="choseSql">
  241. <choose>
  242. <when test="province !=null and province !=''">
  243. and A.ad_code=#{province}
  244. </when>
  245. <otherwise>
  246. and A.ad_code is null
  247. </otherwise>
  248. </choose>
  249. </sql>
  250. <!--获取督查任务列表-->
  251. <select id="findWagaPage" parameterType="cn.com.goldenwater.dcproj.param.TypeParam"
  252. resultType="cn.com.goldenwater.dcproj.model.BisInspWagaRgstrDto">
  253. select * from
  254. (select A.code,(case when r.gate_name is null then A.nm else r.gate_name end)
  255. nm,A.id,A.pType,A.LGTD,A.LTTD,A.OBJ_INTM,A.OBJ_ID,A.Is_Set_Obj,
  256. CASE WHEN r.STATE IS NULL THEN '0' ELSE r.STATE END AS wtdstState,
  257. r.location_Xiang,BB.BUILD_STAT,(case when r.location is null
  258. then cast(e.location_cun as char) else r.location end) as location,
  259. (case when r.gate_adm_org is null then e.gate_adm_name else r.gate_adm_org end) as
  260. gate_adm_org,r.ad_code,r.gate_type,r.eng_scal,r.center_x,r.center_y,
  261. r.safe_stat,r.dmam_stat,r.proen_stat,r.mrs_ci_stat,r.base_stat,r.id as rgstrId,r.INTM
  262. FROM BIS_INSP_ALL_OBJ A
  263. LEFT JOIN ATT_WAGA_RGSTR R ON A.OBJ_ID = R.OBJ_ID
  264. LEFT JOIN BIS_INSP_WAGA_BASE BB ON BB.RGSTR_ID = R.ID
  265. LEFT JOIN ATT_WAGA_BASE E ON A.CODE=E.OBJ_CODE
  266. WHERE 1=1
  267. <include refid="choseSql"/>
  268. AND A.ID IN (
  269. select distinct w.id from (
  270. SELECT P.id FROM BIS_INSP_ALL P
  271. WHERE FIND_IN_SET(P.id, getSubNodes_bis_insp_all( (SELECT group_concat(A.id) FROM BIS_INSP_ALL_RLATION A
  272. WHERE A.PERSID = #{presId} and length(A.id) in (3,6,9) group by A.PERSID ),0,0) ) &gt; 0
  273. union all
  274. SELECT P.id FROM BIS_INSP_ALL P where p.id in (SELECT id FROM BIS_INSP_ALL_RLATION A
  275. WHERE A.PERSID =#{presId} and length(id)=12 )
  276. ) w
  277. )
  278. ) a where 1=1
  279. <if test="plnaId !=null and plnaId !=''">
  280. and a.id like '${plnaId}%'
  281. </if>
  282. <if test="rsName !=null and rsName !=''">
  283. and a.nm like '%${rsName}%'
  284. </if>
  285. <if test="state !=null and state !=''">
  286. and wtdstState in (${state})
  287. </if>
  288. <if test="code !=null and code !=''">
  289. and code like '${code}%'
  290. </if>
  291. order by wtdstState asc
  292. <if test="orderBy != null and orderBy != ''">
  293. <!-- ,${orderBy}-->
  294. ,CONVERT( nm USING gbk ) COLLATE gbk_chinese_ci ASC
  295. </if>
  296. </select>
  297. <select id="get" resultMap="attWagaRgstrResultMap" parameterType="String">
  298. select
  299. <include refid="table_columns"/>
  300. from ATT_WAGA_RGSTR where ID = #{id}
  301. </select>
  302. <select id="getBy" resultMap="attWagaRgstrResultMap">
  303. select
  304. <include refid="table_columns"/>
  305. from ATT_WAGA_RGSTR
  306. <include refid="page_where"/>
  307. </select>
  308. <select id="findAll" resultMap="attWagaRgstrResultMap">
  309. select
  310. <include refid="table_columns"/>
  311. from ATT_WAGA_RGSTR
  312. </select>
  313. <select id="findList" resultMap="attWagaRgstrResultMap">
  314. select
  315. <include refid="table_columns"/>
  316. from ATT_WAGA_RGSTR
  317. <include refid="page_where"/>
  318. </select>
  319. <select id="selectCount" resultType="int">
  320. select count(ID) from ATT_WAGA_RGSTR
  321. <include refid="page_where"/>
  322. </select>
  323. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWagaRgstr">
  324. insert into ATT_WAGA_RGSTR(
  325. <include refid="table_columns"/>
  326. )
  327. values (
  328. <include refid="entity_properties"/>
  329. )
  330. </insert>
  331. <delete id="delete" parameterType="java.lang.String">
  332. delete from ATT_WAGA_RGSTR where ID = #{id}
  333. </delete>
  334. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaRgstr">
  335. delete from ATT_WAGA_RGSTR
  336. <include refid="page_where"/>
  337. </delete>
  338. <update id="deleteInFlag" parameterType="java.lang.String">
  339. update ATT_WAGA_RGSTR set flag_valid = 0 where ID = #{id}
  340. </update>
  341. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWagaRgstr">
  342. update ATT_WAGA_RGSTR
  343. <trim prefix="set" suffixOverrides=",">
  344. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  345. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  346. <if test="province != null and province != ''">PROVINCE = #{province},</if>
  347. <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
  348. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  349. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  350. <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
  351. <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
  352. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  353. <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
  354. <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
  355. <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
  356. <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
  357. <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
  358. <if test="location != null and location != ''">LOCATION = #{location},</if>
  359. <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
  360. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  361. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  362. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  363. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  364. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  365. <if test="note != null and note != ''">NOTE = #{note},</if>
  366. <if test="state != null and state != ''">STATE = #{state},</if>
  367. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  368. <if test="mrsCiStat != null and mrsCiStat != ''">MRS_CI_STAT = #{mrsCiStat},</if>
  369. <if test="safeStat != null and safeStat != ''">SAFE_STAT = #{safeStat},</if>
  370. <if test="dmamStat != null and dmamStat != ''">DMAM_STAT = #{dmamStat},</if>
  371. <if test="proenStat != null and proenStat != ''">PROEN_STAT = #{proenStat},</if>
  372. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  373. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  374. <if test="intm != null">INTM = #{intm},</if>
  375. <if test="uptm != null">UPTM = #{uptm},</if>
  376. <if test="locationXiang != null">location_Xiang = #{locationXiang},</if>
  377. <if test="baseStat != null and baseStat != ''">BASE_STAT = #{baseStat},</if>
  378. </trim>
  379. <where>ID = #{id}</where>
  380. </update>
  381. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaRgstr">
  382. update ATT_WAGA_RGSTR
  383. <trim prefix="set" suffixOverrides=",">
  384. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  385. <if test="province != null and province != ''">PROVINCE = #{province},</if>
  386. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  387. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  388. <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
  389. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  390. <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
  391. <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
  392. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  393. <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
  394. <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
  395. <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
  396. <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
  397. <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
  398. <if test="location != null and location != ''">LOCATION = #{location},</if>
  399. <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
  400. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  401. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  402. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  403. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  404. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  405. <if test="note != null and note != ''">NOTE = #{note},</if>
  406. <if test="state != null and state != ''">STATE = #{state},</if>
  407. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  408. <if test="mrsCiStat != null and mrsCiStat != ''">MRS_CI_STAT = #{mrsCiStat},</if>
  409. <if test="safeStat != null and safeStat != ''">SAFE_STAT = #{safeStat},</if>
  410. <if test="dmamStat != null and dmamStat != ''">DMAM_STAT = #{dmamStat},</if>
  411. <if test="proenStat != null and proenStat != ''">PROEN_STAT = #{proenStat},</if>
  412. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  413. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  414. <if test="intm != null">INTM = #{intm},</if>
  415. <if test="uptm != null">UPTM = #{uptm},</if>
  416. <if test="baseStat != null and baseStat != ''">BASE_STAT = #{baseStat},</if>
  417. </trim>
  418. <include refid="page_where"/>
  419. </update>
  420. <!-- 其他自定义SQL -->
  421. <select id="getWagaByGrouNm" resultType="cn.com.goldenwater.dcproj.model.BisInspBase">
  422. SELECT B.ID RGSTR_ID,B.OBJ_ID,B.GATE_NAME nm
  423. FROM BIS_INSP_ALL_OBJ A
  424. JOIN ATT_WAGA_RGSTR B ON A.OBJ_ID=B.OBJ_ID
  425. WHERE A.ID = #{groupId}
  426. AND A.NM LIKE '%${nm}%'
  427. </select>
  428. </mapper>