|
|
@ -72,6 +72,7 @@ import java.io.File; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.nio.file.Path; |
|
|
|
import java.time.DateTimeException; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.Period; |
|
|
|
import java.util.*; |
|
|
@ -647,7 +648,12 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
} |
|
|
|
|
|
|
|
// 出生日期 & 年龄
|
|
|
|
LocalDate birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); |
|
|
|
LocalDate birthday = null; |
|
|
|
try { |
|
|
|
birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); |
|
|
|
} catch (DateTimeException e) { |
|
|
|
throw new EpmetException("身份证号中日期信息错误"); |
|
|
|
} |
|
|
|
int age = Period.between(birthday, LocalDate.now()).getYears(); |
|
|
|
|
|
|
|
// 性别 & 生日 & 老年人
|
|
|
@ -910,7 +916,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
Map<String, String> itemOptions = columnWrapper.getOptions(); |
|
|
|
String colValue = itemOptions.get(cellContent); |
|
|
|
columnWrapper.setColValue(colValue); |
|
|
|
} else { |
|
|
|
} else if (StringUtils.isNotBlank(cellContent)) { |
|
|
|
String fullUri = columnWrapper.getOptionSourceValue(); |
|
|
|
String[] uriParts = splitOptionSourceUrl(fullUri); |
|
|
|
String pureUri = uriParts[0]; |
|
|
|