parent
3625cf0069
commit
ea800045f2
|
@ -6,6 +6,7 @@ import com.dispose.common.DpTechConfigValue;
|
|||
import com.dispose.common.IpAddrType;
|
||||
import com.dispose.pojo.dto.protocol.device.ability.DpBypassManager;
|
||||
import com.dispose.pojo.dto.protocol.device.ability.DpProtectObject;
|
||||
import com.dispose.pojo.dto.protocol.device.ability.DpProtectionStrategyInfo;
|
||||
import com.dispose.pojo.entity.ServiceInfo;
|
||||
import com.dptech.dispose.ArrayOfProtectionObjectDataForService;
|
||||
import com.dptech.dispose.ArrayOfProtectionTargetWithStrategyForService;
|
||||
|
@ -87,7 +88,28 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
|||
}
|
||||
|
||||
ret.getProtectionTargetWithStrategyForService().forEach(k -> {
|
||||
String objName = k.getProtectionTargetName().getValue();
|
||||
|
||||
// 只处理CMHI相关对象和模板
|
||||
if (objName.startsWith(OBJ_PREFIX)) {
|
||||
DpProtectionStrategyInfo obj;
|
||||
|
||||
// 缓存中不存在改关联关系
|
||||
if (!dpBypassManager.getProtectStrategy().containsKey(objName)) {
|
||||
obj = DpProtectionStrategyInfo.builder()
|
||||
.protectStrategyName(k.getProtectionStrategyName().getValue())
|
||||
.protectTargetName(objName)
|
||||
.build();
|
||||
dpBypassManager.getProtectStrategy().put(objName, obj);
|
||||
} else {
|
||||
obj = dpBypassManager.getProtectStrategy().get(objName);
|
||||
|
||||
// 如果关联关系
|
||||
if (!obj.getProtectStrategyName().equals(k.getProtectionStrategyName().getValue())) {
|
||||
obj.setProtectStrategyName(k.getProtectionStrategyName().getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
log.info("----Finish Begging DPTech Get All Protection Strategy Association Relation");
|
||||
|
|
Loading…
Reference in New Issue