From 4435daea136d1180e72488b43877b66c20aa9b9c Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 14 May 2024 16:25:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20ITSM=E5=8F=91=E8=B5=B7?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C=E4=B8=9A=E5=B0=86=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E8=BD=AC=E4=B8=BA=E6=89=A7=E8=A1=8C=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=95=B0=E6=8D=AE=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1155847105773568]ITSM发起自动化作业将字符串转为执行节点数据格式 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1155847105773568 --- .../component/AutoexecProcessComponent.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/stephandler/component/AutoexecProcessComponent.java b/src/main/java/neatlogic/module/autoexec/stephandler/component/AutoexecProcessComponent.java index 79858e70..222af36e 100644 --- a/src/main/java/neatlogic/module/autoexec/stephandler/component/AutoexecProcessComponent.java +++ b/src/main/java/neatlogic/module/autoexec/stephandler/component/AutoexecProcessComponent.java @@ -791,7 +791,7 @@ public class AutoexecProcessComponent extends ProcessStepHandlerBase { String column = runtimeParamObj.getString("column"); if (tbodyObj != null) { String columnValue = tbodyObj.getString(column); - param.put(key, columnValue); + param.put(key, convertDateType(type, columnValue)); } else { FormAttributeVo formAttributeVo = formAttributeMap.get(value); ProcessTaskFormAttributeDataVo attributeDataVo = processTaskFormAttributeDataMap.get(value); @@ -1222,13 +1222,18 @@ public class AutoexecProcessComponent extends ProcessStepHandlerBase { if (Objects.equals(paramType, ParamType.NODE.getValue())) { if (StringUtils.isNotBlank(source)) { JSONArray inputNodeList = new JSONArray(); - try { + if (source.startsWith("[") && source.endsWith("]")) { JSONArray array = JSON.parseArray(source); for (int i = 0; i < array.size(); i++) { String str = array.getString(i); inputNodeList.add(new AutoexecNodeVo(str)); } - } catch (JSONException e) { + } else if (source.contains("\n")) { + String[] split = source.split("\n"); + for (String str : split) { + inputNodeList.add(new AutoexecNodeVo(str)); + } + } else { inputNodeList.add(new AutoexecNodeVo(source)); } return inputNodeList; -- Gitee