lyhzzz hai 1 ano
pai
achega
a70395577c

+ 25 - 0
src/main/java/com/fdkankan/manage/service/impl/DataService.java

@@ -244,6 +244,8 @@ public class DataService implements IDataService {
         List<DataGroupByCount> kjList = new ArrayList<>();
         List<DataGroupByCount> ssList = new ArrayList<>();
         List<DataGroupByCount> ssObjList = new ArrayList<>();
+        List<DataGroupByCount> sgList = new ArrayList<>();
+        List<DataGroupByCount> sgObjList = new ArrayList<>();
         List<DataGroupByCount> proList = new ArrayList<>();
         List<DataGroupByCount> plusList = new ArrayList<>();
         List<DataGroupByCount> proObjList = new ArrayList<>();
@@ -275,6 +277,8 @@ public class DataService implements IDataService {
         HashMap<String, Long> kjMap = new HashMap<>();
         HashMap<String, Long> ssMap = new HashMap<>();
         HashMap<String, Long> ssObjMap = new HashMap<>();
+        HashMap<String, Long> sgMap = new HashMap<>();
+        HashMap<String, Long> sgObjMap = new HashMap<>();
         for (DataGroupByCount dataGroupByCount : proList) {
             if(dataGroupByCount.getGroupKey2().equals("3")){    //看见
                 kjMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
@@ -282,6 +286,9 @@ public class DataService implements IDataService {
             if(dataGroupByCount.getGroupKey2().equals("4")){    //深时
                 ssMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
             }
+            if(dataGroupByCount.getGroupKey2().equals("5")){    //深时
+                sgMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
+            }
             if(Arrays.asList("1","2","12","13","14").contains(dataGroupByCount.getGroupKey2())){    //看看
                 kkMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
             }
@@ -293,6 +300,9 @@ public class DataService implements IDataService {
             if(dataGroupByCount.getGroupKey2().equals("4")){    //深时
                 ssMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
             }
+            if(dataGroupByCount.getGroupKey2().equals("5")){    //深时
+                sgMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
+            }
             if(Arrays.asList("1","2","12","13","14").contains(dataGroupByCount.getGroupKey2())){    //看看
                 kkMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
             }
@@ -301,32 +311,47 @@ public class DataService implements IDataService {
             if(dataGroupByCount.getGroupKey2().equals("4")){    //深时
                 ssObjMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
             }
+            if(dataGroupByCount.getGroupKey2().equals("5")){    //深时
+                sgObjMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
+            }
         }
         for (DataGroupByCount dataGroupByCount : plusObjList) {
             if(dataGroupByCount.getGroupKey2().equals("4")){    //深时
                 ssObjMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
             }
+            if(dataGroupByCount.getGroupKey2().equals("5")){    //深时
+                sgObjMap.merge(dataGroupByCount.getGroupKey(),dataGroupByCount.getCount(), Long:: sum);
+            }
         }
         Long kkCount = 0L;
         Long KjCount = 0L;
         Long ssCount = 0L;
         Long ssObjCount = 0L;
+        Long sgCount = 0L;
+        Long sgObjCount = 0L;
         if(dataType == 1){
             kkCount = sceneProService.getKkCount(Arrays.asList("1","2","12","13","14"),startTime);
             KjCount = sceneProService.getKkCount(Arrays.asList("3"),startTime);
             ssCount = sceneProService.getSsCount(Arrays.asList("4"),startTime);
             ssObjCount = sceneProService.getSsObjCount(Arrays.asList("4"),startTime);
+            sgCount = sceneProService.getSsCount(Arrays.asList("5"),startTime);
+            sgObjCount = sceneProService.getSsObjCount(Arrays.asList("5"),startTime);
         }
         List<String> dates = DateUtils.findDatesStr(DateUtils.getDate(startTime), DateUtils.getDate(endTime),rule );
         setListData(kkList,kkMap,dates,dataType,kkCount);
         setListData(kjList,kjMap,dates,dataType,KjCount);
         setListData(ssList,ssMap,dates,dataType,ssCount);
         setListData(ssObjList,ssObjMap,dates,dataType,ssObjCount);
+        
+        setListData(sgList,sgMap,dates,dataType,sgCount);
+        setListData(sgObjList,sgObjMap,dates,dataType,sgObjCount);
 
         map.put("kkList",kkList);
         map.put("kjList",kjList);
         map.put("ssList",ssList);
         map.put("ssobjList",ssObjList);
+        map.put("sgList",sgList);
+        map.put("sgobjList",sgObjList);
         return map;
     }