|
|
@@ -1008,15 +1008,13 @@ and
|
|
|
IFNULL( SUM( a.cash_adding_room_control_count ), 0 ) AS cashAddingRoomControlCount,
|
|
|
IFNULL( SUM( a.remote_control_count ), 0 ) AS remoteControlCount
|
|
|
FROM
|
|
|
- sys_org_extend a
|
|
|
- LEFT JOIN sys_org b ON a.org_id = b.id
|
|
|
+ ( SELECT * FROM sys_org WHERE type = 10 and is_lock = 0 and deleted = 0 AND path LIKE concat( #{orgPath}, '%' ) ORDER BY create_time DESC LIMIT 0, 1 ) b
|
|
|
+ LEFT JOIN sys_org_extend a ON a.org_id = b.id
|
|
|
where
|
|
|
1=1
|
|
|
and b.type = 10
|
|
|
-/* and a.remote_control = 1*/
|
|
|
and b.deleted = 0
|
|
|
and b.is_lock = 0
|
|
|
- and b.path LIKE concat(#{orgPath}, '%')
|
|
|
</select>
|
|
|
<select id="getDuty" resultType="java.util.Map">
|
|
|
SELECT
|