fix(自動開立檢驗任務): 每N個生產批開立檢驗任務」發生取生產批陣列index=-1錯誤

refs: #16638
This commit is contained in:
YiLiLin 2023-09-14 15:18:43 +08:00
parent 7619fc7d14
commit ffb47febf6

View File

@ -368,7 +368,7 @@ public class AutoCreateJobServiceImpl implements AutoCreateJobService {
for (int i = 1; i <= quotient; i++) {
int target = (i * severalSfc) - interval;
int index = target - 1;
if (index <= size) {
if (index >= 0 && index < size) {
// prevent out of list range
String lotNo = sort.get(index).getLotNo();
createJob(lotNo, Freq.CHK_SEVERAL_SFC);