Browse Source

Merge remote-tracking branch 'origin/lingshan_master' into dev

# Conflicts:
#	epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
master
yinzuomei 2 years ago
parent
commit
c12acd6c14
  1. 36
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  2. 40
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

36
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -2328,40 +2328,4 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
importTaskId, processStatus, operatorId, resultDesc, resultDescPath);
}
}
/**
* 灵山需求
* @param houseId 房屋id
*/
@Async
public void syncHousePartyCenterHouse(String houseId,String resiUserId) {
if(StringUtils.isBlank(houseId)){
IcResiUserEntity entity=icResiUserDao.selectById(resiUserId);
houseId=entity.getHomeId();
}
// 查询房屋里的所有人
LambdaQueryWrapper<IcResiUserEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcResiUserEntity::getHomeId, houseId)
.eq(IcResiUserEntity::getStatus, NumConstant.ZERO_STR)
.select(IcResiUserEntity::getId);
List<IcResiUserEntity> resiList = icResiUserDao.selectList(wrapper);
//默认该房屋不是党员中心户
ConfigPartyCenterHouseFormDTO configPartyCenterHouseFormDTO=new ConfigPartyCenterHouseFormDTO();
configPartyCenterHouseFormDTO.setHouseId(houseId);
configPartyCenterHouseFormDTO.setPartyCenterHouseFlag(NumConstant.ZERO_STR);
if(CollectionUtils.isNotEmpty(resiList)){
List<String> resiIds = resiList.stream().map(IcResiUserEntity::getId).collect(Collectors.toList());
// 是否有党员中心户
LambdaQueryWrapper<IcPartyMemberEntity> queryWrapper = new LambdaQueryWrapper();
queryWrapper.in(IcPartyMemberEntity::getIcResiUser, resiIds)
.eq(IcPartyMemberEntity::getIsDyzxh, NumConstant.ONE_STR);
List<IcPartyMemberEntity> dyzxhList = icPartyMemberDao.selectList(queryWrapper);
if (CollectionUtils.isNotEmpty(dyzxhList)) {
configPartyCenterHouseFormDTO.setPartyCenterHouseFlag(NumConstant.ONE_STR);
}
}
govOrgOpenFeignClient.updatePartyCenterHouse(configPartyCenterHouseFormDTO);
}
}

40
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -224,7 +224,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
SpringContextUtils.getBean(DataSyncRecordDeathService.class).deleteByIcResiUserId(formDTO.getIcResiUserId());
}
//灵山需求:如果放屋里的人,有党员中心户, 将ic_house.party_center_house_flag置为1,说明该房屋是党员中心户
icResiUserImportService.syncHousePartyCenterHouse(origin.getHomeId(),null);
syncHousePartyCenterHouse(origin.getHomeId(),null);
}
/**
@ -457,7 +457,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
//3.变更记录表和变更记录明细表新增数据
saveUserChangeRecord(tokenDto, map, resiUserId, name);
//灵山需求:如果放屋里的人,有党员中心户, 将ic_house.party_center_house_flag置为1,说明该房屋是党员中心户
icResiUserImportService.syncHousePartyCenterHouse(null,resiUserId);
syncHousePartyCenterHouse(null,resiUserId);
return resiUserId;
}
@ -797,7 +797,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
}
CustomerResiUserRedis.delIcResiUserInfo(resiUserId);
//灵山需求:如果放屋里的人,有党员中心户, 将ic_house.party_center_house_flag置为1,说明该房屋是党员中心户
icResiUserImportService.syncHousePartyCenterHouse(entity.getHomeId(),null);
syncHousePartyCenterHouse(entity.getHomeId(),null);
return resiUserId;
}
@ -4196,4 +4196,38 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
PageInfo<ResiPortrayalDetailDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal(), pageSize);
}
/**
* 灵山需求
* @param houseId 房屋id
*/
public void syncHousePartyCenterHouse(String houseId,String resiUserId) {
if(StringUtils.isBlank(houseId)){
IcResiUserEntity entity=baseDao.selectById(resiUserId);
houseId=entity.getHomeId();
}
// 查询房屋里的所有人
LambdaQueryWrapper<IcResiUserEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcResiUserEntity::getHomeId, houseId)
.eq(IcResiUserEntity::getStatus, NumConstant.ZERO_STR)
.select(IcResiUserEntity::getId);
List<IcResiUserEntity> resiList = baseDao.selectList(wrapper);
//默认该房屋不是党员中心户
ConfigPartyCenterHouseFormDTO configPartyCenterHouseFormDTO=new ConfigPartyCenterHouseFormDTO();
configPartyCenterHouseFormDTO.setHouseId(houseId);
configPartyCenterHouseFormDTO.setPartyCenterHouseFlag(NumConstant.ZERO_STR);
if(CollectionUtils.isNotEmpty(resiList)){
List<String> resiIds = resiList.stream().map(IcResiUserEntity::getId).collect(Collectors.toList());
// 是否有党员中心户
LambdaQueryWrapper<IcPartyMemberEntity> queryWrapper = new LambdaQueryWrapper();
queryWrapper.in(IcPartyMemberEntity::getIcResiUser, resiIds)
.eq(IcPartyMemberEntity::getIsDyzxh, NumConstant.ONE_STR);
List<IcPartyMemberEntity> dyzxhList = icPartyMemberDao.selectList(queryWrapper);
if (CollectionUtils.isNotEmpty(dyzxhList)) {
configPartyCenterHouseFormDTO.setPartyCenterHouseFlag(NumConstant.ONE_STR);
}
}
govOrgOpenFeignClient.updatePartyCenterHouse(configPartyCenterHouseFormDTO);
}
}

Loading…
Cancel
Save