|
@@ -679,6 +679,12 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
|
|
|
|
|
|
// 将字符串解析为LocalDate对象
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
|
- return LocalDate.parse(birthdayString, formatter);
|
|
|
+
|
|
|
+ try {
|
|
|
+ LocalDate parse = LocalDate.parse(birthdayString, formatter);
|
|
|
+ return parse;
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new MyException("身份证号填写错误,无法提取出生日期");
|
|
|
+ }
|
|
|
}
|
|
|
}
|