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
0fb78911
Commit
0fb78911
authored
Jul 16, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增打印日志
2.实现序列化
parent
1dd974ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+3
-1
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+6
-5
CheckInputItemRo.java
...oin/amos/fas/business/service/model/CheckInputItemRo.java
+6
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
0fb78911
...
...
@@ -5,6 +5,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -568,7 +569,8 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"上传巡检数据"
,
notes
=
"上传巡检数据"
)
@RequestMapping
(
value
=
"/data/patroldata"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
postPatrolData
(
@RequestBody
ProtalDataRo
protalData
)
throws
Exception
{
riskSourceService
.
processProtalData
(
getToken
(),
getProduct
(),
getAppKey
(),
protalData
);
log
.
info
(
"上传巡检数据"
+
JSONObject
.
toJSONString
(
protalData
));
riskSourceService
.
processProtalData
(
getToken
(),
getProduct
(),
getAppKey
(),
protalData
);
return
CommonResponseUtil
.
success
();
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
0fb78911
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
...
...
@@ -642,10 +643,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
try
{
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
log
.
info
(
"巡检消息发送规则"
+
JSONObject
.
toJSONString
(
protalData
));
ruleTrigger
.
publish
(
protalData
,
"风险管控/patrol"
,
null
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
@@ -1363,10 +1364,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
this
.
updateParentRpn
(
riskSource
.
getParentId
());
//4.极光推送给手机客户端
if
(
"recovery"
.
equals
(
notifyType
)
||
"fmeaUpdate"
.
equals
(
notifyType
)
||
(
"alarm"
.
equals
(
notifyType
)
&&
rpnDiffer
>
0
)
||
(
"patrol"
.
equals
(
notifyType
)
&&
rpnDiffer
>
0
&&
CheckStatusEnum
.
UNQUALIFIED
.
getName
().
equals
(
checkStatus
)))
{
jpushRiskSourceMessage
(
jpushMsgBo
);
//
jpushRiskSourceMessage(jpushMsgBo);
}
//5.规则告警(消息)
if
(
"recovery"
.
equals
(
notifyType
)
||
"fmeaUpdate"
.
equals
(
notifyType
)
||
(
"alarm"
.
equals
(
notifyType
)
&&
rpnDiffer
>
0
)
||
(
notifyType
==
"patrol"
&&
rpnDiffer
>
0
&&
CheckStatusEnum
.
UNQUALIFIED
.
getName
().
equals
(
checkStatus
)))
{
if
(
"recovery"
.
equals
(
notifyType
)
||
"fmeaUpdate"
.
equals
(
notifyType
)
||
(
"alarm"
.
equals
(
notifyType
)
&&
rpnDiffer
>
0
)
||
(
"patrol"
.
equals
(
notifyType
)
&&
rpnDiffer
>
0
&&
CheckStatusEnum
.
UNQUALIFIED
.
getName
().
equals
(
checkStatus
)))
{
notifyRule
(
riskSourceId
,
rpn
,
rpni
,
notifyType
,
changeType
,
jpushMsgBo
.
getMsg
());
}
//6.通知全景监控屏幕数据刷新
...
...
@@ -1485,7 +1486,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSourceRuleRo
.
setTitle
(
msgContentBo
.
getSubject
());
riskSourceRuleRo
.
setRg
(
String
.
valueOf
(
rpnr
.
subtract
(
rpni
).
toBigInteger
()));
try
{
// remoteRuleServer.fireRule(riskSourceRuleRo, "风险管控/riskSource"
);
log
.
info
(
"规则告警发送数据为"
+
JSONObject
.
toJSONString
(
riskSourceRuleRo
)
);
ruleTrigger
.
publish
(
riskSourceRuleRo
,
"风险管控/riskSource"
,
null
);
// 没有配决策流,processIds传null即可
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则异常"
,
e
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/CheckInputItemRo.java
View file @
0fb78911
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
public
class
CheckInputItemRo
{
import
java.io.Serializable
;
/**
* @author DELL
*/
public
class
CheckInputItemRo
implements
Serializable
{
/**
* 检查项id
*/
...
...
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