|
@@ -130,6 +130,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
@Resource
|
|
@Resource
|
|
WxCorpInfoMapper wxCorpInfoMapper;
|
|
WxCorpInfoMapper wxCorpInfoMapper;
|
|
@Resource
|
|
@Resource
|
|
|
|
+ SysFunctionService sysFunctionService;
|
|
|
|
+ @Resource
|
|
private InformationServiceImpl informationService;
|
|
private InformationServiceImpl informationService;
|
|
@Resource
|
|
@Resource
|
|
private ProjectNotifyUserMapper projectNotifyUserMapper;
|
|
private ProjectNotifyUserMapper projectNotifyUserMapper;
|
|
@@ -2118,8 +2120,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
Report oneReport = reportMapper.selectById(ids.get(0));
|
|
Report oneReport = reportMapper.selectById(ids.get(0));
|
|
if(timeType.getReportAuditType()==5){
|
|
if(timeType.getReportAuditType()==5){
|
|
- if(!user.getId().equals(oneReport.getAuditDeptManagerid())){
|
|
|
|
- httpRespMsg.setError("非当前日报所属人员所在部门主要负责人");
|
|
|
|
|
|
+ //日报审核类型为5时,只有日报所属人员所在部门主要负责人或者有审核全公司日报的权限才能审核
|
|
|
|
+ Integer roleId = user.getRoleId();
|
|
|
|
+ boolean canAuditAllReport = sysFunctionService.hasPriviledge(roleId, "审核全员日报");
|
|
|
|
+ if(!user.getId().equals(oneReport.getAuditDeptManagerid()) && !canAuditAllReport){
|
|
|
|
+ httpRespMsg.setError("您无权操作权限");
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -5792,6 +5797,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
if (user.getIsActive() == 0 && i.isAfter(user.getInactiveDate())){
|
|
if (user.getIsActive() == 0 && i.isAfter(user.getInactiveDate())){
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ //跳过入职日期以前的日期
|
|
|
|
+ if (user.getIsActive() == 1 && user.getInductionDate() != null && i.isBefore(user.getInductionDate())){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
Boolean workDay = timeTypeService.isWorkDay(user.getCompanyId(), i);
|
|
Boolean workDay = timeTypeService.isWorkDay(user.getCompanyId(), i);
|
|
if (workDay){
|
|
if (workDay){
|
|
Double workTime = 0.0;
|
|
Double workTime = 0.0;
|
|
@@ -5809,6 +5818,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
Double fillHour = monthVO.getAllday() - workTime;
|
|
Double fillHour = monthVO.getAllday() - workTime;
|
|
//将fillHour平均分配到每个项目
|
|
//将fillHour平均分配到每个项目
|
|
Double fillHourPerProject = fillHour / projectIds.size();
|
|
Double fillHourPerProject = fillHour / projectIds.size();
|
|
|
|
+ //保留小数点后1位
|
|
|
|
+ fillHourPerProject = new BigDecimal(fillHourPerProject).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
//遍历项目
|
|
//遍历项目
|
|
double sumHours = 0;
|
|
double sumHours = 0;
|
|
for (int pIndex = 0; pIndex<projectIds.size(); pIndex++) {
|
|
for (int pIndex = 0; pIndex<projectIds.size(); pIndex++) {
|