1、部分查询接口增加排序。2、UI部分的页面定义管理界面增加BS自定义查询方式和CS自定义查询方式两个字段的增删改逻辑。
已修改8个文件
86 ■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PLDefination.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLDefinationVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebLoServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/UITools.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PLDefination.java
@@ -160,6 +160,16 @@
    private String queryTemplateName = "";
    /**
     * cs端使用的自定义查询类名或URL
     */
    private String csCustQueryCLsOrUrl = "";
    /**
     * bs端使用的自定义查询类名或URL
     */
    private String bsCustQueryCLsOrUrl = "";
    /**
     * 子UI的业务类型
     */
    private String subUiObjType = "";
@@ -463,6 +473,22 @@
        this.queryTemplateName = queryTemplateName;
    }
    public void setCsCustQueryCLsOrUrl(String csCustQueryCLsOrUrl) {
        this.csCustQueryCLsOrUrl = csCustQueryCLsOrUrl;
    }
    public void setBsCustQueryCLsOrUrl(String bsCustQueryCLsOrUrl) {
        this.bsCustQueryCLsOrUrl = bsCustQueryCLsOrUrl;
    }
    public String getCsCustQueryCLsOrUrl() {
        return csCustQueryCLsOrUrl;
    }
    public String getBsCustQueryCLsOrUrl() {
        return bsCustQueryCLsOrUrl;
    }
    /**
     * @return the subUiBtName
     */
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLDefinationVO.java
@@ -179,6 +179,16 @@
    private String queryTemplateName = "";
    /**
     * cs端使用的自定义查询类名或URL
     */
    private String csCustQueryCLsOrUrl = "";
    /**
     * bs端使用的自定义查询类名或URL
     */
    private String bsCustQueryCLsOrUrl = "";
    /**
     * 子UI的业务类型
     */
    private String subUIObjType = "";
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -460,7 +460,8 @@
            });
            attrVOs = finalAttrVOs;
        }
        return attrVOs;
        //// TODO: 2024/12/2 Ludc 返回值排序
        return attrVOs.stream().sorted(Comparator.comparing(o->o.getId(),String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList());
    }
    /**
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
@@ -98,7 +98,8 @@
        }else {
            qtdArray = platformClientUtil.getQTDService().getBizTypeQTDs(btmName);
        }
        return BaseResult.dataList(Arrays.asList(qtdArray));
        List<QTD> qtdList = Arrays.asList(qtdArray).stream().sorted(Comparator.comparing(s -> s.name,String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList());
        return BaseResult.dataList(qtdList);
    }
    /**
@@ -195,6 +196,9 @@
    public BaseResult getObjTypeQTs(String btName) throws PLException, DocumentException {
        VciBaseUtil.alertNotNull(btName,"类型名");
        QTInfo[] objTypeQTs = platformClientUtil.getQTDService().getObjTypeQTs(btName);
        if(Func.isEmpty(objTypeQTs)){
            return BaseResult.success();
        }
        List<QTInfoDTO> dtos = new ArrayList<>();
        Map<String, AttributeDef> allSysAttr = Arrays.stream(platformClientUtil.getBtmService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e));
        allSysAttr.putAll(Arrays.stream(platformClientUtil.getLinkTypeService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e)));
@@ -216,6 +220,8 @@
            qtInfoDTO.setCreateTimeText(DateFormatUtils.format(new Date(obj.createTime), DateUtil.PATTERN_DATETIME));
            dtos.add(qtInfoDTO);
        }
        //// TODO: 2024/12/2 Ludc 返回值排序
        dtos = dtos.stream().sorted(Comparator.comparing(QTInfoDTO::getQtName,String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList());
        return BaseResult.dataList(dtos);
    }
@@ -1612,8 +1618,9 @@
    @Override
    public BaseResult getAllQTs() throws PLException {
        QTInfo[] allQTs = platformClientUtil.getQTDService().getAllQTs();
        List<QTInfo> allQTList = Arrays.stream(allQTs).sorted(Comparator.comparing(o -> o.qtName, String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList());
        DataGrid<QTInfo> dataGrid = new DataGrid<>();
        dataGrid.setData(Arrays.asList(allQTs));
        dataGrid.setData(allQTList);
        dataGrid.setTotal(allQTs.length);
        return BaseResult.dataGrid(dataGrid);
    }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -50,7 +50,6 @@
import static com.vci.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST;
/**
 * UI上的数据查询
 * @author weidy
@@ -688,7 +687,10 @@
            if(StringUtils.isNotBlank(parentFieldName)){
                tree.setParentId(ObjectTool.getBOAttributeValue(cbo,parentFieldName));
            }
            tree.setAttributes(boService.cbo2Map(cbo));
            Map<String,Object> cbo2Map = boService.cbo2Map(cbo);
            Map<String, Object> returnMap = new HashMap<>();
            returnMap.put((String) cbo2Map.get("btmname"),cbo2Map);
            tree.setAttributes(returnMap);
            tree.setIndex(i[0] + "");
            i[0]++;
            tree.setChecked(showCheckBox);
@@ -748,7 +750,7 @@
            //TODO:返回的数据改成按链接类型和业务类型为key:值为对应的属性集合形式返回
            Map<String, Object> returnMap = new HashMap<>();
            returnMap.put((String) cloMap.get("linktypename"),cloMap);
            returnMap.put((String) cbo2Map.get("btmname"),cloMap);
            returnMap.put((String) cbo2Map.get("btmname"),cbo2Map);
            tree.setAttributes(returnMap);
            tree.setIndex(i[0] + "");
            i[0]++;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java
@@ -30,6 +30,7 @@
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.math3.distribution.TDistribution;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.slf4j.Logger;
@@ -2273,9 +2274,13 @@
    public Map cbo2Map(BusinessObject cbo) throws VciBaseException {
        Map<String,String> map = new HashMap<String, String>();
        WebUtil.copyValueToMapFromCbos(cbo, map);
        return map;
        //TODO:20241128 过滤掉空key和空value
        Map<String, Object> filteredCbo2Map = map.entrySet()
                .stream()
                .filter(entry -> entry.getKey() != null && !entry.getKey().isEmpty() && entry.getValue() != null && !entry.getValue().toString().isEmpty())
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
        return filteredCbo2Map;
    }
    /**
     * map转为BusinessObject
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebLoServiceImpl.java
@@ -367,7 +367,12 @@
    public Map clo2Map(LinkObject clo) throws VciBaseException {
        Map<String,String> map = new HashMap<String, String>();
        WebUtil.copyValueToMapFromClos(clo, map);
        return map;
        //TODO:20241128 过滤掉空key和空value
        Map<String, Object> filteredClo2Map = map.entrySet()
                .stream()
                .filter(entry -> entry.getKey() != null && !entry.getKey().isEmpty() && entry.getValue() != null && !entry.getValue().toString().isEmpty())
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
        return filteredClo2Map;
    }
    @Override
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/UITools.java
@@ -542,6 +542,12 @@
            node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME);
            node.setText(obj.getQueryTemplateName());
            node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME);
            node.setText(obj.getBsCustQueryCLsOrUrl());
            node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME);
            node.setText(obj.getCsCustQueryCLsOrUrl());
            node = rootNode.addElement(PLDefinationConstants.SUBUIOBJTYPE);
            node.setText(obj.getSubUiObjType());
@@ -662,6 +668,12 @@
                elementText = root.elementText(PLDefinationConstants.QUERYTEMPLATENAME);
                obj.setQueryTemplateName(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.BSCUSTQUERYCLSORURL);
                obj.setBsCustQueryCLsOrUrl(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.CSCUSTQUERYCLSORURL);
                obj.setCsCustQueryCLsOrUrl(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SUBUILAYOUT);
                obj.setSubUILayout(elementText == null ? "" : elementText);
            }