|
@@ -5784,14 +5784,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
List<Map<String, Object>> list = projectMapper.getUserWorkingTimeList(userId, user.getCompanyId(), startDate, endDate, projectId,start,size,branchDepartment,deptIds);
|
|
List<Map<String, Object>> list = projectMapper.getUserWorkingTimeList(userId, user.getCompanyId(), startDate, endDate, projectId,start,size,branchDepartment,deptIds);
|
|
long total=projectMapper.findCountWithUser(userId, user.getCompanyId(), startDate, endDate, projectId,null,null,departmentId,deptIds);
|
|
long total=projectMapper.findCountWithUser(userId, user.getCompanyId(), startDate, endDate, projectId,null,null,departmentId,deptIds);
|
|
- list.forEach(li->{
|
|
|
|
- double isPublic = (double) li.get("isPublic");
|
|
|
|
- double workingTime = (double) li.get("workingTime");
|
|
|
|
- BigDecimal bdIsPublic=new BigDecimal(isPublic);
|
|
|
|
- BigDecimal divide = bdIsPublic.divide(BigDecimal.valueOf(workingTime),2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
- NumberFormat nf = NumberFormat.getPercentInstance();
|
|
|
|
- li.put("proportion",nf.format(divide));
|
|
|
|
- });
|
|
|
|
Integer companyId = user.getCompanyId();
|
|
Integer companyId = user.getCompanyId();
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
List<LeaveSheet> leaveSheet = leaveSheetMapper.selectLeave(companyId,startDate,endDate);
|
|
List<LeaveSheet> leaveSheet = leaveSheetMapper.selectLeave(companyId,startDate,endDate);
|
|
@@ -5838,7 +5830,18 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
// System.err.println("总时间为:"+leaveSum);
|
|
// System.err.println("总时间为:"+leaveSum);
|
|
map.put("leaveSum",leaveSum + "h");
|
|
map.put("leaveSum",leaveSum + "h");
|
|
|
|
+ double workTimeDouble = Double.parseDouble(map.get("workingTime").toString()) + leaveSum;
|
|
|
|
+ BigDecimal workTimeBig = new BigDecimal(workTimeDouble);
|
|
|
|
+ map.put("workingTime",workTimeBig.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
}
|
|
}
|
|
|
|
+ list.forEach(li->{
|
|
|
|
+ double isPublic = (double) li.get("isPublic");
|
|
|
|
+ double workingTime = (double) li.get("workingTime");
|
|
|
|
+ BigDecimal bdIsPublic=new BigDecimal(isPublic);
|
|
|
|
+ BigDecimal divide = bdIsPublic.divide(BigDecimal.valueOf(workingTime),2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
+ NumberFormat nf = NumberFormat.getPercentInstance();
|
|
|
|
+ li.put("proportion",nf.format(divide));
|
|
|
|
+ });
|
|
HashMap map=new HashMap();
|
|
HashMap map=new HashMap();
|
|
map.put("total",total);
|
|
map.put("total",total);
|
|
map.put("result",list);
|
|
map.put("result",list);
|
|
@@ -5922,6 +5925,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
// System.err.println("总时间为:"+leaveSum);
|
|
// System.err.println("总时间为:"+leaveSum);
|
|
item.put("leaveSum",leaveSum + "h");
|
|
item.put("leaveSum",leaveSum + "h");
|
|
|
|
+ double workTimeDouble = Double.parseDouble(item.get("workingTime").toString()) + leaveSum;
|
|
|
|
+ BigDecimal workTimeBig = new BigDecimal(workTimeDouble);
|
|
|
|
+ item.put("workingTime",workTimeBig.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
List<String> subList=new ArrayList<>();
|
|
List<String> subList=new ArrayList<>();
|
|
double isPublic = (double) item.get("isPublic");
|
|
double isPublic = (double) item.get("isPublic");
|
|
double workingTime = (double) item.get("workingTime");
|
|
double workingTime = (double) item.get("workingTime");
|