|
@@ -296,7 +296,7 @@ public class ReportController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/getWeeklyReportData")
|
|
|
- public HttpRespMsg getWeeklyReportData(@RequestParam String targetDate, @RequestParam String targetUserId) {
|
|
|
+ public HttpRespMsg getWeeklyReportData(@RequestParam String targetDate, String targetUserId) {
|
|
|
return reportService.getWeeklyReportData(targetDate, targetUserId, request);
|
|
|
}
|
|
|
|
|
@@ -1088,35 +1088,41 @@ public class ReportController {
|
|
|
if (comTimeType.getReportAuditType() == 3) {
|
|
|
report.setAuditorSetting(auditorSettingList.get(i));
|
|
|
}
|
|
|
- if (auditWorkflowList.size() == 0) {
|
|
|
- //没有自定义审核流,直接代填的,就算审核通过
|
|
|
- report.setIsDeptAudit(0);
|
|
|
- report.setIsFinalAudit(1);
|
|
|
- report.setState(1);
|
|
|
+ if (comTimeType.getReportAuditType() == 7) {
|
|
|
+ report.setState(draft==0?0:3);
|
|
|
} else {
|
|
|
- //有审核流程的,取项目经理后面的流程节点
|
|
|
- int projectLeaderNodeIndex = 0;
|
|
|
- for (int t=0;t<auditWorkflowList.size(); t++) {
|
|
|
- if (auditWorkflowList.get(t).getIsDeptAudit() == 0) {
|
|
|
- projectLeaderNodeIndex = t;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (projectLeaderNodeIndex == auditWorkflowList.size() -1) {
|
|
|
- //最后一个节点就是项目经理,那就不用审核了,直接通过
|
|
|
+ //并非并行审核模式下的代填,需要设置审核状态
|
|
|
+ if (auditWorkflowList.size() == 0) {
|
|
|
+ //没有自定义审核流,直接代填的,就算审核通过
|
|
|
+ report.setIsDeptAudit(0);
|
|
|
+ report.setIsFinalAudit(1);
|
|
|
report.setState(1);
|
|
|
} else {
|
|
|
- //否则取下一个节点,待审核
|
|
|
- report.setState(0);
|
|
|
- int nextIndex = projectLeaderNodeIndex + 1;
|
|
|
- AuditWorkflowTimeSetting nextNode = auditWorkflowList.get(nextIndex);
|
|
|
- report.setIsFinalAudit((nextIndex == auditWorkflowList.size()-1)?1:0);
|
|
|
- report.setIsDeptAudit(nextNode.getIsDeptAudit());
|
|
|
- report.setAuditDeptid(nextNode.getAuditDeptId());
|
|
|
- report.setAuditDeptManagerid(nextNode.getAuditDeptId() != null?allDeptList.stream().filter(d->d.getDepartmentId().equals(nextNode.getAuditDeptId())).findFirst().get().getManagerId(): null);
|
|
|
+ //有审核流程的,取项目经理后面的流程节点
|
|
|
+ int projectLeaderNodeIndex = 0;
|
|
|
+ for (int t=0;t<auditWorkflowList.size(); t++) {
|
|
|
+ if (auditWorkflowList.get(t).getIsDeptAudit() == 0) {
|
|
|
+ projectLeaderNodeIndex = t;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (projectLeaderNodeIndex == auditWorkflowList.size() -1) {
|
|
|
+ //最后一个节点就是项目经理,那就不用审核了,直接通过
|
|
|
+ report.setState(1);
|
|
|
+ } else {
|
|
|
+ //否则取下一个节点,待审核
|
|
|
+ report.setState(0);
|
|
|
+ int nextIndex = projectLeaderNodeIndex + 1;
|
|
|
+ AuditWorkflowTimeSetting nextNode = auditWorkflowList.get(nextIndex);
|
|
|
+ report.setIsFinalAudit((nextIndex == auditWorkflowList.size()-1)?1:0);
|
|
|
+ report.setIsDeptAudit(nextNode.getIsDeptAudit());
|
|
|
+ report.setAuditDeptid(nextNode.getAuditDeptId());
|
|
|
+ report.setAuditDeptManagerid(nextNode.getAuditDeptId() != null?allDeptList.stream().filter(d->d.getDepartmentId().equals(nextNode.getAuditDeptId())).findFirst().get().getManagerId(): null);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (taskId != null && taskId[i] != null && taskId[i] != 0) {
|
|
|
report.setTaskId(taskId[i]);
|
|
|
}
|