Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
YeeAmosFireAutoSysRoot
Commits
1ff71201
Commit
1ff71201
authored
May 22, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改异常区域
parent
f56dffa2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+12
-5
ExceptionRegionVo.java
...a/com/yeejoin/amos/fas/business/vo/ExceptionRegionVo.java
+17
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
1ff71201
...
...
@@ -411,9 +411,8 @@ public class View3dServiceImpl implements IView3dService {
if
(
optional
.
isPresent
())
{
List
<
RiskSource
>
regionList
=
iRiskSourceDao
.
findByParentIdAndIsRegion
(
optional
.
get
().
getId
(),
RiskSourceRegionEum
.
TRUE
.
getCode
());
exceptionList
=
regionList
.
stream
().
filter
(
riskSource
->
{
//TODO:待毛颖确认,增加判断故障的规则(统计数据:故障或者rpn上升)
BigDecimal
rpnBig
=
riskSource
.
getRpn
()
==
null
?
new
BigDecimal
(
"0"
)
:
riskSource
.
getRpn
();
return
rpnBig
.
subtract
(
riskSource
.
getRpni
()).
doubleValue
()
>
0
;
BigDecimal
rpn
=
riskSource
.
getRpn
()
==
null
?
new
BigDecimal
(
"0"
)
:
riskSource
.
getRpn
();
return
rpn
.
subtract
(
riskSource
.
getRpni
()).
doubleValue
()
>
0
;
}).
map
(
riskSource
->
{
ExceptionRegionVo
regionVo
=
new
ExceptionRegionVo
();
regionVo
.
setId
(
riskSource
.
getId
());
...
...
@@ -421,7 +420,8 @@ public class View3dServiceImpl implements IView3dService {
regionVo
.
setUe4Rotation
(
getInitJSONArray
(
riskSource
.
getUe4Rotation
()));
regionVo
.
setUe4Extent
(
getInitJSONArray
(
riskSource
.
getUe4Extent
()));
regionVo
.
setSafetyIndex
(
changeRpnToSafetyIndex
(
riskSource
.
getRpn
()));
regionVo
.
setBreakdown
(
isBreakDown
(
riskSource
.
getId
()));
regionVo
.
setBreakdown
(
isBreakDown
(
riskSource
.
getId
()));
//待后期去掉,前端图标显示统一不在细分
regionVo
.
setRoutePath
(
this
.
changeStringToJson
(
riskSource
.
getRoutePath
()));
return
regionVo
;
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -436,8 +436,15 @@ public class View3dServiceImpl implements IView3dService {
}
}
private
JSONObject
changeStringToJson
(
String
str
){
if
(
StringUtil
.
isNotEmpty
(
str
)){
return
JSON
.
parseObject
(
str
);
}
else
{
return
new
JSONObject
();
}
}
private
Boolean
isBreakDown
(
Long
id
){
//TODO:判断是否故障,待毛颖确认
return
true
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ExceptionRegionVo.java
View file @
1ff71201
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
springfox.documentation.spring.web.json.Json
;
/**
* @author suhg
*/
...
...
@@ -32,6 +36,11 @@ public class ExceptionRegionVo {
*/
private
JSONArray
ue4Extent
;
/**
* 自研3维区域参数
*/
private
JSONObject
routePath
;
public
Long
getId
()
{
return
id
;
}
...
...
@@ -68,6 +77,14 @@ public class ExceptionRegionVo {
return
ue4Extent
;
}
public
JSONObject
getRoutePath
()
{
return
routePath
;
}
public
void
setRoutePath
(
JSONObject
routePath
)
{
this
.
routePath
=
routePath
;
}
public
void
setUe4Extent
(
JSONArray
ue4Extent
)
{
this
.
ue4Extent
=
ue4Extent
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment