Commit 03db73c5 authored by maoying's avatar maoying

规则消息推送调整

parent 3f60cf1f
...@@ -568,7 +568,6 @@ public class RiskSourceController extends BaseController { ...@@ -568,7 +568,6 @@ public class RiskSourceController extends BaseController {
@ApiOperation(httpMethod = "PUT", value = "上传巡检数据", notes = "上传巡检数据") @ApiOperation(httpMethod = "PUT", value = "上传巡检数据", notes = "上传巡检数据")
@RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT) @RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse postPatrolData(@RequestBody ProtalDataRo protalData) throws Exception { public CommonResponse postPatrolData(@RequestBody ProtalDataRo protalData) throws Exception {
riskSourceService.protalRuleMessagePush(protalData);
riskSourceService.processProtalData(getToken(),getProduct(),getAppKey(),protalData); riskSourceService.processProtalData(getToken(),getProduct(),getAppKey(),protalData);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
......
...@@ -586,7 +586,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -586,7 +586,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override @Override
@Async @Async
public void processProtalData(String toke, String product, String appKey, ProtalDataRo protalData) { public void processProtalData(String toke, String product, String appKey, ProtalDataRo protalData) {
if (!CollectionUtils.isEmpty(protalData.getPointInputitems())) { //巡检消息规则推送
protalRuleMessagePush(protalData);
if (!CollectionUtils.isEmpty(protalData.getPointInputitems())) {
Long pointId = protalData.getId(); Long pointId = protalData.getId();
List<Long> inputIds = Lists.newArrayList(); List<Long> inputIds = Lists.newArrayList();
Map<Long, CheckInputItemRo> map = Maps.newHashMap(); Map<Long, CheckInputItemRo> map = Maps.newHashMap();
...@@ -625,13 +627,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -625,13 +627,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* 巡检消息规则推送 * 巡检消息规则推送
* @param protalData * @param protalData
*/ */
@Override
@Async @Async
public void protalRuleMessagePush(ProtalDataRo protalData){ private void protalRuleMessagePush(ProtalDataRo protalData){
String bacthNo = UUID.randomUUID().toString(); String bacthNo = UUID.randomUUID().toString();
protalData.setBatchNo(bacthNo); protalData.setBatchNo(bacthNo);
protalData.setOriginalNodeState(protalData.getNodeState()); protalData.setOriginalNodeState(protalData.getNodeState());
protalData.setUserName(protalData.getCheckUser()); protalData.setUserName(protalData.getCheckUser());
protalData.setPointName(protalData.getName());
try { try {
ruleTrigger.publish(protalData, "风险管控/patrol", null); ruleTrigger.publish(protalData, "风险管控/patrol", null);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -78,9 +78,6 @@ public interface IRiskSourceService { ...@@ -78,9 +78,6 @@ public interface IRiskSourceService {
void processProtalData(String toke,String product,String appKey,ProtalDataRo protalData) throws Exception; void processProtalData(String toke,String product,String appKey,ProtalDataRo protalData) throws Exception;
void protalRuleMessagePush(ProtalDataRo protalData);
RiskSourceTreeResponse queryRiskSourceDetailById(Long id); RiskSourceTreeResponse queryRiskSourceDetailById(Long 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