Commit 4477efa1 authored by 单奇雲's avatar 单奇雲

调试接口

parent 9e592a48
...@@ -26,6 +26,7 @@ import com.alibaba.fastjson.JSON; ...@@ -26,6 +26,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.gson.JsonObject;
import com.yeejoin.amos.fas.business.bo.BindPointBo; import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.business.bo.CheckErrorBo; import com.yeejoin.amos.fas.business.bo.CheckErrorBo;
import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo; import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo;
...@@ -44,6 +45,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable; ...@@ -44,6 +45,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.business.vo.*; import com.yeejoin.amos.fas.business.vo.*;
import com.yeejoin.amos.fas.common.enums.*; import com.yeejoin.amos.fas.common.enums.*;
import com.yeejoin.amos.fas.core.common.request.DateUtil; import com.yeejoin.amos.fas.core.common.request.DateUtil;
import com.yeejoin.amos.fas.core.common.response.CoordDTO;
import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse; import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse; import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.util.CommonResponse; import com.yeejoin.amos.fas.core.util.CommonResponse;
...@@ -581,14 +583,21 @@ public class View3dServiceImpl implements IView3dService { ...@@ -581,14 +583,21 @@ public class View3dServiceImpl implements IView3dService {
List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName); List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName);
retrieveAll.stream().forEach(e->{ retrieveAll.stream().forEach(e->{
String person = (String)e.get("person"); String person = (String)e.get("person");
String positionDTO = (String)e.get("positionDTO");
JSONArray ue4Location = this.getInitJSONArray(String.valueOf(e.get("ue4Location"))); JSONArray ue4Location = this.getInitJSONArray(String.valueOf(e.get("ue4Location")));
JSONArray ue4Rotation = this.getInitJSONArray(String.valueOf(e.get("ue4Rotation"))); JSONArray ue4Rotation = this.getInitJSONArray(String.valueOf(e.get("ue4Rotation")));
if(person != null && !person.equals("")) { if(person != null && !person.equals("")) {
AgencyUserModel user = remoteSecurityService.getUserById(token, product, appKey, person); AgencyUserModel user = remoteSecurityService.getUserById(token, product, appKey, person);
e.put("person", user != null ? user.getRealName() : ""); e.put("person", user != null ? user.getRealName() : "");
} }
CoordDTO position = null;
if(positionDTO != null && !positionDTO.equals("")) {
position = JSONObject.parseObject(positionDTO, CoordDTO.class);
}
e.put("position",position);
e.put("ue4Location",ue4Location); e.put("ue4Location",ue4Location);
e.put("ue4Rotation",ue4Rotation); e.put("ue4Rotation",ue4Rotation);
e.put("showInfo",true);
}); });
Page result = new PageImpl(retrieveAll,pageable,count); Page result = new PageImpl(retrieveAll,pageable,count);
return CommonResponseUtil.success(result); return CommonResponseUtil.success(result);
......
...@@ -1018,8 +1018,8 @@ ...@@ -1018,8 +1018,8 @@
<select id="retrieveAll" resultType="java.util.HashMap"> <select id="retrieveAll" resultType="java.util.HashMap">
select *,'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,'{ "x": 1, "y": 1, "z": 1 }' scaleDTO select *,'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,'{ "x": 1, "y": 1, "z": 1 }' scaleDTO
from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode, from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
rl.name as level,CONCAT('level_',rl.level) as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode, rl.level as level,rl.name as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode,
CASE CASE
WHEN ( WHEN (
ISNULL(r.position3d) || LENGTH(trim(r.position3d)) <![CDATA[ <]]> 1 ISNULL(r.position3d) || LENGTH(trim(r.position3d)) <![CDATA[ <]]> 1
...@@ -1044,7 +1044,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1044,7 +1044,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title r.rpn as title,
CONCAT('riskSource-',r.id) as `key`
from f_risk_source r from f_risk_source r
left join f_risk_level rl ON rl.id = r.risk_level_id left join f_risk_level rl ON rl.id = r.risk_level_id
where r.is_region = 'FALSE' where r.is_region = 'FALSE'
...@@ -1052,7 +1053,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1052,7 +1053,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
AND rl.level = #{dataLevel} AND rl.level = #{dataLevel}
</if> </if>
UNION all UNION all
select p.id,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode, select concat('patrol-',p.id) as id,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode, p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1083,11 +1084,12 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1083,11 +1084,12 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
when p.status = '1' then '合格' when p.status = '1' then '合格'
when p.status = '2' then '不合格' when p.status = '2' then '不合格'
when p.status = '3' then '漏检' when p.status = '3' then '漏检'
end as title end as title,
concat('patrol-',p.id) as `key`
from p_point p from p_point p
WHERE is_delete = FALSE WHERE is_delete = FALSE
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode, select concat('impEquipment-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,
0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode, 0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1113,10 +1115,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1113,10 +1115,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('impEquipment-',e.id) as `key`
from f_equipment e from f_equipment e
UNION all UNION all
select m.id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode, select concat('monitorEquipment-',m.id) as id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode, m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1142,7 +1145,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1142,7 +1145,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
f.name as protectObjName, f.name as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title m.name as title,
concat('monitorEquipment-',m.id) as `key`
from f_fire_equipment m from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id left join f_equipment f on f.id = fe.equipment_id
...@@ -1151,7 +1155,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1151,7 +1155,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
AND f.name = #{protectObjName} AND f.name = #{protectObjName}
</if> </if>
UNION all UNION all
select m.id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'video' as type,m.org_code as orgCode, select concat('video-',m.id) as id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'video' as type,m.org_code as orgCode,
m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'摄像头' as typeName,'video' as typeCode, m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'摄像头' as typeName,'video' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1177,14 +1181,15 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1177,14 +1181,15 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
f.name as protectObjName, f.name as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title m.name as title,
concat('video-',m.id) as `key`
from f_fire_equipment m from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id left join f_equipment f on f.id = fe.equipment_id
where m.equip_classify = 2 where m.equip_classify = 2
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode, select concat('hydrant-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1210,10 +1215,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1210,10 +1215,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('hydrant-',id) as `key`
from f_water_resource where type = 1 from f_water_resource where type = 1
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode, select concat('pool-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1239,10 +1245,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1239,10 +1245,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('pool-',id) as `key`
from f_water_resource where type = 2 from f_water_resource where type = 2
UNION all UNION all
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode, select concat('fireCar-',id) as id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1268,10 +1275,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1268,10 +1275,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireCar-',id) as `key`
from f_fire_car from f_fire_car
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode, select concat('fireEquipment-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,
equip_status as level , concat('level_',equip_status) as levelStr,is_indoor as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode, equip_status as level , concat('level_',equip_status) as levelStr,is_indoor as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1297,10 +1305,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1297,10 +1305,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireEquipment-',id) as `key`
from f_fire_equipment where equip_classify = 3 from f_fire_equipment where equip_classify = 3
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode, select concat('fireChamber-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1326,10 +1335,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1326,10 +1335,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireChamber-',id) as `key`
from f_fire_station where type = 2 from f_fire_station where type = 2
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode, select concat('fireFoamRoom-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防室' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防室' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1355,7 +1365,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1355,7 +1365,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireFoamRoom-',id) as `key`
from f_fire_station where type = 1 from f_fire_station where type = 1
) as tmp ) as tmp
where 1=1 where 1=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment