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

调试接口

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