|
@ -359,6 +359,59 @@ |
|
|
AND t.pid = #{pid} |
|
|
AND t.pid = #{pid} |
|
|
order by t.id |
|
|
order by t.id |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getAllDeptInfoByGridName" resultType="com.elink.esua.epdc.dto.AllDeptDTO"> |
|
|
|
|
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
grid.id AS gridId, |
|
|
|
|
|
grid.`name` AS gridName, |
|
|
|
|
|
grid.id as gridDeptId, |
|
|
|
|
|
comm.id AS communityId, |
|
|
|
|
|
comm.`name` AS communityName, |
|
|
|
|
|
comm.id as communityDeptId, |
|
|
|
|
|
street.id AS streetId, |
|
|
|
|
|
street.`name` AS streetName, |
|
|
|
|
|
street.id as streetDeptId |
|
|
|
|
|
FROM |
|
|
|
|
|
sys_dept grid |
|
|
|
|
|
LEFT JOIN sys_dept comm ON comm.id = grid.pid |
|
|
|
|
|
LEFT JOIN sys_dept street ON street.id = comm.pid |
|
|
|
|
|
WHERE |
|
|
|
|
|
grid.type_key LIKE '%grid_party%' |
|
|
|
|
|
AND grid.name = #{gridName} |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getDeptInfoByName" resultType="com.elink.esua.epdc.dto.AllDeptDTO"> |
|
|
|
|
|
SELECT |
|
|
|
|
|
grid.id AS gridId, |
|
|
|
|
|
grid.`name` AS gridName, |
|
|
|
|
|
comm.id AS communityId, |
|
|
|
|
|
comm.`name` AS communityName, |
|
|
|
|
|
street.id AS streetId, |
|
|
|
|
|
street.`name` AS streetName, |
|
|
|
|
|
street.id AS deptId, |
|
|
|
|
|
street.`name` AS deptName |
|
|
|
|
|
FROM |
|
|
|
|
|
sys_dept grid |
|
|
|
|
|
LEFT JOIN sys_dept comm ON comm.id = grid.pid |
|
|
|
|
|
LEFT JOIN sys_dept street ON street.id = comm.pid |
|
|
|
|
|
WHERE |
|
|
|
|
|
grid.type_key LIKE '%grid_party%' |
|
|
|
|
|
AND grid.name = #{gridName} |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDeptPidByDeptId" resultType="com.elink.esua.epdc.entity.SysDeptEntity"> |
|
|
|
|
|
SELECT |
|
|
|
|
|
p.* |
|
|
|
|
|
FROM |
|
|
|
|
|
sys_dept d |
|
|
|
|
|
LEFT JOIN sys_dept p ON p.id = d.pid |
|
|
|
|
|
WHERE |
|
|
|
|
|
d.id = #{agencyId} |
|
|
|
|
|
AND p.pid != 0 |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="deptInfo" resultType="com.elink.esua.epdc.dto.result.DeptInfoResultDTO"> |
|
|
<select id="deptInfo" resultType="com.elink.esua.epdc.dto.result.DeptInfoResultDTO"> |
|
|
SELECT |
|
|
SELECT |
|
|
d.id, |
|
|
d.id, |
|
@ -374,6 +427,7 @@ |
|
|
sys_dept d |
|
|
sys_dept d |
|
|
LEFT JOIN sys_dept p ON d.pid = p.id |
|
|
LEFT JOIN sys_dept p ON d.pid = p.id |
|
|
<where> |
|
|
<where> |
|
|
|
|
|
|
|
|
AND d.type_key in ('street_party','community_party','grid_party') |
|
|
AND d.type_key in ('street_party','community_party','grid_party') |
|
|
<if test="tags!=null and tags!=''"> |
|
|
<if test="tags!=null and tags!=''"> |
|
|
and d.type_key = #{tags} |
|
|
and d.type_key = #{tags} |
|
@ -405,4 +459,5 @@ |
|
|
AND p.pid != 0 |
|
|
AND p.pid != 0 |
|
|
AND d.type_key in ('street_party','community_party','grid_party') |
|
|
AND d.type_key in ('street_party','community_party','grid_party') |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
</mapper> |
|
|
</mapper> |
|
|