Commit 1ee34716 authored by tangwei's avatar tangwei

Merge branch 'dev_upgrade' of http://172.16.10.76/station/YeeAmosFireAutoSysRoot into dev_upgrade

parents 3038ab8c 088dc82e
...@@ -71,6 +71,12 @@ public class RiskSource extends BasicEntity { ...@@ -71,6 +71,12 @@ public class RiskSource extends BasicEntity {
*/ */
@Lob @Lob
private String ue4Extent; private String ue4Extent;
/**
* 区域路径
*/
@Lob
private String routePath;
/** /**
* 闪烁频率 * 闪烁频率
...@@ -261,4 +267,19 @@ public class RiskSource extends BasicEntity { ...@@ -261,4 +267,19 @@ public class RiskSource extends BasicEntity {
this.ue4Extent = ue4Extent; this.ue4Extent = ue4Extent;
} }
/**
* @return the routePath
*/
@Column(name = "route_path")
public String getRoutePath() {
return routePath;
}
/**
* @param routePath the routePath to set
*/
public void setRoutePath(String routePath) {
this.routePath = routePath;
}
} }
\ No newline at end of file
...@@ -29,6 +29,9 @@ public class BasePointPositionBo { ...@@ -29,6 +29,9 @@ public class BasePointPositionBo {
*/ */
@ApiModelProperty("3d点坐标,非ue4用") @ApiModelProperty("3d点坐标,非ue4用")
private String position3d; private String position3d;
@ApiModelProperty("区域坐标,非ue4用")
private String routePath;
public String getUe4Location() { public String getUe4Location() {
return ue4Location; return ue4Location;
...@@ -61,4 +64,18 @@ public class BasePointPositionBo { ...@@ -61,4 +64,18 @@ public class BasePointPositionBo {
public void setPosition3d(String position3d) { public void setPosition3d(String position3d) {
this.position3d = position3d; this.position3d = position3d;
} }
/**
* @return the routePath
*/
public String getRoutePath() {
return routePath;
}
/**
* @param routePath the routePath to set
*/
public void setRoutePath(String routePath) {
this.routePath = routePath;
}
} }
...@@ -150,6 +150,8 @@ public class View3dController extends BaseController { ...@@ -150,6 +150,8 @@ public class View3dController extends BaseController {
public CommonResponse getStatisticsCheck(){ public CommonResponse getStatisticsCheck(){
ReginParams reginParams =getSelectedOrgInfo(); ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams); String orgCode = this.getOrgCode(reginParams);
//TODO:待删除
orgCode = "1*2";
return CommonResponseUtil.success(view3dService.getStatisticsCheck(orgCode)); return CommonResponseUtil.success(view3dService.getStatisticsCheck(orgCode));
} }
......
...@@ -16,12 +16,12 @@ import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse; ...@@ -16,12 +16,12 @@ import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
public interface View3dMapper extends BaseMapper{ public interface View3dMapper extends BaseMapper{
/** /**
* 按类型查询 * 按类型查询
* @param type * @param type
* @param orgCode * @param orgCode
* @return * @return
*/ */
List<RegionTreeResponse> getPointTreeByType(@Param("type")String type,@Param("orgCode")String orgCode,@Param("channelType") String channelType); List<RegionTreeResponse> getPointByType(@Param("type")String type,@Param("orgCode")String orgCode,@Param("channelType") String channelType);
/** /**
* 获取点详情 * 获取点详情
......
...@@ -103,6 +103,8 @@ public class View3dServiceImpl implements IView3dService { ...@@ -103,6 +103,8 @@ public class View3dServiceImpl implements IView3dService {
@Autowired @Autowired
private IDataRefreshService iDataRefreshService; private IDataRefreshService iDataRefreshService;
@Autowired
private RiskSourceMapper riskSourceMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -244,8 +246,12 @@ public class View3dServiceImpl implements IView3dService { ...@@ -244,8 +246,12 @@ public class View3dServiceImpl implements IView3dService {
@Override @Override
public List<RegionTreeResponse> getPointTreeByType(String type,String orgCode,String channelType) { public List<RegionTreeResponse> getPointTreeByType(String type,String orgCode,String channelType) {
List<RegionTreeResponse> pointTreeByType = view3dMapper.getPointTreeByType(type,orgCode,channelType); //查询点
return convertPointTree(pointTreeByType); List<RegionTreeResponse> regionList = riskSourceMapper.getRegionList(channelType, orgCode);
//查询区域
List<RegionTreeResponse> pointByType = view3dMapper.getPointByType(type,orgCode,channelType);
pointByType.addAll(regionList);
return convertPointTree(pointByType);
} }
//区域列表转树 //区域列表转树
......
...@@ -694,7 +694,8 @@ ...@@ -694,7 +694,8 @@
IF(rs.is_region = 'TRUE',1,0) as is_region, IF(rs.is_region = 'TRUE',1,0) as is_region,
rs.route_path, rs.route_path,
rl.level, rl.level,
CONCAT('level_',rl.level) as level_str CONCAT('level_',rl.level) as level_str,
'riskSource' as type
from f_risk_source rs from f_risk_source rs
left join f_risk_level rl ON rs.risk_level_id = rl.id left join f_risk_level rl ON rs.risk_level_id = rl.id
where is_region = 'TRUE' AND rs.org_code like CONCAT(#{orgCode},'%') where is_region = 'TRUE' AND rs.org_code like CONCAT(#{orgCode},'%')
...@@ -731,8 +732,8 @@ ...@@ -731,8 +732,8 @@
<if test="item.ue4Extent != null" > <if test="item.ue4Extent != null" >
ue4_extent = #{item.ue4Extent,jdbcType=VARCHAR}, ue4_extent = #{item.ue4Extent,jdbcType=VARCHAR},
</if> </if>
<if test="item.position3d != null" > <if test="item.routePath != null" >
route_path = #{item.position3d,jdbcType=VARCHAR}, route_path = #{item.routePath,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where id = #{item.riskSourceId,jdbcType=BIGINT} where id = #{item.riskSourceId,jdbcType=BIGINT}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.View3dMapper"> <mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.View3dMapper">
<select id="getPointTreeByType" resultType="com.yeejoin.amos.fas.core.common.response.RegionTreeResponse"> <select id="getPointByType" resultType="com.yeejoin.amos.fas.core.common.response.RegionTreeResponse">
<choose> <choose>
<when test="type == 'riskSource'"> <when test="type == 'riskSource'">
select select
...@@ -21,15 +21,16 @@ ...@@ -21,15 +21,16 @@
route_path, route_path,
rl.level, rl.level,
CONCAT('level_',rl.level) as level_str, CONCAT('level_',rl.level) as level_str,
IF(is_region = 'TRUE',1,0) as is_region, 0 as is_region,
R.position3d R.position3d
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 1=1 where 1=1
AND R.is_region = 'FALSE'
</when> </when>
<when test="type == 'patrol'"> <when test="type == 'patrol'">
select select
R.id,R.parent_id, B.id,B.risk_source_id as parent_id,
<choose> <choose>
<when test="channelType == '3dpage'"> <when test="channelType == '3dpage'">
IF(ISNULL(B.coordinates) || LENGTH(trim(B.coordinates)) <![CDATA[ <]]> 1,0,1) as is_bind, IF(ISNULL(B.coordinates) || LENGTH(trim(B.coordinates)) <![CDATA[ <]]> 1,0,1) as is_bind,
...@@ -40,8 +41,8 @@ ...@@ -40,8 +41,8 @@
</otherwise> </otherwise>
</choose> </choose>
#{type} as type, #{type} as type,
B.name as name,B.point_no,B.ue4_location,B.ue4_rotation, B.name as name,B.point_no as code,B.ue4_location,B.ue4_rotation,
1 as is_region, 0 as is_region,
B.coordinates as position3d, B.coordinates as position3d,
B.status as level, B.status as level,
CONCAT('level_',B.status) as level_str CONCAT('level_',B.status) as level_str
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
</when> </when>
<when test="type == 'impEquipment'"> <when test="type == 'impEquipment'">
select select
R.id,R.parent_id, B.id,B.risk_source_id as parent_id,
<choose> <choose>
<when test="channelType == '3dpage'"> <when test="channelType == '3dpage'">
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind, IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,
...@@ -64,7 +65,7 @@ ...@@ -64,7 +65,7 @@
</choose> </choose>
#{type} as type, #{type} as type,
B.name,B.code,B.ue4_location,B.ue4_rotation, B.name,B.code,B.ue4_location,B.ue4_rotation,
1 as is_region, 0 as is_region,
B.position3d B.position3d
from f_risk_source R from f_risk_source R
left join f_equipment B on B.risk_source_id = R.id AND R.is_region='TRUE' left join f_equipment B on B.risk_source_id = R.id AND R.is_region='TRUE'
...@@ -73,7 +74,7 @@ ...@@ -73,7 +74,7 @@
</when> </when>
<when test="type == 'monitorEquipment'"> <when test="type == 'monitorEquipment'">
select select
R.id,R.parent_id, B.id,B.risk_source_id as parent_id,
<choose> <choose>
<when test="channelType == '3dpage'"> <when test="channelType == '3dpage'">
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind, IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,
...@@ -94,7 +95,7 @@ ...@@ -94,7 +95,7 @@
</when> </when>
<when test="type == 'video'"> <when test="type == 'video'">
select select
R.id,R.parent_id, B.id,B.risk_source_id as parent_id,
<choose> <choose>
<when test="channelType == '3dpage'"> <when test="channelType == '3dpage'">
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind, IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,
...@@ -115,7 +116,14 @@ ...@@ -115,7 +116,14 @@
</when> </when>
<when test="type == 'fireEquipment'"> <when test="type == 'fireEquipment'">
select select
R.id,R.parent_id, <!-- R.id, -->
CASE
WHEN ISNULL(C.id) = 0 then C.id
WHEN ISNULL(E.id) = 0 then E.id
WHEN ISNULL(S.id) = 0 then S.id
WHEN ISNULL(W.id) = 0 then W.id
END as id
,R.parent_id,
<choose> <choose>
<when test="channelType == '3dpage'"> <when test="channelType == '3dpage'">
CASE CASE
...@@ -173,13 +181,6 @@ ...@@ -173,13 +181,6 @@
END as ue4_rotation, END as ue4_rotation,
0 as is_region, 0 as is_region,
CASE CASE
WHEN ISNULL(C.id) = 0 then C.ue4_rotation
WHEN ISNULL(E.id) = 0 then E.ue4_rotation
WHEN ISNULL(S.id) = 0 then S.ue4_rotation
WHEN ISNULL(W.id) = 0 then W.ue4_rotation
END as ue4_rotation,
0 as is_region,
CASE
WHEN ISNULL(C.id) = 0 then C.position3d WHEN ISNULL(C.id) = 0 then C.position3d
WHEN ISNULL(E.id) = 0 then E.position3d WHEN ISNULL(E.id) = 0 then E.position3d
WHEN ISNULL(S.id) = 0 then S.position3d WHEN ISNULL(S.id) = 0 then S.position3d
...@@ -204,7 +205,10 @@ ...@@ -204,7 +205,10 @@
<choose> <choose>
<when test="type == 'riskSource'"> <when test="type == 'riskSource'">
select rs.id,rs.name,rs.code,rs.ue4_location as ue4Location,rs.ue4_rotation as ue4Rotation,rs.position3d, select rs.id,rs.name,rs.code,rs.ue4_location as ue4Location,rs.ue4_rotation as ue4Rotation,rs.position3d,
rl.level,rl.name as levelStr,rs.floor3d ,rs.is_indoor as isIndoor rl.level,rl.name as levelStr,rs.floor3d ,rs.is_indoor as isIndoor,
rs.flicker_frequency as frequency,
true as 'showInfo',
rs.rpn as title
from f_risk_source rs from f_risk_source rs
left join f_risk_level rl ON rl.id = rs.risk_level_id left join f_risk_level rl ON rl.id = rs.risk_level_id
where 1=1 where 1=1
...@@ -217,8 +221,27 @@ ...@@ -217,8 +221,27 @@
</when> </when>
<when test="type == 'patrol'"> <when test="type == 'patrol'">
select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,coordinates as position3d, select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,coordinates as position3d,
status,floor as floor3d,is_indoor as isIndoor status,floor as floor3d,is_indoor as isIndoor,
from p_point 0 as frequency,
case p.status
when '0' then false
when '1' then false
else true
end as `showInfo`,
case p.status
when '0' then '未计划'
when '1' then '合格'
when '2' then '不合格'
when '3' then '漏检'
end as title,
case p.status
when '0' then '未计划'
when '1' then '合格'
when '2' then '不合格'
when '3' then '漏检'
end as levelStr,
status as level
from p_point p
where 1=1 and is_delete = 0 where 1=1 and is_delete = 0
<if test="pointId != null"> <if test="pointId != null">
AND id = #{pointId} AND id = #{pointId}
...@@ -229,7 +252,10 @@ ...@@ -229,7 +252,10 @@
</when> </when>
<when test="type == 'impEquipment'"> <when test="type == 'impEquipment'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
name as 'title'
from f_equipment from f_equipment
where 1=1 where 1=1
<if test="pointId != null"> <if test="pointId != null">
...@@ -241,7 +267,10 @@ ...@@ -241,7 +267,10 @@
</when> </when>
<when test="type == 'monitorEquipment'"> <when test="type == 'monitorEquipment'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
name as 'title'
from f_fire_equipment from f_fire_equipment
where equip_classify = 0 where equip_classify = 0
<if test="pointId != null"> <if test="pointId != null">
...@@ -253,7 +282,10 @@ ...@@ -253,7 +282,10 @@
</when> </when>
<when test="type == 'video'"> <when test="type == 'video'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
name as 'title'
from f_fire_equipment from f_fire_equipment
where equip_classify = 2 where equip_classify = 2
<if test="pointId != null"> <if test="pointId != null">
...@@ -265,7 +297,10 @@ ...@@ -265,7 +297,10 @@
</when> </when>
<when test="type == 'hydrant'"> <when test="type == 'hydrant'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
name as 'title'
from f_water_resource from f_water_resource
where type = 1 where type = 1
<if test="pointId != null"> <if test="pointId != null">
...@@ -277,7 +312,10 @@ ...@@ -277,7 +312,10 @@
</when> </when>
<when test="type == 'pool'"> <when test="type == 'pool'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
name as 'title'
from f_water_resource from f_water_resource
where type = 2 where type = 2
<if test="pointId != null"> <if test="pointId != null">
...@@ -289,7 +327,10 @@ ...@@ -289,7 +327,10 @@
</when> </when>
<when test="type == 'fireCar'"> <when test="type == 'fireCar'">
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
name as 'title'
from f_fire_car from f_fire_car
where 1=1 where 1=1
<if test="pointId != null"> <if test="pointId != null">
...@@ -301,7 +342,10 @@ ...@@ -301,7 +342,10 @@
</when> </when>
<when test="type == 'fireEquipment'"> <when test="type == 'fireEquipment'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
name as 'title'
from f_fire_equipment from f_fire_equipment
where equip_classify = 3 where equip_classify = 3
<if test="pointId != null"> <if test="pointId != null">
...@@ -313,7 +357,10 @@ ...@@ -313,7 +357,10 @@
</when> </when>
<when test="type == 'fireChamber'"> <when test="type == 'fireChamber'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
name as 'title'
from f_fire_station from f_fire_station
where type = 1 where type = 1
<if test="pointId != null"> <if test="pointId != null">
...@@ -325,7 +372,10 @@ ...@@ -325,7 +372,10 @@
</when> </when>
<when test="type == 'fireFoamRoom'"> <when test="type == 'fireFoamRoom'">
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d, select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
floor3d,is_indoor as isIndoor floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
name as 'title'
from f_fire_station from f_fire_station
where type = 2 where type = 2
<if test="pointId != null"> <if test="pointId != null">
......
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