From 9776d77169a6ab1e3012e9a654d7c1097b41e51b Mon Sep 17 00:00:00 2001 From: wangshaoping Date: Fri, 4 Jul 2025 12:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=A1=86=E6=9E=B6=E5=8F=91?= =?UTF-8?q?=E5=B8=83:=208.2.22=20=20=201)=20=E8=A7=84=E5=88=99=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E4=B8=AD=EF=BC=8C=E5=A2=9E=E5=8A=A0=20Java=20?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=BC=95=E6=93=8E=20=20=202)=20=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=BC=95=E6=93=8E=E4=B8=AD=EF=BC=8C=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=AD=EF=BC=8C=E5=B0=86=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=99=84=E5=8A=A0=E5=B1=9E=E6=80=A7=E4=B8=AD=E7=9A=84=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E5=80=BC=E5=8F=98=E9=87=8F=E6=9B=BF=E6=8D=A2=E6=88=90?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=20=20=203)=20=E8=A7=84=E5=88=99=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E4=B8=AD=EF=BC=8C=E6=A8=A1=E5=9E=8B=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=B0=86=E5=8F=82=E6=95=B0=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E4=B8=AD=E7=9A=84=E6=9E=9A=E4=B8=BE=E5=80=BC?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=9B=BF=E6=8D=A2=E6=88=90=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/code/generator/impl/processor/ExecutionFlow.java | 4 ++-- .../rule/core/code/generator/impl/processor/OptionValue.java | 4 ++-- .../src/views/shared/TestcaseParameterGrid.vue | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/ExecutionFlow.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/ExecutionFlow.java index d625c5ec..b3465a20 100644 --- a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/ExecutionFlow.java +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/ExecutionFlow.java @@ -109,10 +109,10 @@ public class ExecutionFlow { EdgeConditionBranchNode edge =(EdgeConditionBranchNode)outs.get(i); //出口边 GraphNode nexNode =edge.getOuts().get(0); //出口边指向的节点 if(i==0) { - sb.append("\tif((").append(GroovyExpressionReplacer.groovy(node.getCondition(),null)).append(").equals(").append(GroovyExpressionReplacer.groovy(edge.getValue(),edge.getValueType())).append(")){").append("\n"); + sb.append("\tif((").append(GroovyExpressionReplacer.groovy(edge.getValue(),edge.getValueType())).append(").equals(").append(GroovyExpressionReplacer.groovy(node.getCondition(),null)).append(")){").append("\n"); }else { if(edge.getValue()!=null && !edge.getValue().trim().isEmpty()) { - sb.append("else if((").append(GroovyExpressionReplacer.groovy(node.getCondition(),null)).append(").equals(").append(GroovyExpressionReplacer.groovy(edge.getValue(),edge.getValueType())).append(")){").append("\n"); + sb.append("else if((").append(GroovyExpressionReplacer.groovy(edge.getValue(),edge.getValueType())).append(").equals(").append(GroovyExpressionReplacer.groovy(node.getCondition(),null)).append(")){").append("\n"); }else { sb.append("else {").append("\n"); } diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/OptionValue.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/OptionValue.java index 9908d0e8..40bc0ca0 100644 --- a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/OptionValue.java +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/processor/OptionValue.java @@ -32,13 +32,13 @@ public class OptionValue { sb.append("\n").append("else if("); } sb.append(GroovyExpressionReplacer.ARGUMENT_NAME).append(".").append(IdReplacer.fieldName(inOptionParameter.getCode())); - sb.append("=="); + sb.append(".equals("); if(ValueTypeUtil.isString(inOptionParameter.getValueType())){ sb.append(GroovyExpressionReplacer.groovy(item.getInputValue(),"java.lang.String")); }else{ sb.append(GroovyExpressionReplacer.groovy(item.getInputValue())); } - sb.append("){ "); + sb.append(")){ "); sb.append(GroovyExpressionReplacer.ARGUMENT_NAME).append(".").append(IdReplacer.fieldName(parameter.getCode())); sb.append(" =TypeConvertor.getValue("); sb.append(GroovyExpressionReplacer.groovy(item.getValue(),parameter.getValueType())); diff --git a/io.sc.engine.rule.frontend/src/views/shared/TestcaseParameterGrid.vue b/io.sc.engine.rule.frontend/src/views/shared/TestcaseParameterGrid.vue index 43c50983..a13e4506 100644 --- a/io.sc.engine.rule.frontend/src/views/shared/TestcaseParameterGrid.vue +++ b/io.sc.engine.rule.frontend/src/views/shared/TestcaseParameterGrid.vue @@ -184,6 +184,7 @@ const parameterType = arg.form.getFieldValue('parameterType'); const scoreCardVarType = arg.form.getFieldValue('scoreCardVarType'); const indicatorType = arg.form.getFieldValue('indicatorType'); + console.log(indicatorType); if ( (!Tools.isUndefinedOrNull(parameterType) && (parameterType === 'INTERMEDIATE' ||