From dec14bca0a616da54ff545d6fd3eb6f7989f1d06 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Sun, 28 Jan 2024 13:47:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BD=AC=E6=8D=A2=E8=8A=82=E7=82=B9=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=B5=81=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1077329307074560]后端-数据转换节点工单流转逻辑 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1077329307074560 --- .../transaction/CiEntityTransactionVo.java | 20 +++++++++++++++++++ .../attr/AttrValueIrregularException.java | 4 ++++ .../exception/ci/CiIsAbstractedException.java | 5 +++++ .../exception/ci/CiNotFoundException.java | 4 ++++ .../ci/CiUniqueAttrNotFoundException.java | 4 ++++ ...iUniqueRuleAttrTypeIrregularException.java | 4 ++++ .../ci/DownwardCiNotFoundException.java | 4 ++++ 7 files changed, 45 insertions(+) diff --git a/src/main/java/neatlogic/framework/cmdb/dto/transaction/CiEntityTransactionVo.java b/src/main/java/neatlogic/framework/cmdb/dto/transaction/CiEntityTransactionVo.java index 4ae8cf4..fc919a0 100644 --- a/src/main/java/neatlogic/framework/cmdb/dto/transaction/CiEntityTransactionVo.java +++ b/src/main/java/neatlogic/framework/cmdb/dto/transaction/CiEntityTransactionVo.java @@ -96,6 +96,10 @@ public class CiEntityTransactionVo implements Serializable { private String description; @EntityField(name = "唯一属性列表", type = ApiParamType.LONG) private List uniqueAttrIdList; + /** 配置路径列表 **/ + private List configurationPathList; + /** 实际路径列表 **/ + private List actualPathList; public CiEntityTransactionVo() { @@ -793,4 +797,20 @@ public class CiEntityTransactionVo implements Serializable { } return hash; } + + public List getConfigurationPathList() { + return configurationPathList; + } + + public void setConfigurationPathList(List configurationPathList) { + this.configurationPathList = configurationPathList; + } + + public List getActualPathList() { + return actualPathList; + } + + public void setActualPathList(List actualPathList) { + this.actualPathList = actualPathList; + } } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java b/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java index 9163560..e69605f 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java @@ -25,4 +25,8 @@ public class AttrValueIrregularException extends ApiRuntimeException { super("模型“{0}({1})”属性“{2}({3})”的值“{4}”不是合法的{3}类型", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), value, attrVo.getTypeText()); } + public AttrValueIrregularException(AttrVo attrVo, String value, String configurationPath, String actualPath) { + super("模型“{0}({1})”属性“{2}({3})”的值“{4}”不是合法的{3}类型,配置路径:{5},实际路径:{6}", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), value, attrVo.getTypeText(), configurationPath, actualPath); + } + } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java index 8077a7b..f0966b4 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java @@ -16,6 +16,7 @@ package neatlogic.framework.cmdb.exception.ci; +import neatlogic.framework.cmdb.dto.ci.CiVo; import neatlogic.framework.exception.core.ApiRuntimeException; import neatlogic.framework.util.$; @@ -29,6 +30,10 @@ public class CiIsAbstractedException extends ApiRuntimeException { super(getMessage(type, ciName)); } + public CiIsAbstractedException(CiVo ciVo, String configurationPath, String actualPath) { + super("配置项模型:“{0}({1})”是抽象模型,不能直接添加数据,配置路径:{2},实际路径:{3}", ciVo.getLabel(), ciVo.getName(), configurationPath, actualPath); + } + private static String getMessage(Type type, String ciName) { if (type == Type.DATA) { return $.t("nfcec.ciisabstractedexception.data", ciName); diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java index de46275..b77ac2c 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java @@ -27,4 +27,8 @@ public class CiNotFoundException extends ApiRuntimeException { public CiNotFoundException(String ciName) { super("配置项模型“{0}”不存在", ciName); } + + public CiNotFoundException(String ciName, String configurationPath, String actualPath) { + super("配置项模型“{0}”不存在,配置路径:{1},实际路径:{2}", ciName, configurationPath, actualPath); + } } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java index 5e612b8..ae18378 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java @@ -38,6 +38,10 @@ public class CiUniqueAttrNotFoundException extends ApiRuntimeException { super("nfcec.ciuniqueattrnotfoundexception.ciuniqueattrnotfoundexception_c", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName()); } + public CiUniqueAttrNotFoundException(AttrVo attrVo, String configurationPath, String actualPath) { + super("模型“{0}({1})”的唯一规则属性“{2}({3})”的值为空,配置路径:{4},实际路径:{5}", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), configurationPath, actualPath); + } + public CiUniqueAttrNotFoundException(Long ciId, Long attrId) { super("nfcec.ciuniqueattrnotfoundexception.ciuniqueattrnotfoundexception_d", ciId, attrId); } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java index e3af37b..6eeb210 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java @@ -28,4 +28,8 @@ public class CiUniqueRuleAttrTypeIrregularException extends ApiRuntimeException public CiUniqueRuleAttrTypeIrregularException(AttrVo attrVo) { super("nfcec.ciuniqueruleattrtypeirregularexception.ciuniqueruleattrtypeirregularexception_b", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName()); } + + public CiUniqueRuleAttrTypeIrregularException(AttrVo attrVo, String configurationPath, String actualPath) { + super("模型“{0}({1})”的唯一规则属性“{2}({3})”不能是一个表达式属性,配置路径:{4},实际路径:{5}", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), configurationPath, actualPath); + } } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java index cdbe631..4b50a40 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java @@ -8,4 +8,8 @@ public class DownwardCiNotFoundException extends ApiRuntimeException { public DownwardCiNotFoundException(CiVo rootCi, String ciName) { super("nfcec.downwardcinotfoundexception.downwardcinotfoundexception", rootCi.getLabel(), rootCi.getName(), ciName); } + + public DownwardCiNotFoundException(CiVo rootCi, String ciName, String configurationPath, String actualPath) { + super("在配置项模型“{0}({1})”的下游模型中找不到配置项模型“{2}”,配置路径:{3},实际路径:{4}", rootCi.getLabel(), rootCi.getName(), ciName, configurationPath, actualPath); + } } -- Gitee From f046c744161aaef8667e1d1ca13ce6c496f97370 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Tue, 30 Jan 2024 16:34:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BD=AC=E6=8D=A2=E8=8A=82=E7=82=B9=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=B5=81=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1077329307074560]后端-数据转换节点工单流转逻辑 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1077329307074560 --- .../cmdb/exception/attr/AttrValueIrregularException.java | 4 ++-- .../cmdb/exception/ci/CiIsAbstractedException.java | 2 +- .../framework/cmdb/exception/ci/CiNotFoundException.java | 6 +++--- .../cmdb/exception/ci/CiUniqueAttrNotFoundException.java | 2 +- .../ci/CiUniqueRuleAttrTypeIrregularException.java | 2 +- .../cmdb/exception/ci/DownwardCiNotFoundException.java | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java b/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java index e69605f..9cadc88 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/attr/AttrValueIrregularException.java @@ -22,11 +22,11 @@ import neatlogic.framework.exception.core.ApiRuntimeException; public class AttrValueIrregularException extends ApiRuntimeException { public AttrValueIrregularException(AttrVo attrVo, String value) { - super("模型“{0}({1})”属性“{2}({3})”的值“{4}”不是合法的{3}类型", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), value, attrVo.getTypeText()); + super("nfcea.attrvalueirregularexception.attrvalueirregularexception_a", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), value, attrVo.getTypeText()); } public AttrValueIrregularException(AttrVo attrVo, String value, String configurationPath, String actualPath) { - super("模型“{0}({1})”属性“{2}({3})”的值“{4}”不是合法的{3}类型,配置路径:{5},实际路径:{6}", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), value, attrVo.getTypeText(), configurationPath, actualPath); + super("nfcea.attrvalueirregularexception.attrvalueirregularexception_b", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), value, attrVo.getTypeText(), configurationPath, actualPath); } } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java index f0966b4..6ffa165 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiIsAbstractedException.java @@ -31,7 +31,7 @@ public class CiIsAbstractedException extends ApiRuntimeException { } public CiIsAbstractedException(CiVo ciVo, String configurationPath, String actualPath) { - super("配置项模型:“{0}({1})”是抽象模型,不能直接添加数据,配置路径:{2},实际路径:{3}", ciVo.getLabel(), ciVo.getName(), configurationPath, actualPath); + super("nfcec.ciisabstractedexception.ciisabstractedexception_a", ciVo.getLabel(), ciVo.getName(), configurationPath, actualPath); } private static String getMessage(Type type, String ciName) { diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java index b77ac2c..d429d7f 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiNotFoundException.java @@ -20,15 +20,15 @@ import neatlogic.framework.exception.core.ApiRuntimeException; public class CiNotFoundException extends ApiRuntimeException { public CiNotFoundException(Long ciId) { - super("配置项模型“{0}”不存在", ciId); + super("nfcec.cinotfoundexception.cinotfoundexception_a", ciId); } public CiNotFoundException(String ciName) { - super("配置项模型“{0}”不存在", ciName); + super("nfcec.cinotfoundexception.cinotfoundexception_a", ciName); } public CiNotFoundException(String ciName, String configurationPath, String actualPath) { - super("配置项模型“{0}”不存在,配置路径:{1},实际路径:{2}", ciName, configurationPath, actualPath); + super("nfcec.cinotfoundexception.cinotfoundexception_b", ciName, configurationPath, actualPath); } } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java index ae18378..625fbab 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueAttrNotFoundException.java @@ -39,7 +39,7 @@ public class CiUniqueAttrNotFoundException extends ApiRuntimeException { } public CiUniqueAttrNotFoundException(AttrVo attrVo, String configurationPath, String actualPath) { - super("模型“{0}({1})”的唯一规则属性“{2}({3})”的值为空,配置路径:{4},实际路径:{5}", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), configurationPath, actualPath); + super("nfcec.ciuniqueattrnotfoundexception.ciuniqueattrnotfoundexception_f", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), configurationPath, actualPath); } public CiUniqueAttrNotFoundException(Long ciId, Long attrId) { diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java index 6eeb210..8aabce4 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiUniqueRuleAttrTypeIrregularException.java @@ -30,6 +30,6 @@ public class CiUniqueRuleAttrTypeIrregularException extends ApiRuntimeException } public CiUniqueRuleAttrTypeIrregularException(AttrVo attrVo, String configurationPath, String actualPath) { - super("模型“{0}({1})”的唯一规则属性“{2}({3})”不能是一个表达式属性,配置路径:{4},实际路径:{5}", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), configurationPath, actualPath); + super("nfcec.ciuniqueruleattrtypeirregularexception.ciuniqueruleattrtypeirregularexception_c", attrVo.getCiLabel(), attrVo.getCiName(), attrVo.getLabel(), attrVo.getName(), configurationPath, actualPath); } } diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java index 4b50a40..b9fd45f 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/DownwardCiNotFoundException.java @@ -10,6 +10,6 @@ public class DownwardCiNotFoundException extends ApiRuntimeException { } public DownwardCiNotFoundException(CiVo rootCi, String ciName, String configurationPath, String actualPath) { - super("在配置项模型“{0}({1})”的下游模型中找不到配置项模型“{2}”,配置路径:{3},实际路径:{4}", rootCi.getLabel(), rootCi.getName(), ciName, configurationPath, actualPath); + super("nfcec.downwardcinotfoundexception.downwardcinotfoundexception_b", rootCi.getLabel(), rootCi.getName(), ciName, configurationPath, actualPath); } } -- Gitee From 6e148c73d54cc0d78987da8dcdc74cab951c9eb9 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Tue, 30 Jan 2024 18:34:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BD=AC=E6=8D=A2=E8=8A=82=E7=82=B9=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=B5=81=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1077329307074560]后端-数据转换节点工单流转逻辑 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1077329307074560 --- .../exception/cientity/AttrEntityValueEmptyException.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/framework/cmdb/exception/cientity/AttrEntityValueEmptyException.java b/src/main/java/neatlogic/framework/cmdb/exception/cientity/AttrEntityValueEmptyException.java index 0760f8d..a55d0e5 100644 --- a/src/main/java/neatlogic/framework/cmdb/exception/cientity/AttrEntityValueEmptyException.java +++ b/src/main/java/neatlogic/framework/cmdb/exception/cientity/AttrEntityValueEmptyException.java @@ -16,11 +16,16 @@ package neatlogic.framework.cmdb.exception.cientity; +import neatlogic.framework.cmdb.dto.ci.AttrVo; +import neatlogic.framework.cmdb.dto.ci.CiVo; import neatlogic.framework.exception.core.ApiRuntimeException; public class AttrEntityValueEmptyException extends ApiRuntimeException { public AttrEntityValueEmptyException(String msg) { - super("属性“{0}”值不能为空", msg); + super("nfcec.attrentityvalueemptyexception.attrentityvalueemptyexception_a", msg); } + public AttrEntityValueEmptyException(CiVo ciVo, AttrVo attrVo) { + super("nfcec.attrentityvalueemptyexception.attrentityvalueemptyexception_b", ciVo.getLabel(), ciVo.getName(), attrVo.getLabel(), attrVo.getName()); + } } -- Gitee