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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
20 deletions
+78
-20
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+16
-9
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
+47
-9
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
b73d4be6
...
@@ -635,15 +635,22 @@ public class RiskSourceController extends BaseController {
...
@@ -635,15 +635,22 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点设备启动预案"
,
notes
=
"重点设备启动预案"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点设备启动预案"
,
notes
=
"重点设备启动预案"
)
@RequestMapping
(
value
=
"/startEquipReserve"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/startEquipReserve"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
startEquipReserve
(
@RequestParam
Long
id
,
@RequestParam
String
typeCode
)
{
public
ResponseModel
startEquipReserve
(
@RequestParam
Long
id
,
@RequestParam
String
typeCode
)
{
ReserveEnum
reserveEnum
=
riskSourceService
.
startEquipReserve
(
id
,
typeCode
);
try
{
Integer
status
=
reserveEnum
.
getStatus
();
ReserveEnum
reserveEnum
=
riskSourceService
.
startEquipReserve
(
id
,
typeCode
);
String
text
=
reserveEnum
.
getText
();
Integer
status
=
reserveEnum
.
getStatus
();
if
(
status
==
1
)
{
String
text
=
reserveEnum
.
getText
();
return
CommonResponseUtil2
.
success
(
text
);
if
(
status
==
1
)
{
}
else
{
return
CommonResponseUtil2
.
success
(
text
);
return
CommonResponseUtil2
.
failure
(
text
);
}
else
{
}
return
CommonResponseUtil2
.
failure
(
text
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
CommonResponseUtil2
.
failure
();
// TODO: handle exception
}
}
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
@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
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
...
@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -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.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindRegionBo
;
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.param.RetrieveParams
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
...
@@ -154,12 +157,17 @@ public class View3dController extends BaseController {
...
@@ -154,12 +157,17 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
getStatisticsCheck
(
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
getStatisticsCheck
(
orgCode
));
}
}
@Permission
@ApiOperation
(
value
=
"异常显示最新5条"
,
notes
=
"异常显示最新5条"
)
@ApiOperation
(
value
=
"异常显示最新5条"
,
notes
=
"异常显示最新5条"
)
@GetMapping
(
value
=
"safetyExecute/list/{type}"
)
@GetMapping
(
value
=
"safetyExecute/list/{type}"
)
public
CommonResponse
getSafetyExecuteListTop5
(
@PathVariable
(
"type"
)
String
type
){
public
CommonResponse
getSafetyExecuteListTop5
(
@PathVariable
(
"type"
)
String
type
){
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
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
@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;
...
@@ -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.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttSubscribe
;
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.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao
;
...
@@ -172,7 +173,11 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -172,7 +173,11 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
* 影响区域:消防安全=>火灾告警
* 影响区域:消防安全=>火灾告警
*/
*/
String
title
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
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
())){
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;
...
@@ -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.JpushMsgContentBo
;
import
com.yeejoin.amos.fas.business.bo.MsgParamBo
;
import
com.yeejoin.amos.fas.business.bo.MsgParamBo
;
import
com.yeejoin.amos.fas.business.bo.RpnCalculationBo
;
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.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
...
@@ -813,7 +814,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -813,7 +814,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 巡检异常
// 巡检异常
String
topicTwo
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
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"
);
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
...
@@ -1219,7 +1224,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1219,7 +1224,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* 影响区域:消防安全=>火灾告警
* 影响区域:消防安全=>火灾告警
*/
*/
String
topic
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
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 {
...
@@ -1780,9 +1789,23 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 消防安全
// 消防安全
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
)));
List
<
SafetyExecuteBo
>
riskdataList
=
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
Map
<
String
,
Object
>
riskResult
=
new
HashMap
<>();
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
)));
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"
);
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
...
@@ -1839,10 +1862,25 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1839,10 +1862,25 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 消防安全
// 消防安全
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
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
)));
List
<
SafetyExecuteBo
>
riskdataList
=
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
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"
);
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
webMqttComponent
.
publish
(
topicThree
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexWeek
(
orgCode
)));
webMqttComponent
.
publish
(
topicThree
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexWeek
(
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