This commit is contained in:
parent
9838eb1541
commit
ce10dbafcc
1 changed files with 6 additions and 6 deletions
|
|
@ -47,7 +47,9 @@ public class PersonServiceV2 {
|
||||||
Collectors.collectingAndThen(
|
Collectors.collectingAndThen(
|
||||||
Collectors.toList(),
|
Collectors.toList(),
|
||||||
docs -> docs.stream()
|
docs -> docs.stream()
|
||||||
.filter(p -> "21".equals(p.getIdType2()) || "21".equals(p.getIdType()))
|
.filter(p ->
|
||||||
|
("21".equals(p.getIdType2()) || "21".equals(p.getIdType()))
|
||||||
|
&& CTUtil.normalizePassport(p).length() == 10)
|
||||||
.max(byDatesDesc)
|
.max(byDatesDesc)
|
||||||
.or(() -> docs.stream().max(byDatesDesc))
|
.or(() -> docs.stream().max(byDatesDesc))
|
||||||
.orElse(null)
|
.orElse(null)
|
||||||
|
|
@ -96,10 +98,8 @@ public class PersonServiceV2 {
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
idType2 = null;
|
idType2 = null;
|
||||||
}
|
}
|
||||||
String serNum = CTUtil.normalizePassport(p);
|
return (idType != null && idType <= 30 && idType != 12) ||
|
||||||
return serNum.length() == 10 &&
|
(idType2 != null && (idType2 >= 1 && idType2 <= 999));
|
||||||
((idType != null && idType <= 30 && idType != 12) ||
|
|
||||||
(idType2 != null && (idType2 >= 1 && idType2 <= 999)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue