|
@@ -1244,7 +1244,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
|
|
|
- //按状态获取报告列表
|
|
|
+ //获取待审核项目报告列表
|
|
|
@Override
|
|
|
public HttpRespMsg getListByState(Integer state, Integer departmentId,
|
|
|
Integer projectId,
|
|
@@ -6383,4 +6383,49 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List getAuditWorkflowList(Integer reportId) {
|
|
|
+ Report report = reportMapper.selectById(reportId);
|
|
|
+ TimeType timeType = timeTypeMapper.selectById(report.getCompanyId());
|
|
|
+ if (timeType.getReportAuditType() == 6) {
|
|
|
+ //针对先部门或直属审核人审核,后项目日报审核人审核的情况
|
|
|
+ List<User> userList = new ArrayList<>();
|
|
|
+ String creatorId = report.getCreatorId();
|
|
|
+ User user = userMapper.selectById(creatorId);
|
|
|
+ User firstAuditor = new User();
|
|
|
+ if (!StringUtils.isEmpty(report.getProjectAuditorId())) {
|
|
|
+ String name = userMapper.selectById(report.getProjectAuditorId()).getName();
|
|
|
+ firstAuditor.setId(report.getProjectAuditorId()).setName(name);
|
|
|
+ } else if (!StringUtils.isEmpty(report.getAuditDeptManagerid())) {
|
|
|
+ String name = userMapper.selectById(report.getAuditDeptManagerid()).getName();
|
|
|
+ firstAuditor.setId(report.getAuditDeptManagerid()).setName(name);
|
|
|
+ }
|
|
|
+ userList.add(firstAuditor);
|
|
|
+ Integer onlyAuditOnce = user.getOnlyAuditOnce();
|
|
|
+ if (onlyAuditOnce == 0) {
|
|
|
+ //两层审核
|
|
|
+ List<ProjectAuditor> projectAuditors = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().eq("project_id", report.getProjectId()));
|
|
|
+ if (projectAuditors.size() > 0) {
|
|
|
+ ProjectAuditor auditor = projectAuditors.get(0);
|
|
|
+ User au = new User();
|
|
|
+ au.setId(auditor.getAuditorId());
|
|
|
+ au.setName(auditor.getAuditorName());
|
|
|
+ if (report.getDepartmentAuditState() == 0) {
|
|
|
+ //待第一步审核
|
|
|
+ firstAuditor.setIsActive(1);
|
|
|
+ } else {
|
|
|
+ au.setIsActive(1);
|
|
|
+ }
|
|
|
+ userList.add(au);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ //isActive表示当前审核到该流程
|
|
|
+ firstAuditor.setIsActive(1);
|
|
|
+ }
|
|
|
+ return userList;
|
|
|
+ } else {
|
|
|
+ return new ArrayList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|