| | |
| | | dataGrid.setData(portalVIVOS); |
| | | dataGrid.setTotal(pagePortalVIArrayByPageInfoResult.total); |
| | | }else{ |
| | | dataGrid = new DataGrid<>("沒有查询到数据"); |
| | | dataGrid = new DataGrid<>(); |
| | | } |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | PortalVIVO portalVIVO=new PortalVIVO(); |
| | | PortalVI portalVI= platformClientUtil.getPortalService().getPortalVIById(id); |
| | | if(portalVI==null||StringUtils.isBlank(portalVI.id)){ |
| | | throw new VciBaseException("根据主键未查询到数据"); |
| | | } |
| | | portalVIVO=portalVIDOO2VO(portalVI); |
| | | return portalVIVO; |
| | | } |
| | |
| | | } |
| | | String attributeStr=""; |
| | | try { |
| | | List<OsAttributeVO> osAttributeVOList=osAttributeService.getOsAttributeVOSByBtName(portalVIDTO.getTypeName(),portalVIDTO.getTypeFlag()); |
| | | List<OsAttributeVO> osAttributeVOList=osAttributeService.getOsAttributeVOSByBtName(portalVIDTO.getTypeName(),portalVIDTO.getTypeFlag(),false); |
| | | if(!CollectionUtils.isEmpty(osAttributeVOList)){ |
| | | List<String> filedList= osAttributeVOList.stream().map(OsAttributeVO::getId).collect(Collectors.toList()); |
| | | attributeStr=VciBaseUtil.array2String(filedList.toArray(new String[]{})); |
| | |
| | | }); |
| | | } |
| | | //校验属性是否正确 |
| | | List<OsAttributeVO> osAttributeVOList = osAttributeService.getOsAttributeVOSByBtName(portalVI.typeName, portalVI.typeFlag); |
| | | List<OsAttributeVO> osAttributeVOList = osAttributeService.getOsAttributeVOSByBtName(portalVI.typeName, portalVI.typeFlag,false); |
| | | if (!CollectionUtils.isEmpty(osAttributeVOList)) { |
| | | List<String> filedList = osAttributeVOList.stream().map(OsAttributeVO::getId).collect(Collectors.toList()); |
| | | List<String> attributeList = VciBaseUtil.str2List(portalVIPO.getAttributeKey()); |
| | |
| | | boolean flag = false; |
| | | String labelName=PortalVIType.Form.getName(); |
| | | try { |
| | | VciBaseUtil.alertNotNull(portalVIDTO.getViName(),"名称不能为空!"); |
| | | VciBaseUtil.alertNotNull(portalVIDTO.getViName(),"名称"); |
| | | if(portalVIDTO.getPrm()==null||portalVIDTO.getPrm().getPrmItemList()==null||portalVIDTO.getPrm().getPrmItemList().size()==0){ |
| | | throw new Throwable(labelName+",未设置"); |
| | | } |
| | |
| | | prmItemDO.setItemHttpPathField(prmItemDTO.getItemHttpPathField()); |
| | | if(viType==PortalVIType.Table.getIntVal()) {//如果是表格 |
| | | initTableConfigDTOO2DOData(prmItemDO,prmItemDTO); |
| | | }else{ |
| | | List<String> itemValueList=new ArrayList<>(); |
| | | List<KeyValue> keyValueList=prmItemDTO.getItemKeyValueList(); |
| | | Optional.ofNullable(keyValueList).orElseGet(()->new ArrayList<>()).stream().forEach(keyValue -> { |
| | | String value= keyValue.getValue()+"{"+keyValue.getKey()+"}"; |
| | | itemValueList.add(value); |
| | | }); |
| | | prmItemDO.setItemValueList(itemValueList); |
| | | |
| | | } |
| | | return prmItemDO; |
| | | } |
| | |
| | | prmItemVO.setItemIsHttpSave(prmItemDO.getItemIsHttpSave()); |
| | | prmItemVO.setItemHttpVolumnPath(prmItemDO.getItemHttpVolumnPath()); |
| | | prmItemVO.setItemHttpPathField(prmItemDO.getItemHttpPathField()); |
| | | |
| | | if(viType==PortalVIType.Table.getIntVal()) {//如果是表格 |
| | | initTableConfigDOO2VOData(prmItemVO,prmItemDO); |
| | | }else{ |
| | | List<String> enumList= prmItemDO.getItemValueList(); |
| | | List<KeyValue>itemKeyValueList=new ArrayList<>(); |
| | | Optional.ofNullable(enumList).orElseGet(()->new ArrayList<>()).stream().forEach(enumValue->{ |
| | | List<String> keyValueList= VciBaseUtil.str2List(VciBaseUtil.removeComma(enumValue,"}"),"\\{"); |
| | | KeyValue keyValue=new KeyValue(); |
| | | keyValue.setKey(keyValueList.get(1)); |
| | | keyValue.setValue(keyValueList.get(0)); |
| | | itemKeyValueList.add(keyValue); |
| | | }); |
| | | prmItemVO.setItemKeyValueList(itemKeyValueList); |
| | | } |
| | | return prmItemVO; |
| | | } |
| | |
| | | prmItemDTO.setItemHttpPathField(prmItemDO.getItemHttpPathField()); |
| | | if(viType==PortalVIType.Table.getIntVal()) {//如果是表格 |
| | | initTableConfigDOO2VOData(prmItemDTO,prmItemDO); |
| | | }else{ |
| | | List<String> enumList= prmItemDO.getItemValueList(); |
| | | List<KeyValue>itemKeyValueList=new ArrayList<>(); |
| | | Optional.ofNullable(enumList).orElseGet(()->new ArrayList<>()).stream().forEach(enumValue->{ |
| | | List<String> keyValueList= VciBaseUtil.str2List(VciBaseUtil.removeComma(enumValue,"}"),"\\{"); |
| | | KeyValue keyValue=new KeyValue(); |
| | | keyValue.setKey(keyValueList.get(1)); |
| | | keyValue.setValue(keyValueList.get(0)); |
| | | itemKeyValueList.add(keyValue); |
| | | }); |
| | | prmItemDTO.setItemKeyValueList(itemKeyValueList); |
| | | } |
| | | return prmItemDTO; |
| | | } |
| | |
| | | private List<String> getRefFormVIName(String refFormOid){ |
| | | List<String> keyList=new ArrayList<>(); |
| | | try { |
| | | |
| | | PortalVI refFormVI = UITools.getService().getPortalVIById(refFormOid); |
| | | PortalVIVO portalVIVO= portalVIDOO2VO(refFormVI); |
| | | if(portalVIVO!=null&&portalVIVO.getPrm().getPrmItemList().size()>0){ |