fix bug compare
This commit is contained in:
parent
ef8b843d81
commit
d72f3641d7
|
@ -101,6 +101,13 @@ function isSavePlateOther(type, timestamp, plate) {
|
||||||
return false;
|
return false;
|
||||||
} else if (levenshtein(plate, currentInOther[i].plate) < 2) {
|
} else if (levenshtein(plate, currentInOther[i].plate) < 2) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var i = 0; i < currentIn.length; i++) {
|
||||||
|
if ((timestamp - currentIn[i].time) < 600) {
|
||||||
|
if (plate === currentIn[i].plate) {
|
||||||
|
return false;
|
||||||
} else if (levenshtein(plate, currentIn[i].plate) < 3) {
|
} else if (levenshtein(plate, currentIn[i].plate) < 3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +126,15 @@ function isSavePlateOther(type, timestamp, plate) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (var i = 0; i < currentOut.length; i++) {
|
||||||
|
if ((timestamp - currentOut[i].time) < 600) {
|
||||||
|
if (plate === currentOut[i].plate) {
|
||||||
|
return false;
|
||||||
|
} else if (levenshtein(plate, currentOut[i].plate) < 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user