Browse Source

Merge branch 'feature-refactor' of ssh://10.10.100.21/source/platform-bi-server into feature-refactor

zhuth 6 years ago
parent
commit
d69d5128e3

+ 9 - 0
bi-server/src/main/java/com/usoftchina/bi/server/model/vo/dataVo/PopAndIndDataInfo.java

@@ -5,6 +5,15 @@ import com.usoftchina.bi.server.model.bo.ChartsColumnConfig;
 public class PopAndIndDataInfo<T> {
     private ChartsColumnConfig chartsColumnConfig;
     private T valueList;
+    private String styleConfig;
+
+    public String getStyleConfig() {
+        return styleConfig;
+    }
+
+    public void setStyleConfig(String styleConfig) {
+        this.styleConfig = styleConfig;
+    }
 
     public ChartsColumnConfig getChartsColumnConfig() {
         return chartsColumnConfig;

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowPopulationService.java

@@ -30,7 +30,7 @@ public class ShowPopulationService {
     @Autowired
     ChartsUtilService chartsUtilService;
 
-    public RepEntity showPopulation(PopulationInfo populationInfo, String token, int dashId) throws SQLException {
+    public RepEntity<PopAndIndDataInfo> showPopulation(PopulationInfo populationInfo, String token, int dashId) throws SQLException {
         if (populationInfo == null || "".equals(populationInfo)){
             return new RepEntity(RepCode.Null);
         }

+ 7 - 2
bi-server/src/main/java/com/usoftchina/bi/server/service/dashboard/DashboardsToChartsUtilService.java

@@ -12,6 +12,7 @@ import com.usoftchina.bi.core.base.TestPage;
 import com.usoftchina.bi.server.model.po.TokenData;
 import com.usoftchina.bi.server.model.po.User;
 import com.usoftchina.bi.server.model.vo.configVo.*;
+import com.usoftchina.bi.server.model.vo.dataVo.PopAndIndDataInfo;
 import com.usoftchina.bi.server.service.chart.*;
 import com.usoftchina.bi.server.service.user.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -131,7 +132,9 @@ public class DashboardsToChartsUtilService {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        return showPopulationService.showPopulation(populationInfo, token, chartId);
+        RepEntity<PopAndIndDataInfo> repEntity = showPopulationService.showPopulation(populationInfo, token, chartId);
+        repEntity.getData().setStyleConfig(styleConfig);
+        return repEntity;
     }
 
     public RepEntity getIndividual(String fetchConfig, String token, List<Screen> filters, TestPage testPage, int chartId, String styleConfig) throws SQLException {
@@ -143,7 +146,9 @@ public class DashboardsToChartsUtilService {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        return showIndividualService.showIndividual(individualConfigInfo, token, chartId);
+        RepEntity<PopAndIndDataInfo> repEntity = showIndividualService.showIndividual(individualConfigInfo, token, chartId);
+        repEntity.getData().setStyleConfig(styleConfig);
+        return repEntity;
     }
 
     public RepEntity getPie(String fetchConfig, String token, List<Screen> filters, int chartId, String styleConfig){