| | |
| | | sql.append("\n c.uuid cuuid,c.detail cdetail,c.attribute_name cname,c.subordinate_element_type csubordinate_element_type,c.is_commonly cis_commonly, "); |
| | | sql.append("\n d.uuid duuid,d.detail ddetail,d.attribute_name dname,d.subordinate_element_type dsubordinate_element_type,d.is_commonly dis_commonly, "); |
| | | sql.append("\n e.uuid euuid,e.detail edetail,e.attribute_name ename,e.subordinate_element_type esubordinate_element_type,e.is_commonly eis_commonly, "); |
| | | sql.append("\n f.uuid fuuid,f.detail fdetail,f.attribute_name fname,f.subordinate_element_type fsubordinate_element_type,f.is_commonly fis_commonly, "); |
| | | sql.append("\n f.uuid fuuid,f.detail fdetail,f.attribute_name fname,f.subordinate_element_type fsubordinate_element_type,f.is_commonly fis_commonly "); |
| | | sql.append("\nFROM product_sys_report_type_attribute a "); |
| | | sql.append("\nLEFT JOIN product_sys_report_type_attribute b on a.parent_attribute_uuid = b.uuid "); |
| | | sql.append("\nLEFT JOIN product_sys_report_type_attribute c on b.parent_attribute_uuid = c.uuid "); |
| | |
| | | sql.append("WHERE a.report_config_uuid = ? \n"); |
| | | sql.append("ORDER BY a.group_sign,b.parent_attribute_uuid"); |
| | | DataTableEntity attributeData = baseDao.listTable(sql.toString() ,new Object[]{fse.getString(CmnConst.UUID)}); |
| | | if ("13081b93-bd02-4319-a423-e3000cd9e9b4".equals(fse.getUUID())) { |
| | | System.out.println(""); |
| | | } |
| | | // 创建图表属性容器 |
| | | JSONObject allProperties = new JSONObject(); |
| | | if(!BaseUtil.dataTableIsEmpty(attributeData)){ |
| | |
| | | FieldSetEntity fseAttr = attributeData.getFieldSetEntity(i); |
| | | // 图表属性和配置值 |
| | | String attrName = fseAttr.getString(CmnConst.ATTRIBUTE_NAME); |
| | | if("show".equals(attrName)) { |
| | | System.out.println(); |
| | | } |
| | | String attrValue = fseAttr.getString(CmnConst.REPORT_TYPE_ATTR_VALUE); |
| | | if(BaseUtil.strIsNull(attrValue)){ |
| | | // 配置值为空则用默认值 |
| | |
| | | if(theOriginalData == null){ |
| | | currentProperty.put(attribute_name,arr); |
| | | }else { |
| | | theOriginalData.add(arr.getJSONObject(arr.size()-1)); |
| | | JSONObject lastJSONObject = theOriginalData.getJSONObject(theOriginalData.size() - 1); |
| | | JSONObject insertJsonObject = arr.getJSONObject(arr.size()-1); |
| | | for (String key : insertJsonObject.keySet()) { |
| | | if (lastJSONObject.containsKey(key)) { |
| | | // key已存在,新建对象 |
| | | theOriginalData.add(insertJsonObject); |
| | | break; |
| | | } else { |
| | | // key不存在,合并 |
| | | lastJSONObject.putAll(insertJsonObject); |
| | | break; |
| | | } |
| | | } |
| | | // theOriginalData.getJSONObject(theOriginalData.size() - 1) |
| | | // .putAll(JSONObject.parseObject(arr.getJSONObject(arr.size()-1).toJSONString())); |
| | | // theOriginalData.add(arr.getJSONObject(arr.size()-1)); |
| | | } |
| | | |
| | | }else { |
| | |
| | | oArray[0] = subObj; |
| | | } |
| | | }else { |
| | | oArray[0] = attr_value; |
| | | oArray[0] = SystemParamReplace.systemParamsReplace(attr_value); |
| | | } |
| | | return oArray; |
| | | } |