REM:
1. 修正迪普旁路牵引策略防护IP格式
This commit is contained in:
HuangXin 2021-01-19 16:09:02 +08:00
parent 528ef2249a
commit 3c2312b295
1 changed files with 18 additions and 1 deletions

View File

@ -231,6 +231,23 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
return ErrorCode.ERR_OK;
}
/**
* Gets traction strategy format.
*
* @param disposeObject the dispose object
* @return the traction strategy format
*/
private String getTractionStrategyFormat(String disposeObject) {
// 根据 - / 字符进行分割字符串
String[] ret = disposeObject.replaceAll("/", "-").split("-");
if(ret.length == 0) {
return disposeObject;
} else {
return ret[0] + "-" + ret[0];
}
}
/**
* Create traction strategy error code.
*
@ -257,7 +274,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
// 创建旁路手动牵引策略
ret = getCleanTypePort().addBypassManualTractionStrategyForUMC(tractionName,
objName,
disposeObject);
getTractionStrategyFormat(disposeObject));
if (ret.getResultRetVal() == 0) {
log.debug("----Finish Create Traction Strategy {} Succeed", tractionName);
return ErrorCode.ERR_OK;