Commit 43b6ac5dab6d19a8090bb7e6423173675f8963ec
1 parent
f7687e65
Update
Showing
1 changed file
with
8 additions
and
0 deletions
src/main/resources/rules/shiftloop_fb.drl
| @@ -248,6 +248,10 @@ rule "Calcu_loop_guideboard_result" | @@ -248,6 +248,10 @@ rule "Calcu_loop_guideboard_result" | ||
| 248 | new ArrayList<ScheduleResult_output>(); | 248 | new ArrayList<ScheduleResult_output>(); |
| 249 | 249 | ||
| 250 | int i = $indexData.getCalcu_index(); | 250 | int i = $indexData.getCalcu_index(); |
| 251 | + if (((Boolean) $weekdays.get(initDate.getDayOfWeek() - 1)).booleanValue() == false) { | ||
| 252 | + i = (i + 1) % $rangesize; | ||
| 253 | + } | ||
| 254 | + | ||
| 251 | while (!initDate.isAfter(endDate)) { | 255 | while (!initDate.isAfter(endDate)) { |
| 252 | if (((Boolean) $weekdays.get(initDate.getDayOfWeek() - 1)).booleanValue()) { | 256 | if (((Boolean) $weekdays.get(initDate.getDayOfWeek() - 1)).booleanValue()) { |
| 253 | ScheduleResult_output ro = new ScheduleResult_output(); | 257 | ScheduleResult_output ro = new ScheduleResult_output(); |
| @@ -302,6 +306,10 @@ rule "Calcu_loop_employee_result" | @@ -302,6 +306,10 @@ rule "Calcu_loop_employee_result" | ||
| 302 | new ArrayList<ScheduleResult_output>(); | 306 | new ArrayList<ScheduleResult_output>(); |
| 303 | 307 | ||
| 304 | int i = $indexData.getCalcu_index(); | 308 | int i = $indexData.getCalcu_index(); |
| 309 | + if (((Boolean) $weekdays.get(initDate.getDayOfWeek() - 1)).booleanValue() == false) { | ||
| 310 | + i = (i + 1) % $rangesize; | ||
| 311 | + } | ||
| 312 | + | ||
| 305 | while (!initDate.isAfter(endDate)) { | 313 | while (!initDate.isAfter(endDate)) { |
| 306 | if (((Boolean) $weekdays.get(initDate.getDayOfWeek() - 1)).booleanValue()) { | 314 | if (((Boolean) $weekdays.get(initDate.getDayOfWeek() - 1)).booleanValue()) { |
| 307 | ScheduleResult_output ro = new ScheduleResult_output(); | 315 | ScheduleResult_output ro = new ScheduleResult_output(); |