From 19ec0269a9ce3a57ccfcd1d36585bb1c31977b60 Mon Sep 17 00:00:00 2001 From: ludc <ludc@vci-tech.com> Date: 星期五, 10 一月 2025 10:25:22 +0800 Subject: [PATCH] ui定义为树或树表时默认设置orientation为positive --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java | 52 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 32 insertions(+), 20 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java index ffcfde3..78105b6 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java @@ -27,6 +27,10 @@ import com.vci.starter.web.annotation.bus.VciChangeDataPlugin; import com.vci.starter.web.constant.FrameWorkLcStatusConstant; import com.vci.starter.web.constant.QueryOptionConstant; +import com.vci.starter.web.dto.BaseLinkModelDTO; +import com.vci.starter.web.dto.BaseLinkModelDTOList; +import com.vci.starter.web.dto.BaseModelDTO; +import com.vci.starter.web.dto.BaseModelDTOList; import com.vci.starter.web.enumpck.VciChangeDocumentTypeEnum; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.model.BaseModel; @@ -40,7 +44,6 @@ import com.vci.web.service.*; import com.vci.web.service.impl.WebBoServiceImpl; import com.vci.web.service.impl.WebLoServiceImpl; -import com.vci.web.service.uidataservice.UIDataBaseServiceI; import com.vci.web.service.uidataservice.UIDataCommonServiceI; import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; @@ -154,10 +157,10 @@ if(Func.isNotEmpty(dataGridQuery.getSourceData())){ dataGridQuery.setSourceData(this.convertMapValueJson2Map(dataGridQuery.getSourceData())); } - //鍏堝垽鏂煡璇㈡ā鏉挎槸鍚﹂厤缃簡鑷畾涔夋煡璇㈢被 UIComponentVO componentVO = uiEngineService.getComponentByOid(dataGridQuery.getComponentOid(), null); UITableDefineVO tableDefineVO = componentVO.getTableDefineVO(); - String bsCustQueryCLsOrUrl = componentVO.getBsCustQueryCLsOrUrl(); + //鍏堝垽鏂煡璇㈡ā鏉挎槸鍚﹂厤缃簡鑷畾涔夋煡璇㈢被 + String bsCustQueryCLsOrUrl = componentVO.getBsDataModel() ; // TODO: 2024/12/5 Ludc 鏍规嵁UI閰嶇疆鐨勮繘琛屽垽鏂槸鍚︿娇鐢ㄨ嚜瀹氫箟绫昏繘琛屾煡璇�(鑷畾涔夌被鏌ヨ鏂瑰紡浼樺厛绾ч珮浜庢煡璇㈡ā鏉�) if(Func.isNotBlank(bsCustQueryCLsOrUrl) && isCustomClass(bsCustQueryCLsOrUrl)){ //閫氳繃鍙嶅皠璋冪敤bsCustQueryCLsOrUrl涓畾涔夌殑鏈嶅姟绫讳腑鐨勬煡璇㈡柟娉� @@ -259,7 +262,7 @@ //鍏堝垽鏂煡璇㈡ā鏉挎槸鍚﹂厤缃簡鑷畾涔夋煡璇㈢被 UIComponentVO componentVO = uiEngineService.getComponentByOid(formQuery.getComponentOid(), null); //UIFormDefineVO formDefineVO = uiEngineService.getFormById(formQuery.getBtmName(),formQuery.getFormDefineId()); - String bsCustQueryCLsOrUrl = componentVO.getBsCustQueryCLsOrUrl(); + String bsCustQueryCLsOrUrl = componentVO.getBsDataModel(); if(Func.isNotBlank(bsCustQueryCLsOrUrl) && isCustomClass(bsCustQueryCLsOrUrl)){ //閫氳繃鍙嶅皠璋冪敤bsCustQueryCLsOrUrl涓畾涔夌殑鏈嶅姟绫讳腑鐨勬煡璇㈡柟娉� try { @@ -417,7 +420,7 @@ if(componentVO == null || StringUtils.isBlank(componentVO.getOid())){ throw new VciBaseException("鏍戠殑閰嶇疆淇℃伅娌℃湁鑾峰彇鍒�"); } - String bsCustQueryCLsOrUrl = componentVO.getBsCustQueryCLsOrUrl(); + String bsCustQueryCLsOrUrl = componentVO.getBsDataModel(); if(Func.isNotBlank(bsCustQueryCLsOrUrl) && isCustomClass(bsCustQueryCLsOrUrl)){ //閫氳繃鍙嶅皠璋冪敤bsCustQueryCLsOrUrl涓畾涔夌殑鏈嶅姟绫讳腑鐨勬煡璇㈡柟娉� try { @@ -446,10 +449,14 @@ //TODO: 鏇挎崲鏍戝畾涔変笂鐨勬鍙嶅悜鏌ヨ灞炴�э紝鍥犱负姝e弽鍚戞煡璇㈡槸鐢遍摼鎺ョ被鍨嬫煡璇㈡ā鏉夸笂鎺у埗鐨� boolean isOrientation = false; //鏄惁鍙嶅悜锛屼娇鐢ㄦā鏉夸笂閰嶇疆鐨� String qtName = treeDefineVO.getQueryTemplateName(); - if(Func.isNotBlank(treeDefineVO.getLinkType()) && Func.isNotBlank(qtName)){ - QTInfo wrapper = platformClientUtil.getQTDService().getQT(qtName); - QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), qtName); - isOrientation = qt.getDirection().equals("opposite"); + if(Func.isNotBlank(treeDefineVO.getOrientation())){ + isOrientation = treeDefineVO.getOrientation().equalsIgnoreCase("opposite"); + }else{ + if(Func.isNotBlank(treeDefineVO.getLinkType()) && Func.isNotBlank(qtName)){ + QTInfo wrapper = platformClientUtil.getQTDService().getQT(qtName); + QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), qtName); + isOrientation = qt.getDirection().equals("opposite"); + } } if(treeQuery.getConditionMap() == null){ treeQuery.setConditionMap(new HashMap<>()); @@ -660,11 +667,16 @@ UITreeDefineVO treeDefineVO = componentVO.getTreeDefineVO(); boolean isOrientation = false; //鏄惁鍙嶅悜锛屼娇鐢ㄦā鏉夸笂閰嶇疆鐨� String qtName = treeDefineVO.getQueryTemplateName(); - if(Func.isNotBlank(treeDefineVO.getLinkType()) && Func.isNotBlank(qtName)){ - QTInfo wrapper = platformClientUtil.getQTDService().getQT(qtName); - QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), qtName); - isOrientation = qt.getDirection().equals("opposite"); + if(Func.isNotBlank(treeDefineVO.getOrientation())){ + isOrientation = treeDefineVO.getOrientation().equalsIgnoreCase("opposite"); + }else{ + if(Func.isNotBlank(treeDefineVO.getLinkType()) && Func.isNotBlank(qtName)){ + QTInfo wrapper = platformClientUtil.getQTDService().getQT(qtName); + QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), qtName); + isOrientation = qt.getDirection().equals("opposite"); + } } + String queryTemplate = StringUtils.isNotBlank(treeQuery.getQueryTemplate())?treeQuery.getQueryTemplate():(!CollectionUtils.isEmpty(treeQuery.getSourceData())? (String) treeQuery.getSourceData().getOrDefault("querytemplate",treeDefineVO.getQueryTemplateName()) :treeDefineVO.getQueryTemplateName()); Map<String, Object> replaceMap = wrapperReplaceMap(treeQuery.getSourceData()); List<String> queryFieldList = new ArrayList<>(); @@ -1358,7 +1370,7 @@ BaseModel baseModel = new BaseModel(); baseModel.setOid(cbo.oid); baseModel.setNameOid(cbo.nameoid); - baseModel.setRevisionOid(cbo.revisionid); + baseModel.setRevisionOid(cbo.revoid); baseModel.setBtmName(cbo.btName); baseModel.setLastR(String.valueOf(cbo.isLastR)); baseModel.setLastV(String.valueOf(cbo.isLastV)); @@ -2156,7 +2168,7 @@ //璇存槑鏄崌鐗� BaseModel baseModel = cbo2BaseModel(cbo); RevisionDataInfo revisionValueObject = getNextRevision(btmTypeVO,baseModel); - cbo.revisionid = VciBaseUtil.getPk(); + cbo.revoid = VciBaseUtil.getPk(); cbo.revisionSeq = revisionValueObject.revisionSeq; cbo.revisionValue = revisionValueObject.revisionVal; cbo.isLastR = true; @@ -2251,8 +2263,8 @@ if (StringUtils.isBlank(cbo.nameoid)) { cbo.nameoid = VciBaseUtil.getPk(); } - if (StringUtils.isBlank(cbo.revisionid)) { - cbo.revisionid = VciBaseUtil.getPk(); + if (StringUtils.isBlank(cbo.revoid)) { + cbo.revoid = VciBaseUtil.getPk(); } cbo.isFirstR = true; cbo.isLastR = true; @@ -2695,9 +2707,9 @@ throw new PLException("500", new String[]{"娌℃湁鑾峰彇鍒版暟鎹殑涓婚敭"}); } for (BusinessObject cbo : cbos) { - if(StringUtils.isBlank(cbo.revisionid)){ - String revisionoid = Arrays.stream(cbo.hisAttrValList).filter(e -> e.attrName.equals("REVISIONOID")).findFirst().map(e -> e.attrVal).orElse(""); - cbo.revisionid = revisionoid; + if(StringUtils.isBlank(cbo.revoid)){ + String revisionoid = Arrays.stream(cbo.hisAttrValList).filter(e -> e.name.equals("REVISIONOID")).findFirst().map(e -> e.value).orElse(""); + cbo.revoid = revisionoid; } boolean b = platformClientUtil.getBOFService().deleteBusinessObject(cbo,type); if(!b){ -- Gitblit v1.9.3