| | |
| | | */ |
| | | @Autowired |
| | | private OsBtmServiceI btmService; |
| | | /** |
| | | * 属性服务 |
| | | */ |
| | | @Autowired |
| | | private OsAttributeServiceI attrService; |
| | | |
| | | /** |
| | | * 链接类型 |
| | |
| | | * @throws VciBaseException 查询出错的时候会抛出异常 |
| | | */ |
| | | @Override |
| | | public DataGrid getDataForGrid(UIDataGridQuery dataGridQuery) throws VciBaseException { |
| | | public DataGrid getDataForGrid(UIDataGridQuery dataGridQuery) throws VciBaseException, PLException { |
| | | VciBaseUtil.alertNotNull(dataGridQuery,"查询对象",dataGridQuery.getBtmname(),"业务类型",dataGridQuery.getTableDefineId()); |
| | | //先判断查询模板 |
| | | UITableDefineVO tableDefineVO = uiEngineService.getComponentByOid(dataGridQuery.getComponentOid()).getTableDefineVO(); |
| | | UITableDefineVO tableDefineVO = uiEngineService.getComponentByOid(dataGridQuery.getComponentOid(),null).getTableDefineVO(); |
| | | String queryTemplate = !CollectionUtils.isEmpty(dataGridQuery.getSourceData())?dataGridQuery.getSourceData().getOrDefault("querytemplate",tableDefineVO.getQueryTemplateName()):tableDefineVO.getQueryTemplateName(); |
| | | if(StringUtils.isBlank(queryTemplate)){ |
| | | //说明没有设置查询模板,需要看看在这个表格所在的组件有没有设置 |
| | |
| | | @Override |
| | | public List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(treeQuery,"表单的查询对象",treeQuery.getBtmname(),"业务类型的信息",treeQuery.getComponentOid(),"树所在的组件的主键"); |
| | | UIComponentVO componentVO = uiEngineService.getComponentByOid(treeQuery.getComponentOid()); |
| | | Map<String, OsAttributeVO> attributeVOMap = attrService.selectAllAttributeMap(); |
| | | UIComponentVO componentVO = uiEngineService.getComponentByOid(treeQuery.getComponentOid(),attributeVOMap); |
| | | if(componentVO == null || StringUtils.isBlank(componentVO.getOid())){ |
| | | throw new VciBaseException("树的配置信息没有获取到"); |
| | | } |
| | |
| | | if(StringUtils.isBlank(treeDefineVO.getLinkType())){ |
| | | //这个是业务类型的自参照 |
| | | //以前的平台没有对自参照这种有全部查询的 |
| | | OsBtmTypeVO btmTypeVO = btmService.getBtmById(treeDefineVO.getBtmType()); |
| | | OsBtmTypeVO btmTypeVO = btmService.getBtmById(treeDefineVO.getBtmType(),attributeVOMap); |
| | | queryFieldList.addAll(btmTypeVO.getAttributes().stream().map(OsBtmTypeAttributeVO::getId).collect(Collectors.toList())); |
| | | queryFieldList.addAll(WebBoServiceImpl.BO_BASE_FIELD_MAP.values()); |
| | | |