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); }