|
@@ -246,6 +246,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
private BustripProjectMapper bustripProjectMapper;
|
|
|
@Resource
|
|
|
private CompanyDingdingMapper companyDingdingMapper;
|
|
|
+ @Resource
|
|
|
+ private SysRoleFunctionService sysRoleFunctionService;
|
|
|
|
|
|
|
|
|
//获取报告列表
|
|
@@ -262,6 +264,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
//首先根据日期获取当天所有提交过日志的人
|
|
|
String userId = request.getHeader("Token");
|
|
|
User user = userMapper.selectById(userId);
|
|
|
+ Integer hideTimeCount= sysRoleFunctionService.selectHideTimeCount(user.getRoleId());
|
|
|
String viewUserId = user.getId();
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
@@ -578,6 +581,22 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (hideTimeCount>0){
|
|
|
+ for (Map<String, Object> map : nameList) {
|
|
|
+ if (map.get("state").equals(1)){
|
|
|
+ map.put("cardTime","*");
|
|
|
+ map.put("reportTime","*");
|
|
|
+ List<Map<String, Object>> reportList = (List<Map<String, Object>>)map.get("data");
|
|
|
+ for (Map<String, Object> reportMap : reportList) {
|
|
|
+ reportMap.put("endTime","");
|
|
|
+ reportMap.put("customText","*");
|
|
|
+ reportMap.put("startTime","");
|
|
|
+ reportMap.put("time","*");
|
|
|
+ reportMap.put("overtimeHours","*");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (pageStart == null) {
|
|
|
//老版本,不带分页的情况
|
|
@@ -5127,6 +5146,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
public HttpRespMsg getUserDailyWorkTime(HttpServletRequest request, String startDate, String endDate,Integer hasReportDeptId) throws Exception {
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
+ Integer hideTimeCount= sysRoleFunctionService.selectHideTimeCount(user.getRoleId());
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
Company company = companyMapper.selectById(companyId);
|
|
|
//准备部门数据
|
|
@@ -5399,6 +5419,18 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
days.add(mapItem);
|
|
|
}
|
|
|
map.put("days", days);
|
|
|
+ if (hideTimeCount>0){
|
|
|
+ for (UserMonthWork work : userMonthWorks) {
|
|
|
+ List<Map<String, Object>> worktimeList = work.worktimeList;
|
|
|
+ if (!worktimeList.isEmpty()){
|
|
|
+ worktimeList.forEach(w->{
|
|
|
+ if (w.get("state")!=null&&w.get("state").equals(1)){
|
|
|
+ w.put("workingTime","*");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
map.put("list", userMonthWorks);
|
|
|
msg.data = map;
|
|
|
return msg;
|
|
@@ -6376,6 +6408,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
try {
|
|
|
String userId = request.getHeader("Token");
|
|
|
User user = userMapper.selectById(userId);
|
|
|
+ Integer hideTimeCount= sysRoleFunctionService.selectHideTimeCount(user.getRoleId());
|
|
|
//检查模式,是否是一个项目多个工作事项的情况
|
|
|
TimeType timeType = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", user.getCompanyId()));
|
|
|
Company company = companyMapper.selectById(user.getCompanyId());
|
|
@@ -6804,7 +6837,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
item.add((String) map.get("detail"));
|
|
|
}
|
|
|
}
|
|
|
- item.add(map.get("duration").toString());
|
|
|
+ if (hideTimeCount>0){
|
|
|
+ item.add("*");
|
|
|
+ }else {
|
|
|
+ item.add(map.get("duration").toString());
|
|
|
+ }
|
|
|
+
|
|
|
if (timeType.getMultiWorktime() == 1) {
|
|
|
if ((Integer)map.get("multiWorktime") == 1) {
|
|
|
item.add(map.get("startTime").toString()+"-"+map.get("endTime").toString());
|
|
@@ -6813,11 +6851,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
//加班情况
|
|
|
int isOverTime = (Integer) map.get("isOvertime");
|
|
|
- item.add(isOverTime==1?(df.format((double)map.get("overtimeHours"))):"-");
|
|
|
+ item.add(isOverTime==1?(hideTimeCount>0?"*":df.format((double)map.get("overtimeHours"))):"-");
|
|
|
}
|
|
|
if (timeType.getMultiWorktime() == 0) {
|
|
|
int isOverTime = (Integer) map.get("isOvertime");
|
|
|
- item.add(isOverTime==1?(df.format((double)map.get("overtimeHours"))):"-");
|
|
|
+ item.add(isOverTime==1?(hideTimeCount>0?"*":df.format((double)map.get("overtimeHours"))):"-");
|
|
|
}
|
|
|
//是否启用自定义的维度了
|
|
|
if (timeType.getCustomDegreeActive() == 1) {
|
|
@@ -7027,7 +7065,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- item.add(cellValue);
|
|
|
+ if (hideTimeCount>0){
|
|
|
+ item.add("*");
|
|
|
+ }else {
|
|
|
+ item.add(cellValue);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
//审核流程状态
|
|
|
if (exportType==0) {
|