From a18610302ccbf2ee418d63cf4421e4751376efa0 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 28 十一月 2024 11:08:52 +0800 Subject: [PATCH] 多输入的bug --- iailab-module-model/iailab-module-model-biz/src/main/resources/template/menu.xml.vm | 8 ++++++-- iailab-module-model/iailab-module-model-biz/src/main/resources/template/impl.java.vm | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/template/impl.java.vm b/iailab-module-model/iailab-module-model-biz/src/main/resources/template/impl.java.vm index f1ebee1..f111279 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/resources/template/impl.java.vm +++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/template/impl.java.vm @@ -23,11 +23,10 @@ #{end} if (#{foreach} ($column in [1..$entity.dataLength])#{if}($column==1)data${column} == null || data${column}.length == 0 || data${column}[0].length == 0#{else} || data${column} == null || data${column}.length == 0 || data${column}[0].length == 0#{end}#{end}) { result = new HashMap<String, Object>(); - result.put("status_code", "400"); + result.put("status_code", "998"); return result; } result = ${pyName}${entity.methodName}(#foreach ($column in [1..$entity.dataLength])data${column}, #{end}#{if}($entity.model==1)model, #{end}settings); - return utils.reverseResult(this.result); } #{end} diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/template/menu.xml.vm b/iailab-module-model/iailab-module-model-biz/src/main/resources/template/menu.xml.vm index a68f42b..e9d76e2 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/resources/template/menu.xml.vm +++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/template/menu.xml.vm @@ -18,7 +18,9 @@ #{if}($method.methodName=="train") <tab-train class="${model.pkgName}.impl.${model.pyName}Impl" method="train" params="#{foreach} ($column in [1..$method.dataLength])double[][],#{end}#{if}($method.model==1)java.util.HashMap,#{end}java.util.HashMap"> - <property key="data1" name="数据路径" type="file" valueType="file" min="" max=""/> +#{foreach} ($column in [1..$method.dataLength]) + <property key="data${column}" name="数据${column}路径" type="file" valueType="file" min="" max=""/> +#{end} #{foreach} ($setting in $method.methodSettings) #{if}($setting.type=="select") <property key="${setting.settingKey}" name="${setting.name}" type="select" valueType="${setting.valueType}" min="$!{setting.min}" max="$!{setting.max}"> @@ -35,7 +37,9 @@ <tab-load class="${model.pkgName}.impl.${model.pyName}Impl" method="predict" params="#{foreach} ($column in [1..$method.dataLength])double[][],#{end}#{if}($method.model==1)java.util.HashMap,#{end}java.util.HashMap" resultKey="$!{method.resultKey}" modelRules="${model.pkgName}.impl.${model.pyName}Impl.predict"> - <property key="data1" name="数据路径" type="file" valueType="file" min="" max=""/> +#{foreach} ($column in [1..$method.dataLength]) + <property key="data${column}" name="数据${column}路径" type="file" valueType="file" min="" max=""/> +#{end} #{foreach} ($setting in $method.methodSettings) #{if}($setting.type=="select") <property key="${setting.settingKey}" name="${setting.name}" type="select" valueType="${setting.valueType}" min="$!{setting.min}" max="$!{setting.max}"> -- Gitblit v1.9.3