|
|
@ -61,6 +61,7 @@ import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.dto.result.demand.IcResiDemandDictDTO; |
|
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
|
import com.epmet.dto.result.lingshan.ConfigPartyCenterHouseFormDTO; |
|
|
|
import com.epmet.dto.result.resi.IcResiNonDynamicResultDTO; |
|
|
|
import com.epmet.entity.*; |
|
|
|
import com.epmet.enums.RenHuConditionEnum; |
|
|
@ -132,8 +133,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
private UserService userService; |
|
|
|
@Autowired |
|
|
|
private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private IcResiUserDao icResiUserDao; |
|
|
|
// @Autowired
|
|
|
|
// private IcResiUserDao icResiUserDao;
|
|
|
|
@Autowired |
|
|
|
private IcUserChangeRecordService icUserChangeRecordService; |
|
|
|
@Autowired |
|
|
@ -154,8 +155,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
private GuardarDatosFeignClient guardarDatosFeignClient; |
|
|
|
@Resource |
|
|
|
private ResiPartyMemberOpenFeignClient resiPartyMemberOpenFeignClient; |
|
|
|
@Resource |
|
|
|
private GovOrgOpenFeignClient getGovOrgOpenFeignClient; |
|
|
|
// @Resource
|
|
|
|
// private GovOrgOpenFeignClient getGovOrgOpenFeignClient;
|
|
|
|
@Resource |
|
|
|
private EpmetHeartOpenFeignClient epmetHeartOpenFeignClient; |
|
|
|
@Resource |
|
|
@ -169,8 +170,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
@Resource |
|
|
|
private IcUserChangeDetailedDao icUserChangeDetailedDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DataReportOpenFeignClient dataReportOpenFeignClient; |
|
|
|
// @Autowired
|
|
|
|
// private DataReportOpenFeignClient dataReportOpenFeignClient;
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private IcResiRentContractInfoDao icResiRentContractInfoDao; |
|
|
@ -200,6 +201,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void delete(DelIcResiUserFormDTO formDTO) { |
|
|
|
IcResiUserEntity origin=baseDao.selectById(formDTO.getIcResiUserId()); |
|
|
|
baseDao.updateToDel(formDTO.getIcResiUserId(),formDTO.getCurrentStaffId()); |
|
|
|
CustomerFormQueryDTO queryDTO = ConvertUtils.sourceToTarget(formDTO, CustomerFormQueryDTO.class); |
|
|
|
Result<Set<String>> subTableRes = operCustomizeOpenFeignClient.queryIcResiSubTables(queryDTO); |
|
|
@ -232,7 +234,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
LambdaQueryWrapper<IcResiUserEntity> resiWrapper=new LambdaQueryWrapper<>(); |
|
|
|
resiWrapper.eq(IcResiUserEntity::getAgencyId,formDTO.getAgencyId()); |
|
|
|
resiWrapper.select(IcResiUserEntity::getId); |
|
|
|
List<IcResiUserEntity> resiIds=icResiUserDao.selectList(resiWrapper); |
|
|
|
List<IcResiUserEntity> resiIds=baseDao.selectList(resiWrapper); |
|
|
|
for(IcResiUserEntity entity:resiIds){ |
|
|
|
baseDao.updateToDel(entity.getId(),formDTO.getCurrentStaffId()); |
|
|
|
CustomerFormQueryDTO queryDTO = ConvertUtils.sourceToTarget(formDTO, CustomerFormQueryDTO.class); |
|
|
@ -448,7 +450,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
//3.变更记录表和变更记录明细表新增数据
|
|
|
|
saveUserChangeRecord(tokenDto, map, resiUserId, name); |
|
|
|
|
|
|
|
return resiUserId; |
|
|
|
|
|
|
|
} |
|
|
@ -792,7 +793,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 生成居民变更记录 |
|
|
|
* @param null: |
|
|
|
* @param entity |
|
|
|
* @param map |
|
|
|
* @return |
|
|
|
* @author: sun |
|
|
|
*/ |
|
|
@ -830,7 +832,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
//修改前数据库居民十八类信息值
|
|
|
|
List<String> columns = categoryListResult.getData().stream().map(IcResiCategoryStatsConfigDTO::getColumnName).collect(Collectors.toList()); |
|
|
|
Map<String, String> hash = icResiUserDao.getCategoryListMap(columns, entity.getId()); |
|
|
|
Map<String, String> hash = baseDao.getCategoryListMap(columns, entity.getId()); |
|
|
|
//封装变更记录和变更明细数据
|
|
|
|
//变更记录
|
|
|
|
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); |
|
|
@ -1684,7 +1686,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
r.setVillageName(neighborHood.getNeighborHoodName()); |
|
|
|
|
|
|
|
// 2.志愿者类型填充
|
|
|
|
List<String> volunteers = icResiUserDao.selectVolunteerByUserId(resiEntity.getId()); |
|
|
|
List<String> volunteers = baseDao.selectVolunteerByUserId(resiEntity.getId()); |
|
|
|
if (CollectionUtils.isNotEmpty(volunteers)) { |
|
|
|
String[] vCategories = volunteers.get(0).split(","); |
|
|
|
|
|
|
@ -1701,7 +1703,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
ArrayList<String> resiCategoryNames = new ArrayList<>(); |
|
|
|
|
|
|
|
Map<String, String> categories = icResiUserDao.getCategoryListMap(resiCategoryColumns, resiUserId); |
|
|
|
Map<String, String> categories = baseDao.getCategoryListMap(resiCategoryColumns, resiUserId); |
|
|
|
categories.forEach((k, v) -> { |
|
|
|
if (NumConstant.ONE_STR.equals(v)) { |
|
|
|
ResiCategoryEnum enumObject = ResiCategoryEnum.getEnum(k); |
|
|
@ -2831,7 +2833,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result editMember(IcResiUserConfirmSubmitDTO dto) { |
|
|
|
IcResiUserEntity user = icResiUserDao.selectById(dto.getIcResiUserId()); |
|
|
|
IcResiUserEntity user = baseDao.selectById(dto.getIcResiUserId()); |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcResiUserEntity> userWrapper = new LambdaQueryWrapper<>(); |
|
|
|
userWrapper.ne(IcResiUserEntity::getId, dto.getIcResiUserId()); |
|
|
@ -3247,7 +3249,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
entity.setUnitId(houseInfo.getBuildingUnitId()); |
|
|
|
entity.setAgencyId(houseInfo.getAgencyId()); |
|
|
|
// 根据homeId获取gridId和pids
|
|
|
|
Result<HouseAgencyInfoResultDTO> resultDTOResult = getGovOrgOpenFeignClient.getHouseAgencyInfo(houseInfo.getHomeId()); |
|
|
|
Result<HouseAgencyInfoResultDTO> resultDTOResult = govOrgOpenFeignClient.getHouseAgencyInfo(houseInfo.getHomeId()); |
|
|
|
HouseAgencyInfoResultDTO data = resultDTOResult.getData(); |
|
|
|
entity.setGridId(data.getGridId()); |
|
|
|
entity.setPids(data.getPids() + ":" + data.getAgencyId()); |
|
|
@ -3911,4 +3913,38 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
return fzBig.multiply(NumConstant.ONE_HUNDRED_DECIMAL).divide(totalBig, NumConstant.TWO, BigDecimal.ROUND_HALF_UP); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 灵山需求 |
|
|
|
* @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); |
|
|
|
} |
|
|
|
} |
|
|
|