Browse Source

移除应急的改动

feature/teamB_zz_wgh
YUJT 3 years ago
parent
commit
4f3dfc7363
  1. 40
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java

40
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java

@ -58,11 +58,9 @@ public class HouseInformationServiceImpl implements HouseInformationService {
*/
@Override
public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) {
//获取工作人员所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (StringUtils.isEmpty(formDTO.getCommunityId())) {
//获取工作人员所属组织
// CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
}
@ -71,12 +69,7 @@ public class HouseInformationServiceImpl implements HouseInformationService {
String orgName;
CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId());
if (null == agency) {
agency = customerAgencyDao.selectById(staffInfo.getAgencyId());
if (null == agency) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
} else {
formDTO.setCommunityId(staffInfo.getAgencyId());
}
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
}
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid());
if (null == parentAgency) {
@ -128,35 +121,6 @@ public class HouseInformationServiceImpl implements HouseInformationService {
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
} else {
return deleteAfetrEmergency(formDTO);
}
return new PageData<>(list, pageInfo.getTotal());
}
private PageData<GridCountListResultDTO> deleteAfetrEmergency(HouseInformationFormDTO formDTO) {
//获取工作人员所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
formDTO.setCommunityId(staffInfo.getAgencyId());
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<GridCountListResultDTO> list = icNeighborHoodDao.getGridList(formDTO);
PageInfo<GridCountListResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) {
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.ZERO_STR);
countFormDTO.setOrgId(formDTO.getCommunityId());
countFormDTO.setType(NumConstant.ONE_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
list.forEach(item -> {
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
}
return new PageData<>(list, pageInfo.getTotal());
}

Loading…
Cancel
Save