BisInspWtdstTrackDao.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  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.BisInspWtdstTrackDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWtdstTrack" id="bisInspWtdstTrackResultMap">
  5. <result property="centerX" column="CENTER_X" />
  6. <result property="centerY" column="CENTER_Y" />
  7. <result property="gdX" column="GD_X" />
  8. <result property="gdY" column="GD_Y" />
  9. <result property="prjType" column="PRJ_TYPE" />
  10. <result property="wtdstLev" column="WTDST_LEV" />
  11. <result property="prjamntTcfBch" column="PRJAMNT_TCF_BCH" />
  12. <result property="prjamntTcfNo" column="PRJAMNT_TCF_NO" />
  13. <result property="prjamntTcfSum" column="PRJAMNT_TCF_SUM" />
  14. <result property="prjamntMony" column="PRJAMNT_MONY" />
  15. <result property="prjamntSum" column="PRJAMNT_SUM" />
  16. <result property="prjState" column="PRJ_STATE" />
  17. <result property="fdPlan" column="FD_PLAN" />
  18. <result property="year" column="YEAR" />
  19. <result property="orgId" column="ORG_ID"/>
  20. <result property="cost" column="COST"/>
  21. <result property="planRcvr" column="PLAN_RCVR"/>
  22. <result property="chkWay" column="CHK_WAY"/>
  23. <result property="trackId" column="TRACK_ID"/>
  24. <result property="objId" column="OBJ_ID"/>
  25. <result property="objNm" column="OBJ_NM"/>
  26. <result property="mangNm" column="MANG_NM"/>
  27. <result property="loac" column="LOAC"/>
  28. <result property="disContent" column="DIS_CONTENT"/>
  29. <result property="wkstate" column="WKSTATE"/>
  30. <result property="planTm" column="PLAN_TM"/>
  31. <result property="promNum" column="PROM_NUM"/>
  32. <result property="adNm" column="AD_NM"/>
  33. <result property="groupLeaderId" column="GROUP_LEADER_ID"/>
  34. <result property="groupLeader" column="GROUP_LEADER"/>
  35. <result property="groupLeaderTel" column="GROUP_LEADER_TEL"/>
  36. <result property="recPersId" column="REC_PERS_ID"/>
  37. <result property="recPers" column="REC_PERS"/>
  38. <result property="recPersTel" column="REC_PERS_TEL"/>
  39. <result property="indp" column="INDP"/>
  40. <result property="intm" column="INTM"/>
  41. <result property="uptm" column="UPTM"/>
  42. <result property="note" column="NOTE"/>
  43. <result property="attachid" column="ATTACHID"/>
  44. <result property="dataStat" column="DATA_STAT"/>
  45. <result property="state" column="STATE"/>
  46. <result property="secStat" column="sec_Stat"/>
  47. <result property="adCode" column="AD_CODE"/>
  48. <result property="chkTime" column="CHK_TIME"/>
  49. </resultMap>
  50. <sql id="table_columns">
  51. CHK_TIME,
  52. CENTER_X,
  53. CENTER_Y,
  54. GD_X,
  55. GD_Y,
  56. TRACK_ID,
  57. OBJ_ID,
  58. OBJ_NM,
  59. MANG_NM,
  60. LOAC,
  61. DIS_CONTENT,
  62. WKSTATE,
  63. PLAN_TM,
  64. PROM_NUM,
  65. AD_NM,
  66. GROUP_LEADER_ID,
  67. GROUP_LEADER,
  68. GROUP_LEADER_TEL,
  69. REC_PERS_ID,
  70. REC_PERS,
  71. REC_PERS_TEL,
  72. INDP,
  73. INTM,
  74. UPTM,
  75. NOTE,
  76. ATTACHID,
  77. DATA_STAT,
  78. STATE,
  79. SEC_STAT,
  80. PRJ_TYPE,
  81. WTDST_LEV,
  82. PRJAMNT_TCF_BCH,
  83. PRJAMNT_TCF_NO,
  84. PRJAMNT_TCF_SUM,
  85. PRJAMNT_MONY,
  86. PRJAMNT_SUM,
  87. AD_CODE,
  88. PRJ_STATE,
  89. FD_PLAN,
  90. YEAR,
  91. ORG_ID,
  92. COST,
  93. PLAN_RCVR,
  94. CHK_WAY
  95. </sql>
  96. <sql id="entity_properties">
  97. #{chkTime},
  98. #{centerX},
  99. #{centerY},
  100. #{gdX},
  101. #{gdY},
  102. #{trackId},
  103. #{objId},
  104. #{objNm},
  105. #{mangNm},
  106. #{loac},
  107. #{disContent},
  108. #{wkstate},
  109. #{planTm},
  110. #{promNum},
  111. #{adNm},
  112. #{groupLeaderId},
  113. #{groupLeader},
  114. #{groupLeaderTel},
  115. #{recPersId},
  116. #{recPers},
  117. #{recPersTel},
  118. #{indp},
  119. #{intm},
  120. #{uptm},
  121. #{note},
  122. #{attachid},
  123. #{dataStat},
  124. #{state},
  125. #{secStat},
  126. #{prjType},
  127. #{wtdstLev},
  128. #{prjamntTcfBch},
  129. #{prjamntTcfNo},
  130. #{prjamntTcfSum},
  131. #{prjamntMony},
  132. #{prjamntSum},
  133. #{adCode},
  134. #{prjState},
  135. #{fdPlan},
  136. #{year},
  137. #{orgId},
  138. #{cost},
  139. #{planRcvr},
  140. #{chkWay}
  141. </sql>
  142. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  143. <sql id="page_where">
  144. <trim prefix="where" prefixOverrides="and | or ">
  145. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  146. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  147. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  148. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  149. <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
  150. <if test="cost != null and cost != ''">and COST = #{cost}</if>
  151. <if test="planRcvr != null and planRcvr != ''">and PLAN_RCVR = #{planRcvr}</if>
  152. <if test="chkWay != null and chkWay != ''">and CHK_WAY = #{chkWay}</if>
  153. <if test="trackId != null and trackId != ''">and TRACK_ID = #{trackId}</if>
  154. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  155. <if test="objNm != null and objNm != ''">and OBJ_NM = #{objNm}</if>
  156. <if test="mangNm != null and mangNm != ''">and MANG_NM = #{mangNm}</if>
  157. <if test="loac != null and loac != ''">and LOAC = #{loac}</if>
  158. <if test="disContent != null and disContent != ''">and DIS_CONTENT = #{disContent}</if>
  159. <if test="wkstate != null and wkstate != ''">and WKSTATE = #{wkstate}</if>
  160. <if test="planTm != null and planTm != ''">and PLAN_TM = #{planTm}</if>
  161. <if test="promNum != null and promNum != ''">and PROM_NUM = #{promNum}</if>
  162. <if test="adNm != null and adNm != ''">and AD_NM = #{adNm}</if>
  163. <if test="groupLeaderId != null and groupLeaderId != ''">and GROUP_LEADER_ID = #{groupLeaderId}</if>
  164. <if test="groupLeader != null and groupLeader != ''">and GROUP_LEADER = #{groupLeader}</if>
  165. <if test="groupLeaderTel != null and groupLeaderTel != ''">and GROUP_LEADER_TEL = #{groupLeaderTel}</if>
  166. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  167. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  168. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  169. <if test="indp != null and indp != ''">and INDP = #{indp}</if>
  170. <if test="intm != null and intm != ''">and INTM = #{intm}</if>
  171. <if test="uptm != null and uptm != ''">and UPTM = #{uptm}</if>
  172. <if test="note != null and note != ''">and NOTE = #{note}</if>
  173. <if test="attachid != null and attachid != ''">and ATTACHID = #{attachid}</if>
  174. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  175. <if test="state != null and state != ''">and STATE = #{state}</if>
  176. <if test="secStat != null and secStat != ''">and sec_Stat = #{secStat}</if>
  177. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  178. </trim>
  179. </sql>
  180. <sql id="choseSql">
  181. <choose>
  182. <when test="province !=null and province !=''">
  183. and A.AD_CODE=#{province}
  184. </when>
  185. <otherwise>
  186. and A.AD_CODE is null
  187. </otherwise>
  188. </choose>
  189. </sql>
  190. <sql id="orgIdSql">
  191. <choose>
  192. <when test="orgId !=null and orgId !=''">
  193. and ORG_ID=#{orgId}
  194. </when>
  195. <otherwise>
  196. and ORG_ID is null
  197. </otherwise>
  198. </choose>
  199. </sql>
  200. <select id="findPageByType" resultType="cn.com.goldenwater.dcproj.dto.BisInspWtdstBaseDto" parameterType="cn.com.goldenwater.dcproj.param.TypeParam">
  201. select * from (SELECT A.code,A.id,C.SEC_STAT,(case when B.Wtdst_Nm is null then A.Nm else B.Wtdst_Nm end ) as nm,A.Ptype,A.Lgtd,A.Lttd,A.Obj_Id,A.Lgtdpc,A.Lttdpc,B.WTDST_ID,B.WTDST_TYPE,B.WTDST_NM,B.LOC_NM,B.WTDST_LGTD,B.WTDST_LTTD,C.TRACK_ID,C.TRACK_ID AS RGSTR_ID,
  202. CASE WHEN C.STATE IS NULL THEN '0' ELSE C.STATE END AS wtdstState,C.INTM
  203. FROM BIS_INSP_ALL_OBJ A
  204. LEFT JOIN BIS_INSP_WTDST B ON A.CODE = B.WTDST_ID
  205. LEFT JOIN BIS_INSP_ALL ia on A.id=ia.id
  206. LEFT JOIN BIS_INSP_WTDST_TRACK C
  207. ON A.OBJ_ID = C.OBJ_ID
  208. where 1=1
  209. <if test="tabType =='2'.toString()">
  210. and ia.entm &lt; DATE_ADD(STR_TO_DATE(#{nowTime},'%Y-%m-%d'),INTERVAL 1 DAY)
  211. </if>
  212. <if test="tabType =='1'.toString()">
  213. and ia.entm &gt;=STR_TO_DATE(#{nowTime},'%Y-%m-%d')
  214. </if>
  215. <include refid="choseSql"/>
  216. and
  217. REGEXP_LIKE(
  218. A.Id,concat('^(',
  219. ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{presId} <include refid="orgIdSql"/> )>0 then
  220. (SELECT group_concat(id separator '|') as
  221. id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{presId} <include refid="orgIdSql"/> GROUP BY PERSID)
  222. else (select 'non' from dual) end)
  223. ,')'))
  224. ) a where ptype=#{pType}
  225. <if test="plnaId !=null and plnaId !=''">
  226. and a.id like '${plnaId}%'
  227. </if>
  228. <if test="state !=null and state !=''">
  229. and wtdstState =#{state}
  230. </if>
  231. <if test="rsName !=null and rsName !=''">
  232. and a.nm like '%${rsName}%'
  233. </if>
  234. order by wtdstState asc
  235. <if test="orderBy != null and orderBy != ''">
  236. ,CONVERT( nm USING gbk ) COLLATE gbk_chinese_ci ASC
  237. </if>
  238. </select>
  239. <select id="get" resultMap="bisInspWtdstTrackResultMap" parameterType="String" >
  240. select <include refid="table_columns" /> from BIS_INSP_WTDST_TRACK where TRACK_ID = #{id}
  241. </select>
  242. <select id="getBy" resultMap="bisInspWtdstTrackResultMap">
  243. select <include refid="table_columns" /> from BIS_INSP_WTDST_TRACK <include refid="page_where" />
  244. </select>
  245. <select id="findAll" resultMap="bisInspWtdstTrackResultMap">
  246. select <include refid="table_columns" /> from BIS_INSP_WTDST_TRACK
  247. </select>
  248. <select id="findList" resultMap="bisInspWtdstTrackResultMap">
  249. select <include refid="table_columns" /> from BIS_INSP_WTDST_TRACK <include refid="page_where" /> ORDER BY UPTM DESC
  250. </select>
  251. <select id="selectCount" resultType="int" >
  252. select count(TRACK_ID) from BIS_INSP_WTDST_TRACK <include refid="page_where" />
  253. </select>
  254. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtdstTrack">
  255. insert into BIS_INSP_WTDST_TRACK( <include refid="table_columns" /> )
  256. values ( <include refid="entity_properties" /> )
  257. </insert>
  258. <delete id="delete" parameterType="java.lang.String">
  259. delete from BIS_INSP_WTDST_TRACK where TRACK_ID = #{id}
  260. </delete>
  261. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtdstTrack">
  262. delete from BIS_INSP_WTDST_TRACK <include refid="page_where" />
  263. </delete>
  264. <update id="deleteInFlag" parameterType="java.lang.String">
  265. update BIS_INSP_WTDST_TRACK set flag_valid = 0 where TRACK_ID = #{id}
  266. </update>
  267. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtdstTrack">
  268. update BIS_INSP_WTDST_TRACK
  269. <trim prefix="set" suffixOverrides=",">
  270. <if test="chkTime != null">CHK_TIME = #{chkTime},</if>
  271. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  272. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  273. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  274. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  275. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  276. <if test="objNm != null and objNm != ''">OBJ_NM = #{objNm},</if>
  277. <if test="mangNm != null and mangNm != ''">MANG_NM = #{mangNm},</if>
  278. <if test="loac != null and loac != ''">LOAC = #{loac},</if>
  279. <if test="disContent != null and disContent != ''">DIS_CONTENT = #{disContent},</if>
  280. <if test="wkstate != null and wkstate != ''">WKSTATE = #{wkstate},</if>
  281. <if test="planTm != null">PLAN_TM = #{planTm},</if>
  282. <if test="promNum != null and promNum != ''">PROM_NUM = #{promNum},</if>
  283. <if test="adNm != null and adNm != ''">AD_NM = #{adNm},</if>
  284. <if test="groupLeaderId != null and groupLeaderId != ''">GROUP_LEADER_ID = #{groupLeaderId},</if>
  285. <if test="groupLeader != null and groupLeader != ''">GROUP_LEADER = #{groupLeader},</if>
  286. <if test="groupLeaderTel != null and groupLeaderTel != ''">GROUP_LEADER_TEL = #{groupLeaderTel},</if>
  287. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  288. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  289. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  290. <if test="indp != null and indp != ''">INDP = #{indp},</if>
  291. <if test="intm != null">INTM = #{intm},</if>
  292. <if test="uptm != null">UPTM = #{uptm},</if>
  293. <if test="note != null and note != ''">NOTE = #{note},</if>
  294. <if test="attachid != null and attachid != ''">ATTACHID = #{attachid},</if>
  295. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  296. <if test="state != null and state != ''">STATE = #{state},</if>
  297. <if test="secStat != null and secStat != ''">SEC_STAT = #{secStat},</if>
  298. <if test="prjType != null and prjType != ''">PRJ_TYPE = #{prjType},</if>
  299. <if test="wtdstLev != null and wtdstLev != ''">WTDST_LEV = #{wtdstLev},</if>
  300. <if test="prjamntTcfBch != null and prjamntTcfBch != ''">PRJAMNT_TCF_BCH = #{prjamntTcfBch},</if>
  301. <if test="prjamntTcfNo != null and prjamntTcfNo != ''">PRJAMNT_TCF_NO = #{prjamntTcfNo},</if>
  302. <if test="prjamntTcfSum != null and prjamntTcfSum != ''">PRJAMNT_TCF_SUM = #{prjamntTcfSum},</if>
  303. <if test="prjamntMony != null and prjamntMony != ''">PRJAMNT_MONY = #{prjamntMony},</if>
  304. <if test="prjamntSum != null and prjamntSum != ''">PRJAMNT_SUM = #{prjamntSum},</if>
  305. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  306. <if test="prjState != null and prjState != ''">PRJ_STATE = #{prjState},</if>
  307. <if test="fdPlan != null and fdPlan != ''">FD_PLAN = #{fdPlan},</if>
  308. <if test="year != null and year != ''">YEAR = #{year},</if>
  309. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  310. <if test="cost != null and cost != ''">COST = #{cost},</if>
  311. <if test="planRcvr != null and planRcvr != ''">PLAN_RCVR = #{planRcvr},</if>
  312. <if test="chkWay != null and chkWay != ''">CHK_WAY = #{chkWay},</if>
  313. </trim>
  314. <where>TRACK_ID = #{trackId}</where>
  315. </update>
  316. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtdstTrack">
  317. update BIS_INSP_WTDST_TRACK
  318. <trim prefix="set" suffixOverrides=",">
  319. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  320. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  321. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  322. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  323. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  324. <if test="objNm != null and objNm != ''">OBJ_NM = #{objNm},</if>
  325. <if test="mangNm != null and mangNm != ''">MANG_NM = #{mangNm},</if>
  326. <if test="loac != null and loac != ''">LOAC = #{loac},</if>
  327. <if test="disContent != null and disContent != ''">DIS_CONTENT = #{disContent},</if>
  328. <if test="wkstate != null and wkstate != ''">WKSTATE = #{wkstate},</if>
  329. <if test="planTm != null">PLAN_TM = #{planTm},</if>
  330. <if test="promNum != null and promNum != ''">PROM_NUM = #{promNum},</if>
  331. <if test="adNm != null and adNm != ''">AD_NM = #{adNm},</if>
  332. <if test="groupLeaderId != null and groupLeaderId != ''">GROUP_LEADER_ID = #{groupLeaderId},</if>
  333. <if test="groupLeader != null and groupLeader != ''">GROUP_LEADER = #{groupLeader},</if>
  334. <if test="groupLeaderTel != null and groupLeaderTel != ''">GROUP_LEADER_TEL = #{groupLeaderTel},</if>
  335. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  336. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  337. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  338. <if test="indp != null and indp != ''">INDP = #{indp},</if>
  339. <if test="intm != null">INTM = #{intm},</if>
  340. <if test="uptm != null">UPTM = #{uptm},</if>
  341. <if test="note != null and note != ''">NOTE = #{note},</if>
  342. <if test="attachid != null and attachid != ''">ATTACHID = #{attachid},</if>
  343. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  344. <if test="state != null and state != ''">STATE = #{state},</if>
  345. <if test="secStat != null and secStat != ''">SEC_STAT = #{secStat},</if>
  346. <if test="prjType != null and prjType != ''">PRJ_TYPE = #{prjType},</if>
  347. <if test="wtdstLev != null and wtdstLev != ''">WTDST_LEV = #{wtdstLev},</if>
  348. <if test="prjamntTcfBch != null and prjamntTcfBch != ''">PRJAMNT_TCF_BCH = #{prjamntTcfBch},</if>
  349. <if test="prjamntTcfNo != null and prjamntTcfNo != ''">PRJAMNT_TCF_NO = #{prjamntTcfNo},</if>
  350. <if test="prjamntTcfSum != null and prjamntTcfSum != ''">PRJAMNT_TCF_SUM = #{prjamntTcfSum},</if>
  351. <if test="prjamntMony != null and prjamntMony != ''">PRJAMNT_MONY = #{prjamntMony},</if>
  352. <if test="prjamntSum != null and prjamntSum != ''">PRJAMNT_SUM = #{prjamntSum},</if>
  353. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  354. <if test="prjState != null and prjState != ''">PRJ_STATE = #{prjState},</if>
  355. <if test="fdPlan != null and fdPlan != ''">FD_PLAN = #{fdPlan},</if>
  356. <if test="year != null and year != ''">YEAR = #{year},</if>
  357. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  358. <if test="cost != null and cost != ''">COST = #{cost},</if>
  359. <if test="planRcvr != null and planRcvr != ''">PLAN_RCVR = #{planRcvr},</if>
  360. <if test="chkWay != null and chkWay != ''">CHK_WAY = #{chkWay},</if>
  361. </trim>
  362. <include refid="page_where" />
  363. </update>
  364. <!-- 其他自定义SQL -->
  365. <select id="queryListByPersId" resultMap="bisInspWtdstTrackResultMap" parameterType="string">
  366. SELECT
  367. D.TRACK_ID ,
  368. D.OBJ_ID ,
  369. D.OBJ_NM ,
  370. D.MANG_NM ,
  371. D.LOAC ,
  372. D.DIS_CONTENT ,
  373. D.WKSTATE ,
  374. D.PLAN_TM ,
  375. D.PROM_NUM ,
  376. D.AD_NM ,
  377. D.GROUP_LEADER_ID ,
  378. D.GROUP_LEADER ,
  379. D.GROUP_LEADER_TEL ,
  380. D.REC_PERS_ID ,
  381. D.REC_PERS ,
  382. D.REC_PERS_TEL ,
  383. D.INDP ,
  384. D.INTM,
  385. D.UPTM,
  386. D.NOTE ,
  387. D.ATTACHID ,
  388. D.DATA_STAT ,
  389. D.STATE,D.sec_Stat
  390. FROM REL_PERS_INSPGROUP B
  391. LEFT JOIN BIS_INSP_OBJ C ON B.INSP_GROUP_ID=C.INSP_GROUP_ID
  392. RIGHT JOIN BIS_INSP_WTDST_TRACK D ON C.OBJ_ID=D.OBJ_ID
  393. WHERE B.PERS_ID=#{id}
  394. <if test="orgId != null and orgId != ''">and D.ORG_ID = #{orgId},</if>
  395. </select>
  396. </mapper>