From 1f800986d6b1341987df5778bc6d45dc3afea753 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 16 May 2022 14:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E4=B8=BB=E4=BF=A1=E6=81=AF=E4=B8=BAnu?= =?UTF-8?q?ll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/HouseServiceImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 29f240f486..fb600f680e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -170,6 +170,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override public void houseChangeRecord(String houseId, String customerId, IcHouseDTO houseDTO){ IcHouseEntity entity = icHouseService.selectById(houseId); + entity.setOwnerName(null == entity.getOwnerName() ? "" : entity.getOwnerName()); + entity.setOwnerPhone(null == entity.getOwnerPhone() ? "" : entity.getOwnerPhone()); + entity.setOwnerIdCard(null == entity.getOwnerIdCard() ? "" : entity.getOwnerIdCard()); if (null == entity){ throw new EpmetException("不存在此房屋..."); } @@ -203,7 +206,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(HouseRentFlagEnums.getTypeValue(entity.getRentFlag())); entityList.add(e); } - if (!houseDTO.getOwnerName().equals(entity.getOwnerName())){ + if (null != houseDTO.getOwnerName() && !houseDTO.getOwnerName().equals(entity.getOwnerName())){ sbAfter.append(HouseChangeEnums.OWNER_NAME.getColumnName()).append(":").append(StringUtils.isNotBlank(houseDTO.getOwnerName()) ? houseDTO.getOwnerName() : "无").append(";"); sbBefore.append(HouseChangeEnums.OWNER_NAME.getColumnName()).append(":").append(StringUtils.isNotBlank(entity.getOwnerName()) ? entity.getOwnerName() : "无").append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -212,7 +215,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(StringUtils.isNotBlank(entity.getOwnerName()) ? entity.getOwnerName() : "无"); entityList.add(e); } - if (!houseDTO.getOwnerPhone().equals(entity.getOwnerPhone())){ + if (null != houseDTO.getOwnerPhone() && !houseDTO.getOwnerPhone().equals(entity.getOwnerPhone())){ sbAfter.append(HouseChangeEnums.OWNER_PHONE.getColumnName()).append(":").append(StringUtils.isNotBlank(houseDTO.getOwnerPhone()) ? houseDTO.getOwnerPhone() : "无").append(";"); sbBefore.append(HouseChangeEnums.OWNER_PHONE.getColumnName()).append(":").append(StringUtils.isNotBlank(entity.getOwnerPhone()) ? entity.getOwnerPhone() : "无").append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -221,7 +224,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(StringUtils.isNotBlank(entity.getOwnerPhone()) ? entity.getOwnerPhone() : "无"); entityList.add(e); } - if (!houseDTO.getOwnerIdCard().equals(entity.getOwnerIdCard())){ + if (null != houseDTO.getOwnerIdCard() && !houseDTO.getOwnerIdCard().equals(entity.getOwnerIdCard())){ sbAfter.append(HouseChangeEnums.OWNER_ID_CARD.getColumnName()).append(":").append(StringUtils.isNotBlank(houseDTO.getOwnerIdCard()) ? houseDTO.getOwnerIdCard() : "无").append(";"); sbBefore.append(HouseChangeEnums.OWNER_ID_CARD.getColumnName()).append(":").append(StringUtils.isNotBlank(entity.getOwnerIdCard()) ? entity.getOwnerIdCard() : "无").append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity();