|
@ -252,14 +252,33 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
//3.变更记录表和变更记录明细表新增数据
|
|
|
//3.变更记录表和变更记录明细表新增数据
|
|
|
|
|
|
saveUserChangeRecord(tokenDto,map,resiUserId,name); |
|
|
|
|
|
|
|
|
|
|
|
return resiUserId; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 3.变更记录表和变更记录明细表新增数据 |
|
|
|
|
|
* |
|
|
|
|
|
* @param tokenDto |
|
|
|
|
|
* @param map |
|
|
|
|
|
* @param icUserId |
|
|
|
|
|
* @param icUserName |
|
|
|
|
|
* @return void |
|
|
|
|
|
* @author zhy |
|
|
|
|
|
* @date 2022/4/29 14:49 |
|
|
|
|
|
*/ |
|
|
|
|
|
private void saveUserChangeRecord(TokenDto tokenDto, LinkedHashMap<String, String> map, String icUserId, String icUserName) { |
|
|
|
|
|
//变更记录表和变更记录明细表新增数据
|
|
|
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
//3-1.变更记录表
|
|
|
//3-1.变更记录表
|
|
|
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); |
|
|
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); |
|
|
changeRecordEntity.setCustomerId(tokenDto.getCustomerId()); |
|
|
changeRecordEntity.setCustomerId(tokenDto.getCustomerId()); |
|
|
changeRecordEntity.setOperatorId(tokenDto.getUserId()); |
|
|
changeRecordEntity.setOperatorId(tokenDto.getUserId()); |
|
|
changeRecordEntity.setIcUserId(resiUserId); |
|
|
changeRecordEntity.setIcUserId(icUserId); |
|
|
changeRecordEntity.setOperatorName(staffInfoCache.getRealName()); |
|
|
changeRecordEntity.setOperatorName(staffInfoCache.getRealName()); |
|
|
changeRecordEntity.setIcUserName(name); |
|
|
changeRecordEntity.setIcUserName(icUserName); |
|
|
changeRecordEntity.setType("add"); |
|
|
changeRecordEntity.setType("add"); |
|
|
changeRecordEntity.setTypeName("新增"); |
|
|
changeRecordEntity.setTypeName("新增"); |
|
|
changeRecordEntity.setBeforeChangeName("-"); |
|
|
changeRecordEntity.setBeforeChangeName("-"); |
|
@ -267,11 +286,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
changeRecordEntity.setChangeTime(new java.util.Date()); |
|
|
changeRecordEntity.setChangeTime(new java.util.Date()); |
|
|
icUserChangeRecordService.insert(changeRecordEntity); |
|
|
icUserChangeRecordService.insert(changeRecordEntity); |
|
|
//3-2.变更明细表
|
|
|
//3-2.变更明细表
|
|
|
List<IcUserChangeDetailedEntity> changeDetailedEntityList = saveChangeRecord(tokenDto, map, resiUserId, changeRecordEntity.getId()); |
|
|
List<IcUserChangeDetailedEntity> changeDetailedEntityList = saveChangeRecord(tokenDto, map, icUserId, changeRecordEntity.getId()); |
|
|
icUserChangeDetailedService.insertBatch(changeDetailedEntityList); |
|
|
icUserChangeDetailedService.insertBatch(changeDetailedEntityList); |
|
|
|
|
|
|
|
|
return resiUserId; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -1615,7 +1631,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public String updateImage(RentTenantFormDTO formDTO) { |
|
|
public String updateImage(TokenDto tokenDto, RentTenantFormDTO formDTO) { |
|
|
String resiUserId = ""; |
|
|
String resiUserId = ""; |
|
|
IcResiUserDTO userDTO = baseDao.getResiUserByIdCard(formDTO.getIdCard(), formDTO.getCustomerId()); |
|
|
IcResiUserDTO userDTO = baseDao.getResiUserByIdCard(formDTO.getIdCard(), formDTO.getCustomerId()); |
|
|
if (null != userDTO) { |
|
|
if (null != userDTO) { |
|
@ -1629,7 +1645,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
IcResiUserEntity entity = ConvertUtils.sourceToTarget(formDTO.getUser(), IcResiUserEntity.class); |
|
|
IcResiUserEntity entity = ConvertUtils.sourceToTarget(formDTO.getUser(), IcResiUserEntity.class); |
|
|
insert(entity); |
|
|
insert(entity); |
|
|
resiUserId = entity.getId(); |
|
|
resiUserId = entity.getId(); |
|
|
|
|
|
// 变更记录表和变更记录明细表新增数据
|
|
|
|
|
|
LinkedHashMap<String, String> map = new LinkedHashMap(); |
|
|
|
|
|
map.put("AGENCY_ID",entity.getAgencyId()); |
|
|
|
|
|
saveUserChangeRecord(tokenDto,map,resiUserId,entity.getName()); |
|
|
// 新增用户后保存头像信息
|
|
|
// 新增用户后保存头像信息
|
|
|
List<IcResiUserAttachmentDTO> images = formDTO.getImages(); |
|
|
List<IcResiUserAttachmentDTO> images = formDTO.getImages(); |
|
|
images.forEach(item -> item.setUserId(entity.getId())); |
|
|
images.forEach(item -> item.setUserId(entity.getId())); |
|
@ -1638,4 +1657,5 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
|
return resiUserId; |
|
|
return resiUserId; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|