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
42a577ae
Commit
42a577ae
authored
May 25, 2020
by
吴江
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
15db6f25
bc956768
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
216 additions
and
75 deletions
+216
-75
SafetyExecuteBo.java
...ava/com/yeejoin/amos/fas/business/bo/SafetyExecuteBo.java
+7
-0
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+1
-1
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+2
-0
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+22
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+57
-39
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+44
-27
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+1
-1
ExceptionRegionVo.java
...a/com/yeejoin/amos/fas/business/vo/ExceptionRegionVo.java
+17
-0
StringUtil.java
.../main/java/com/yeejoin/amos/fas/core/util/StringUtil.java
+3
-2
dbTemplate_fire_equippoint.xml
...c/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
+2
-2
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+58
-2
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/SafetyExecuteBo.java
View file @
42a577ae
...
...
@@ -7,6 +7,7 @@ public class SafetyExecuteBo {
private
String
label
;
private
String
pointId
;
private
String
type
;
private
String
status
;
//指标状态
private
String
changeDate
;
public
Long
getId
()
{
return
id
;
...
...
@@ -44,4 +45,10 @@ public class SafetyExecuteBo {
public
void
setChangeDate
(
String
changeDate
)
{
this
.
changeDate
=
changeDate
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireEquimtPointController.java
View file @
42a577ae
...
...
@@ -100,7 +100,7 @@ public class FireEquimtPointController extends BaseController {
@ApiParam
(
value
=
"监测点编号或者监测点名称模糊匹配"
)
@RequestParam
(
required
=
false
)
String
searchValue
,
@ApiParam
(
value
=
"类型(模拟量:ANALOGUE;开关量:SWITCH)"
)
@RequestParam
(
required
=
false
)
String
type
)
{
Map
<
String
,
Object
>
queryMap
=
Maps
.
newHashMap
();
queryMap
.
put
(
"
pageNumber"
,
pageNumber
);
queryMap
.
put
(
"
offset"
,
pageNumber
*
pageSize
);
queryMap
.
put
(
"pageSize"
,
pageSize
);
if
(
isBindDevice
!=
null
&&
isBindDevice
==
0
)
{
queryMap
.
put
(
"fireEquipmentId"
,
0
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
42a577ae
...
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.Authorization
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.*
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
42a577ae
...
...
@@ -74,6 +74,14 @@ public interface View3dMapper extends BaseMapper{
*/
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
/**
* 今日安全指数故障告警详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllFaultAlarm
(
Map
<
String
,
Object
>
params
);
/**
* 今日巡检统计接口
* @param orgCode
...
...
@@ -96,6 +104,20 @@ public interface View3dMapper extends BaseMapper{
List
<
SafetyExecuteBo
>
getCheckErrorTop5
(
String
orgCode
);
/**
* 火灾告警最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getFireAlarmTop5
(
String
orgCode
);
/**
* 设备状态最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getEquipStatusTop5
(
String
orgCode
);
/**
* 按照类型查询点
* @param params {orgCode,type}
* @return 列表
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
42a577ae
...
...
@@ -67,8 +67,6 @@ import com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
...
...
@@ -102,6 +100,7 @@ import com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.Alarm
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
...
...
@@ -122,7 +121,6 @@ import com.yeejoin.amos.fas.exception.YeeException;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
@Service
(
"riskSourceService"
)
public
class
RiskSourceServiceImpl
implements
IRiskSourceService
{
...
...
@@ -144,8 +142,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
private
AppMessagePushService
appMessagePushService
;
@Autowired
private
IFmeaDao
iFmeaDao
;
@Autowired
private
IRiskLevelDao
riskLevelDao
;
...
...
@@ -177,8 +173,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
private
IRiskLevelDao
iRiskLevelDao
;
@Autowired
private
IPPointDao
iPPointDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
...
...
@@ -775,14 +769,25 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
Equipment
equipment
=
null
;
if
(
fireEquipment
!=
null
)
{
deviceData
.
setCode
(
fireEquipment
.
getCode
());
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
fireEquipmentPoint
.
getFireEquipmentId
());
//报警数据存库
//保存实时数据
saveFireEquipmentData
(
fireEquipmentPoint
,
fireEquipment
,
deviceData
,
fireEquipmentPointType
);
List
<
AlarmParam
>
list
=
new
ArrayList
<>();
list
.
add
(
deviceData
);
//保存到mongo
saveData
(
list
,
"soe"
);
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
fireEquipmentPoint
.
getFireEquipmentId
());
if
(
equipment
!=
null
)
{
//动态预案执行
dynamicPlan
(
deviceData
,
equipment
,
fireEquipment
,
fireEquipmentPointType
);
}
}
}
/**
* 预案执行
* @param deviceData
* @param equipment
* @param fireEquipment
* @param fireEquipmentPointType
*/
@Async
private
void
dynamicPlan
(
AlarmParam
deviceData
,
Equipment
equipment
,
FireEquipment
fireEquipment
,
String
fireEquipmentPointType
){
String
batchNo
=
null
;
Object
batch
=
null
;
Dict
dict
=
null
;
...
...
@@ -813,7 +818,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
Object
canBeRunning
=
redisTemplate
.
opsForValue
().
get
(
cacheKeyForCanBeRunning
());
if
(
canBeRunning
==
null
)
{
try
{
alermContingency
(
batchNo
,
fireEquipment
,
equipment
);
}
catch
(
Exception
e
)
{
...
...
@@ -825,14 +829,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
redisTemplate
.
opsForHash
().
put
(
"currentContingency"
,
"batchNo"
,
batchNo
);
redisTemplate
.
opsForHash
().
put
(
"currentContingency"
,
"contingencyPlan"
,
null
);
redisTemplate
.
opsForHash
().
put
(
"currentContingency"
,
"alarmType"
,
null
);
//通知刷新3d页面告警数据
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
alarm
.
getCode
());
}
else
{
if
(
"alarm_type_trouble"
.
equals
(
fireEquipmentPointType
))
{
notifyAlarm
(
fireEquipmentPoint
,
deviceData
);
//通知刷新3d页面相关故障数据
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
trouble
.
getCode
());
}
String
alarmType
=
(
String
)
redisTemplate
.
opsForHash
().
get
(
"currentContingency"
,
"alarmType"
);
if
(!
ObjectUtils
.
isEmpty
(
alarmType
)
&&
dict
.
getDictValue
().
equals
(
alarmType
))
{
ContingencyDeviceStatus
contingencyDeviceStatus
=
(
ContingencyDeviceStatus
)
redisTemplate
.
opsForHash
().
get
(
"currentContingency"
,
"contingencyPlan"
);
...
...
@@ -841,8 +838,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
}
}
}
@Override
@javax
.
transaction
.
Transactional
...
...
@@ -853,7 +848,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private
void
saveFireEquipmentData
(
FireEquipmentPoint
fireEquipmentPoint
,
FireEquipment
fireEquipment
,
AlarmParam
deviceData
,
String
fireEquipmentPointType
)
{
if
(
"alarm_type_fire"
.
equals
(
fireEquipmentPointType
)
||
"alarm_type_trouble"
.
equals
(
fireEquipmentPointType
)){
Alarm
alarm
=
iAlarmDao
.
findByStatusTrueAndFireEquipmentPointCode
(
deviceData
.
getPointCode
());
if
(
alarm
!=
null
){
...
...
@@ -865,7 +859,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
alarm
.
setFrequency
((
alarm
.
getFrequency
()+
1
));
alarm
.
setUpdateDate
(
new
Date
());
}
iAlarmDao
.
save
(
alarm
);
}
else
{
if
(
"true"
.
equals
(
deviceData
.
getState
())){
alarm
=
new
Alarm
();
alarm
.
setFireEquipmentCode
(
fireEquipment
.
getCode
());
alarm
.
setFireEquipmentId
(
fireEquipment
.
getId
());
...
...
@@ -876,9 +872,23 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
alarm
.
setFireEquipmentPointValue
(
deviceData
.
getState
());
alarm
.
setOrgCode
(
fireEquipment
.
getOrgCode
());
alarm
.
setType
(
fireEquipmentPointType
);
}
iAlarmDao
.
save
(
alarm
);
}
}
if
(
alarm
!=
null
){
if
(
"alarm_type_trouble"
.
equals
(
fireEquipmentPointType
))
{
//通知刷新3d页面相关故障数据
if
(
alarm
.
getFrequency
()==
1
||
alarm
.
getStatus
()
==
false
){
notifyAlarm
(
fireEquipmentPoint
,
deviceData
);
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
trouble
.
getCode
());
}
}
else
{
//通知刷新3d页面告警数据
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
alarm
.
getCode
());
}
}
}
else
{
if
(
"SWITCH"
.
equals
(
fireEquipmentPoint
.
getType
())){
//保存遥信信号数据到mysql中
FireEquipmentData
fireEquipmentData
=
new
FireEquipmentData
();
fireEquipmentData
.
setEqPointCode
(
deviceData
.
getPointCode
());
fireEquipmentData
.
seteValue
(
deviceData
.
getState
());
...
...
@@ -896,9 +906,17 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
content
.
put
(
"label"
,
fireEquipmentData
.
getEqPointName
());
content
.
put
(
"changeDate"
,
fireEquipmentData
.
getCreateDate
());
content
.
put
(
"orgCode"
,
fireEquipment
.
getOrgCode
());
content
.
put
(
"status"
,
deviceData
.
getSoe
());
iDataRefreshService
.
sendRefreshDataWithArea
(
DataRefreshTypeEum
.
monitor
.
getCode
(),
content
);
}
}
List
<
AlarmParam
>
list
=
new
ArrayList
<>();
list
.
add
(
deviceData
);
//保存所有数据(遥测,遥信)到mongo
saveData
(
list
,
"soe"
);
}
@Override
public
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
)
{
...
...
@@ -1072,26 +1090,26 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
List
<
Map
>
list
=
riskSourceMapper
.
queryContingencyWater
();
HashOperations
hashOperations
=
redisTemplate
.
opsForHash
();
for
(
Map
map
:
list
)
{
if
(
hashOperations
.
size
(
"Analogue"
)
>
0
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"CODE"
))
||
!
hashOperations
.
hasKey
(
"Analogue"
,
map
.
get
(
"CODE"
)))
{
map
.
put
(
"level"
,
0
);
map
.
put
(
"volume"
,
0
);
continue
;
}
EquipCommunicationData
data
=
(
EquipCommunicationData
)
hashOperations
.
get
(
"Analogue"
,
map
.
get
(
"CODE"
));
map
.
put
(
"level"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
data
.
getState
())));
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"level"
)))
{
double
area
=
0
;
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"area"
)))
{
area
=
Double
.
valueOf
(
map
.
get
(
"area"
).
toString
());
}
map
.
put
(
"volume"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"level"
).
toString
())
*
area
));
}
else
{
map
.
put
(
"volume"
,
0
);
String
maxlevel
=
map
.
get
(
"max_level"
)
!=
null
?
map
.
get
(
"max_level"
).
toString
():
"0.0"
;
String
level
=
map
.
get
(
"value"
)
!=
null
&&
StringUtil
.
isNumeric
(
map
.
get
(
"value"
).
toString
())?
String
.
format
(
"%.2f"
,
(
Double
.
valueOf
(
map
.
get
(
"value"
).
toString
()))):
maxlevel
;
String
volume
=
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
level
)
*
area
);
if
(
hashOperations
.
size
(
"Analogue"
)
>
0
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"CODE"
))
||
!
hashOperations
.
hasKey
(
"Analogue"
,
map
.
get
(
"CODE"
)))
{
map
.
put
(
"level"
,
level
);
map
.
put
(
"volume"
,
volume
);
continue
;
}
EquipCommunicationData
data
=
(
EquipCommunicationData
)
hashOperations
.
get
(
"Analogue"
,
map
.
get
(
"CODE"
));
map
.
put
(
"level"
,
StringUtil
.
isNumeric
(
data
.
getState
())?
data
.
getState
():
level
);
map
.
put
(
"volume"
,
String
.
format
(
"%.2f"
,
(
Double
.
valueOf
(
map
.
get
(
"level"
).
toString
())*
area
)));
}
else
{
map
.
put
(
"level"
,
0
);
map
.
put
(
"volume"
,
0
);
map
.
put
(
"level"
,
level
);
map
.
put
(
"volume"
,
volume
);
}
}
return
list
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
42a577ae
...
...
@@ -307,8 +307,7 @@ public class View3dServiceImpl implements IView3dService {
Long
checkExceptionNum
=
this
.
getCheckExceptionNum
(
orgCode
,
date
);
vo
.
setCheckExceptionNum
(
checkExceptionNum
);
//4.统计故障数量-日期+机构
//TODO:待毛颖确认调整完成后继续
vo
.
setFireExceptionNum
(
0L
);
vo
.
setFireExceptionNum
(
getFireExceptionNum
(
orgCode
,
date
));
}
else
{
throw
new
YeeException
(
"机构:"
+
orgCode
+
" 不存在"
);
}
...
...
@@ -350,6 +349,15 @@ public class View3dServiceImpl implements IView3dService {
});
}
else
if
(
StatisticsErrorTypeEum
.
equip
.
getCode
().
equals
(
type
)){
//TODO:待毛颖确认调整完成后继续
List
<
CheckErrorBo
>
checkErrorBoList
=
view3dMapper
.
getAllFaultAlarm
(
params
);
Map
<
String
,
List
<
CheckErrorBo
>>
map
=
checkErrorBoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CheckErrorBo:
:
getStatus
));
map
.
forEach
((
k
,
v
)->{
SafetyIndexDetailVo
safetyIndexDetailVo
=
new
SafetyIndexDetailVo
();
safetyIndexDetailVo
.
setTypeCode
(
k
);
safetyIndexDetailVo
.
setTypeName
(
k
);
safetyIndexDetailVo
.
setContent
(
getErrorContentVos
(
v
));
resultList
.
add
(
safetyIndexDetailVo
);
});
}
return
resultList
;
}
...
...
@@ -411,9 +419,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 +428,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 +444,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
;
}
...
...
@@ -471,23 +486,24 @@ public class View3dServiceImpl implements IView3dService {
case
"check"
:
//巡检异常
return
view3dMapper
.
getCheckErrorTop5
(
orgCode
);
case
"fire"
:
return
JSON
.
parseArray
(
" [\r\n"
+
" {\r\n"
+
" \"id\": 35781,\r\n"
+
" \"code\": \"s001\",\r\n"
+
" \"label\": \"设备test\",\r\n"
+
" \"pointId\": \"1\",\r\n"
+
" \"type\": \"check\",\r\n"
+
" \"changeDate\": \"2020-04-23 14:31:31\"\r\n"
+
" },\r\n"
+
" {\r\n"
+
" \"id\": 35780,\r\n"
+
" \"code\": \"s002\",\r\n"
+
" \"label\": \"设备002\",\r\n"
+
" \"pointId\": \"23123\",\r\n"
+
" \"type\": \"check\",\r\n"
+
" \"changeDate\": \"2020-04-23 14:31:27\"\r\n"
+
" }]"
,
SafetyExecuteBo
.
class
);
return
view3dMapper
.
getFireAlarmTop5
(
orgCode
);
// return JSON.parseArray(" [\r\n" +
// " {\r\n" +
// " \"id\": 35781,\r\n" +
// " \"code\": \"s001\",\r\n" +
// " \"label\": \"设备test\",\r\n" +
// " \"pointId\": \"1\",\r\n" +
// " \"type\": \"check\",\r\n" +
// " \"changeDate\": \"2020-04-23 14:31:31\"\r\n" +
// " },\r\n" +
// " {\r\n" +
// " \"id\": 35780,\r\n" +
// " \"code\": \"s002\",\r\n" +
// " \"label\": \"设备002\",\r\n" +
// " \"pointId\": \"23123\",\r\n" +
// " \"type\": \"check\",\r\n" +
// " \"changeDate\": \"2020-04-23 14:31:27\"\r\n" +
// " }]", SafetyExecuteBo.class);
default
:
throw
new
YeeException
(
"不支持的类型 -->"
+
type
);
}
...
...
@@ -503,9 +519,10 @@ public class View3dServiceImpl implements IView3dService {
}
@Override
public
Object
getEquipStatusList
(
String
orgCode
)
{
return
JSON
.
parseArray
(
"[{\"id\":1,\"label\":\"设备1 label\",\"changeDate\":\"2020-04-26 10:00:00\"}"
+
",{\"id\":2,\"label\":\"设备2 label\",\"changeDate\":\"2020-04-25 10:00:00\"}]"
);
public
List
<
SafetyExecuteBo
>
getEquipStatusList
(
String
orgCode
)
{
return
view3dMapper
.
getEquipStatusTop5
(
orgCode
);
// return JSON.parseArray("[{\"id\":1,\"label\":\"设备1 label\",\"changeDate\":\"2020-04-26 10:00:00\"}"
// + ",{\"id\":2,\"label\":\"设备2 label\",\"changeDate\":\"2020-04-25 10:00:00\"}]");
}
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
42a577ae
...
...
@@ -112,7 +112,7 @@ public interface IView3dService {
* @param orgCode
* @return
*/
Object
getEquipStatusList
(
String
orgCode
);
List
<
SafetyExecuteBo
>
getEquipStatusList
(
String
orgCode
);
/**
* 左侧菜单(异常点)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ExceptionRegionVo.java
View file @
42a577ae
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
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/util/StringUtil.java
View file @
42a577ae
...
...
@@ -62,14 +62,15 @@ public class StringUtil {
*/
public
static
boolean
isNumeric
(
String
str
)
{
// 该正则表达式可以匹配所有的数字 包括负数
Pattern
pattern
=
Pattern
.
compile
(
"-?[0-9]+(\\.[0-9]+)?"
);
String
bigStr
;
try
{
bigStr
=
new
BigDecimal
(
str
).
toString
();
}
catch
(
Exception
e
)
{
return
false
;
//
异常 说明包含非数字。
return
false
;
//
异常 说明包含非数字。
}
Matcher
isNum
=
numericP
attern
.
matcher
(
bigStr
);
// matcher是全匹配
Matcher
isNum
=
p
attern
.
matcher
(
bigStr
);
// matcher是全匹配
if
(!
isNum
.
matches
())
{
return
false
;
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
View file @
42a577ae
...
...
@@ -152,8 +152,8 @@
</if>
</where>
order by a.create_date desc
<if
test=
"pageSize!=null and pageSize!=-1 and
pageNumber
!=null"
>
limit #{
pageNumber
},#{pageSize}
<if
test=
"pageSize!=null and pageSize!=-1 and
offset
!=null"
>
limit #{
offset
},#{pageSize}
</if>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
42a577ae
...
...
@@ -609,7 +609,8 @@
wr.max_level,
wr.area,
ep.CODE,
wr.`name`
wr.`name`,
ep.value
FROM
f_fire_equipment_point ep
INNER JOIN f_water_resource_equipment wre ON wre.fire_equipment_id = ep.fire_equipment_id AND ep.type = 'ANALOGUE'
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
42a577ae
...
...
@@ -438,7 +438,15 @@
</select>
<select
id=
"countFireException"
resultType=
"long"
>
SELECT
count(1)
FROM
f_alarm a
WHERE
`status` = TRUE
AND org_code = #{orgCode}
AND type = 'alarm_type_trouble'
AND date_format(a.update_date, '%Y-%m-%d') = #{date}
</select>
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
...
...
@@ -473,6 +481,23 @@
and a.org_code = #{orgCode}
</select>
<select
id=
"getAllFaultAlarm"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
SELECT
a.id,
a.fire_equipment_point_name as `name`,
fe.equip_type as status,
a.update_date as changeDate
FROM
f_alarm a
LEFT JOIN f_fire_equipment fe ON fe.id = a.fire_equipment_id
WHERE
`status` = TRUE
AND type = 'alarm_type_trouble'
AND a.org_code = #{orgCode}
AND date_format(a.update_date, '%Y-%m-%d') =#{date}
</select>
<select
id=
"getStatisticsCheck"
resultType=
"java.util.HashMap"
>
<![CDATA[
SELECT d.status as type, count(1) as value
...
...
@@ -503,11 +528,42 @@
left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3')
AND I.is_delete = 0
AND p.org_code = #{org
_c
ode} or p.org_code like CONCAT(#{orgCode},'-','%')
AND p.org_code = #{org
C
ode} or p.org_code like CONCAT(#{orgCode},'-','%')
ORDER BY p.check_time desc
limit 0,5
</select>
<select
id=
"getFireAlarmTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
a.fire_equipment_id id,
a.fire_equipment_code code,
a.fire_equipment_point_name as `label`,
a.update_date as changeDate,
"monitorEquipment" type
FROM
f_alarm a
WHERE
a.org_code = #{orgCode}
AND a.`status` = TRUE
AND a.type = 'alarm_type_fire'
ORDER BY a.update_date DESC
limit 0,5
</select>
<select
id=
"getEquipStatusTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
fed.id,
fed.eq_point_name label,
fed.e_value status,
fed.create_date changeDate
FROM
f_fire_equipment_data fed
WHERE
fed.org_code = #{orgCode}
ORDER BY fed.create_date DESC
limit 0,5
</select>
<select
id=
"getPintsByType"
resultType=
"hashmap"
>
select CONCAT(type,'-',id) as `key`,sp.* from
(select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'riskSource' as type,org_code as orgCode,
...
...
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