From 6c0c3557e791dc46948190dd3745335ed043d051 Mon Sep 17 00:00:00 2001 From: 杜洪波 <1074825718@qq.com> Date: 星期三, 17 九月 2025 09:30:32 +0800 Subject: [PATCH] 代码提交 --- src/main/java/com/product/server/report/service/GenerateEChartService.java | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/product/server/report/service/GenerateEChartService.java b/src/main/java/com/product/server/report/service/GenerateEChartService.java index 9a675e6..adf07be 100644 --- a/src/main/java/com/product/server/report/service/GenerateEChartService.java +++ b/src/main/java/com/product/server/report/service/GenerateEChartService.java @@ -117,18 +117,18 @@ DataTableEntity valueData = baseDao.listTable(sql_text,new Object[]{}); //鑾峰彇鎶ヨ〃閰嶇疆灞炴�ц〃 鍔爀charts閰嶇疆灞炴�� //鍙兘鏌ヨ鍒板叧鑱斿睘鎬у�肩殑灞炴�ц〃锛屽鏋滅埗绾у睘鎬т笅鏈夊涓浉鍚屽瓙灞炴�с�傞�氳繃grouping鍒嗙粍銆� - DataTableEntity attributeData = baseDao.listTable("SELECT a.field_name,a.report_type_attr_value,a.uuid,a.grouping ,b.* FROM product_sys_report_config_attribute a LEFT JOIN product_sys_report_type_attribute b on a.report_type_attr = b.uuid WHERE a.report_config_uuid = ? ORDER BY a.grouping,b.parentAttributeUuid " ,new Object[]{fse.getString(CmnConst.UUID)}); + DataTableEntity attributeData = baseDao.listTable("SELECT a.field_name,a.report_type_attr_value,a.uuid,a.grouping ,b.* FROM product_sys_report_config_attribute a LEFT JOIN product_sys_report_type_attribute b on a.report_type_attr = b.uuid WHERE a.report_config_uuid = ? ORDER BY a.grouping,b.parent_attribute_uuid " ,new Object[]{fse.getString(CmnConst.UUID)}); JSONObject allProperties = new JSONObject(); if(attributeData.getRows() > 0){ JSONObject propertyObject = new JSONObject(); - String parenUuid1 = attributeData.getString(0,"parentAttributeUuid"); + String parenUuid1 = attributeData.getString(0,"parent_attribute_uuid"); String grouping1 = attributeData.getString(0,"grouping"); for (int i = 0,length = attributeData.getRows(); i < length; i++) { FieldSetEntity fieldSet = attributeData.getFieldSetEntity(i); //涓婄骇uuid - String parenUuid2 = fieldSet.getString("parentAttributeUuid"); + String parenUuid2 = fieldSet.getString("parent_attribute_uuid"); //涓婄骇name - String parenName = fieldSet.getString("parentAttributeName"); + String parenName = fieldSet.getString("parent_attribute_name"); //鍥捐〃灞炴�у�� String attr_value = fieldSet.getString("report_type_attr_value"); //涓虹┖浼犻粯璁ゅ�� @@ -166,9 +166,9 @@ grouping1 = grouping2; //楗肩姸鍥炬彃鍏ユ暟鎹悓灞炰竴涓埗鍏冪礌 澶氫釜鍏冪礌鍜屽搴旂殑鏁版嵁闇�鍏ㄩ儴鎵惧嚭鏉ヤ竴璧峰皝瑁卝son if(!BaseUtil.strIsNull(fieldName)){ - String parentAttributeName = fieldSet.getString("parentAttributeName"); + String parentAttributeName = fieldSet.getString(CmnConst.PARENT_ATTRIBUTE_NAME); //涓嬬骇涓哄璞¤繕鏄暟缁� - String type = fieldSet.getString("subordinateElementType"); + String type = fieldSet.getString("subordinate_element_ype"); List<String> keys = ListUtils.newArrayList(); List<String> keys2 = ListUtils.newArrayList(); keys.add(fieldName); @@ -176,7 +176,7 @@ //涓烘渶鍚庝竴浣� while (i < length-1) { FieldSetEntity fieldSet2 = attributeData.getFieldSetEntity(i+1); - String parenUuid3 = fieldSet2.getString("parentAttributeUuid"); + String parenUuid3 = fieldSet2.getString("parent_attribute_uuid"); String fieldName3 = fieldSet2.getString(CmnConst.FIELD_NAME); if(parenUuid2.equals(parenUuid3) && !BaseUtil.strIsNull(fieldName3)){ keys.add(fieldName3); @@ -229,7 +229,7 @@ JSONArray objSubArray = obj.getJSONArray(attribute_name); //纭畾浠栫殑瀛愬睘鎬ф椂(1)array 杩樻槸(0)object // if(objSubArray == null){ - if ("1".equals(fieldSet.getString("subordinateElementType"))) { + if ("1".equals(fieldSet.getString(CmnConst.SUBORDINATE_ELEMENT_TYPE))) { JSONArray array = new JSONArray(); array.add(obj); superiorObj.put(attribute_name, array); @@ -240,9 +240,9 @@ // superiorObj = obj; // } //涓婄骇灞炴�ame - superiorUuid = fieldSet.getString("parentAttributeUuid"); + superiorUuid = fieldSet.getString(CmnConst.PARENT_ATTRIBUTE_UUID); //涓婄骇鍚嶇О - String parentAttributeName = fieldSet.getString("parentAttributeName"); + String parentAttributeName = fieldSet.getString(CmnConst.PARENT_ATTRIBUTE_NAME); //濡傛灉鐖跺厓绱爑uid涓虹┖ if(BaseUtil.strIsNull(superiorUuid)){ JSONArray allSubProperties = allProperties.getJSONArray(attribute_name); @@ -689,12 +689,15 @@ Integer pageSize = fieldSetEntity.getInteger(CmnConst.PAGE_SIZE); StringBuffer sql = new StringBuffer(); // sql.append(" select * from ( ") - sql.append(" select rc.uuid,rc.report_name,'鍥捐〃' type_name,t1.role_info,mp.menu_name tricode_parent,m.menu_icon,m.menu_name,rc.function_uuid ") + sql.append(" select rc.uuid,rc.report_name,'鍥捐〃' type_name,mp.menu_name tricode_parent,m.menu_icon,m.menu_name,rc.function_uuid ") +// sql.append(" select rc.uuid,rc.report_name,'鍥捐〃' type_name,t1.role_info,mp.menu_name tricode_parent,m.menu_icon,m.menu_name,rc.function_uuid ") .append(" FROM product_sys_report_config rc ") .append(" inner join ( ") - .append(" select function_uuid,group_concat(role_info separator ',') role_info ") + .append(" select function_uuid ") +// .append(" select function_uuid,group_concat(role_info separator ',') role_info ") //Duird瑙f瀽涓嶄簡杩欎釜鍑芥暟鐢ㄦ硶 .append(" from ( ") - .append(" select function_uuid,concat(c.client_name,'/',o.org_level_name,'/',role_name) role_info ") +// .append(" select function_uuid,concat(c.client_name,'/',o.org_level_name,'/',role_name) role_info ") + .append(" select function_uuid ") .append(" FROM product_sys_clients c ") .append(" inner join product_sys_org_levels o on o.client_uuid=c.uuid ") .append(" inner join ( ") -- Gitblit v1.9.2