Browse Source

移除应急的改动

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

38
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 @Override
public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) { public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) {
//获取工作人员所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (StringUtils.isEmpty(formDTO.getCommunityId())) { if (StringUtils.isEmpty(formDTO.getCommunityId())) {
//获取工作人员所属组织 //获取工作人员所属组织
// CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo) { if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
} }
@ -70,13 +68,8 @@ public class HouseInformationServiceImpl implements HouseInformationService {
} }
String orgName; String orgName;
CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId()); CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId());
if (null == agency) {
agency = customerAgencyDao.selectById(staffInfo.getAgencyId());
if (null == agency) { if (null == agency) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
} else {
formDTO.setCommunityId(staffInfo.getAgencyId());
}
} }
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid()); CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid());
if (null == parentAgency) { if (null == parentAgency) {
@ -128,35 +121,6 @@ public class HouseInformationServiceImpl implements HouseInformationService {
} }
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); 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()); return new PageData<>(list, pageInfo.getTotal());
} }

Loading…
Cancel
Save