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
b73d4be6
Commit
b73d4be6
authored
Mar 29, 2021
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改三维接口返回
parent
5247f7f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
10 deletions
+68
-10
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+7
-0
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+9
-1
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+6
-1
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+46
-8
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
b73d4be6
...
...
@@ -636,6 +636,7 @@ public class RiskSourceController extends BaseController {
@RequestMapping
(
value
=
"/startEquipReserve"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
startEquipReserve
(
@RequestParam
Long
id
,
@RequestParam
String
typeCode
)
{
try
{
ReserveEnum
reserveEnum
=
riskSourceService
.
startEquipReserve
(
id
,
typeCode
);
Integer
status
=
reserveEnum
.
getStatus
();
String
text
=
reserveEnum
.
getText
();
...
...
@@ -644,6 +645,12 @@ public class RiskSourceController extends BaseController {
}
else
{
return
CommonResponseUtil2
.
failure
(
text
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
CommonResponseUtil2
.
failure
();
// TODO: handle exception
}
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
b73d4be6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
...
...
@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindRegionBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.param.RetrieveParams
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
...
...
@@ -154,12 +157,17 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
getStatisticsCheck
(
orgCode
));
}
@Permission
@ApiOperation
(
value
=
"异常显示最新5条"
,
notes
=
"异常显示最新5条"
)
@GetMapping
(
value
=
"safetyExecute/list/{type}"
)
public
CommonResponse
getSafetyExecuteListTop5
(
@PathVariable
(
"type"
)
String
type
){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyExecuteListTop5
(
type
,
orgCode
));
List
<
SafetyExecuteBo
>
dataList
=
view3dService
.
getSafetyExecuteListTop5
(
type
,
orgCode
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"type"
,
type
);
result
.
put
(
"dataList"
,
dataList
);
return
CommonResponseUtil
.
success
(
result
);
}
@Permission
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
b73d4be6
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.fas.business.action.model.ContingencyRo;
import
com.yeejoin.amos.fas.business.action.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttSubscribe
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao
;
...
...
@@ -172,7 +173,11 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
* 影响区域:消防安全=>火灾告警
*/
String
title
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
equipmentSpecific
.
getOrgCode
())));
List
<
SafetyExecuteBo
>
dataList
=
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
equipmentSpecific
.
getOrgCode
());
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"type"
,
"fire"
);
result
.
put
(
"dataList"
,
dataList
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
result
));
// 报警触发调用规则服务
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
specificIndexType
)&&!
ObjectUtils
.
isEmpty
(
equipment
)
&&
!
ObjectUtils
.
isEmpty
(
equipment
.
getReservePlan
())){
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
b73d4be6
...
...
@@ -65,6 +65,7 @@ import com.yeejoin.amos.fas.business.bo.JpushMsgBo;
import
com.yeejoin.amos.fas.business.bo.JpushMsgContentBo
;
import
com.yeejoin.amos.fas.business.bo.MsgParamBo
;
import
com.yeejoin.amos.fas.business.bo.RpnCalculationBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
...
...
@@ -813,7 +814,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 巡检异常
String
topicTwo
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
webMqttComponent
.
publish
(
topicTwo
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
List
<
SafetyExecuteBo
>
dataList
=
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"type"
,
"check"
);
result
.
put
(
"dataList"
,
dataList
);
webMqttComponent
.
publish
(
topicTwo
,
JSON
.
toJSONString
(
result
));
// 一周安全趋势
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
...
...
@@ -1219,7 +1224,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* 影响区域:消防安全=>火灾告警
*/
String
topic
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
fireEquipmentPoint
.
getOrgCode
())));
List
<
SafetyExecuteBo
>
dataList
=
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
fireEquipmentPoint
.
getOrgCode
());
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"type"
,
"fire"
);
result
.
put
(
"dataList"
,
dataList
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
}
}
...
...
@@ -1780,9 +1789,23 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 消防安全
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
)));
List
<
SafetyExecuteBo
>
riskdataList
=
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
);
Map
<
String
,
Object
>
riskResult
=
new
HashMap
<>();
riskResult
.
put
(
"type"
,
"risk"
);
riskResult
.
put
(
"dataList"
,
riskdataList
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
riskResult
));
List
<
SafetyExecuteBo
>
checkdataList
=
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
);
Map
<
String
,
Object
>
checkResult
=
new
HashMap
<>();
checkResult
.
put
(
"type"
,
"check"
);
checkResult
.
put
(
"dataList"
,
checkdataList
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
checkResult
));
List
<
SafetyExecuteBo
>
firedataList
=
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
);
Map
<
String
,
Object
>
firekResult
=
new
HashMap
<>();
firekResult
.
put
(
"type"
,
"fire"
);
firekResult
.
put
(
"dataList"
,
firedataList
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
firekResult
));
// 一周安全趋势
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
...
...
@@ -1839,9 +1862,24 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 消防安全
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
)));
List
<
SafetyExecuteBo
>
riskdataList
=
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
);
Map
<
String
,
Object
>
riskResult
=
new
HashMap
<>();
riskResult
.
put
(
"type"
,
"risk"
);
riskResult
.
put
(
"dataList"
,
riskdataList
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
riskResult
));
List
<
SafetyExecuteBo
>
checkdataList
=
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
);
Map
<
String
,
Object
>
checkResult
=
new
HashMap
<>();
checkResult
.
put
(
"type"
,
"check"
);
checkResult
.
put
(
"dataList"
,
checkdataList
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
checkResult
));
List
<
SafetyExecuteBo
>
firedataList
=
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
);
Map
<
String
,
Object
>
firekResult
=
new
HashMap
<>();
firekResult
.
put
(
"type"
,
"fire"
);
firekResult
.
put
(
"dataList"
,
firedataList
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
firekResult
));
// 一周安全趋势
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
...
...
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