Commit 2a8b4994 authored by 单奇雲's avatar 单奇雲

调试接口

parent 84e09ca1
...@@ -72,6 +72,12 @@ public class RiskSource extends BasicEntity { ...@@ -72,6 +72,12 @@ public class RiskSource extends BasicEntity {
@Lob @Lob
private String ue4Extent; private String ue4Extent;
/**
* 区域路径
*/
@Lob
private String routePath;
private List<Fmea> fmeaList; private List<Fmea> fmeaList;
private List<RpnChangeLog> rpnChangeLogList; private List<RpnChangeLog> rpnChangeLogList;
...@@ -247,4 +253,19 @@ public class RiskSource extends BasicEntity { ...@@ -247,4 +253,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
...@@ -30,6 +30,9 @@ public class BasePointPositionBo { ...@@ -30,6 +30,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);
} }
//区域列表转树 //区域列表转树
......
...@@ -691,7 +691,8 @@ ...@@ -691,7 +691,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},'%')
...@@ -728,8 +729,8 @@ ...@@ -728,8 +729,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
......
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