|
@@ -227,7 +227,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
List<Map<String, Object>> nameList = new ArrayList<>();
|
|
List<Map<String, Object>> nameList = new ArrayList<>();
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全公司工时");
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全公司工时");
|
|
if (functionList.size() == 0) {
|
|
if (functionList.size() == 0) {
|
|
- String leaderId = user.getId();
|
|
|
|
//不是项目经理,只看自己的报告
|
|
//不是项目经理,只看自己的报告
|
|
List<ReportVO> list = new ArrayList<>();
|
|
List<ReportVO> list = new ArrayList<>();
|
|
//没有指定员工或者指定的就是自己
|
|
//没有指定员工或者指定的就是自己
|
|
@@ -236,7 +235,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("id", user.getId());
|
|
map.put("id", user.getId());
|
|
map.put("name", user.getName());
|
|
map.put("name", user.getName());
|
|
- list = reportMapper.getReportByDate(date, (String) map.get("id"));
|
|
|
|
|
|
+ List<String> userIds = new ArrayList<>();
|
|
|
|
+ userIds.add(user.getId());
|
|
|
|
+ list = reportMapper.getUserReportByDate(date, userIds);
|
|
if (list.size() > 0) {
|
|
if (list.size() > 0) {
|
|
//个人日报
|
|
//个人日报
|
|
nameList.add(map);
|
|
nameList.add(map);
|
|
@@ -1799,6 +1800,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
list = reportMapper.getUserDailyWorkTime(companyId, startDate, endDate, allDeptIds, null);
|
|
list = reportMapper.getUserDailyWorkTime(companyId, startDate, endDate, allDeptIds, null);
|
|
//部门负责人看自己部门相关的
|
|
//部门负责人看自己部门相关的
|
|
allRangeUserList = userMapper.selectList(new QueryWrapper<User>().in("department_id", allDeptIds).orderByDesc("department_id"));
|
|
allRangeUserList = userMapper.selectList(new QueryWrapper<User>().in("department_id", allDeptIds).orderByDesc("department_id"));
|
|
|
|
+ } else {
|
|
|
|
+ //个人只能看自己的
|
|
|
|
+ list = reportMapper.getMyDailyWorkTime(startDate, endDate, user.getId());
|
|
|
|
+ allRangeUserList.add(user);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
list = reportMapper.getUserDailyWorkTime(companyId, startDate, endDate, null, null);
|
|
list = reportMapper.getUserDailyWorkTime(companyId, startDate, endDate, null, null);
|