From a6c954e8ccda157364ee29084f7db5fc7ba4074e Mon Sep 17 00:00:00 2001
From: 杜洪波 <1074825718@qq.com>
Date: 星期四, 19 九月 2024 15:32:05 +0800
Subject: [PATCH] 代码提交

---
 src/main/java/com/product/server/report/controller/ReportTypeController.java |    2 +-
 src/main/java/com/product/server/report/service/ReportTypeService.java       |   35 +++++++++++++++++++++--------------
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/src/main/java/com/product/server/report/controller/ReportTypeController.java b/src/main/java/com/product/server/report/controller/ReportTypeController.java
index 2e3e0f0..515867b 100644
--- a/src/main/java/com/product/server/report/controller/ReportTypeController.java
+++ b/src/main/java/com/product/server/report/controller/ReportTypeController.java
@@ -341,7 +341,7 @@
 			if (!CmnConst.PRODUCT_SYS_REPORT_TYPE_CONFIG.equals(fse.getTableName())) {
 				return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText());
 			}
-			JSONObject object =reportTypeService.getEChartsElement(fse.getUUID());
+			JSONObject object = reportTypeService.getEChartsElement(fse.getUUID());
 			return BaseUtil.success(object);
 		} catch (BaseException e) {
 			e.printStackTrace();
diff --git a/src/main/java/com/product/server/report/service/ReportTypeService.java b/src/main/java/com/product/server/report/service/ReportTypeService.java
index 8a25827..26024ef 100644
--- a/src/main/java/com/product/server/report/service/ReportTypeService.java
+++ b/src/main/java/com/product/server/report/service/ReportTypeService.java
@@ -219,20 +219,22 @@
 	@Override
 	public DataTableEntity getEChartsElementList(String uuid)throws BaseException{
 		StringBuffer sql = new StringBuffer();
-		sql.append(" SELECT a.uuid auuid,a.detail adetail,a.attribute_name aname,a.subordinateElementType asubordinateElementType,a.prompt_name,a.default_value, ")
-				.append(" b.uuid buuid,b.detail bdetail,b.attribute_name bname,b.subordinateElementType bsubordinateElementType, ")
-				.append(" c.uuid cuuid,c.detail cdetail,c.attribute_name cname,c.subordinateElementType csubordinateElementType, ")
-				.append(" d.uuid duuid,d.detail ddetail,d.attribute_name dname,d.subordinateElementType dsubordinateElementType, ")
-				.append(" e.uuid euuid,e.detail edetail,e.attribute_name ename,e.subordinateElementType esubordinateElementType, ")
-				.append(" f.uuid fuuid,f.detail fdetail,f.attribute_name fname,f.subordinateElementType fsubordinateElementType FROM ")
-				.append("product_sys_report_type_attribute a LEFT JOIN ")
-				.append("product_sys_report_type_attribute b on a.parentAttributeUuid = b.uuid LEFT JOIN ")
-				.append("product_sys_report_type_attribute c on b.parentAttributeUuid = c.uuid LEFT JOIN ")
-				.append("product_sys_report_type_attribute d on c.parentAttributeUuid = d.uuid LEFT JOIN ")
-				.append("product_sys_report_type_attribute e on d.parentAttributeUuid = e.uuid LEFT JOIN ")
-				.append("product_sys_report_type_attribute f on e.parentAttributeUuid = f.uuid ")
-				.append(" WHERE  a.config_properties = 1 ")
-				.append(" AND a.type_uuid = ? ");
+		sql.append("SELECT ");
+		sql.append(" a.uuid auuid,a.detail adetail,a.attribute_name aname,a.subordinateElementType asubordinateElementType,a.is_commonly ais_commonly,a.prompt_name,a.default_value, ");
+		sql.append(" b.uuid buuid,b.detail bdetail,b.attribute_name bname,b.subordinateElementType bsubordinateElementType,b.is_commonly bis_commonly, ");
+		sql.append(" c.uuid cuuid,c.detail cdetail,c.attribute_name cname,c.subordinateElementType csubordinateElementType,c.is_commonly cis_commonly, ");
+		sql.append(" d.uuid duuid,d.detail ddetail,d.attribute_name dname,d.subordinateElementType dsubordinateElementType,d.is_commonly dis_commonly, ");
+		sql.append(" e.uuid euuid,e.detail edetail,e.attribute_name ename,e.subordinateElementType esubordinateElementType,e.is_commonly eis_commonly, ");
+		sql.append(" f.uuid fuuid,f.detail fdetail,f.attribute_name fname,f.subordinateElementType fsubordinateElementType,f.is_commonly fis_commonly  ");
+		sql.append("FROM product_sys_report_type_attribute a ");
+		sql.append("LEFT JOIN product_sys_report_type_attribute b on a.parentAttributeUuid = b.uuid ");
+		sql.append("LEFT JOIN product_sys_report_type_attribute c on b.parentAttributeUuid = c.uuid ");
+		sql.append("LEFT JOIN product_sys_report_type_attribute d on c.parentAttributeUuid = d.uuid ");
+		sql.append("LEFT JOIN product_sys_report_type_attribute e on d.parentAttributeUuid = e.uuid ");
+		sql.append("LEFT JOIN product_sys_report_type_attribute f on e.parentAttributeUuid = f.uuid ");
+		sql.append("WHERE  a.config_properties = 1 ");
+		sql.append("AND a.type_uuid = ? ");
+		sql.append("ORDER BY a.is_commonly DESC");
 
 		return baseDao.listTable(sql.toString(), new String[]{uuid});
 	}
@@ -282,12 +284,17 @@
 		String uuid = fieldSetEntity.getString(parameter[paramIndex]+"uuid");
 		//鍏冪礌瀛愬厓绱犵被鍨�
 		String subType = fieldSetEntity.getString(parameter[paramIndex]+"subordinateElementType");
+		//鍏冪礌鏄惁甯哥敤
+		String isCommonly = fieldSetEntity.getString(parameter[paramIndex] + "is_commonly");
 		JSONObject jsonObject = new JSONObject();
 		jsonObject.put("value",name);
 		jsonObject.put("label",detail);
 		jsonObject.put("uuid",uuid);
 		jsonObject.put("subordinateElementType",subType);
 		jsonObject.put("config_properties",fieldSetEntity.getString("config_properties"));
+		jsonObject.put("is_commonly", isCommonly);
+		jsonObject.put("is_commonly_label", "1".equals(isCommonly) ? "鏄�":"鍚�");
+		jsonObject.put("subordinateElementType_label", "1".equals(subType) ? "鏁扮粍":"Object瀵硅薄");
 		paramIndex++;
 		if(paramIndex < parameter.length) {
 			JSONArray childrenArray = new JSONArray();

--
Gitblit v1.9.2