|
@ -2,10 +2,13 @@ package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.ExcelExportUtil; |
|
|
import cn.afterturn.easypoi.excel.ExcelExportUtil; |
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams; |
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
|
|
import com.epmet.commons.tools.enums.RelationshipEnum; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
@ -18,12 +21,16 @@ import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.constants.ImportTaskConstants; |
|
|
import com.epmet.constants.ImportTaskConstants; |
|
|
|
|
|
import com.epmet.dao.IcResiUserDao; |
|
|
import com.epmet.dao.IcVaccinePrarmeterDao; |
|
|
import com.epmet.dao.IcVaccinePrarmeterDao; |
|
|
import com.epmet.dto.IcVaccinePrarmeterDTO; |
|
|
import com.epmet.dto.IcVaccinePrarmeterDTO; |
|
|
import com.epmet.dto.form.GridInfoVaccinePrarmeterFormDTO; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
|
|
|
|
|
import com.epmet.dto.result.GridInfoByNameResultDTO; |
|
|
import com.epmet.dto.result.GridInfoByNameResultDTO; |
|
|
|
|
|
import com.epmet.dto.result.IcHouseInfoCollectResultDTO; |
|
|
import com.epmet.dto.result.UploadImgResultDTO; |
|
|
import com.epmet.dto.result.UploadImgResultDTO; |
|
|
|
|
|
import com.epmet.entity.IcResiCollectEntity; |
|
|
|
|
|
import com.epmet.entity.IcResiUserEntity; |
|
|
|
|
|
import com.epmet.entity.IcUserChangeRecordEntity; |
|
|
import com.epmet.entity.IcVaccinePrarmeterEntity; |
|
|
import com.epmet.entity.IcVaccinePrarmeterEntity; |
|
|
import com.epmet.excel.IcVaccinePrarmeterImportExcel; |
|
|
import com.epmet.excel.IcVaccinePrarmeterImportExcel; |
|
|
import com.epmet.excel.error.IcVaccinePrarmeterImportErrorModel; |
|
|
import com.epmet.excel.error.IcVaccinePrarmeterImportErrorModel; |
|
@ -31,6 +38,7 @@ import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|
|
import com.epmet.feign.GovOrgFeignClient; |
|
|
import com.epmet.feign.GovOrgFeignClient; |
|
|
import com.epmet.feign.OssFeignClient; |
|
|
import com.epmet.feign.OssFeignClient; |
|
|
import com.epmet.redis.IcVaccinePrarmeterRedis; |
|
|
import com.epmet.redis.IcVaccinePrarmeterRedis; |
|
|
|
|
|
import com.epmet.service.IcUserChangeRecordService; |
|
|
import com.epmet.service.IcVaccinePrarmeterService; |
|
|
import com.epmet.service.IcVaccinePrarmeterService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
@ -50,6 +58,7 @@ import java.io.IOException; |
|
|
import java.io.InputStream; |
|
|
import java.io.InputStream; |
|
|
import java.io.OutputStream; |
|
|
import java.io.OutputStream; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
|
|
|
import java.util.function.Function; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -74,6 +83,12 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
@Autowired |
|
|
@Autowired |
|
|
private GovOrgFeignClient govOrgFeignClient; |
|
|
private GovOrgFeignClient govOrgFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IcResiUserDao icResiUserDao; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IcUserChangeRecordService icUserChangeRecordService; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<IcVaccinePrarmeterDTO> page(Map<String, Object> params) { |
|
|
public PageData<IcVaccinePrarmeterDTO> page(Map<String, Object> params) { |
|
|
IPage<IcVaccinePrarmeterEntity> page = baseDao.selectPage( |
|
|
IPage<IcVaccinePrarmeterEntity> page = baseDao.selectPage( |
|
@ -279,7 +294,7 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
// 已接种 判断是否填写接种时间地点
|
|
|
// 已接种 判断是否填写接种时间地点
|
|
|
if (StringUtils.isBlank(list.get(i).getFirstVacTime()) && !list.get(i).getAddStatus()){ |
|
|
if (list.get(i).getFirstVacTime() == null && !list.get(i).getAddStatus()){ |
|
|
errorInfo.add(getErrorInfo(list.get(i), "第一次接种时间不能为空",i+1)); |
|
|
errorInfo.add(getErrorInfo(list.get(i), "第一次接种时间不能为空",i+1)); |
|
|
list.get(i).setAddStatus(true); |
|
|
list.get(i).setAddStatus(true); |
|
|
continue; |
|
|
continue; |
|
@ -289,7 +304,7 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
list.get(i).setAddStatus(true); |
|
|
list.get(i).setAddStatus(true); |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
if (StringUtils.isBlank(list.get(i).getSecondVacTime()) && !list.get(i).getAddStatus()){ |
|
|
if (list.get(i).getSecondVacTime() == null && !list.get(i).getAddStatus()){ |
|
|
errorInfo.add(getErrorInfo(list.get(i), "第二次接种时间不能为空",i+1)); |
|
|
errorInfo.add(getErrorInfo(list.get(i), "第二次接种时间不能为空",i+1)); |
|
|
list.get(i).setAddStatus(true); |
|
|
list.get(i).setAddStatus(true); |
|
|
continue; |
|
|
continue; |
|
@ -299,7 +314,7 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
list.get(i).setAddStatus(true); |
|
|
list.get(i).setAddStatus(true); |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
if (StringUtils.isBlank(list.get(i).getThirdVacTime()) && !list.get(i).getAddStatus()){ |
|
|
if (list.get(i).getThirdVacTime() == null && !list.get(i).getAddStatus()){ |
|
|
errorInfo.add(getErrorInfo(list.get(i), "第三次接种时间不能为空",i+1)); |
|
|
errorInfo.add(getErrorInfo(list.get(i), "第三次接种时间不能为空",i+1)); |
|
|
list.get(i).setAddStatus(true); |
|
|
list.get(i).setAddStatus(true); |
|
|
continue; |
|
|
continue; |
|
@ -323,7 +338,7 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
continue; |
|
|
continue; |
|
|
}else{ |
|
|
}else{ |
|
|
list.get(i).setGridId(gridInfoByNameResultDTO.getDeptId()); |
|
|
list.get(i).setGridId(gridInfoByNameResultDTO.getDeptId()); |
|
|
list.get(i).setPid(gridInfoByNameResultDTO.getPid()); |
|
|
list.get(i).setAgencyId(gridInfoByNameResultDTO.getPid()); |
|
|
list.get(i).setPids(gridInfoByNameResultDTO.getPids()); |
|
|
list.get(i).setPids(gridInfoByNameResultDTO.getPids()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -409,4 +424,214 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
public void vaccineCheck(IcVaccineCheckFormDTO formDTO, TokenDto tokenDto) { |
|
|
|
|
|
|
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|
|
|
|
|
formDTO.setRealName(staffInfo.getRealName()); |
|
|
|
|
|
|
|
|
|
|
|
// 获取新冠病毒疫苗接种人员信息台账表信息
|
|
|
|
|
|
IcVaccinePrarmeterEntity icResiCollectEntity = baseDao.selectById(formDTO.getId()); |
|
|
|
|
|
|
|
|
|
|
|
// 更新审核信息
|
|
|
|
|
|
icResiCollectEntity.setCheckState(formDTO.getCheckState()); |
|
|
|
|
|
icResiCollectEntity.setCheckReason(formDTO.getCheckReason()); |
|
|
|
|
|
icResiCollectEntity.setVillageId(formDTO.getVillageId()); |
|
|
|
|
|
icResiCollectEntity.setBuildId(formDTO.getBuildId()); |
|
|
|
|
|
icResiCollectEntity.setUnitId(formDTO.getUnitId()); |
|
|
|
|
|
icResiCollectEntity.setHomeId(formDTO.getHomeId()); |
|
|
|
|
|
|
|
|
|
|
|
baseDao.updateById(icResiCollectEntity); |
|
|
|
|
|
|
|
|
|
|
|
// 审核状态:0待审核 1未通过 2已通过
|
|
|
|
|
|
if("2".equals(formDTO.getCheckState())){ |
|
|
|
|
|
|
|
|
|
|
|
// 同步接种记录
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isBlank(icResiCollectEntity.getHomeId())){ |
|
|
|
|
|
// 新增房屋(新增房屋操作已在审核接口之前,前端调用新增接口实现)
|
|
|
|
|
|
// 更新登记表房屋ID
|
|
|
|
|
|
icResiCollectEntity = updateHomeId(icResiCollectEntity,formDTO); |
|
|
|
|
|
|
|
|
|
|
|
// 根据身份证号和房屋ID获取人员信息
|
|
|
|
|
|
IcResiUserEntity userIdCardEntity = queryOriginUserByIdCard(icResiCollectEntity.getIdCard(),icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
if(userIdCardEntity != null){ |
|
|
|
|
|
// 已存在人员 人员房屋不一致(更新人员信息和变更记录)
|
|
|
|
|
|
updateUserInfo(icResiCollectEntity,true,formDTO,userIdCardEntity); |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 不存在人员
|
|
|
|
|
|
insertUserInfo(icResiCollectEntity,formDTO); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 更新房屋
|
|
|
|
|
|
updateHouseInfo(icResiCollectEntity); |
|
|
|
|
|
|
|
|
|
|
|
// 根据身份证号和房屋ID获取人员信息
|
|
|
|
|
|
IcResiUserEntity userIdCardEntity = queryOriginUserByIdCard(icResiCollectEntity.getIdCard(),icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
Map<String, IcResiUserEntity> userMap = queryOriginUserByHomeId(icResiCollectEntity.getHomeId(),icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
if(userIdCardEntity != null){ |
|
|
|
|
|
// 已存在人员
|
|
|
|
|
|
if(userMap.containsKey(icResiCollectEntity.getIdCard())){ |
|
|
|
|
|
// 人员房屋一致(只更新人员信息)
|
|
|
|
|
|
updateUserInfo(icResiCollectEntity,false,formDTO,userIdCardEntity); |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 人员房屋不一致(更新人员信息和变更记录)
|
|
|
|
|
|
updateUserInfo(icResiCollectEntity,true,formDTO,userIdCardEntity); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 不存在人员
|
|
|
|
|
|
insertUserInfo(icResiCollectEntity,formDTO); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 更新新冠病毒疫苗接种人员信息台账表房屋ID |
|
|
|
|
|
* @param icResiCollectEntity |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private IcVaccinePrarmeterEntity updateHomeId(IcVaccinePrarmeterEntity icResiCollectEntity,IcVaccineCheckFormDTO formDTO){ |
|
|
|
|
|
|
|
|
|
|
|
// fegin获取房屋信息
|
|
|
|
|
|
GetHouseInfoToCollectFormDTO getHouseInfoToCollectFormDTO = new GetHouseInfoToCollectFormDTO(); |
|
|
|
|
|
getHouseInfoToCollectFormDTO.setBuildingUnitId(formDTO.getUnitId()); |
|
|
|
|
|
getHouseInfoToCollectFormDTO.setDoorName(formDTO.getDoorName()); |
|
|
|
|
|
Result<IcHouseInfoCollectResultDTO> resultDTOResult = govOrgFeignClient.getHouseInfoToCollect(getHouseInfoToCollectFormDTO); |
|
|
|
|
|
IcHouseInfoCollectResultDTO icHouseInfoCollectResultDTO = resultDTOResult.getData(); |
|
|
|
|
|
|
|
|
|
|
|
// 新增房屋后需要collect更新上房屋ID
|
|
|
|
|
|
// log
|
|
|
|
|
|
icResiCollectEntity.setHomeId(icHouseInfoCollectResultDTO.getId()); |
|
|
|
|
|
baseDao.updateById(icResiCollectEntity); |
|
|
|
|
|
return icResiCollectEntity; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 更新房屋信息 |
|
|
|
|
|
* @param icResiCollectEntity |
|
|
|
|
|
*/ |
|
|
|
|
|
private void updateHouseInfo(IcVaccinePrarmeterEntity icResiCollectEntity){ |
|
|
|
|
|
CollectHouseFormDTO collectHouseFormDTO = new CollectHouseFormDTO(); |
|
|
|
|
|
collectHouseFormDTO.setId(icResiCollectEntity.getHomeId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fegin获取房屋信息
|
|
|
|
|
|
GetHouseInfoToCollectFormDTO getHouseInfoToCollectFormDTO = new GetHouseInfoToCollectFormDTO(); |
|
|
|
|
|
getHouseInfoToCollectFormDTO.setBuildingUnitId(icResiCollectEntity.getUnitId()); |
|
|
|
|
|
getHouseInfoToCollectFormDTO.setDoorName(icResiCollectEntity.getHomeName()); |
|
|
|
|
|
Result<IcHouseInfoCollectResultDTO> resultDTOResult = govOrgFeignClient.getHouseInfoToCollect(getHouseInfoToCollectFormDTO); |
|
|
|
|
|
IcHouseInfoCollectResultDTO icHouseInfoCollectResultDTO = resultDTOResult.getData(); |
|
|
|
|
|
|
|
|
|
|
|
collectHouseFormDTO.setCustomerId(icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
collectHouseFormDTO.setResiNumber((icHouseInfoCollectResultDTO.getResiNumber() + 1)); |
|
|
|
|
|
govOrgFeignClient.updateCollect(collectHouseFormDTO); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取人员信息 |
|
|
|
|
|
* @param idCard |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private IcResiUserEntity queryOriginUserByIdCard(String idCard,String customerId) { |
|
|
|
|
|
LambdaQueryWrapper<IcResiUserEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
|
|
query.eq(IcResiUserEntity::getIdCard, idCard); |
|
|
|
|
|
query.eq(IcResiUserEntity::getCustomerId, customerId); |
|
|
|
|
|
IcResiUserEntity originUser = icResiUserDao.selectOne(query); |
|
|
|
|
|
return originUser; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Map<String, IcResiUserEntity> queryOriginUserByHomeId(String homeId,String customerId) { |
|
|
|
|
|
LambdaQueryWrapper<IcResiUserEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
|
|
query.eq(IcResiUserEntity::getHomeId, homeId); |
|
|
|
|
|
query.eq(IcResiUserEntity::getCustomerId, customerId); |
|
|
|
|
|
List<IcResiUserEntity> originUserList = icResiUserDao.selectList(query); |
|
|
|
|
|
Map<String, IcResiUserEntity> memMap = originUserList.stream().collect(Collectors.toMap(IcResiUserEntity::getIdCard, Function.identity())); |
|
|
|
|
|
return memMap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 更新人员信息 |
|
|
|
|
|
* @param icResiCollectEntity 登记信息 |
|
|
|
|
|
* @param isUpdateLog 是否更新记录 |
|
|
|
|
|
* @param formDTO 入参 |
|
|
|
|
|
* @param userEntity 根据身份证号查询到的user信息 |
|
|
|
|
|
*/ |
|
|
|
|
|
private void updateUserInfo(IcVaccinePrarmeterEntity icResiCollectEntity,Boolean isUpdateLog, |
|
|
|
|
|
IcVaccineCheckFormDTO formDTO,IcResiUserEntity userEntity){ |
|
|
|
|
|
|
|
|
|
|
|
userEntity.setPids(icResiCollectEntity.getPids()); // ic_resi_user表的组织的pids 含agencyId本身
|
|
|
|
|
|
userEntity.setAgencyId(icResiCollectEntity.getAgencyId()); |
|
|
|
|
|
userEntity.setGridId(icResiCollectEntity.getGridId()); |
|
|
|
|
|
userEntity.setVillageId(icResiCollectEntity.getVillageId()); |
|
|
|
|
|
userEntity.setBuildId(icResiCollectEntity.getBuildId()); |
|
|
|
|
|
userEntity.setUnitId(icResiCollectEntity.getUnitId()); |
|
|
|
|
|
userEntity.setHomeId(icResiCollectEntity.getHomeId()); |
|
|
|
|
|
userEntity.setName(icResiCollectEntity.getName()); |
|
|
|
|
|
userEntity.setMobile(icResiCollectEntity.getMobile()); |
|
|
|
|
|
userEntity.setIdCard(icResiCollectEntity.getIdCard()); |
|
|
|
|
|
icResiUserDao.updateById(userEntity); |
|
|
|
|
|
|
|
|
|
|
|
// 判断是否需要更新记录
|
|
|
|
|
|
if(isUpdateLog){ |
|
|
|
|
|
//变更记录表
|
|
|
|
|
|
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); |
|
|
|
|
|
changeRecordEntity.setCustomerId(icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
changeRecordEntity.setOperatorId(formDTO.getUserId()); |
|
|
|
|
|
changeRecordEntity.setIcUserId(userEntity.getId()); |
|
|
|
|
|
changeRecordEntity.setOperatorName(formDTO.getRealName()); |
|
|
|
|
|
changeRecordEntity.setIcUserName(userEntity.getName()); |
|
|
|
|
|
changeRecordEntity.setType("update"); |
|
|
|
|
|
changeRecordEntity.setTypeName("修改"); |
|
|
|
|
|
changeRecordEntity.setBeforeChangeName("-"); |
|
|
|
|
|
changeRecordEntity.setAfterChangeName("-"); |
|
|
|
|
|
changeRecordEntity.setChangeTime(new java.util.Date()); |
|
|
|
|
|
icUserChangeRecordService.insert(changeRecordEntity); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增人员信息 |
|
|
|
|
|
* @param icResiCollectEntity |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
*/ |
|
|
|
|
|
private void insertUserInfo(IcVaccinePrarmeterEntity icResiCollectEntity,IcVaccineCheckFormDTO formDTO){ |
|
|
|
|
|
|
|
|
|
|
|
// 新增人员
|
|
|
|
|
|
IcResiUserEntity userEntity = new IcResiUserEntity(); |
|
|
|
|
|
userEntity.setPids(icResiCollectEntity.getPids()); // ic_resi_user表的组织的pids 含agencyId本身
|
|
|
|
|
|
userEntity.setAgencyId(icResiCollectEntity.getAgencyId()); |
|
|
|
|
|
userEntity.setGridId(icResiCollectEntity.getGridId()); |
|
|
|
|
|
userEntity.setVillageId(icResiCollectEntity.getVillageId()); |
|
|
|
|
|
userEntity.setBuildId(icResiCollectEntity.getBuildId()); |
|
|
|
|
|
userEntity.setUnitId(icResiCollectEntity.getUnitId()); |
|
|
|
|
|
userEntity.setHomeId(icResiCollectEntity.getHomeId()); |
|
|
|
|
|
userEntity.setName(icResiCollectEntity.getName()); |
|
|
|
|
|
userEntity.setMobile(icResiCollectEntity.getMobile()); |
|
|
|
|
|
userEntity.setIdCard(icResiCollectEntity.getIdCard()); |
|
|
|
|
|
userEntity.setCustomerId(icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
icResiUserDao.insert(userEntity); |
|
|
|
|
|
|
|
|
|
|
|
//变更记录表
|
|
|
|
|
|
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); |
|
|
|
|
|
changeRecordEntity.setCustomerId(icResiCollectEntity.getCustomerId()); |
|
|
|
|
|
changeRecordEntity.setOperatorId(formDTO.getUserId()); |
|
|
|
|
|
changeRecordEntity.setIcUserId(userEntity.getId()); |
|
|
|
|
|
changeRecordEntity.setOperatorName(formDTO.getRealName()); |
|
|
|
|
|
changeRecordEntity.setIcUserName(userEntity.getName()); |
|
|
|
|
|
changeRecordEntity.setType("add"); |
|
|
|
|
|
changeRecordEntity.setTypeName("新增"); |
|
|
|
|
|
changeRecordEntity.setBeforeChangeName("-"); |
|
|
|
|
|
changeRecordEntity.setAfterChangeName("-"); |
|
|
|
|
|
changeRecordEntity.setChangeTime(new java.util.Date()); |
|
|
|
|
|
icUserChangeRecordService.insert(changeRecordEntity); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|