diff --git a/apps/application/flow/compare/__init__.py b/apps/application/flow/compare/__init__.py index f1884501442..f0dd01523f5 100644 --- a/apps/application/flow/compare/__init__.py +++ b/apps/application/flow/compare/__init__.py @@ -24,10 +24,11 @@ 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(), 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..7e7a055162e --- /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:2026/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') },