|
|
@@ -898,7 +898,7 @@ and
|
|
|
WHERE
|
|
|
a.path LIKE concat( #{orgPath}, '%' )) AS onLineTotal,
|
|
|
(
|
|
|
- select SUM(a.size) from (select org_id,if(count(1) > 0,1,0) as size from sys_org_physical_defense_construction where standard =1 and type = 3 GROUP BY org_id) a
|
|
|
+ select SUM(a.size) from (select org_id,if(count(1) > 0,1,0) as size from sys_org_physical_defense_construction where standard =1 and type = 4 GROUP BY org_id) a
|
|
|
LEFT JOIN sys_org b on a.org_id = b.id
|
|
|
where 1=1
|
|
|
AND b.deleted = 0
|
|
|
@@ -920,7 +920,7 @@ and
|
|
|
AND path LIKE concat( #{orgPath}, '%' )) AS departureTotal,
|
|
|
(
|
|
|
select SUM(a.size) from (select org_id,if(count(1) > 0,1,0) as size from
|
|
|
- sys_org_physical_defense_construction where standard =1 and type = 4 GROUP BY org_id) a
|
|
|
+ sys_org_physical_defense_construction where standard =1 and type = 3 GROUP BY org_id) a
|
|
|
LEFT JOIN sys_org b on a.org_id = b.id
|
|
|
where 1=1
|
|
|
AND b.deleted = 0
|
|
|
@@ -929,25 +929,21 @@ and
|
|
|
DUAL
|
|
|
</select>
|
|
|
<select id="getSelfEquipment" resultType="java.util.Map">
|
|
|
- SELECT
|
|
|
+ select
|
|
|
t.onLineThroughWalls,
|
|
|
t.onLineLobbyImplement,
|
|
|
t.departureThroughWalls,
|
|
|
t.departureLobbyImplement,
|
|
|
( t.onLineThroughWalls + t.onLineLobbyImplement + t.departureThroughWalls + t.departureLobbyImplement ) AS selfServiceDevicesTotal
|
|
|
- FROM
|
|
|
- (
|
|
|
- SELECT
|
|
|
- IFNULL( SUM( a.lobby_equipment ), 0 ) AS onLineLobbyImplement,
|
|
|
- IFNULL( SUM( a.wall_penetrating_equipment ), 0 ) AS onLineThroughWalls,
|
|
|
- IFNULL( SUM( a.detached_lobby_equipment ), 0 ) AS departureLobbyImplement,
|
|
|
- IFNULL( SUM( a.detached_wall_penetrating_equipment ), 0 ) AS departureThroughWalls
|
|
|
- FROM
|
|
|
- sys_org_extend a
|
|
|
- LEFT JOIN sys_org b ON a.org_id = b.id
|
|
|
- WHERE
|
|
|
- b.path LIKE concat(#{orgPath}, '%')
|
|
|
- ) t
|
|
|
+ from (
|
|
|
+
|
|
|
+ select
|
|
|
+ (select IFNULL( SUM( a.lobby_equipment ), 0 ) from sys_org_extend a LEFT JOIN sys_org b on a.org_id = b.id WHERE 1=1 and b.type = 4 and b.path LIKE concat(#{orgPath}, '%')) as onLineThroughWalls,
|
|
|
+ (select IFNULL( SUM( a.wall_penetrating_equipment ), 0 ) from sys_org_extend a LEFT JOIN sys_org b on a.org_id = b.id WHERE 1=1 and b.type = 4 and b.path LIKE concat(#{orgPath}, '%')) as onLineLobbyImplement,
|
|
|
+ (select IFNULL( SUM( a.lobby_equipment ), 0 ) from sys_org_extend a LEFT JOIN sys_org b on a.org_id = b.id WHERE 1=1 and b.type = 5 and b.path LIKE concat(#{orgPath}, '%')) as departureThroughWalls,
|
|
|
+ (select IFNULL( SUM( a.wall_penetrating_equipment ), 0 ) from sys_org_extend a LEFT JOIN sys_org b on a.org_id = b.id WHERE 1=1 and b.type = 5 and b.path LIKE concat(#{orgPath}, '%')) as departureLobbyImplement
|
|
|
+ from dual
|
|
|
+ ) t
|
|
|
</select>
|
|
|
<select id="getCenterConstruction" resultType="java.util.Map">
|
|
|
|