From ae5dd47eea1fff103016ff7863b87945a119a0c2 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 6 Dec 2022 14:13:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/RentContractInfoServiceImpl.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java index 8ce7373..da6da9f 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java @@ -303,6 +303,13 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl tenantList = rentTenantInfoService.list(tenantParams); tenantList.forEach(tenant -> { + // 根据身份证解析性别和出生日期 + tenant.setGender("0".equals(IdCardNoValidatorUtils.getGender(tenant.getIdCard())) ? "" : IdCardNoValidatorUtils.getGender(tenant.getIdCard())); + if(tenant.getIdCard() != null && tenant.getIdCard().length() == 18){ + tenant.setBirthday(tenant.getIdCard().substring(6, 10) + "-" + tenant.getIdCard().substring(10, 12) + "-" + tenant.getIdCard().substring(12, 14)); + }else{ + tenant.setBirthday(""); + } // 1、审核通过,插入合同记录表的租客信息 RentTenantInfoEntity rentTenantInfoEntity = ConvertUtils.sourceToTarget(tenant, RentTenantInfoEntity.class); @@ -364,12 +371,8 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl