|
@@ -3,6 +3,7 @@ package com.redxun.knowledge.analysis.service;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.redxun.common.base.entity.QueryData;
|
|
|
import com.redxun.common.tool.StringUtils;
|
|
|
+import com.redxun.knowledge.analysis.entity.consts.ComanyColumnsConst;
|
|
|
import com.redxun.knowledge.analysis.entity.enums.SystemDetailVisitsEnum;
|
|
|
import com.redxun.knowledge.analysis.entity.vo.SystemCompanyVo;
|
|
|
import com.redxun.knowledge.analysis.entity.vo.SystemDetailVisitsVo;
|
|
@@ -41,7 +42,7 @@ public class AnalysisSearchServiceImpl {
|
|
|
* @param type
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, Double> searchSystemDetailVisits(String type) {
|
|
|
+ public List<SystemDetailVisitsVo> searchSystemDetailVisits(String type) {
|
|
|
Map<String, Double> map = new HashMap<>();
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
int year = calendar.get(Calendar.YEAR);
|
|
@@ -57,8 +58,7 @@ public class AnalysisSearchServiceImpl {
|
|
|
String lastOfMonth = DateUtils.getLastOfMonth(year, month + 1, 15);
|
|
|
result = analysisSearchMapper.searchSystemDetailVisits(firstOfMonth, lastOfMonth);
|
|
|
}
|
|
|
- result.forEach(e -> map.put(SystemDetailVisitsEnum.getMessage(e.getPlatform()),e.getPercentage()));
|
|
|
- return map;
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -66,7 +66,7 @@ public class AnalysisSearchServiceImpl {
|
|
|
* @param queryData
|
|
|
* @return
|
|
|
*/
|
|
|
- public IPage organizationSearchs(QueryData queryData) {
|
|
|
+ public Map<String,List> organizationSearchs(QueryData queryData) {
|
|
|
//获取排序规则
|
|
|
String sort = queryData.getSortField();
|
|
|
if (sort != null){
|
|
@@ -94,6 +94,9 @@ public class AnalysisSearchServiceImpl {
|
|
|
}
|
|
|
//公司名称赋值
|
|
|
result.forEach(e -> e.setCompany(userService.findDeptByDeptId(e.getCompany()).getName()));
|
|
|
- return PageListUtils.getPages(queryData.getPageNo(),queryData.getPageSize(),result);
|
|
|
+ Map<String,List> mapList = new LinkedHashMap<>();
|
|
|
+ mapList.put("columns",ComanyColumnsConst.companyColumnsList());
|
|
|
+ mapList.put("rows",result);
|
|
|
+ return mapList;
|
|
|
}
|
|
|
}
|