private void getAllRelateConditionReportBeans( AbsContainerConfigBean containerBean, Set<String> sRelateConditionNames, Map<String, List<ReportBean>> mRelateConReportBeans) { IComponentConfigBean childBeanTmp; for (Entry<String, IComponentConfigBean> entryTmp : containerBean.getMChildren().entrySet()) { childBeanTmp = entryTmp.getValue(); if (childBeanTmp instanceof ReportBean) { for (String relateconname : sRelateConditionNames) { ReportBean rbeanTmp = (ReportBean) entryTmp.getValue(); if (rbeanTmp.getSbean() == null || rbeanTmp.getSbean().getLstConditions() == null) continue; if (rbeanTmp.isSlaveReportDependsonListReport()) continue; // 从报表不存在查询条件关联的情况 List<ConditionBean> lstConditions = rbeanTmp.getSbean().getLstConditions(); for (ConditionBean cbean : lstConditions) { if (cbean == null || !cbean.isConditionValueFromUrl()) continue; if (relateconname.equals(cbean.getName())) { List<ReportBean> lst = mRelateConReportBeans.get(relateconname); if (lst == null) { lst = new ArrayList<ReportBean>(); mRelateConReportBeans.put(relateconname, lst); } lst.add(rbeanTmp); } } } } else if (childBeanTmp instanceof AbsContainerConfigBean) { getAllRelateConditionReportBeans( (AbsContainerConfigBean) childBeanTmp, sRelateConditionNames, mRelateConReportBeans); } } }
private void processRelateConditions() { List<String> lstAllConditionNames = new ArrayList<String>(); Set<String> sRelateConditionNames = new HashSet<String>(); getAllRelateConditions(this, lstAllConditionNames, sRelateConditionNames); if (sRelateConditionNames.size() == 0) return; Map<String, List<ReportBean>> mRelateConReportBeans = new HashMap<String, List<ReportBean>>(); getAllRelateConditionReportBeans(this, sRelateConditionNames, mRelateConReportBeans); for (Entry<String, List<ReportBean>> entryTmp : mRelateConReportBeans.entrySet()) { // 处理每个关联查询条件对应的报表 updateRefreshContaineridForReportBeans(entryTmp.getValue()); updateRelateReportidsForReportBeans(entryTmp.getValue()); } }