|
@@ -7268,6 +7268,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
.eq("creator_id", userId).between("create_date", startDate, endDate).groupBy("create_date"));
|
|
|
//获取日报详情
|
|
|
List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().eq("creator_id", userId).between("create_date", startDate, endDate).orderByAsc("create_date"));
|
|
|
+ List<ReportExtraDegree> degreeList = reportExtraDegreeMapper.selectList(new QueryWrapper<ReportExtraDegree>().eq("company_id", user.getCompanyId()));
|
|
|
|
|
|
List<Integer> collect = reportList.stream().map(Report::getProjectId).collect(Collectors.toList());
|
|
|
List<User> auditorList = new ArrayList<>();
|
|
@@ -7332,6 +7333,36 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
report.setSapServiceName(optionalSap.get().getServiceName());
|
|
|
}
|
|
|
}
|
|
|
+ //设置自定义维度
|
|
|
+ if (timeType.getCustomDegreeActive() == 1) {
|
|
|
+ if (timeType.getCustomDegreeWithPro() == 1) {
|
|
|
+ String associateDegrees = optional.get().getAssociateDegrees();
|
|
|
+ List<HashMap> degreeMapList = new ArrayList<>();
|
|
|
+ if (associateDegrees != null) {
|
|
|
+ String[] split = associateDegrees.split("\\,");
|
|
|
+ for (int i=0;i<split.length; i++) {
|
|
|
+ HashMap map = new HashMap();
|
|
|
+ if (!StringUtils.isEmpty(split[i])) {
|
|
|
+ Integer id = Integer.parseInt(split[i]);
|
|
|
+ map.put("id", id);
|
|
|
+ map.put("name", degreeList.stream().filter(d->d.getId().equals(id)).findFirst().get().getName());
|
|
|
+ degreeMapList.add(map);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ report.setDegreeList(degreeMapList);
|
|
|
+ } else {
|
|
|
+ //把degreeList改成HashMap结构
|
|
|
+ List<HashMap> mapDegreeList = new ArrayList<>();
|
|
|
+ for (ReportExtraDegree degree : degreeList) {
|
|
|
+ HashMap map = new HashMap();
|
|
|
+ map.put("id", degree.getId());
|
|
|
+ map.put("name", degree.getName());
|
|
|
+ mapDegreeList.add(map);
|
|
|
+ }
|
|
|
+ report.setDegreeList(mapDegreeList);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|