From b0e22a162dd735628d304ff246ae3bcb4d6119a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Tue, 17 Mar 2026 09:48:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?test:=20=E5=88=A4=E6=96=AD=E5=99=A8?= =?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=20`=E4=B8=8D=E7=AD=89=E4=BA=8E`=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/flow/compare/__init__.py | 2 +- .../flow/compare/not_equal_compare.py | 21 +++++++++++++++++++ ui/src/locales/lang/en-US/workflow.ts | 1 + ui/src/locales/lang/zh-CN/workflow.ts | 1 + ui/src/locales/lang/zh-Hant/workflow.ts | 1 + ui/src/workflow/common/data.ts | 1 + 6 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 apps/application/flow/compare/not_equal_compare.py diff --git a/apps/application/flow/compare/__init__.py b/apps/application/flow/compare/__init__.py index f1884501442..e334d92d21e 100644 --- a/apps/application/flow/compare/__init__.py +++ b/apps/application/flow/compare/__init__.py @@ -29,5 +29,5 @@ compare_handle_list = [GECompare(), GTCompare(), ContainCompare(), EqualCompare(), LTCompare(), LECompare(), LenLECompare(), LenGECompare(), LenEqualCompare(), LenGTCompare(), LenLTCompare(), IsNullCompare(), - IsNotNullCompare(), NotContainCompare(), IsTrueCompare(), IsNotTrueCompare(), StartWithCompare(), + IsNotNullCompare(), NotContainCompare(), NotEqualCompare(), IsTrueCompare(), IsNotTrueCompare(), StartWithCompare(), EndWithCompare()] diff --git a/apps/application/flow/compare/not_equal_compare.py b/apps/application/flow/compare/not_equal_compare.py new file mode 100644 index 00000000000..ec7f80f54d5 --- /dev/null +++ b/apps/application/flow/compare/not_equal_compare.py @@ -0,0 +1,21 @@ +# coding=utf-8 +""" + @project: maxkb + @Author:wangliang181230 + @file: not_equal_compare.py + @date:2025/3/17 9:41 + @desc: +""" +from typing import List + +from application.flow.compare import Compare + + +class NotEqualCompare(Compare): + + def support(self, node_id, fields: List[str], source_value, compare, target_value): + if compare == 'not_eq': + return True + + def compare(self, source_value, compare, target_value): + return str(source_value) != str(target_value) diff --git a/ui/src/locales/lang/en-US/workflow.ts b/ui/src/locales/lang/en-US/workflow.ts index d920d34fa77..939706357f9 100644 --- a/ui/src/locales/lang/en-US/workflow.ts +++ b/ui/src/locales/lang/en-US/workflow.ts @@ -524,6 +524,7 @@ You are a master of problem optimization, adept at accurately inferring user int contain: 'Contains', not_contain: 'Does not contain', eq: 'Equal to', + not_eq: 'Not equal to', ge: 'Greater than or equal to', gt: 'Greater than', le: 'Less than or equal to', diff --git a/ui/src/locales/lang/zh-CN/workflow.ts b/ui/src/locales/lang/zh-CN/workflow.ts index 8a5d65eb053..79164f83bff 100644 --- a/ui/src/locales/lang/zh-CN/workflow.ts +++ b/ui/src/locales/lang/zh-CN/workflow.ts @@ -515,6 +515,7 @@ export default { contain: '包含', not_contain: '不包含', eq: '等于', + not_eq: '不等于', ge: '大于等于', gt: '大于', le: '小于等于', diff --git a/ui/src/locales/lang/zh-Hant/workflow.ts b/ui/src/locales/lang/zh-Hant/workflow.ts index 07fe2b1fe46..326b8c5e863 100644 --- a/ui/src/locales/lang/zh-Hant/workflow.ts +++ b/ui/src/locales/lang/zh-Hant/workflow.ts @@ -509,6 +509,7 @@ export default { contain: '包含', not_contain: '不包含', eq: '等於', + not_eq: '不等於', ge: '大於等於', gt: '大於', le: '小於等於', diff --git a/ui/src/workflow/common/data.ts b/ui/src/workflow/common/data.ts index 3f820797c68..af5f12a0b52 100644 --- a/ui/src/workflow/common/data.ts +++ b/ui/src/workflow/common/data.ts @@ -942,6 +942,7 @@ export const compareList = [ { value: 'contain', label: t('workflow.compare.contain') }, { value: 'not_contain', label: t('workflow.compare.not_contain') }, { value: 'eq', label: t('workflow.compare.eq') }, + { value: 'not_eq', label: t('workflow.compare.not_eq') }, { value: 'ge', label: t('workflow.compare.ge') }, { value: 'gt', label: t('workflow.compare.gt') }, { value: 'le', label: t('workflow.compare.le') }, From ef4f65b7c9cb62d4b047ac4a63525d913acf3ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Tue, 17 Mar 2026 10:19:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?test:=20=E5=88=A4=E6=96=AD=E5=99=A8?= =?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=20`=E4=B8=8D=E7=AD=89=E4=BA=8E`=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/flow/compare/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/application/flow/compare/__init__.py b/apps/application/flow/compare/__init__.py index e334d92d21e..f0dd01523f5 100644 --- a/apps/application/flow/compare/__init__.py +++ b/apps/application/flow/compare/__init__.py @@ -24,6 +24,7 @@ from .len_lt_compare import * from .lt_compare import * from .not_contain_compare import * +from .not_equal_compare import * from .start_with import StartWithCompare compare_handle_list = [GECompare(), GTCompare(), ContainCompare(), EqualCompare(), LTCompare(), LECompare(), From 044ee4c52ce69a18eb5b5c5912b6478addb30191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Tue, 17 Mar 2026 11:00:04 +0800 Subject: [PATCH 3/3] Update date in not_equal_compare.py --- apps/application/flow/compare/not_equal_compare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/flow/compare/not_equal_compare.py b/apps/application/flow/compare/not_equal_compare.py index ec7f80f54d5..7e7a055162e 100644 --- a/apps/application/flow/compare/not_equal_compare.py +++ b/apps/application/flow/compare/not_equal_compare.py @@ -3,7 +3,7 @@ @project: maxkb @Author:wangliang181230 @file: not_equal_compare.py - @date:2025/3/17 9:41 + @date:2026/3/17 9:41 @desc: """ from typing import List