Explorar o código

总体统计图分组BUG修复

chenw %!s(int64=6) %!d(string=hai) anos
pai
achega
86088f9b1d

+ 3 - 3
bi-server/src/main/java/com/usoftchina/bi/server/dao/chart/ShowChartsMapper.java

@@ -223,15 +223,15 @@ public interface ShowChartsMapper {
     /*
     总体分组的值
      */
-    @Select("select ${groupBy},${operation} from ${tableName} ${screen} group by ${groupBy} order by ${groupByOne}")
+    @Select("select ${groupBy},${operation} from ${tableName} group by ${groupBy} order by ${groupByOne}")
     List<LinkedHashMap<String, Object>> getGroupByValue(@Param("groupBy") String groupBy, @Param("operation") String operation, @Param("tableName") String tableName,
                                                         @Param("groupByOne") String groupByOne, @Param("screen") String screen);
 
     /*
     总体TH值
      */
-    @Select("select median(${columnName}) from sale where ${columnName} between " +
-            " (select ${fOperation}(${columnName}) from sale) and (select ${aOperation}(${columnName}) from ${tableName})" +
+    @Select("select median(${columnName}) from ${tableName} where ${columnName} between " +
+            " (select ${fOperation}(${columnName}) from ${tableName}) and (select ${aOperation}(${columnName}) from ${tableName})" +
             " group by " +
             " ${groupBy} order by ${groupByOne}")
     List<LinkedHashMap<String, Object>> getGroupByValueTh(@Param("groupBy") String groupBy, @Param("columnName") String columnName, @Param("tableName") String tableName,

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

@@ -147,23 +147,8 @@ public class ShowPopulationService {
             List<LinkedHashMap<String, Object>> valueListTh = new ArrayList<>();
 
             Iterator thList = operatorOther.iterator();
-            while (thList.hasNext()){
-                String oprTh = (String) thList.next();
-                String fOpertion = "";
-                String aOpertion = "";
-                if ("25th".equals(oprTh)){
-                    fOpertion = "min";
-                    aOpertion = "median";
-                }else if ("75th".equals(oprTh)) {
-                    fOpertion = "median";
-                    aOpertion = "max";
-                }
-                valueListTh = showChartsMapper.getGroupByValueTh(groupBy, columnName, tableName, listOne, screen, fOpertion, aOpertion);
-
-            }
 
             valueList = showChartsMapper.getGroupByValue(groupBy, opr, tableName, listOne, screenStr);
-            valueList.addAll(valueListTh);
             popAndIndDataInfo.setValueList(valueList);
             return new RepEntity(RepCode.success, popAndIndDataInfo);
         }