|
@@ -1630,7 +1630,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
delLog.setDeleteUserId(delUserId);
|
|
delLog.setDeleteUserId(delUserId);
|
|
delList.add(delLog);
|
|
delList.add(delLog);
|
|
}
|
|
}
|
|
- reportDeleteService.saveBatch(delList);
|
|
|
|
|
|
+ reportDeleteService.saveOrUpdateBatch(delList);
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
@@ -5257,12 +5257,17 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
//赛元微电子,导入的按照项目审核的模式进行
|
|
//赛元微电子,导入的按照项目审核的模式进行
|
|
if (company.getId() == 469) {
|
|
if (company.getId() == 469) {
|
|
report.setState(0);//待审核员审核
|
|
report.setState(0);//待审核员审核
|
|
- //赛元都是非项目,直接取员工所属部门的主要负责人来审核
|
|
|
|
- Department department = departmentMapper.selectById(reportCreator.getDepartmentId());
|
|
|
|
- if (department != null) {
|
|
|
|
- report.setProjectAuditorId(department.getManagerId());
|
|
|
|
- }
|
|
|
|
|
|
+ //赛元都是非项目,直接取员工所属部门的主要负责人来审核,如果设置了非项目审核人,优先用非项目审核人
|
|
|
|
+ int mode = 0;
|
|
|
|
+ String superiorId = user.getSuperiorId();
|
|
|
|
+ if (superiorId == null) {
|
|
|
|
+ Department department = departmentMapper.selectById(reportCreator.getDepartmentId());
|
|
|
|
+ if (department != null) {
|
|
|
|
+ superiorId = department.getManagerId();
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ report.setProjectAuditorId(superiorId);
|
|
List<AuditWorkflowTimeSetting> auditWorkflowList
|
|
List<AuditWorkflowTimeSetting> auditWorkflowList
|
|
= auditWorkflowTimeSettingMapper.selectList(
|
|
= auditWorkflowTimeSettingMapper.selectList(
|
|
new QueryWrapper<AuditWorkflowTimeSetting>().eq("dept_id", reportCreator.getDepartmentId()).orderByAsc("seq"));
|
|
new QueryWrapper<AuditWorkflowTimeSetting>().eq("dept_id", reportCreator.getDepartmentId()).orderByAsc("seq"));
|
|
@@ -5656,12 +5661,32 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
report.setState(0);//待审核
|
|
report.setState(0);//待审核
|
|
//目前仅支持项目审核人审核的模式,叠加审批流
|
|
//目前仅支持项目审核人审核的模式,叠加审批流
|
|
if (timeType.getReportAuditType() == 0) {
|
|
if (timeType.getReportAuditType() == 0) {
|
|
- //设置日报审核人
|
|
|
|
- List<ProjectAuditor> projectAuditors = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().eq("project_id", project.getId()));
|
|
|
|
- if (projectAuditors.size() > 0) {
|
|
|
|
- report.setProjectAuditorId(projectAuditors.get(0).getAuditorId());
|
|
|
|
|
|
+ int mode = 0;
|
|
|
|
+ if (company.getNonProjectSimple() == 1) {
|
|
|
|
+ //启用了简易模式
|
|
|
|
+ List<ProjectAuditor> pAuditorList = new ArrayList<>();
|
|
|
|
+ if (project.getIsPublic() == 1) {
|
|
|
|
+ //非项目,该员工的部门主要负责人审核
|
|
|
|
+ mode = 1;
|
|
|
|
+ //优先取员工的上级领导
|
|
|
|
+ String superiorId = user.getSuperiorId();
|
|
|
|
+ if (superiorId == null) {
|
|
|
|
+ Integer departmentId = user.getDepartmentId();
|
|
|
|
+ Department department = departmentMapper.selectById(departmentId);
|
|
|
|
+ if (department != null) {
|
|
|
|
+ superiorId = department.getManagerId();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ report.setProjectAuditorId(superiorId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (mode == 0) {
|
|
|
|
+ //没有设置部门的审核人,按项目日报审核人设置
|
|
|
|
+ List<ProjectAuditor> projectAuditors = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().eq("project_id", project.getId()));
|
|
|
|
+ if (projectAuditors.size() > 0) {
|
|
|
|
+ report.setProjectAuditorId(projectAuditors.get(0).getAuditorId());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
List<AuditWorkflowTimeSetting> auditWorkflowList
|
|
List<AuditWorkflowTimeSetting> auditWorkflowList
|
|
= auditWorkflowTimeSettingMapper.selectList(
|
|
= auditWorkflowTimeSettingMapper.selectList(
|
|
new QueryWrapper<AuditWorkflowTimeSetting>().eq("dept_id", reportCreator.getDepartmentId()).orderByAsc("seq"));
|
|
new QueryWrapper<AuditWorkflowTimeSetting>().eq("dept_id", reportCreator.getDepartmentId()).orderByAsc("seq"));
|
|
@@ -8264,12 +8289,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
if (project.getIsPublic() == 1) {
|
|
if (project.getIsPublic() == 1) {
|
|
//非项目,该员工的部门主要负责人审核
|
|
//非项目,该员工的部门主要负责人审核
|
|
mode = 1;
|
|
mode = 1;
|
|
- String superiorId = null;
|
|
|
|
- Integer departmentId = user.getDepartmentId();
|
|
|
|
- Department department = departmentMapper.selectById(departmentId);
|
|
|
|
- if (department != null) {
|
|
|
|
- superiorId = department.getManagerId();
|
|
|
|
|
|
+ //优先取员工的上级领导
|
|
|
|
+ String superiorId = user.getSuperiorId();
|
|
|
|
+ if (superiorId == null) {
|
|
|
|
+ Integer departmentId = user.getDepartmentId();
|
|
|
|
+ Department department = departmentMapper.selectById(departmentId);
|
|
|
|
+ if (department != null) {
|
|
|
|
+ superiorId = department.getManagerId();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
if (superiorId != null) {
|
|
if (superiorId != null) {
|
|
User superior = userMapper.selectById(superiorId);
|
|
User superior = userMapper.selectById(superiorId);
|
|
if (superior != null) {
|
|
if (superior != null) {
|