Commit 1cf85534 authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents cb2b3e16 227f6697
...@@ -5,8 +5,6 @@ import static org.hamcrest.CoreMatchers.nullValue; ...@@ -5,8 +5,6 @@ import static org.hamcrest.CoreMatchers.nullValue;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -130,6 +128,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -130,6 +128,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private long time; private long time;
@Value("${mqtt.topic.command.power.deployment}") @Value("${mqtt.topic.command.power.deployment}")
private String topic1; private String topic1;
@Value("${mqtt.topic.command.knowledgebase.alert.match}")
private String topicMatch;
@Autowired @Autowired
private OrgUsrServiceImpl iOrgUsrService; private OrgUsrServiceImpl iOrgUsrService;
...@@ -971,6 +972,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -971,6 +972,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public Object toCompletePoliceSituationMatch(Long id) throws Exception{ public Object toCompletePoliceSituationMatch(Long id) throws Exception{
Object result=null;;
AlertCalledFormDto dto = (AlertCalledFormDto) selectAlertCalledByIdNoRedis(id); AlertCalledFormDto dto = (AlertCalledFormDto) selectAlertCalledByIdNoRedis(id);
AlertCalled alertCalled = dto.getAlertCalled(); AlertCalled alertCalled = dto.getAlertCalled();
List<FormValue> list = dto.getDynamicFormAlert(); List<FormValue> list = dto.getDynamicFormAlert();
...@@ -984,9 +986,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -984,9 +986,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
break; break;
} }
} }
return getIdsList1( alertCalled.getAlertTypeCode() ,AlertStageEnums.救援预案警情类型.getValue() + "," + condition1, result= getIdsList1( alertCalled.getAlertTypeCode() ,AlertStageEnums.救援预案警情类型.getValue() + "," + condition1,
AlertStageEnums.责任单位.getValue() + "," + condition2, AlertStageEnums.责任单位.getValue() + "," + condition2,
AlertStageEnums.重点部位名称.getValue() + "," + condition3); AlertStageEnums.重点部位名称.getValue() + "," + condition3);
//
} else if (alertCalled.getAlertTypeCode().equals(AlertStageEnums.HKJY.getCode())) { } else if (alertCalled.getAlertTypeCode().equals(AlertStageEnums.HKJY.getCode())) {
String condition1 = alertCalled.getAlertType();// 航空器救援 String condition1 = alertCalled.getAlertType();// 航空器救援
String condition2 = ""; String condition2 = "";
...@@ -995,12 +1000,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -995,12 +1000,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
condition2 = condition1 + i.getValue(); condition2 = condition1 + i.getValue();
} }
} }
return getIdsList1(alertCalled.getAlertTypeCode(),AlertStageEnums.救援预案警情类型.getValue() + "," + condition1, result= getIdsList1(alertCalled.getAlertTypeCode(),AlertStageEnums.救援预案警情类型.getValue() + "," + condition1,
AlertStageEnums.航空器救援子类.getValue() + "," + condition2, null); AlertStageEnums.航空器救援子类.getValue() + "," + condition2, null);
} else { } else {
String condition1 = alertCalled.getAlertType(); String condition1 = alertCalled.getAlertType();
return getIdsList1(alertCalled.getAlertTypeCode(),AlertStageEnums.救援预案警情类型.getValue() + "," + condition1, null, null); result= getIdsList1(alertCalled.getAlertTypeCode(),AlertStageEnums.救援预案警情类型.getValue() + "," + condition1, null, null);
} }
emqKeeper.getMqttClient().publish(topicMatch, result.toString().getBytes(), RuleConfig.DEFAULT_QOS, true);
return result;
} }
// private List<Map<String, Object>> getIdsList(String condition1, String condition2, String condition3) { // private List<Map<String, Object>> getIdsList(String condition1, String condition2, String condition3) {
......
...@@ -65,7 +65,8 @@ mqtt.topic.command.power.deployment=power ...@@ -65,7 +65,8 @@ mqtt.topic.command.power.deployment=power
mqtt.topic.alert.iot=iot-system-alarm mqtt.topic.alert.iot=iot-system-alarm
mqtt.topic.alert.iot.web=iot-system-alarm-web mqtt.topic.alert.iot.web=iot-system-alarm-web
#警情预案匹配的消息topic名称
mqtt.topic.command.knowledgebase.alert.match=knowledgebaseAlertMatch
security.systemctl.name=AMOS-API-SYSTEMCTL security.systemctl.name=AMOS-API-SYSTEMCTL
......
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