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 {
*/
@Lob
private String ue4Extent;
/**
* 区域路径
*/
@Lob
private String routePath;
/**
* 闪烁频率
......@@ -261,4 +267,19 @@ public class RiskSource extends BasicEntity {
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 {
*/
@ApiModelProperty("3d点坐标,非ue4用")
private String position3d;
@ApiModelProperty("区域坐标,非ue4用")
private String routePath;
public String getUe4Location() {
return ue4Location;
......@@ -61,4 +64,18 @@ public class BasePointPositionBo {
public void setPosition3d(String 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 {
public CommonResponse getStatisticsCheck(){
ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams);
//TODO:待删除
orgCode = "1*2";
return CommonResponseUtil.success(view3dService.getStatisticsCheck(orgCode));
}
......
......@@ -16,12 +16,12 @@ import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
public interface View3dMapper extends BaseMapper{
/**
* 按类型查询
* 按类型查询
* @param type
* @param orgCode
* @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 {
@Autowired
private IDataRefreshService iDataRefreshService;
@Autowired
private RiskSourceMapper riskSourceMapper;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -244,8 +246,12 @@ public class View3dServiceImpl implements IView3dService {
@Override
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 @@
IF(rs.is_region = 'TRUE',1,0) as is_region,
rs.route_path,
rl.level,
CONCAT('level_',rl.level) as level_str
CONCAT('level_',rl.level) as level_str,
'riskSource' as type
from f_risk_source rs
left join f_risk_level rl ON rs.risk_level_id = rl.id
where is_region = 'TRUE' AND rs.org_code like CONCAT(#{orgCode},'%')
......@@ -731,8 +732,8 @@
<if test="item.ue4Extent != null" >
ue4_extent = #{item.ue4Extent,jdbcType=VARCHAR},
</if>
<if test="item.position3d != null" >
route_path = #{item.position3d,jdbcType=VARCHAR},
<if test="item.routePath != null" >
route_path = #{item.routePath,jdbcType=VARCHAR},
</if>
</set>
where id = #{item.riskSourceId,jdbcType=BIGINT}
......
......@@ -3,7 +3,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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>
<when test="type == 'riskSource'">
select
......@@ -21,15 +21,16 @@
route_path,
rl.level,
CONCAT('level_',rl.level) as level_str,
IF(is_region = 'TRUE',1,0) as is_region,
0 as is_region,
R.position3d
from f_risk_source R
left join f_risk_level rl on rl.id = R.risk_level_id
where 1=1
AND R.is_region = 'FALSE'
</when>
<when test="type == 'patrol'">
select
R.id,R.parent_id,
B.id,B.risk_source_id as parent_id,
<choose>
<when test="channelType == '3dpage'">
IF(ISNULL(B.coordinates) || LENGTH(trim(B.coordinates)) <![CDATA[ <]]> 1,0,1) as is_bind,
......@@ -40,8 +41,8 @@
</otherwise>
</choose>
#{type} as type,
B.name as name,B.point_no,B.ue4_location,B.ue4_rotation,
1 as is_region,
B.name as name,B.point_no as code,B.ue4_location,B.ue4_rotation,
0 as is_region,
B.coordinates as position3d,
B.status as level,
CONCAT('level_',B.status) as level_str
......@@ -52,7 +53,7 @@
</when>
<when test="type == 'impEquipment'">
select
R.id,R.parent_id,
B.id,B.risk_source_id as parent_id,
<choose>
<when test="channelType == '3dpage'">
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,
......@@ -64,7 +65,7 @@
</choose>
#{type} as type,
B.name,B.code,B.ue4_location,B.ue4_rotation,
1 as is_region,
0 as is_region,
B.position3d
from f_risk_source R
left join f_equipment B on B.risk_source_id = R.id AND R.is_region='TRUE'
......@@ -73,7 +74,7 @@
</when>
<when test="type == 'monitorEquipment'">
select
R.id,R.parent_id,
B.id,B.risk_source_id as parent_id,
<choose>
<when test="channelType == '3dpage'">
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,
......@@ -94,7 +95,7 @@
</when>
<when test="type == 'video'">
select
R.id,R.parent_id,
B.id,B.risk_source_id as parent_id,
<choose>
<when test="channelType == '3dpage'">
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,
......@@ -115,7 +116,14 @@
</when>
<when test="type == 'fireEquipment'">
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>
<when test="channelType == '3dpage'">
CASE
......@@ -173,13 +181,6 @@
END as ue4_rotation,
0 as is_region,
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(E.id) = 0 then E.position3d
WHEN ISNULL(S.id) = 0 then S.position3d
......@@ -204,7 +205,10 @@
<choose>
<when test="type == 'riskSource'">
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
left join f_risk_level rl ON rl.id = rs.risk_level_id
where 1=1
......@@ -217,8 +221,27 @@
</when>
<when test="type == 'patrol'">
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
from p_point
status,floor as floor3d,is_indoor as isIndoor,
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
<if test="pointId != null">
AND id = #{pointId}
......@@ -229,7 +252,10 @@
</when>
<when test="type == 'impEquipment'">
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
where 1=1
<if test="pointId != null">
......@@ -241,7 +267,10 @@
</when>
<when test="type == 'monitorEquipment'">
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
where equip_classify = 0
<if test="pointId != null">
......@@ -253,7 +282,10 @@
</when>
<when test="type == 'video'">
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
where equip_classify = 2
<if test="pointId != null">
......@@ -265,7 +297,10 @@
</when>
<when test="type == 'hydrant'">
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
where type = 1
<if test="pointId != null">
......@@ -277,7 +312,10 @@
</when>
<when test="type == 'pool'">
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
where type = 2
<if test="pointId != null">
......@@ -289,7 +327,10 @@
</when>
<when test="type == 'fireCar'">
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
where 1=1
<if test="pointId != null">
......@@ -301,7 +342,10 @@
</when>
<when test="type == 'fireEquipment'">
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
where equip_classify = 3
<if test="pointId != null">
......@@ -313,7 +357,10 @@
</when>
<when test="type == 'fireChamber'">
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
where type = 1
<if test="pointId != null">
......@@ -325,7 +372,10 @@
</when>
<when test="type == 'fireFoamRoom'">
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
where type = 2
<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