|
@@ -1586,15 +1586,7 @@ public class ReportController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
- String curDate = createDate[0];
|
|
|
|
|
- LocalDate localDate = LocalDate.parse(curDate, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
|
- localDate = localDate.withDayOfMonth(1);
|
|
|
|
|
- int count2 = financialAuditMapper.selectCount(new QueryWrapper<FinancialAudit>().eq("company_id", company.getId()).eq("reportYrmnth", localDate).eq("review_status", 2));
|
|
|
|
|
- if (count2 > 0) {
|
|
|
|
|
- HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
|
|
- httpRespMsg.setError("当月工时财务已锁定,无法填报");
|
|
|
|
|
- return httpRespMsg;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
//对于正北(苏州和广州)需校验项目开始结束日期
|
|
//对于正北(苏州和广州)需校验项目开始结束日期
|
|
|
if (SysConstant.ZhengBeiCompIds.contains(company.getId())) {
|
|
if (SysConstant.ZhengBeiCompIds.contains(company.getId())) {
|
|
|
for (Report report : reportList) {
|
|
for (Report report : reportList) {
|
|
@@ -1616,11 +1608,15 @@ public class ReportController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//校验之前7天内是否有未提交的日报
|
|
//校验之前7天内是否有未提交的日报
|
|
|
|
|
+ String curDate = createDate[0];
|
|
|
|
|
+ if (curDate.contains("@")) {
|
|
|
|
|
+ curDate = curDate.split("@")[0];
|
|
|
|
|
+ }
|
|
|
LocalDate startDate = LocalDate.parse(curDate, dateTimeFormatter);
|
|
LocalDate startDate = LocalDate.parse(curDate, dateTimeFormatter);
|
|
|
LocalDate endDate = startDate.minusDays(1);
|
|
LocalDate endDate = startDate.minusDays(1);
|
|
|
startDate = startDate.minusDays(8);
|
|
startDate = startDate.minusDays(8);
|
|
|
List<String> missingReportDates = reportService.getUserMissingReportDates(user.getId(), dateTimeFormatter.format(startDate), dateTimeFormatter.format(endDate));
|
|
List<String> missingReportDates = reportService.getUserMissingReportDates(user.getId(), dateTimeFormatter.format(startDate), dateTimeFormatter.format(endDate));
|
|
|
- System.out.println("missingReportDates.size()=="+missingReportDates.size());
|
|
|
|
|
|
|
+ System.out.println("missingReportDates.size()=="+missingReportDates.size() + ", startDate=" + dateTimeFormatter.format(startDate) + ", endDate=" + dateTimeFormatter.format(endDate));
|
|
|
if (missingReportDates != null && missingReportDates.size() > 0) {
|
|
if (missingReportDates != null && missingReportDates.size() > 0) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
httpRespMsg.setError("请按顺序填写近期日报:" + String.join(",", missingReportDates));
|
|
httpRespMsg.setError("请按顺序填写近期日报:" + String.join(",", missingReportDates));
|