Commit 2f2930fa authored by 高建强's avatar 高建强

item:删除预案冗余动作

parent 18a1f65a
......@@ -40,7 +40,6 @@ import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import com.yeejoin.amos.fas.dao.entity.Equipment;
import com.yeejoin.amos.fas.dao.entity.PlanDetail;
import com.yeejoin.amos.fas.dao.entity.PlanOperationRecord;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -303,7 +302,7 @@ public class ContingencyAction implements CustomerAction {
String msg = JSON.toJSONString(event);
log.info("RocketMQ发送的主题是: " + rocketTopic + ", 消息体是: " + toipResponse.toJsonStr() + "!");
try {
rocketMQService.sendMsg(rocketTopic, "plan_process", toipResponse);
rocketMQService.sendMsg(rocketTopic, "plan_process", toipResponse);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RuntimeException("RocketMQ消息发送失败!");
......@@ -850,27 +849,6 @@ public class ContingencyAction implements CustomerAction {
this.sendcmd("message", paramObj, result);
}
@RuleMethod(methodLabel = "自动执行动作", project = "换流站消防专项预案")
public void autoExecuteAction(
@MethodParam(paramLabel = "当前步骤") String currentSetup,
@MethodParam(paramLabel = "按钮状态") String buttonStatus,
@MethodParam(paramLabel = "按钮编码") String buttonCode,
@MethodParam(paramLabel = "规则主题") String topic,
@MethodParam(paramLabel = "预案对象") Object paramObj) {
ContingencyRo contingencyRo = (ContingencyRo) paramObj;
contingencyRo.setButtonState(buttonStatus);
contingencyRo.setButtonCode(buttonCode);
contingencyRo.setStepState(topic);
contingencyRo.setStep(currentSetup);
try {
//电力设备
Equipment equipment = equipmentService.queryOne(Long.parseLong(contingencyRo.getEquipmentId()));
ruleTrigger.publish(contingencyRo, equipment.getReservePlan(), ArrayUtils.toArray(contingencyRo.getEquipmentName()));
} catch (Exception e) {
e.printStackTrace();
}
}
@RuleMethod(methodLabel = "自动执行动作V2", project = "换流站消防专项预案")
public void autoExecuteActionV2(
@MethodParam(paramLabel = "步骤编码") String stepCode,
......
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