工作组查询优化

This commit is contained in:
yuezhihang
2021-11-11 14:13:11 +08:00
parent 333143549f
commit b714156172
30 changed files with 361 additions and 74 deletions
@@ -10,4 +10,13 @@
where wg_dept.wg_id =#{data}
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
,ts_user.INSTITUTION_NAME as deptName
from wg_dept
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
left join wg_work_group on wg_work_group.id = wg_dept.wg_id
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -20,4 +20,10 @@
select * from wg_meeting_info where wg_meeting_info.wg_id = #{data}
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo">
select * from wg_meeting_info
left join wg_work_group on wg_work_group.id = wg_meeting_info.wg_id
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -9,4 +9,13 @@
left join ts_user on ts_user.ACCOUNT = wg_meeting_user_relation.user_id
where wg_meeting_user_relation.meeting_id = #{meetId}
</select>
<select id="getMeetingAllPeoples"
resultType="com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow">
select wg_meeting_user_relation.*,ts_user.UNAME as name from wg_meeting_user_relation
left join ts_user on ts_user.ACCOUNT = wg_meeting_user_relation.user_id
left join wg_meeting_info on wg_meeting_info.id = wg_meeting_user_relation.meeting_id
left join wg_work_group on wg_work_group.id = wg_meeting_info.wg_id
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -10,4 +10,13 @@
where wg_net_info.wg_id =#{data}
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
select wg_net_info.net_id,ts_user.UNAME as name ,ts_user.PHONE as phone, ts_user.EMAIL as email
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
from wg_net_info
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
left join wg_work_group on wg_work_group.id = wg_net_info.wg_id
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -7,4 +7,10 @@
select * from wg_pay_info where wg_pay_info.wg_id = #{data}
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgPayInfo.entity.WgPayInfo">
select * from wg_pay_info
left join wg_work_group on wg_work_group.id=wg_pay_info.wg_id
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -6,4 +6,10 @@
<select id="researchDatas" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
select * from wg_standorpolicy_info where wg_standorpolicy_info.wg_id = #{data}
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
select * from wg_standorpolicy_info
left join wg_work_group on wg_work_group.id = wg_standorpolicy_info.wg_id
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -14,14 +14,14 @@
<result property="standerArea" column="stander_area"/>
<result property="mark" column="mark"/>
<result property="level" column="level"/>
<association property="wgPayInfos" javaType="java.util.List" column="id"
select="com.adc.da.slrs.wgPayInfo.dao.WgPayInfoDao.researchDatas"/>
<association property="wgStandorpolicyInfos" javaType="java.util.List" column="id"
select="com.adc.da.slrs.wgStandorpolicyInfo.dao.WgStandorpolicyInfoDao.researchDatas"/>
<association property="wgDepts" javaType="java.util.List" column="id"
select="com.adc.da.slrs.wgDept.dao.WgDeptDao.researchDatas"/>
<association property="wgNetInfos" javaType="java.util.List" column="id"
select="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao.researchDatas"/>
<!--<association property="wgPayInfos" javaType="java.util.List" column="id"-->
<!--select="com.adc.da.slrs.wgPayInfo.dao.WgPayInfoDao.researchDatas"/>-->
<!--<association property="wgStandorpolicyInfos" javaType="java.util.List" column="id"-->
<!--select="com.adc.da.slrs.wgStandorpolicyInfo.dao.WgStandorpolicyInfoDao.researchDatas"/>-->
<!--<association property="wgDepts" javaType="java.util.List" column="id"-->
<!--select="com.adc.da.slrs.wgDept.dao.WgDeptDao.researchDatas"/>-->
<!--<association property="wgNetInfos" javaType="java.util.List" column="id"-->
<!--select="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao.researchDatas"/>-->
<association property="wgMeetingInfos" javaType="java.util.List" column="id"
select="com.adc.da.slrs.wgMeetingInfo.dao.WgMeetingInfoDao.researchDatas"/>
<association property="children" javaType="java.util.List" column="id"
@@ -45,5 +45,9 @@
select * from wg_work_group where wg_work_group.pid = #{data} and wg_work_group.status = #{status}
</select>
<select id="researchAllData" resultType="com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO">
select * from wg_work_group where wg_work_group.type =#{type}
</select>
</mapper>