From 3c2312b29591da0925b7140b6f2d5195b943e952 Mon Sep 17 00:00:00 2001 From: HuangXin Date: Tue, 19 Jan 2021 16:09:02 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E4=BF=AE=E6=AD=A3=E8=BF=AA?= =?UTF-8?q?=E6=99=AE=E6=97=81=E8=B7=AF=E7=89=B5=E5=BC=95=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E9=98=B2=E6=8A=A4IP=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ability/impl/DpTechBypassAbilityImpl.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java b/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java index f2b68def..a93393e2 100644 --- a/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java +++ b/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java @@ -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;