Commit a62bcfe0 authored by hongguangwu's avatar hongguangwu

MVP1.7.17-离职待办-优化代码

parent 2d918a4c
...@@ -554,8 +554,10 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -554,8 +554,10 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
// 获取下一个工作日 // 获取下一个工作日
public LocalDate getNextWorkday(LocalDate date, Map<String, Integer> holidayMap) { public LocalDate getNextWorkday(LocalDate date, Map<String, Integer> holidayMap) {
LocalDate result = date.plusDays(CommonConstants.ONE_INT); LocalDate result = date.plusDays(CommonConstants.ONE_INT);
while (!this.isWorkday(result, holidayMap)) { int i=100;
while (i>0 && !this.isWorkday(result, holidayMap)) {
result = result.plusDays(CommonConstants.ONE_INT); result = result.plusDays(CommonConstants.ONE_INT);
i--;
} }
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment