处理公式数组问题
This commit is contained in:
parent
e7c46bc5e8
commit
7d7d2dc309
|
|
@ -91,7 +91,7 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
|
|||
String datasourceJson = map.getOrDefault("datasource", "");
|
||||
if (StringUtils.isNotBlank(datasourceJson)) {
|
||||
Map<String, String> datasourceIdMap = JsonUtil.parseMap(datasourceJson, String.class);
|
||||
String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId","");
|
||||
String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId", "");
|
||||
if (StringUtils.isNotBlank(datasourceIdNode)) {
|
||||
datasourceId = datasourceIdNode;
|
||||
}
|
||||
|
|
@ -216,6 +216,10 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
|
|||
}
|
||||
if (DataType.NUMBER.equals(v.getFieldType()) && NumberUtils.isCreatable(v.getContent())) {
|
||||
context.put(v.getFieldId(), new BigDecimal(v.getContent()));
|
||||
} else if (v.getContent().startsWith("[") && v.getContent().endsWith("]")) {
|
||||
String content = v.getContent().substring(1);
|
||||
content = content.substring(0, content.length() - 1);
|
||||
context.put(v.getFieldId(), content.split(","));
|
||||
} else {
|
||||
context.put(v.getFieldId(), v.getContent());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue