Commit 0fb78911 authored by suhuiguang's avatar suhuiguang

1.新增打印日志

2.实现序列化
parent 1dd974ab
......@@ -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();
}
......
......@@ -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);
......
package com.yeejoin.amos.fas.business.service.model;
public class CheckInputItemRo {
import java.io.Serializable;
/**
* @author DELL
*/
public class CheckInputItemRo implements Serializable {
/**
* 检查项id
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment