Browse Source

新冠病毒疫苗接种人员信息台账--bug

master
wanggongfeng 3 years ago
parent
commit
70c1645ea1
  1. 182
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccinePrarmeterServiceImpl.java

182
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccinePrarmeterServiceImpl.java

@ -455,17 +455,17 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
formDTO.setRealName(staffInfo.getRealName()); formDTO.setRealName(staffInfo.getRealName());
// 获取新冠病毒疫苗接种人员信息台账表信息 // 获取新冠病毒疫苗接种人员信息台账表信息
IcVaccinePrarmeterEntity icResiCollectEntity = baseDao.selectById(formDTO.getId()); IcVaccinePrarmeterEntity icVaccinePrarmeterEntity = baseDao.selectById(formDTO.getId());
// 更新审核信息 // 更新审核信息
icResiCollectEntity.setCheckState(formDTO.getCheckState()); icVaccinePrarmeterEntity.setCheckState(formDTO.getCheckState());
icResiCollectEntity.setCheckReason(formDTO.getCheckReason()); icVaccinePrarmeterEntity.setCheckReason(formDTO.getCheckReason());
icResiCollectEntity.setVillageId(formDTO.getVillageId()); icVaccinePrarmeterEntity.setVillageId(formDTO.getVillageId());
icResiCollectEntity.setBuildId(formDTO.getBuildId()); icVaccinePrarmeterEntity.setBuildId(formDTO.getBuildId());
icResiCollectEntity.setUnitId(formDTO.getUnitId()); icVaccinePrarmeterEntity.setUnitId(formDTO.getUnitId());
icResiCollectEntity.setHomeId(formDTO.getHomeId()); icVaccinePrarmeterEntity.setHomeId(formDTO.getHomeId());
baseDao.updateById(icResiCollectEntity); baseDao.updateById(icVaccinePrarmeterEntity);
// 审核状态:0待审核 1未通过 2已通过 // 审核状态:0待审核 1未通过 2已通过
if("2".equals(formDTO.getCheckState())){ if("2".equals(formDTO.getCheckState())){
@ -473,44 +473,44 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
String icResiUserId = ""; String icResiUserId = "";
// 根据身份证号和房屋ID获取人员信息 // 根据身份证号和房屋ID获取人员信息
IcResiUserEntity userIdCardEntity = queryOriginUserByIdCard(icResiCollectEntity.getIdCard(),icResiCollectEntity.getCustomerId()); IcResiUserEntity userIdCardEntity = queryOriginUserByIdCard(icVaccinePrarmeterEntity.getIdCard(),icVaccinePrarmeterEntity.getCustomerId());
if(StringUtils.isBlank(icResiCollectEntity.getHomeId())){ if(StringUtils.isBlank(icVaccinePrarmeterEntity.getHomeId())){
// 新增房屋(新增房屋操作已在审核接口之前,前端调用新增接口实现) // 新增房屋(新增房屋操作已在审核接口之前,前端调用新增接口实现)
// 更新登记表房屋ID // 更新登记表房屋ID
icResiCollectEntity = updateHomeId(icResiCollectEntity,formDTO); icVaccinePrarmeterEntity = updateHomeId(icVaccinePrarmeterEntity,formDTO);
if(userIdCardEntity != null){ if(userIdCardEntity != null){
icResiUserId = userIdCardEntity.getId(); icResiUserId = userIdCardEntity.getId();
// 已存在人员 人员房屋不一致(更新人员信息和变更记录) // 已存在人员 人员房屋不一致(更新人员信息和变更记录)
updateUserInfo(icResiCollectEntity,true,formDTO,userIdCardEntity); updateUserInfo(icVaccinePrarmeterEntity,true,formDTO,userIdCardEntity);
}else{ }else{
// 不存在人员 // 不存在人员
icResiUserId = insertUserInfo(icResiCollectEntity,formDTO); icResiUserId = insertUserInfo(icVaccinePrarmeterEntity,formDTO);
} }
}else{ }else{
// 更新房屋 // 更新房屋
updateHouseInfo(icResiCollectEntity); updateHouseInfo(icVaccinePrarmeterEntity);
Map<String, IcResiUserEntity> userMap = queryOriginUserByHomeId(icResiCollectEntity.getHomeId(),icResiCollectEntity.getCustomerId()); Map<String, IcResiUserEntity> userMap = queryOriginUserByHomeId(icVaccinePrarmeterEntity.getHomeId(),icVaccinePrarmeterEntity.getCustomerId());
if(userIdCardEntity != null){ if(userIdCardEntity != null){
icResiUserId = userIdCardEntity.getId(); icResiUserId = userIdCardEntity.getId();
// 已存在人员 // 已存在人员
if(userMap.containsKey(icResiCollectEntity.getIdCard())){ if(userMap.containsKey(icVaccinePrarmeterEntity.getIdCard())){
// 人员房屋一致(只更新人员信息) // 人员房屋一致(只更新人员信息)
updateUserInfo(icResiCollectEntity,false,formDTO,userIdCardEntity); updateUserInfo(icVaccinePrarmeterEntity,false,formDTO,userIdCardEntity);
}else{ }else{
// 人员房屋不一致(更新人员信息和变更记录) // 人员房屋不一致(更新人员信息和变更记录)
updateUserInfo(icResiCollectEntity,true,formDTO,userIdCardEntity); updateUserInfo(icVaccinePrarmeterEntity,true,formDTO,userIdCardEntity);
} }
}else{ }else{
// 不存在人员 // 不存在人员
icResiUserId = insertUserInfo(icResiCollectEntity,formDTO); icResiUserId = insertUserInfo(icVaccinePrarmeterEntity,formDTO);
} }
} }
// 同步接种记录 and 疫苗接种记录关系 // 同步接种记录 and 疫苗接种记录关系
synchronizationVaccineInfo(icResiCollectEntity,icResiUserId); synchronizationVaccineInfo(icVaccinePrarmeterEntity,icResiUserId);
} }
@ -518,68 +518,68 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
/** /**
* 同步接种记录 and 疫苗接种记录关系 * 同步接种记录 and 疫苗接种记录关系
* @param icResiCollectEntity * @param icVaccinePrarmeterEntity
* @param icResiUserId * @param icResiUserId
*/ */
@SneakyThrows @SneakyThrows
private void synchronizationVaccineInfo(IcVaccinePrarmeterEntity icResiCollectEntity,String icResiUserId){ private void synchronizationVaccineInfo(IcVaccinePrarmeterEntity icVaccinePrarmeterEntity,String icResiUserId){
// 同步接种记录 // 同步接种记录
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// 处理第一次接种时间格式 // 处理第一次接种时间格式
String firstTime = icResiCollectEntity.getFirstVacTime(); String firstTime = icVaccinePrarmeterEntity.getFirstVacTime();
Date firstDate = sdf.parse(firstTime); Date firstDate = sdf.parse(firstTime);
icResiCollectEntity.setFirstVacTime(sdf.format(firstDate)); icVaccinePrarmeterEntity.setFirstVacTime(sdf.format(firstDate));
// 处理第二次接种时间格式 // 处理第二次接种时间格式
String secondTime = icResiCollectEntity.getSecondVacTime(); String secondTime = icVaccinePrarmeterEntity.getSecondVacTime();
Date secondDate = sdf.parse(secondTime); Date secondDate = sdf.parse(secondTime);
icResiCollectEntity.setSecondVacTime(sdf.format(secondDate)); icVaccinePrarmeterEntity.setSecondVacTime(sdf.format(secondDate));
// 处理第三次接种时间格式 // 处理第三次接种时间格式
String thirdTime = icResiCollectEntity.getThirdVacTime(); String thirdTime = icVaccinePrarmeterEntity.getThirdVacTime();
Date thirdDate = sdf.parse(thirdTime); Date thirdDate = sdf.parse(thirdTime);
icResiCollectEntity.setThirdVacTime(sdf.format(thirdDate)); icVaccinePrarmeterEntity.setThirdVacTime(sdf.format(thirdDate));
// 查询第一次接种信息 // 查询第一次接种信息
List<IcVaccineEntity> icVaccineEntityFirstList = icVaccineDao.getVaccineListByIdCard(icResiCollectEntity.getIdCard(),sdf.format(firstDate)); List<IcVaccineEntity> icVaccineEntityFirstList = icVaccineDao.getVaccineListByIdCard(icVaccinePrarmeterEntity.getIdCard(),sdf.format(firstDate));
if(icVaccineEntityFirstList.size() > 0){ if(icVaccineEntityFirstList.size() > 0){
// 更新疫苗接种记录 and 疫苗接种记录关系 // 更新疫苗接种记录 and 疫苗接种记录关系
for(IcVaccineEntity entity : icVaccineEntityFirstList){ for(IcVaccineEntity entity : icVaccineEntityFirstList){
updateVaccineInfo(entity,icResiCollectEntity); updateVaccineInfo(entity,icVaccinePrarmeterEntity);
} }
}else{ }else{
// 新增疫苗接种记录 and 疫苗接种记录关系 // 新增疫苗接种记录 and 疫苗接种记录关系
insertVaccineInfo(icResiCollectEntity,icResiUserId,firstDate); insertVaccineInfo(icVaccinePrarmeterEntity,icResiUserId,firstDate);
} }
// 查询第二次接种信息 // 查询第二次接种信息
List<IcVaccineEntity> icVaccineEntitySecondList = icVaccineDao.getVaccineListByIdCard(icResiCollectEntity.getIdCard(),sdf.format(secondDate)); List<IcVaccineEntity> icVaccineEntitySecondList = icVaccineDao.getVaccineListByIdCard(icVaccinePrarmeterEntity.getIdCard(),sdf.format(secondDate));
if(icVaccineEntitySecondList.size() > 0){ if(icVaccineEntitySecondList.size() > 0){
// 更新疫苗接种记录 and 疫苗接种记录关系 // 更新疫苗接种记录 and 疫苗接种记录关系
for(IcVaccineEntity entity : icVaccineEntitySecondList){ for(IcVaccineEntity entity : icVaccineEntitySecondList){
updateVaccineInfo(entity,icResiCollectEntity); updateVaccineInfo(entity,icVaccinePrarmeterEntity);
} }
}else{ }else{
// 新增疫苗接种记录 and 疫苗接种记录关系 // 新增疫苗接种记录 and 疫苗接种记录关系
insertVaccineInfo(icResiCollectEntity,icResiUserId,firstDate); insertVaccineInfo(icVaccinePrarmeterEntity,icResiUserId,firstDate);
} }
// 查询第三次接种信息 // 查询第三次接种信息
List<IcVaccineEntity> icVaccineEntityThirdList = icVaccineDao.getVaccineListByIdCard(icResiCollectEntity.getIdCard(),sdf.format(thirdDate)); List<IcVaccineEntity> icVaccineEntityThirdList = icVaccineDao.getVaccineListByIdCard(icVaccinePrarmeterEntity.getIdCard(),sdf.format(thirdDate));
if(icVaccineEntityThirdList.size() > 0){ if(icVaccineEntityThirdList.size() > 0){
// 更新疫苗接种记录 and 疫苗接种记录关系 // 更新疫苗接种记录 and 疫苗接种记录关系
for(IcVaccineEntity entity : icVaccineEntityThirdList){ for(IcVaccineEntity entity : icVaccineEntityThirdList){
updateVaccineInfo(entity,icResiCollectEntity); updateVaccineInfo(entity,icVaccinePrarmeterEntity);
} }
}else{ }else{
// 新增疫苗接种记录 and 疫苗接种记录关系 // 新增疫苗接种记录 and 疫苗接种记录关系
insertVaccineInfo(icResiCollectEntity,icResiUserId,firstDate); insertVaccineInfo(icVaccinePrarmeterEntity,icResiUserId,firstDate);
} }
} }
@ -587,48 +587,48 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
/** /**
* 更新疫苗接种记录 and 疫苗接种记录关系 * 更新疫苗接种记录 and 疫苗接种记录关系
* @param entity * @param entity
* @param icResiCollectEntity * @param icVaccinePrarmeterEntity
*/ */
private void updateVaccineInfo(IcVaccineEntity entity,IcVaccinePrarmeterEntity icResiCollectEntity){ private void updateVaccineInfo(IcVaccineEntity entity,IcVaccinePrarmeterEntity icVaccinePrarmeterEntity){
// 更新疫苗接种记录 // 更新疫苗接种记录
entity.setInoculateAddress(icResiCollectEntity.getFirstVacSite()); entity.setInoculateAddress(icVaccinePrarmeterEntity.getFirstVacSite());
entity.setUserType("prarmeter"); entity.setUserType("prarmeter");
entity.setCustomerId(icResiCollectEntity.getCustomerId()); entity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
icVaccineDao.updateById(entity); icVaccineDao.updateById(entity);
// 更新疫苗接种记录关系 // 更新疫苗接种记录关系
IcVaccineRelationEntity icVaccineRelationEntity = new IcVaccineRelationEntity(); IcVaccineRelationEntity icVaccineRelationEntity = new IcVaccineRelationEntity();
icVaccineRelationEntity.setIcVaccineId(entity.getId()); icVaccineRelationEntity.setIcVaccineId(entity.getId());
icVaccineRelationEntity.setUserType("prarmeter"); icVaccineRelationEntity.setUserType("prarmeter");
icVaccineRelationEntity.setCustomerId(icResiCollectEntity.getCustomerId()); icVaccineRelationEntity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
icVaccineRelationDao.updateRelationInfoByVaccineId(icVaccineRelationEntity); icVaccineRelationDao.updateRelationInfoByVaccineId(icVaccineRelationEntity);
} }
/** /**
* 新增疫苗接种记录 and 疫苗接种记录关系 * 新增疫苗接种记录 and 疫苗接种记录关系
* @param icResiCollectEntity * @param icVaccinePrarmeterEntity
* @param icResiUserId * @param icResiUserId
* @param time * @param time
*/ */
private void insertVaccineInfo(IcVaccinePrarmeterEntity icResiCollectEntity,String icResiUserId,Date time){ private void insertVaccineInfo(IcVaccinePrarmeterEntity icVaccinePrarmeterEntity,String icResiUserId,Date time){
IcVaccineEntity icVaccineEntity = new IcVaccineEntity(); IcVaccineEntity icVaccineEntity = new IcVaccineEntity();
icVaccineEntity.setCustomerId(icResiCollectEntity.getCustomerId()); icVaccineEntity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
icVaccineEntity.setName(icResiCollectEntity.getName()); icVaccineEntity.setName(icVaccinePrarmeterEntity.getName());
icVaccineEntity.setMobile(icResiCollectEntity.getMobile()); icVaccineEntity.setMobile(icVaccinePrarmeterEntity.getMobile());
icVaccineEntity.setIdCard(icResiCollectEntity.getIdCard()); icVaccineEntity.setIdCard(icVaccinePrarmeterEntity.getIdCard());
icVaccineEntity.setIsResiUser("1"); icVaccineEntity.setIsResiUser("1");
icVaccineEntity.setUserType("prarmeter"); icVaccineEntity.setUserType("prarmeter");
icVaccineEntity.setUserId(icResiUserId); icVaccineEntity.setUserId(icResiUserId);
icVaccineEntity.setInoculateTime(time); icVaccineEntity.setInoculateTime(time);
icVaccineEntity.setInoculateAddress(icResiCollectEntity.getFirstVacSite()); icVaccineEntity.setInoculateAddress(icVaccinePrarmeterEntity.getFirstVacSite());
icVaccineDao.insert(icVaccineEntity); icVaccineDao.insert(icVaccineEntity);
// 新增关系 // 新增关系
IcVaccineRelationEntity icVaccineRelationEntity = new IcVaccineRelationEntity(); IcVaccineRelationEntity icVaccineRelationEntity = new IcVaccineRelationEntity();
icVaccineRelationEntity.setCustomerId(icResiCollectEntity.getCustomerId()); icVaccineRelationEntity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
icVaccineRelationEntity.setAgencyId(icResiCollectEntity.getAgencyId()); icVaccineRelationEntity.setAgencyId(icVaccinePrarmeterEntity.getAgencyId());
icVaccineRelationEntity.setPids(icResiCollectEntity.getPids()); icVaccineRelationEntity.setPids(icVaccinePrarmeterEntity.getPids());
icVaccineRelationEntity.setIcVaccineId(icVaccineEntity.getId()); icVaccineRelationEntity.setIcVaccineId(icVaccineEntity.getId());
icVaccineRelationEntity.setUserType("prarmeter"); icVaccineRelationEntity.setUserType("prarmeter");
icVaccineRelationDao.insert(icVaccineRelationEntity); icVaccineRelationDao.insert(icVaccineRelationEntity);
@ -636,11 +636,11 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
/** /**
* 更新新冠病毒疫苗接种人员信息台账表房屋ID * 更新新冠病毒疫苗接种人员信息台账表房屋ID
* @param icResiCollectEntity * @param icVaccinePrarmeterEntity
* @param formDTO * @param formDTO
* @return * @return
*/ */
private IcVaccinePrarmeterEntity updateHomeId(IcVaccinePrarmeterEntity icResiCollectEntity,IcVaccineCheckFormDTO formDTO){ private IcVaccinePrarmeterEntity updateHomeId(IcVaccinePrarmeterEntity icVaccinePrarmeterEntity,IcVaccineCheckFormDTO formDTO){
// fegin获取房屋信息 // fegin获取房屋信息
GetHouseInfoToCollectFormDTO getHouseInfoToCollectFormDTO = new GetHouseInfoToCollectFormDTO(); GetHouseInfoToCollectFormDTO getHouseInfoToCollectFormDTO = new GetHouseInfoToCollectFormDTO();
@ -651,30 +651,32 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
// 新增房屋后需要collect更新上房屋ID // 新增房屋后需要collect更新上房屋ID
// log // log
icResiCollectEntity.setHomeId(icHouseInfoCollectResultDTO.getId()); icVaccinePrarmeterEntity.setHomeId(icHouseInfoCollectResultDTO.getId());
baseDao.updateById(icResiCollectEntity); baseDao.updateById(icVaccinePrarmeterEntity);
return icResiCollectEntity; return icVaccinePrarmeterEntity;
} }
/** /**
* 更新房屋信息 * 更新房屋信息
* @param icResiCollectEntity * @param icVaccinePrarmeterEntity
*/ */
private void updateHouseInfo(IcVaccinePrarmeterEntity icResiCollectEntity){ private void updateHouseInfo(IcVaccinePrarmeterEntity icVaccinePrarmeterEntity){
CollectHouseFormDTO collectHouseFormDTO = new CollectHouseFormDTO(); CollectHouseFormDTO collectHouseFormDTO = new CollectHouseFormDTO();
collectHouseFormDTO.setId(icResiCollectEntity.getHomeId()); collectHouseFormDTO.setId(icVaccinePrarmeterEntity.getHomeId());
// fegin获取房屋信息 // fegin获取房屋信息
GetHouseInfoToCollectFormDTO getHouseInfoToCollectFormDTO = new GetHouseInfoToCollectFormDTO(); GetHouseInfoToCollectFormDTO getHouseInfoToCollectFormDTO = new GetHouseInfoToCollectFormDTO();
getHouseInfoToCollectFormDTO.setBuildingUnitId(icResiCollectEntity.getUnitId()); getHouseInfoToCollectFormDTO.setBuildingUnitId(icVaccinePrarmeterEntity.getUnitId());
getHouseInfoToCollectFormDTO.setDoorName(icResiCollectEntity.getHomeName()); getHouseInfoToCollectFormDTO.setDoorName(icVaccinePrarmeterEntity.getHomeName());
Result<IcHouseInfoCollectResultDTO> resultDTOResult = govOrgFeignClient.getHouseInfoToCollect(getHouseInfoToCollectFormDTO); Result<IcHouseInfoCollectResultDTO> resultDTOResult = govOrgFeignClient.getHouseInfoToCollect(getHouseInfoToCollectFormDTO);
IcHouseInfoCollectResultDTO icHouseInfoCollectResultDTO = resultDTOResult.getData(); IcHouseInfoCollectResultDTO icHouseInfoCollectResultDTO = resultDTOResult.getData();
collectHouseFormDTO.setCustomerId(icResiCollectEntity.getCustomerId()); collectHouseFormDTO.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
collectHouseFormDTO.setResiNumber((icHouseInfoCollectResultDTO.getResiNumber() + 1)); collectHouseFormDTO.setResiNumber((icHouseInfoCollectResultDTO.getResiNumber() + 1));
collectHouseFormDTO.setRentFlag(icHouseInfoCollectResultDTO.getRentFlag());
collectHouseFormDTO.setOwnerName(icHouseInfoCollectResultDTO.getOwnerName());
govOrgFeignClient.updateCollect(collectHouseFormDTO); govOrgFeignClient.updateCollect(collectHouseFormDTO);
} }
@ -703,31 +705,31 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
/** /**
* 更新人员信息 * 更新人员信息
* @param icResiCollectEntity 登记信息 * @param icVaccinePrarmeterEntity 登记信息
* @param isUpdateLog 是否更新记录 * @param isUpdateLog 是否更新记录
* @param formDTO 入参 * @param formDTO 入参
* @param userEntity 根据身份证号查询到的user信息 * @param userEntity 根据身份证号查询到的user信息
*/ */
private void updateUserInfo(IcVaccinePrarmeterEntity icResiCollectEntity,Boolean isUpdateLog, private void updateUserInfo(IcVaccinePrarmeterEntity icVaccinePrarmeterEntity,Boolean isUpdateLog,
IcVaccineCheckFormDTO formDTO,IcResiUserEntity userEntity){ IcVaccineCheckFormDTO formDTO,IcResiUserEntity userEntity){
userEntity.setPids(icResiCollectEntity.getPids()); // ic_resi_user表的组织的pids 含agencyId本身 userEntity.setPids(icVaccinePrarmeterEntity.getPids()); // ic_resi_user表的组织的pids 含agencyId本身
userEntity.setAgencyId(icResiCollectEntity.getAgencyId()); userEntity.setAgencyId(icVaccinePrarmeterEntity.getAgencyId());
userEntity.setGridId(icResiCollectEntity.getGridId()); userEntity.setGridId(icVaccinePrarmeterEntity.getGridId());
userEntity.setVillageId(icResiCollectEntity.getVillageId()); userEntity.setVillageId(icVaccinePrarmeterEntity.getVillageId());
userEntity.setBuildId(icResiCollectEntity.getBuildId()); userEntity.setBuildId(icVaccinePrarmeterEntity.getBuildId());
userEntity.setUnitId(icResiCollectEntity.getUnitId()); userEntity.setUnitId(icVaccinePrarmeterEntity.getUnitId());
userEntity.setHomeId(icResiCollectEntity.getHomeId()); userEntity.setHomeId(icVaccinePrarmeterEntity.getHomeId());
userEntity.setName(icResiCollectEntity.getName()); userEntity.setName(icVaccinePrarmeterEntity.getName());
userEntity.setMobile(icResiCollectEntity.getMobile()); userEntity.setMobile(icVaccinePrarmeterEntity.getMobile());
userEntity.setIdCard(icResiCollectEntity.getIdCard()); userEntity.setIdCard(icVaccinePrarmeterEntity.getIdCard());
icResiUserDao.updateById(userEntity); icResiUserDao.updateById(userEntity);
// 判断是否需要更新记录 // 判断是否需要更新记录
if(isUpdateLog){ if(isUpdateLog){
//变更记录表 //变更记录表
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity();
changeRecordEntity.setCustomerId(icResiCollectEntity.getCustomerId()); changeRecordEntity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
changeRecordEntity.setOperatorId(formDTO.getUserId()); changeRecordEntity.setOperatorId(formDTO.getUserId());
changeRecordEntity.setIcUserId(userEntity.getId()); changeRecordEntity.setIcUserId(userEntity.getId());
changeRecordEntity.setOperatorName(formDTO.getRealName()); changeRecordEntity.setOperatorName(formDTO.getRealName());
@ -744,29 +746,29 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar
/** /**
* 新增人员信息 * 新增人员信息
* @param icResiCollectEntity * @param icVaccinePrarmeterEntity
* @param formDTO * @param formDTO
*/ */
private String insertUserInfo(IcVaccinePrarmeterEntity icResiCollectEntity,IcVaccineCheckFormDTO formDTO){ private String insertUserInfo(IcVaccinePrarmeterEntity icVaccinePrarmeterEntity,IcVaccineCheckFormDTO formDTO){
// 新增人员 // 新增人员
IcResiUserEntity userEntity = new IcResiUserEntity(); IcResiUserEntity userEntity = new IcResiUserEntity();
userEntity.setPids(icResiCollectEntity.getPids()); // ic_resi_user表的组织的pids 含agencyId本身 userEntity.setPids(icVaccinePrarmeterEntity.getPids()); // ic_resi_user表的组织的pids 含agencyId本身
userEntity.setAgencyId(icResiCollectEntity.getAgencyId()); userEntity.setAgencyId(icVaccinePrarmeterEntity.getAgencyId());
userEntity.setGridId(icResiCollectEntity.getGridId()); userEntity.setGridId(icVaccinePrarmeterEntity.getGridId());
userEntity.setVillageId(icResiCollectEntity.getVillageId()); userEntity.setVillageId(icVaccinePrarmeterEntity.getVillageId());
userEntity.setBuildId(icResiCollectEntity.getBuildId()); userEntity.setBuildId(icVaccinePrarmeterEntity.getBuildId());
userEntity.setUnitId(icResiCollectEntity.getUnitId()); userEntity.setUnitId(icVaccinePrarmeterEntity.getUnitId());
userEntity.setHomeId(icResiCollectEntity.getHomeId()); userEntity.setHomeId(icVaccinePrarmeterEntity.getHomeId());
userEntity.setName(icResiCollectEntity.getName()); userEntity.setName(icVaccinePrarmeterEntity.getName());
userEntity.setMobile(icResiCollectEntity.getMobile()); userEntity.setMobile(icVaccinePrarmeterEntity.getMobile());
userEntity.setIdCard(icResiCollectEntity.getIdCard()); userEntity.setIdCard(icVaccinePrarmeterEntity.getIdCard());
userEntity.setCustomerId(icResiCollectEntity.getCustomerId()); userEntity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
icResiUserDao.insert(userEntity); icResiUserDao.insert(userEntity);
//变更记录表 //变更记录表
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity();
changeRecordEntity.setCustomerId(icResiCollectEntity.getCustomerId()); changeRecordEntity.setCustomerId(icVaccinePrarmeterEntity.getCustomerId());
changeRecordEntity.setOperatorId(formDTO.getUserId()); changeRecordEntity.setOperatorId(formDTO.getUserId());
changeRecordEntity.setIcUserId(userEntity.getId()); changeRecordEntity.setIcUserId(userEntity.getId());
changeRecordEntity.setOperatorName(formDTO.getRealName()); changeRecordEntity.setOperatorName(formDTO.getRealName());

Loading…
Cancel
Save