fix: same idCard substring fix for top-level copy
This commit is contained in:
@@ -269,7 +269,7 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
// log.debug("添加病人信息,patientInfoDto:{}", patientBaseInfoDto);
|
||||
// 如果患者没有输入身份证号则根据年龄自动生成
|
||||
String idCard = patientBaseInfoDto.getIdCard();
|
||||
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||
if (idCard == null || idCard.length() < 6 || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||
if (patientBaseInfoDto.getAge() != null) {
|
||||
idCard = IdCardUtil.generateIdByAge(patientBaseInfoDto.getAge());
|
||||
patientBaseInfoDto.setIdCard(idCard);
|
||||
|
||||
Reference in New Issue
Block a user