|
|
@ -359,4 +359,45 @@ |
|
|
|
AND t.pid = #{pid} |
|
|
|
order by t.id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getAllDeptInfoByGridName" resultType="com.elink.esua.epdc.dto.AllDeptDTO"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
grid.id AS gridId, |
|
|
|
grid.`name` AS gridName, |
|
|
|
grid.dept_id as gridDeptId, |
|
|
|
comm.id AS communityId, |
|
|
|
comm.`name` AS communityName, |
|
|
|
comm.dept_id as communityDeptId, |
|
|
|
street.id AS streetId, |
|
|
|
street.`name` AS streetName, |
|
|
|
street.dept_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.tags LIKE '%grid_party%' |
|
|
|
AND grid.name = #{gridName} |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getDeptInfoByName" resultType="com.elink.esua.epdc.dto.AllDeptDTO"> |
|
|
|
SELECT |
|
|
|
grid.dept_id AS gridId, |
|
|
|
grid.`name` AS gridName, |
|
|
|
comm.dept_id AS communityId, |
|
|
|
comm.`name` AS communityName, |
|
|
|
street.dept_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.tags LIKE '%grid_party%' |
|
|
|
AND grid.name = #{gridName} |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|