From 99b4bac8059eb61a45ad0b29a84aebe184ba9711 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期四, 24 十月 2024 10:04:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java | 45 +++++++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java index 36e1356..0cb6b97 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java @@ -125,10 +125,10 @@ } DataGrid<PortalVIVO> dataGrid = new DataGrid<>(); try { - GetPagePortalVIArrayByPageInfoResult pagePortalVIArrayByPageInfoResult= platformClientUtil.getPortalService().getPagePortalVIArrayByPageInfo(typeName,viName,viType,viTypeFlag,pageIndex,pageSize); + GetPagePortalVIArrayByPageInfoResult pagePortalVIArrayByPageInfoResult = platformClientUtil.getPortalService().getPagePortalVIArrayByPageInfo(typeName,viName,viType,viTypeFlag,pageIndex,pageSize); if(pagePortalVIArrayByPageInfoResult.total>0) { PortalVI[] portalVIS = pagePortalVIArrayByPageInfoResult.returnValue; - List<PortalVIVO> portalVIVOS= portalVIDOO2VOS(Arrays.asList(portalVIS)); + List<PortalVIVO> portalVIVOS = portalVIDOO2VOS(Arrays.asList(portalVIS)); dataGrid.setData(portalVIVOS); dataGrid.setTotal(pagePortalVIArrayByPageInfoResult.total); }else{ @@ -149,7 +149,7 @@ */ @Override public BaseResult addSave(PortalVIDTO portalVIDTO) throws VciBaseException { - return savePortalVIDTO(portalVIDTO,false); + return savePortalVIDTO(portalVIDTO,false); } /** @@ -166,8 +166,8 @@ if(PortalVIType.Table.getName()==viType){ lableName=PortalVIType.Table.getLabel(); } - PortalVIVO portalVIVO=new PortalVIVO(); - PortalVI portalVI= platformClientUtil.getPortalService().getPortalVIById(id); + PortalVIVO portalVIVO = new PortalVIVO(); + PortalVI portalVI = platformClientUtil.getPortalService().getPortalVIById(id); if(portalVI==null||StringUtils.isBlank(portalVI.id)){ throw new VciBaseException("鏍规嵁涓婚敭鏈煡璇㈠埌鏁版嵁"); } @@ -248,7 +248,7 @@ */ @Override public boolean clone(ClonePortalVIDTOList clonePortalVIDTOList) throws VciBaseException { - if(clonePortalVIDTOList==null||CollectionUtils.isEmpty(clonePortalVIDTOList.getClonePortalVIDTOList())){ + if(clonePortalVIDTOList == null || CollectionUtils.isEmpty(clonePortalVIDTOList.getClonePortalVIDTOList())){ throw new VciBaseException("璇烽�夋嫨瑕佸厠闅嗙殑瀵硅薄!"); } try { @@ -649,30 +649,28 @@ } if(PortalVIType.Table.getIntVal()==portalVIDTO.getViType()){//濡傛灉鏄〃鏍肩殑鐨勬牎楠� labelName=PortalVIType.Table.getName(); - PRMItemDTO prmItemDTO= portalVIDTO.getPrm().getPrmItemList().get(0); + PRMItemDTO prmItemDTO = portalVIDTO.getPrm().getPrmItemList().get(0); //姣忛〉鏄剧ず鏍¢獙 String rtnContent = isCorrectPageNums(prmItemDTO.getItemPageSize()); if (StringUtils.isNotBlank(rtnContent)) { throw new VciBaseException(rtnContent); } - }else{ - } labelName= PortalVIType.getByIntVal(portalVIDTO.getViType()).getLabel(); if(!_isBtm){ - PortalVI[] portalVIS= platformClientUtil.getPortalService().getPortalVIArrayByTypeName(portalVIDTO.getTypeName()); + PortalVI[] portalVIS = platformClientUtil.getPortalService().getPortalVIArrayByTypeName(portalVIDTO.getTypeName()); for (int i = 0; i < portalVIS.length; i++) { - PortalVI portalVI= portalVIS[i]; - String viName= portalVI.viName; + PortalVI portalVI = portalVIS[i]; + String viName = portalVI.viName; if(isEdit){//濡傛灉涓轰慨鏀� try { - PortalVI oldPortalVI= platformClientUtil.getPortalService().getPortalVIById(portalVIDTO.getId()); - flag=platformClientUtil.getPortalService().judgeUpdateButton(oldPortalVI.typeFlag, oldPortalVI.viName, oldPortalVI.typeName); + PortalVI oldPortalVI = platformClientUtil.getPortalService().getPortalVIById(portalVIDTO.getId()); + flag = platformClientUtil.getPortalService().judgeUpdateButton(oldPortalVI.typeFlag, oldPortalVI.viName, oldPortalVI.typeName); if (flag && (StringUtils.isNotBlank(portalVIDTO.getViName()))&&(!oldPortalVI.viName.equals(portalVIDTO.getViName()))) { throw new Throwable("璇�"+labelName+"宸茬粡琚紩鐢紝涓嶈兘淇敼鍚嶇О!"); } } catch (PLException e) { - throw new Throwable("鏌ヨ鍘熸湁琛ㄥ崟鍑虹幇寮傚父:"+e.getMessage()); + throw new Throwable("鏌ヨ鍘熸湁琛ㄥ崟鍑虹幇寮傚父:"+e.getMessage()); } if (!portalVI.id.equals(portalVIDTO.getId())) { if (portalVI.viName.equals(portalVIDTO.getViName())) { @@ -885,7 +883,7 @@ portalVIVO.setViType(portalVI.viType); portalVIVO.setViTypeText(PortalVIType.getByIntVal(portalVI.viType).getLabel()); - String prm= portalVI.prm; + String prm = portalVI.prm; if(StringUtils.isNotBlank(prm)) { PRMDO prmdo = UITools.getPRM(prm); portalVIVO.setPrm(prmDOO2VOS(prmdo, portalVI.viType)); @@ -957,7 +955,7 @@ prmItemDO.setItemHrefConf(prmItemDO.getItemHrefConf());//瓒呴摼鎺ラ厤缃� prmItemDO.setItemTips(prmItemDTO.getItemTips()); prmItemDO.setItemTrim(prmItemDTO.getItemTrim()); - prmItemDO.setItemDateFormat(prmItemDTO.getItemDateFormat()); + //prmItemDO.setItemDateFormat(prmItemDTO.getItemDateFormat()); prmItemDO.setItemCtrlDisplyCondition(prmItemDTO.getItemCtrlDisplyCondition());////鎺у埗鏄剧ず鏉′欢 prmItemDO.setItemEditableProgram(prmItemDTO.getItemEditableProgram()); prmItemDO.setItemEditCondition(prmItemDTO.getItemEditCondition()); @@ -1166,10 +1164,12 @@ List<String> allKeyList= getRefFormVIName(prmItemDO.getItemInObj()); List<String> itemOutFieldList =VciBaseUtil.str2List(prmItemDO.getItemOutFields()); List<String> itemKeyFieldList =VciBaseUtil.str2List(prmItemDO.getItemKeyFields()); - List<String> itemSelectoutFieldList= allKeyList.stream().filter(s ->!itemOutFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); - prmItemVO.setItemSelectoutFieldList(itemSelectoutFieldList);//寰呴�夋嫨鐨勫睘鎬у瓧娈� + List<String> itemSelectOutFieldList= allKeyList.stream() + .filter(s -> !itemOutFieldList.contains(s)) + .collect(Collectors.toList()); + prmItemVO.setItemSelectOutFieldList(itemSelectOutFieldList);//寰呴�夋嫨鐨勫睘鎬у瓧娈� prmItemVO.setItemOutFieldList(itemOutFieldList);//闇�瑕佷娇鐢ㄧ殑闆嗗悎 - // List<String> itemSearchFieldList= itemOutFieldList.stream().filter(s ->!CollectionUtils.isEmpty(itemKeyFieldList).stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); + // List<String> itemSearchFieldList= itemOutFieldList.stream().filter(s ->!CollectionUtils.isEmpty(itemKeyFieldList).stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); List<String> itemSearchFieldList=new ArrayList<>(); if(!CollectionUtils.isEmpty(itemKeyFieldList)){ itemSearchFieldList= itemOutFieldList.stream().filter(s ->!itemKeyFieldList.contains(s)).collect(Collectors.toList()); @@ -1190,8 +1190,8 @@ List<String> allKeyList= getRefFormVIName(prmItemDO.getItemInObj()); List<String> itemOutFieldList =VciBaseUtil.str2List(prmItemDO.getItemOutFields()); List<String> itemKeyFieldList =VciBaseUtil.str2List(prmItemDO.getItemKeyFields()); - List<String> itemSelectoutFieldList= allKeyList.stream().filter(s ->!itemOutFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); - prmItemDTO.setItemSelectoutFieldList(itemSelectoutFieldList);//寰呴�夋嫨鐨勫睘鎬у瓧娈� + List<String> itemSelectOutFieldList= allKeyList.stream().filter(s ->!itemOutFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); + prmItemDTO.setItemSelectoutFieldList(itemSelectOutFieldList);//寰呴�夋嫨鐨勫睘鎬у瓧娈� prmItemDTO.setItemOutFieldList(itemOutFieldList);//闇�瑕佷娇鐢ㄧ殑闆嗗悎 List<String> itemSearchFieldList=new ArrayList<>(); if(!CollectionUtils.isEmpty(itemKeyFieldList)){ @@ -1290,6 +1290,7 @@ } return itemSeniorQueryBOList; } + private List<String> getRefFormVIName(String refFormOid){ List<String> keyList=new ArrayList<>(); try { -- Gitblit v1.9.3