Commit 8b86a16d authored by 高建强's avatar 高建强

item:地图动作添加配置文件

parent 0555c50e
package com.yeejoin.amos.fas.common.enums;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.common.enums
* @ClassName: ContingencyActionEnum
* @Author: Jianqiang Gao
* @Description: 预案动作枚举
* @Date: 2022/6/17 9:34
* @Version: 1.0
*/
public enum ContingencyActionEnum {
ACTION1_2("action1-2", "镜头切换(旋转+推进)"),
;
private String key;
private String value;
ContingencyActionEnum(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
...@@ -30,7 +30,6 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse; ...@@ -30,7 +30,6 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse;
import com.yeejoin.amos.fas.business.util.CacheFactory; import com.yeejoin.amos.fas.business.util.CacheFactory;
import com.yeejoin.amos.fas.business.util.CacheMap; import com.yeejoin.amos.fas.business.util.CacheMap;
import com.yeejoin.amos.fas.business.vo.Toke; import com.yeejoin.amos.fas.business.vo.Toke;
import com.yeejoin.amos.fas.common.enums.ContingencyActionEnum;
import com.yeejoin.amos.fas.common.enums.ContingencyPlanStatusEnum; import com.yeejoin.amos.fas.common.enums.ContingencyPlanStatusEnum;
import com.yeejoin.amos.fas.common.enums.PlanRecordStatusEnum; import com.yeejoin.amos.fas.common.enums.PlanRecordStatusEnum;
import com.yeejoin.amos.fas.core.enums.NumberEnum; import com.yeejoin.amos.fas.core.enums.NumberEnum;
...@@ -122,6 +121,8 @@ public class ContingencyAction implements CustomerAction { ...@@ -122,6 +121,8 @@ public class ContingencyAction implements CustomerAction {
@Value("${rocket-plan-topic}") @Value("${rocket-plan-topic}")
private String rocketTopic; private String rocketTopic;
@Value("${maparea.action.is-area}")
private String isArea;
private static Map<String, String> OPERATE_RECORD_ID = new HashMap<>(); private static Map<String, String> OPERATE_RECORD_ID = new HashMap<>();
...@@ -642,7 +643,7 @@ public class ContingencyAction implements CustomerAction { ...@@ -642,7 +643,7 @@ public class ContingencyAction implements CustomerAction {
tempmap1.put("key", actionName); tempmap1.put("key", actionName);
tempmap1.put("content", paramJSON); tempmap1.put("content", paramJSON);
if (ContingencyActionEnum.ACTION1_2.getKey().equalsIgnoreCase(paramJSON)) { if (isArea.contains(paramJSON)) {
tempmap1.put("isArea", true); tempmap1.put("isArea", true);
} else { } else {
tempmap1.put("isArea", false); tempmap1.put("isArea", false);
...@@ -870,16 +871,16 @@ public class ContingencyAction implements CustomerAction { ...@@ -870,16 +871,16 @@ public class ContingencyAction implements CustomerAction {
content.put("stepCode", stepCode); content.put("stepCode", stepCode);
content.put("buttonCode", buttonCode); content.put("buttonCode", buttonCode);
if (ObjectUtils.isEmpty(fireEquipmentId)) { if (ObjectUtils.isEmpty(fireEquipmentId)) {
return; return;
} }
String batchNo = planDetailMapper.queryBatchNoByFireEquipmentId(fireEquipmentId); String batchNo = planDetailMapper.queryBatchNoByFireEquipmentId(fireEquipmentId);
if (ObjectUtils.isEmpty(batchNo)) { if (ObjectUtils.isEmpty(batchNo)) {
return; return;
} }
content.put("batchNo",batchNo ); content.put("batchNo", batchNo);
tempmap1.put("type", "buttonCache"); tempmap1.put("type", "buttonCache");
tempmap1.put("content",content); tempmap1.put("content", content);
result.add(tempmap1); result.add(tempmap1);
this.sendcmd("message", result); this.sendcmd("message", result);
...@@ -938,7 +939,7 @@ public class ContingencyAction implements CustomerAction { ...@@ -938,7 +939,7 @@ public class ContingencyAction implements CustomerAction {
event.setTopic(topic); event.setTopic(topic);
event.setMsgType(msgType); event.setMsgType(msgType);
contingencyLogPublisher.publish(event); contingencyLogPublisher.publish(event);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
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