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
f571ae6a
Commit
f571ae6a
authored
Jun 02, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加安全值
parent
790b6023
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
36 deletions
+71
-36
RiskSourceLevelEum.java
...com/yeejoin/amos/fas/common/enums/RiskSourceLevelEum.java
+32
-8
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+14
-28
TodaySafetyIndexVo.java
.../com/yeejoin/amos/fas/business/vo/TodaySafetyIndexVo.java
+25
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/RiskSourceLevelEum.java
View file @
f571ae6a
...
@@ -6,19 +6,35 @@ import java.util.List;
...
@@ -6,19 +6,35 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
public
enum
RiskSourceLevelEum
{
public
enum
RiskSourceLevelEum
{
/**
level_1
(
"1"
,
"1级"
),
* 风险等级 名称 安全提示
level_2
(
"2"
,
"2级"
),
*/
level_3
(
"3"
,
"3级"
),
level_1
(
"1"
,
"1级"
,
"警告"
),
level_4
(
"4"
,
"4级"
),
level_2
(
"2"
,
"2级"
,
"注意"
),
level_5
(
"5"
,
"5级"
);
level_3
(
"3"
,
"3级"
,
"安全"
),
level_4
(
"4"
,
"4级"
,
"安全"
),
level_5
(
"5"
,
"5级"
,
"安全"
);
private
String
level
;
private
String
level
;
private
String
name
;
private
String
name
;
private
String
tips
;
RiskSourceLevelEum
(
String
level
,
String
name
)
{
RiskSourceLevelEum
(
String
level
,
String
name
,
String
tips
)
{
this
.
level
=
level
;
this
.
level
=
level
;
this
.
name
=
name
;
this
.
name
=
name
;
this
.
tips
=
tips
;
}
public
static
String
getTipsByLevel
(
String
level
){
String
tips
=
null
;
for
(
RiskSourceLevelEum
eum:
RiskSourceLevelEum
.
values
()){
if
(
eum
.
getLevel
().
equals
(
level
)
){
tips
=
eum
.
getTips
();
break
;
}
}
return
tips
;
}
}
public
String
getLevel
()
{
public
String
getLevel
()
{
...
@@ -47,6 +63,14 @@ public enum RiskSourceLevelEum {
...
@@ -47,6 +63,14 @@ public enum RiskSourceLevelEum {
}
}
return
nameList
;
return
nameList
;
}
}
public
String
getTips
()
{
return
tips
;
}
public
void
setTips
(
String
tips
)
{
this
.
tips
=
tips
;
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
f571ae6a
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.gson.JsonObject
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
...
@@ -38,12 +16,11 @@ import com.yeejoin.amos.fas.business.dao.mapper.View3dMapper;
...
@@ -38,12 +16,11 @@ import com.yeejoin.amos.fas.business.dao.mapper.View3dMapper;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.common.enums.*
;
import
com.yeejoin.amos.fas.common.enums.*
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.DateUtil
;
import
com.yeejoin.amos.fas.core.common.request.DateUtil
;
import
com.yeejoin.amos.fas.core.common.response.CoordDTO
;
import
com.yeejoin.amos.fas.core.common.response.CoordDTO
;
import
com.yeejoin.amos.fas.core.common.response.Node3DVoResponse
;
import
com.yeejoin.amos.fas.core.common.response.Node3DVoResponse
;
...
@@ -54,12 +31,13 @@ import com.yeejoin.amos.fas.core.util.StringUtil;
...
@@ -54,12 +31,13 @@ import com.yeejoin.amos.fas.core.util.StringUtil;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -97,9 +75,7 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -97,9 +75,7 @@ public class View3dServiceImpl implements IView3dService {
private
IRiskLevelDao
iRiskLevelDao
;
private
IRiskLevelDao
iRiskLevelDao
;
@Autowired
@Autowired
private
ISafetyIndexChangeLogDao
iSafetyIndexChangeLogDao
;
private
ISafetyIndexChangeLogDao
iSafetyIndexChangeLogDao
;
@Autowired
private
RemoteWebSocketServer
remoteWebSocketServer
;
@Autowired
@Autowired
private
IDutyModeServer
dutyModeServer
;
private
IDutyModeServer
dutyModeServer
;
...
@@ -313,6 +289,16 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -313,6 +289,16 @@ public class View3dServiceImpl implements IView3dService {
vo
.
setCheckExceptionNum
(
checkExceptionNum
);
vo
.
setCheckExceptionNum
(
checkExceptionNum
);
//4.统计故障数量-日期+机构
//4.统计故障数量-日期+机构
vo
.
setFireExceptionNum
(
getFireExceptionNum
(
orgCode
,
date
));
vo
.
setFireExceptionNum
(
getFireExceptionNum
(
orgCode
,
date
));
//5.安全值提示
if
(
riskSource
.
getRiskLevelId
()
!=
null
){
Optional
<
RiskLevel
>
opt
=
iRiskLevelDao
.
findById
(
riskSource
.
getRiskLevelId
());
if
(
opt
.
isPresent
()){
Integer
level
=
opt
.
get
().
getLevel
();
String
tips
=
RiskSourceLevelEum
.
getTipsByLevel
(
String
.
valueOf
(
level
));
vo
.
setSafetyTips
(
tips
);
vo
.
setLevel
(
level
);
}
}
}
else
{
}
else
{
throw
new
YeeException
(
"机构:"
+
orgCode
+
" 不存在"
);
throw
new
YeeException
(
"机构:"
+
orgCode
+
" 不存在"
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/TodaySafetyIndexVo.java
View file @
f571ae6a
...
@@ -13,6 +13,31 @@ public class TodaySafetyIndexVo {
...
@@ -13,6 +13,31 @@ public class TodaySafetyIndexVo {
private
Long
fireExceptionNum
;
private
Long
fireExceptionNum
;
/**
* 安全提示
*/
private
String
safetyTips
;
/**
* 点击code 1到4
*/
private
Integer
level
;
public
Integer
getLevel
()
{
return
level
;
}
public
void
setLevel
(
Integer
level
)
{
this
.
level
=
level
;
}
public
String
getSafetyTips
()
{
return
safetyTips
;
}
public
void
setSafetyTips
(
String
safetyTips
)
{
this
.
safetyTips
=
safetyTips
;
}
public
Long
getRiskExceptionNum
()
{
public
Long
getRiskExceptionNum
()
{
return
riskExceptionNum
;
return
riskExceptionNum
;
...
...
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