From caf71e1e3b8fcac51c5187e9b1a6a6f18754346f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 25 Jan 2022 19:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=201.=E8=B0=83?= =?UTF-8?q?=E5=8A=A8=E5=B1=85=E6=B0=91=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E5=8F=AA=E5=A2=9E=E5=8A=A0=E4=BA=86=E8=B0=83=E5=8A=A8=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E6=B2=A1=E5=A2=9E=E5=8A=A0=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcResiUserImportServiceImpl.java | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 8bc57fdc3b..fa540e5334 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1406,32 +1406,38 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res newAgencyId, newGridId, newvillageId, newBuildId, newUnitId, newHomeId, oldOrg, newOrg); icUserTransferRecordDao.insert(transferRecord); - // 保存 changeRecord - IcUserChangeRecordEntity changeRecord = fillChangeRecord(customerId, resiId, resiInfo.getName(), transferRecord.getId(), operator.getStaffId(), + // 保存 调动changeRecord + IcUserChangeRecordEntity transferChangeRecord = fillChangeRecord(customerId, resiId, resiInfo.getName(), transferRecord.getId(), operator.getStaffId(), operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "transfer", "调动", "", now); - icUserChangeRecordDao.insert(changeRecord); + icUserChangeRecordDao.insert(transferChangeRecord); + + // 保存 类别变更changeRecord + IcUserChangeRecordEntity categoryChangeRecord = fillChangeRecord(customerId, resiId, resiInfo.getName(), transferRecord.getId(), operator.getStaffId(), + operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "category", "类别", "", now); + icUserChangeRecordDao.insert(categoryChangeRecord); // 保存 changeDetail for (Map.Entry oldCategories : oldData.getCategories().entrySet()) { String key = oldCategories.getKey(); - String value = oldCategories.getValue(); + // String value = oldCategories.getValue(); // 之前是这个类型,那这个类型需要-1 - IcUserChangeDetailedEntity changeDetail = fillChangeDetail(customerId, resiId, changeRecord.getId(), oldData.getAgencyId(), + IcUserChangeDetailedEntity changeDetail = fillChangeDetail(customerId, resiId, categoryChangeRecord.getId(), oldData.getAgencyId(), oldData.getGridId(), oldData.getVillageId(), oldData.getBuildId(), oldData.getUnitId(), - oldData.getHomeId(), "category", "调动", key, -1, resiInfo.getPids()); + oldData.getHomeId(), categoryChangeRecord.getType(), categoryChangeRecord.getTypeName(), key, -1, resiInfo.getPids()); icUserChangeDetailedDao.insert(changeDetail); } + // 保存 changeDetail for (Map.Entry newCategories : newData.getCategories().entrySet()) { String key = newCategories.getKey(); - String value = newCategories.getValue(); + // String value = newCategories.getValue(); // 现在是这个类型,这个类型要+1 - IcUserChangeDetailedEntity changeDetail = fillChangeDetail(customerId, resiId, changeRecord.getId(), newData.getAgencyId(), + IcUserChangeDetailedEntity changeDetail = fillChangeDetail(customerId, resiId, categoryChangeRecord.getId(), newData.getAgencyId(), newData.getGridId(), newData.getVillageId(), newData.getBuildId(), newData.getUnitId(), - newData.getHomeId(), "category", "调动", key, 1, resiInfo.getPids()); + newData.getHomeId(), categoryChangeRecord.getType(), categoryChangeRecord.getTypeName(), key, 1, resiInfo.getPids()); icUserChangeDetailedDao.insert(changeDetail); }