From fcf9919f4009c0d696b39c4a5dc2d6bf7c32cf18 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Fri, 12 Jul 2024 13:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=A0=87=E9=A2=98=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hxgk/lowcode/service/impl/CustomerFormServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java b/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java index 252c826..9e3b6ce 100644 --- a/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java +++ b/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java @@ -565,6 +565,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { * */ } } + //数据标题TreeMap排序 public static CustomerFormTableSingleFieldValue generateCustomerFormTableSingleFieldValue(TreeMap treeMap) { TreeMap treeMapx = new TreeMap<>(); treeMapx.putAll(treeMap); @@ -577,6 +578,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { String label = labelBuilder.toString().substring(0, labelBuilder.length() - 1); return new CustomerFormTableSingleFieldValue(lastValue, label); } + //数据标题截取最后一个空格 public static String removeAfterLastSpace(String str) { int lastSpaceIndex = str.lastIndexOf(' '); if (lastSpaceIndex!= -1) { @@ -602,7 +604,10 @@ public class CustomerFormServiceImpl implements CustomerFormService { String[] titleArr = title.split(":"); toSelectDataTitles.add(titleArr[2]); } - + //如果被关联的表单暂未配置dataTitle,则默认id + if(toSelectDataTitles.size()==0){ + toSelectDataTitles.add("id"); + } List> dataTitleMapList = fieldRecordMapper.getDataTitles(asfFormName,toSelectDataTitles); // 自定义比较器用以排序dataTitleMapList