|
@@ -285,14 +285,6 @@ public class ReportController {
|
|
|
.eq("company_id", company.getId()).eq("alarm_type", 1).last("limit 1"));
|
|
|
if (alarmSetting != null) {
|
|
|
if (basecostId.length < projectId.length) {
|
|
|
- System.err.println("预算成本数组与项目id数组长度不一致:");
|
|
|
- for (Integer pid : projectId) {
|
|
|
- System.out.println("项目id="+pid);
|
|
|
- }
|
|
|
- System.out.println("========================");
|
|
|
- for (Integer b : basecostId) {
|
|
|
- System.out.println("预算项id="+b);
|
|
|
- }
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
msg.setError("请选择预算来源");
|
|
|
return msg;
|
|
@@ -1069,7 +1061,29 @@ public class ReportController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return reportService.editReport(reportList, createDate.length > 0 ? createDate[0] : null, targetUserList, hourCost, user.getCompanyId());
|
|
|
+ HttpRespMsg httpRespMsg = reportService.editReport(reportList, createDate.length > 0 ? createDate[0] : null, targetUserList, hourCost, user.getCompanyId());
|
|
|
+ //先给【上海绎维】使用
|
|
|
+ if (company.getId() == 862 || company.getId() == 10) {
|
|
|
+ //项目审核人是提交人的情况,直接审核
|
|
|
+ List<String> reportIds = new ArrayList<>();
|
|
|
+ for (int i = 0; i<id.length; i++) {
|
|
|
+ Integer oneId = id[i];
|
|
|
+ if (oneId == -1) {
|
|
|
+ Report report = reportList.get(i);
|
|
|
+ if (report.getProjectAuditorId().equals(report.getCreatorId())) {
|
|
|
+ //直接审核
|
|
|
+ if (report.getState() == 0) {
|
|
|
+ reportIds.add(report.getId().toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (reportIds.size() > 0) {
|
|
|
+ String rIds = reportIds.stream().collect(Collectors.joining(","));
|
|
|
+ approveReport(rIds, 0, request, null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return httpRespMsg;
|
|
|
}
|
|
|
|
|
|
private void fillReportHours(Report report, BigDecimal hourCost, Double workingTime, Integer timeType, String startTime, String endTime, SimpleDateFormat sdf, TimeType comTimeType, List<TimeAutoExclude> excludeTimeList) {
|