|
@ -105,17 +105,18 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 图层,大屏数据分析,数据列表 |
|
|
* 图层,大屏数据分析,数据列表 |
|
|
|
|
|
* |
|
|
* @param coverageTypes 图层列表 |
|
|
* @param coverageTypes 图层列表 |
|
|
* @param categoryKeys 分类列表 |
|
|
* @param categoryKeys 分类列表 |
|
|
* @param search 搜索关键词 |
|
|
* @param search 搜索关键词 |
|
|
* @param pageNo 页码 |
|
|
* @param pageNo 页码 |
|
|
* @param pageSize 页面大小 |
|
|
* @param pageSize 页面大小 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public PageData<CoverageAnalisisDataListResultDTO> analysisDataList(String customerId,String staffId,String orgId,String orgType, |
|
|
public PageData<CoverageAnalisisDataListResultDTO> analysisDataList(String customerId, String staffId, String orgId, String orgType, |
|
|
List<String> coverageTypes, List<String> categoryKeys, |
|
|
List<String> coverageTypes, List<String> categoryKeys, |
|
|
String search, Integer pageNo, Integer pageSize, Boolean isPage) { |
|
|
String search, Integer pageNo, Integer pageSize, Boolean isPage) { |
|
|
|
|
|
|
|
|
// 获取跟组织的坐标
|
|
|
// 获取跟组织的坐标
|
|
|
CustomerAgencyEntity rootAgency = govOrgService.getRootAgencyByCustomerId(customerId); |
|
|
CustomerAgencyEntity rootAgency = govOrgService.getRootAgencyByCustomerId(customerId); |
|
@ -137,7 +138,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 2.循环coverageTypes,使用key到map中查询(为了顺序),得到categoryKeys列表之后,根据实际情况做相应的查询
|
|
|
// 2.循环coverageTypes,使用key到map中查询(为了顺序),得到categoryKeys列表之后,根据实际情况做相应的查询
|
|
|
Map<String,String> agencyMap=getStaffPidsFromStaffInfo(customerId,staffId,orgId,orgType); |
|
|
Map<String, String> agencyMap = getStaffPidsFromStaffInfo(customerId, staffId, orgId, orgType); |
|
|
String agencyPath = agencyMap.get(OrgConstant.AGENC_PATH); |
|
|
String agencyPath = agencyMap.get(OrgConstant.AGENC_PATH); |
|
|
String agencyId = agencyMap.get(OrgConstant.AGENCY_ID); |
|
|
String agencyId = agencyMap.get(OrgConstant.AGENCY_ID); |
|
|
|
|
|
|
|
@ -168,7 +169,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
for (GovOrgCoverageService.CategoryCoverageMapping e : ccm) { |
|
|
for (GovOrgCoverageService.CategoryCoverageMapping e : ccm) { |
|
|
|
|
|
|
|
|
Integer tempCount = doDataListCount(EpmetRequestHolder.getLoginUserCustomerId(), agencyId, agencyPath, e.getPlaceType(), |
|
|
Integer tempCount = doDataListCount(EpmetRequestHolder.getLoginUserCustomerId(), agencyId, agencyPath, e.getPlaceType(), |
|
|
e.getCategoryKey(), search,null); |
|
|
e.getCategoryKey(), search, null); |
|
|
lastTotalCount = totalCount; |
|
|
lastTotalCount = totalCount; |
|
|
totalCount += tempCount; |
|
|
totalCount += tempCount; |
|
|
|
|
|
|
|
@ -224,6 +225,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Desc: 五大图层首页搜索 |
|
|
* Desc: 五大图层首页搜索 |
|
|
|
|
|
* |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @author zxc |
|
|
* @author zxc |
|
|
* @date 2022/7/26 16:29 |
|
|
* @date 2022/7/26 16:29 |
|
@ -232,8 +234,8 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
public CoverageHomeSearchResultDTO coverageHomeSearch(CoverageHomeSearchFormDTO formDTO) { |
|
|
public CoverageHomeSearchResultDTO coverageHomeSearch(CoverageHomeSearchFormDTO formDTO) { |
|
|
String customerId = formDTO.getCustomerId(); |
|
|
String customerId = formDTO.getCustomerId(); |
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, formDTO.getUserId()); |
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, formDTO.getUserId()); |
|
|
if (null == staffInfo){ |
|
|
if (null == staffInfo) { |
|
|
throw new EpmetException("查询工作人员失败:"+formDTO.getUserId()); |
|
|
throw new EpmetException("查询工作人员失败:" + formDTO.getUserId()); |
|
|
} |
|
|
} |
|
|
formDTO.setOrgId(staffInfo.getAgencyId()); |
|
|
formDTO.setOrgId(staffInfo.getAgencyId()); |
|
|
CoverageHomeSearchResultDTO result = new CoverageHomeSearchResultDTO(); |
|
|
CoverageHomeSearchResultDTO result = new CoverageHomeSearchResultDTO(); |
|
@ -241,61 +243,61 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
List<GovMenuDTO> customerMenuList = govCustomerMenuRedis.getCustomerMenuList(customerId, 0, "gov_menu"); |
|
|
List<GovMenuDTO> customerMenuList = govCustomerMenuRedis.getCustomerMenuList(customerId, 0, "gov_menu"); |
|
|
// org库配置的
|
|
|
// org库配置的
|
|
|
List<String> resources = govOrgCoverageService.getAllTypeCoverageByCustomerAndType(customerId, "resources"); |
|
|
List<String> resources = govOrgCoverageService.getAllTypeCoverageByCustomerAndType(customerId, "resources"); |
|
|
if (CollectionUtils.isEmpty(resources)){ |
|
|
if (CollectionUtils.isEmpty(resources)) { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
if (CollectionUtils.isEmpty(customerMenuList)){ |
|
|
if (CollectionUtils.isEmpty(customerMenuList)) { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
List<String> tableMore = new ArrayList<>(); |
|
|
List<String> tableMore = new ArrayList<>(); |
|
|
customerMenuList.forEach(cm -> { |
|
|
customerMenuList.forEach(cm -> { |
|
|
resources.forEach(r -> { |
|
|
resources.forEach(r -> { |
|
|
if (cm.getUrl().equals(r)){ |
|
|
if (cm.getUrl().equals(r)) { |
|
|
String tableName = MenusEnums.getValueByUrl(r); |
|
|
String tableName = MenusEnums.getValueByUrl(r); |
|
|
if (StringUtils.isNotBlank(tableName)){ |
|
|
if (StringUtils.isNotBlank(tableName)) { |
|
|
tableMore.add(tableName); |
|
|
tableMore.add(tableName); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
List<String> tables = tableMore.stream().distinct().collect(Collectors.toList()); |
|
|
List<String> tables = tableMore.stream().distinct().collect(Collectors.toList()); |
|
|
if (CollectionUtils.isEmpty(tables)){ |
|
|
if (CollectionUtils.isEmpty(tables)) { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
// 更多,查询出直接返回
|
|
|
// 更多,查询出直接返回
|
|
|
if (StringUtils.isNotBlank(formDTO.getSearchType())){ |
|
|
if (StringUtils.isNotBlank(formDTO.getSearchType())) { |
|
|
if (formDTO.getSearchType().equals(OrgConstant.SEARCH_TYPE_USER)){ |
|
|
if (formDTO.getSearchType().equals(OrgConstant.SEARCH_TYPE_USER)) { |
|
|
PageInfo<UserInfoResultDTO> allIcUserPageInfo = getIcUserPageInfo(formDTO); |
|
|
PageInfo<UserInfoResultDTO> allIcUserPageInfo = getIcUserPageInfo(formDTO); |
|
|
result.setUserInfos(allIcUserPageInfo.getList()); |
|
|
result.setUserInfos(allIcUserPageInfo.getList()); |
|
|
result.setUserInfosTotal(allIcUserPageInfo.getTotal()); |
|
|
result.setUserInfosTotal(allIcUserPageInfo.getTotal()); |
|
|
return result; |
|
|
return result; |
|
|
}else if (formDTO.getSearchType().equals(OrgConstant.SEARCH_TYPE_RESOURCE)){ |
|
|
} else if (formDTO.getSearchType().equals(OrgConstant.SEARCH_TYPE_RESOURCE)) { |
|
|
List<ResourceInfoResultDTO> reInfos = new ArrayList<>(); |
|
|
List<ResourceInfoResultDTO> reInfos = new ArrayList<>(); |
|
|
List<CompletableFuture<List<ResourceInfoResultDTO>>> futures = new ArrayList<>(); |
|
|
List<CompletableFuture<List<ResourceInfoResultDTO>>> futures = new ArrayList<>(); |
|
|
for (String resource : resources) { |
|
|
for (String resource : resources) { |
|
|
if (MenusEnums.IC_SUPERIOR_RESOURCE.getUrl().equals(resource)){ |
|
|
if (MenusEnums.IC_SUPERIOR_RESOURCE.getUrl().equals(resource)) { |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getSuperiorResourceInfos(formDTO),executorService); |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getSuperiorResourceInfos(formDTO), executorService); |
|
|
futures.add(c); |
|
|
futures.add(c); |
|
|
}else if (MenusEnums.IC_CITY_MANAGEMENT.getUrl().equals(resource)){ |
|
|
} else if (MenusEnums.IC_CITY_MANAGEMENT.getUrl().equals(resource)) { |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getCityManageInfos(formDTO),executorService); |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getCityManageInfos(formDTO), executorService); |
|
|
futures.add(c); |
|
|
futures.add(c); |
|
|
}else if (MenusEnums.IC_COMMUNITY_SELF_ORGANIZATION.getUrl().equals(resource)){ |
|
|
} else if (MenusEnums.IC_COMMUNITY_SELF_ORGANIZATION.getUrl().equals(resource)) { |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> heartService.getCommunitySelOrgInfos(formDTO),executorService); |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> heartService.getCommunitySelOrgInfos(formDTO), executorService); |
|
|
futures.add(c); |
|
|
futures.add(c); |
|
|
}else if (MenusEnums.IC_DANGEROUS_CHEMICALS.getUrl().equals(resource)){ |
|
|
} else if (MenusEnums.IC_DANGEROUS_CHEMICALS.getUrl().equals(resource)) { |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getDangerousChemicalsInfos(formDTO),executorService); |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getDangerousChemicalsInfos(formDTO), executorService); |
|
|
futures.add(c); |
|
|
futures.add(c); |
|
|
}else if (MenusEnums.IC_ENTERPRISE.getUrl().equals(resource)){ |
|
|
} else if (MenusEnums.IC_ENTERPRISE.getUrl().equals(resource)) { |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getEnterpriseInfos(formDTO),executorService); |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getEnterpriseInfos(formDTO), executorService); |
|
|
futures.add(c); |
|
|
futures.add(c); |
|
|
}else if (MenusEnums.IC_PUBLIC_SERVICE.getUrl().equals(resource)){ |
|
|
} else if (MenusEnums.IC_PUBLIC_SERVICE.getUrl().equals(resource)) { |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getPublicServiceInfos(formDTO),executorService); |
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getPublicServiceInfos(formDTO), executorService); |
|
|
futures.add(c); |
|
|
futures.add(c); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
for (CompletableFuture<List<ResourceInfoResultDTO>> future : futures) { |
|
|
for (CompletableFuture<List<ResourceInfoResultDTO>> future : futures) { |
|
|
try { |
|
|
try { |
|
|
if (CollectionUtils.isNotEmpty(future.get())){ |
|
|
if (CollectionUtils.isNotEmpty(future.get())) { |
|
|
reInfos.addAll(future.get()); |
|
|
reInfos.addAll(future.get()); |
|
|
} |
|
|
} |
|
|
} catch (InterruptedException e) { |
|
|
} catch (InterruptedException e) { |
|
@ -307,63 +309,63 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
result.setResourceInfos(reInfos); |
|
|
result.setResourceInfos(reInfos); |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
}else { |
|
|
} else { |
|
|
// 查询居民
|
|
|
// 查询居民
|
|
|
PageInfo<UserInfoResultDTO> allIcUserPageInfo = getIcUserPageInfo(formDTO); |
|
|
PageInfo<UserInfoResultDTO> allIcUserPageInfo = getIcUserPageInfo(formDTO); |
|
|
result.setUserInfos(allIcUserPageInfo.getList()); |
|
|
result.setUserInfos(allIcUserPageInfo.getList()); |
|
|
result.setUserInfosTotal(allIcUserPageInfo.getTotal()); |
|
|
result.setUserInfosTotal(allIcUserPageInfo.getTotal()); |
|
|
List<ResourceInfoResultDTO> reInfos = new ArrayList<>(); |
|
|
List<ResourceInfoResultDTO> reInfos = new ArrayList<>(); |
|
|
for (String table : tables) { |
|
|
for (String table : tables) { |
|
|
if (formDTO.getIsPage() && reInfos.size() == formDTO.getPageSize()){ |
|
|
if (formDTO.getIsPage() && reInfos.size() == formDTO.getPageSize()) { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
Integer flag = formDTO.getPageSize() - reInfos.size(); |
|
|
Integer flag = formDTO.getPageSize() - reInfos.size(); |
|
|
switch (table){ |
|
|
switch (table) { |
|
|
case TableConstant.IC_SUPERIOR_RESOURCE: |
|
|
case TableConstant.IC_SUPERIOR_RESOURCE: |
|
|
List<ResourceInfoResultDTO> superiorResourceInfos = govOrgService.getSuperiorResourceInfos(formDTO); |
|
|
List<ResourceInfoResultDTO> superiorResourceInfos = govOrgService.getSuperiorResourceInfos(formDTO); |
|
|
if (formDTO.getIsPage() && superiorResourceInfos.size() > flag){ |
|
|
if (formDTO.getIsPage() && superiorResourceInfos.size() > flag) { |
|
|
reInfos.addAll(superiorResourceInfos.subList(NumConstant.ZERO, flag)); |
|
|
reInfos.addAll(superiorResourceInfos.subList(NumConstant.ZERO, flag)); |
|
|
}else { |
|
|
} else { |
|
|
reInfos.addAll(superiorResourceInfos); |
|
|
reInfos.addAll(superiorResourceInfos); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case TableConstant.IC_CITY_MANAGEMENT: |
|
|
case TableConstant.IC_CITY_MANAGEMENT: |
|
|
List<ResourceInfoResultDTO> cityManageInfos = govOrgService.getCityManageInfos(formDTO); |
|
|
List<ResourceInfoResultDTO> cityManageInfos = govOrgService.getCityManageInfos(formDTO); |
|
|
if (formDTO.getIsPage() && cityManageInfos.size() > flag){ |
|
|
if (formDTO.getIsPage() && cityManageInfos.size() > flag) { |
|
|
reInfos.addAll(cityManageInfos.subList(NumConstant.ZERO,flag)); |
|
|
reInfos.addAll(cityManageInfos.subList(NumConstant.ZERO, flag)); |
|
|
}else { |
|
|
} else { |
|
|
reInfos.addAll(cityManageInfos); |
|
|
reInfos.addAll(cityManageInfos); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case TableConstant.IC_COMMUNITY_SELF_ORGANIZATION: |
|
|
case TableConstant.IC_COMMUNITY_SELF_ORGANIZATION: |
|
|
List<ResourceInfoResultDTO> communitySelOrgInfos = heartService.getCommunitySelOrgInfos(formDTO); |
|
|
List<ResourceInfoResultDTO> communitySelOrgInfos = heartService.getCommunitySelOrgInfos(formDTO); |
|
|
if (formDTO.getIsPage() && communitySelOrgInfos.size() > flag){ |
|
|
if (formDTO.getIsPage() && communitySelOrgInfos.size() > flag) { |
|
|
reInfos.addAll(communitySelOrgInfos.subList(NumConstant.ZERO,flag)); |
|
|
reInfos.addAll(communitySelOrgInfos.subList(NumConstant.ZERO, flag)); |
|
|
}else { |
|
|
} else { |
|
|
reInfos.addAll(communitySelOrgInfos); |
|
|
reInfos.addAll(communitySelOrgInfos); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case TableConstant.IC_DANGEROUS_CHEMICALS: |
|
|
case TableConstant.IC_DANGEROUS_CHEMICALS: |
|
|
List<ResourceInfoResultDTO> dangerousChemicalsInfos = govOrgService.getDangerousChemicalsInfos(formDTO); |
|
|
List<ResourceInfoResultDTO> dangerousChemicalsInfos = govOrgService.getDangerousChemicalsInfos(formDTO); |
|
|
if (formDTO.getIsPage() && dangerousChemicalsInfos.size() > flag){ |
|
|
if (formDTO.getIsPage() && dangerousChemicalsInfos.size() > flag) { |
|
|
reInfos.addAll(dangerousChemicalsInfos.subList(NumConstant.ZERO,flag)); |
|
|
reInfos.addAll(dangerousChemicalsInfos.subList(NumConstant.ZERO, flag)); |
|
|
}else { |
|
|
} else { |
|
|
reInfos.addAll(dangerousChemicalsInfos); |
|
|
reInfos.addAll(dangerousChemicalsInfos); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case TableConstant.IC_ENTERPRISE: |
|
|
case TableConstant.IC_ENTERPRISE: |
|
|
List<ResourceInfoResultDTO> enterpriseInfos = govOrgService.getEnterpriseInfos(formDTO); |
|
|
List<ResourceInfoResultDTO> enterpriseInfos = govOrgService.getEnterpriseInfos(formDTO); |
|
|
if (formDTO.getIsPage() && enterpriseInfos.size() > flag){ |
|
|
if (formDTO.getIsPage() && enterpriseInfos.size() > flag) { |
|
|
reInfos.addAll(enterpriseInfos.subList(NumConstant.ZERO,flag)); |
|
|
reInfos.addAll(enterpriseInfos.subList(NumConstant.ZERO, flag)); |
|
|
}else { |
|
|
} else { |
|
|
reInfos.addAll(enterpriseInfos); |
|
|
reInfos.addAll(enterpriseInfos); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case TableConstant.IC_PUBLIC_SERVICE: |
|
|
case TableConstant.IC_PUBLIC_SERVICE: |
|
|
List<ResourceInfoResultDTO> publicServiceInfos = govOrgService.getPublicServiceInfos(formDTO); |
|
|
List<ResourceInfoResultDTO> publicServiceInfos = govOrgService.getPublicServiceInfos(formDTO); |
|
|
if (formDTO.getIsPage() && publicServiceInfos.size() > flag){ |
|
|
if (formDTO.getIsPage() && publicServiceInfos.size() > flag) { |
|
|
reInfos.addAll(publicServiceInfos.subList(NumConstant.ZERO,flag)); |
|
|
reInfos.addAll(publicServiceInfos.subList(NumConstant.ZERO, flag)); |
|
|
}else { |
|
|
} else { |
|
|
reInfos.addAll(publicServiceInfos); |
|
|
reInfos.addAll(publicServiceInfos); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
@ -375,7 +377,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
result.setResourceInfoTotal(Long.valueOf(String.valueOf(reInfos.size()))); |
|
|
result.setResourceInfoTotal(Long.valueOf(String.valueOf(reInfos.size()))); |
|
|
} |
|
|
} |
|
|
for (String resource : resources) { |
|
|
for (String resource : resources) { |
|
|
if (MenusEnums.IC_EVENT.getUrl().equals(resource)){ |
|
|
if (MenusEnums.IC_EVENT.getUrl().equals(resource)) { |
|
|
PageInfo<EventInfoResultDTO> eventPageInfo = getEventInfo(formDTO); |
|
|
PageInfo<EventInfoResultDTO> eventPageInfo = getEventInfo(formDTO); |
|
|
result.setEventInfos(eventPageInfo.getList()); |
|
|
result.setEventInfos(eventPageInfo.getList()); |
|
|
result.setEventInfoTotal(eventPageInfo.getTotal()); |
|
|
result.setEventInfoTotal(eventPageInfo.getTotal()); |
|
@ -385,116 +387,28 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 【资源】优势资源查询 |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/7/29 08:37 |
|
|
|
|
|
*/ |
|
|
|
|
|
public PageInfo<ResourceInfoResultDTO> getSuperiorResourcePageInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
|
|
|
PageInfo<ResourceInfoResultDTO> result = new PageInfo<>(); |
|
|
|
|
|
if (formDTO.getIsPage()){ |
|
|
|
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govOrgService.getSuperiorResourceInfos(formDTO)); |
|
|
|
|
|
}else { |
|
|
|
|
|
List<ResourceInfoResultDTO> superiorResourceInfos = govOrgService.getSuperiorResourceInfos(formDTO); |
|
|
|
|
|
result.setTotal(Long.valueOf(String.valueOf(superiorResourceInfos.size()))); |
|
|
|
|
|
result.setList(superiorResourceInfos); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 【资源】城市管理查询 |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/7/29 08:37 |
|
|
|
|
|
*/ |
|
|
|
|
|
public PageInfo<ResourceInfoResultDTO> getCityManagePageInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
|
|
|
PageInfo<ResourceInfoResultDTO> result = new PageInfo<>(); |
|
|
|
|
|
if (formDTO.getIsPage()){ |
|
|
|
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govOrgService.getCityManageInfos(formDTO)); |
|
|
|
|
|
}else { |
|
|
|
|
|
List<ResourceInfoResultDTO> cityManageInfos = govOrgService.getCityManageInfos(formDTO); |
|
|
|
|
|
result.setTotal(Long.valueOf(String.valueOf(cityManageInfos.size()))); |
|
|
|
|
|
result.setList(cityManageInfos); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 【资源】公共服务查询 |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/7/29 08:37 |
|
|
|
|
|
*/ |
|
|
|
|
|
public PageInfo<ResourceInfoResultDTO> getPublicServicePageInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
|
|
|
PageInfo<ResourceInfoResultDTO> result = new PageInfo<>(); |
|
|
|
|
|
if (formDTO.getIsPage()){ |
|
|
|
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govOrgService.getPublicServiceInfos(formDTO)); |
|
|
|
|
|
}else { |
|
|
|
|
|
List<ResourceInfoResultDTO> publicServiceInfos = govOrgService.getPublicServiceInfos(formDTO); |
|
|
|
|
|
result.setTotal(Long.valueOf(String.valueOf(publicServiceInfos.size()))); |
|
|
|
|
|
result.setList(publicServiceInfos); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 【资源】重点危化品企业查询 |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/7/29 08:37 |
|
|
|
|
|
*/ |
|
|
|
|
|
public PageInfo<ResourceInfoResultDTO> getDangerousChemicalsPageInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
|
|
|
PageInfo<ResourceInfoResultDTO> result = new PageInfo<>(); |
|
|
|
|
|
if (formDTO.getIsPage()){ |
|
|
|
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govOrgService.getDangerousChemicalsInfos(formDTO)); |
|
|
|
|
|
}else { |
|
|
|
|
|
List<ResourceInfoResultDTO> dangerousChemicalsInfos = govOrgService.getDangerousChemicalsInfos(formDTO); |
|
|
|
|
|
result.setTotal(Long.valueOf(String.valueOf(dangerousChemicalsInfos.size()))); |
|
|
|
|
|
result.setList(dangerousChemicalsInfos); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 【资源】企事业单位查询 |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/7/29 08:37 |
|
|
|
|
|
*/ |
|
|
|
|
|
public PageInfo<ResourceInfoResultDTO> getEnterpriseInfosPageInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
|
|
|
PageInfo<ResourceInfoResultDTO> result = new PageInfo<>(); |
|
|
|
|
|
if (formDTO.getIsPage()){ |
|
|
|
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govOrgService.getEnterpriseInfos(formDTO)); |
|
|
|
|
|
}else { |
|
|
|
|
|
List<ResourceInfoResultDTO> enterpriseInfos = govOrgService.getEnterpriseInfos(formDTO); |
|
|
|
|
|
result.setTotal(Long.valueOf(String.valueOf(enterpriseInfos.size()))); |
|
|
|
|
|
result.setList(enterpriseInfos); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Desc: 居民信息查询 |
|
|
* Desc: 居民信息查询 |
|
|
|
|
|
* |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @author zxc |
|
|
* @author zxc |
|
|
* @date 2022/7/29 08:34 |
|
|
* @date 2022/7/29 08:34 |
|
|
*/ |
|
|
*/ |
|
|
public PageInfo<UserInfoResultDTO> getIcUserPageInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
public PageInfo<UserInfoResultDTO> getIcUserPageInfo(CoverageHomeSearchFormDTO formDTO) { |
|
|
PageInfo<UserInfoResultDTO> result = new PageInfo<>(); |
|
|
PageInfo<UserInfoResultDTO> result = new PageInfo<>(); |
|
|
if (formDTO.getIsPage()){ |
|
|
if (formDTO.getIsPage()) { |
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> icResiService.getAllIcUser(formDTO)); |
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> icResiService.getAllIcUser(formDTO)); |
|
|
}else { |
|
|
} else { |
|
|
List<UserInfoResultDTO> allIcUser = icResiService.getAllIcUser(formDTO); |
|
|
List<UserInfoResultDTO> allIcUser = icResiService.getAllIcUser(formDTO); |
|
|
result.setTotal(Long.valueOf(String.valueOf(allIcUser.size()))); |
|
|
result.setTotal(Long.valueOf(String.valueOf(allIcUser.size()))); |
|
|
result.setList(allIcUser); |
|
|
result.setList(allIcUser); |
|
|
} |
|
|
} |
|
|
if (CollectionUtils.isNotEmpty(result.getList())){ |
|
|
if (CollectionUtils.isNotEmpty(result.getList())) { |
|
|
result.getList().forEach(r -> { |
|
|
result.getList().forEach(r -> { |
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), r.getHomeId()); |
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), r.getHomeId()); |
|
|
if (null == houseInfo){ |
|
|
if (null == houseInfo) { |
|
|
throw new EpmetException("获取房屋信息失败:"+r.getHomeId()); |
|
|
throw new EpmetException("获取房屋信息失败:" + r.getHomeId()); |
|
|
} |
|
|
} |
|
|
r.setLongitude(houseInfo.getBuildingLongitude()); |
|
|
r.setLongitude(houseInfo.getBuildingLongitude()); |
|
|
r.setLatitude(houseInfo.getBuildingLatitude()); |
|
|
r.setLatitude(houseInfo.getBuildingLatitude()); |
|
@ -505,15 +419,16 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Desc: 事件查询 |
|
|
* Desc: 事件查询 |
|
|
|
|
|
* |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @author zxc |
|
|
* @author zxc |
|
|
* @date 2022/7/28 16:03 |
|
|
* @date 2022/7/28 16:03 |
|
|
*/ |
|
|
*/ |
|
|
public PageInfo<EventInfoResultDTO> getEventInfo (CoverageHomeSearchFormDTO formDTO){ |
|
|
public PageInfo<EventInfoResultDTO> getEventInfo(CoverageHomeSearchFormDTO formDTO) { |
|
|
PageInfo<EventInfoResultDTO> result = new PageInfo<>(); |
|
|
PageInfo<EventInfoResultDTO> result = new PageInfo<>(); |
|
|
if (formDTO.getIsPage()){ |
|
|
if (formDTO.getIsPage()) { |
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govProjectService.getEventInfos(formDTO)); |
|
|
result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> govProjectService.getEventInfos(formDTO)); |
|
|
}else { |
|
|
} else { |
|
|
List<EventInfoResultDTO> eventInfos = govProjectService.getEventInfos(formDTO); |
|
|
List<EventInfoResultDTO> eventInfos = govProjectService.getEventInfos(formDTO); |
|
|
result.setTotal(Long.valueOf(String.valueOf(eventInfos.size()))); |
|
|
result.setTotal(Long.valueOf(String.valueOf(eventInfos.size()))); |
|
|
result.setList(eventInfos); |
|
|
result.setList(eventInfos); |
|
@ -523,6 +438,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 从staff信息中获取工作人员的PIDS |
|
|
* 从staff信息中获取工作人员的PIDS |
|
|
|
|
|
* |
|
|
* @param staffInfo |
|
|
* @param staffInfo |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
@ -573,6 +489,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 计算数据条数 |
|
|
* 计算数据条数 |
|
|
|
|
|
* |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @param agencyId |
|
|
* @param agencyId |
|
|
* @param staffOrgIds |
|
|
* @param staffOrgIds |
|
@ -582,18 +499,18 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public Integer doDataListCount(String customerId, String agencyId, String staffOrgIds, String placeType, |
|
|
public Integer doDataListCount(String customerId, String agencyId, String staffOrgIds, String placeType, |
|
|
String categoryKey, String search,String gridId) { |
|
|
String categoryKey, String search, String gridId) { |
|
|
|
|
|
|
|
|
if (CoveragePlaceTypeEnum.RESI.getCode().equals(placeType)) { |
|
|
if (CoveragePlaceTypeEnum.RESI.getCode().equals(placeType)) { |
|
|
// 使用分类查询居民信息
|
|
|
// 使用分类查询居民信息
|
|
|
return icResiService.countResisByCategories4Coverage(customerId, agencyId, |
|
|
return icResiService.countResisByCategories4Coverage(customerId, agencyId, |
|
|
staffOrgIds, categoryKey, search,gridId); |
|
|
staffOrgIds, categoryKey, search, gridId); |
|
|
} else if (CoveragePlaceTypeEnum.SPECIAL_RESI.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.SPECIAL_RESI.getCode().equals(placeType)) { |
|
|
// 特殊人群
|
|
|
// 特殊人群
|
|
|
return icResiService.countSpecialResisBySpecialType(customerId, agencyId, staffOrgIds, categoryKey, search,gridId); |
|
|
return icResiService.countSpecialResisBySpecialType(customerId, agencyId, staffOrgIds, categoryKey, search, gridId); |
|
|
} else if (CoveragePlaceTypeEnum.EVENT.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.EVENT.getCode().equals(placeType)) { |
|
|
// 难点痛点
|
|
|
// 难点痛点
|
|
|
return govProjectService.countIcEventEntities(customerId, staffOrgIds, search, true,gridId); |
|
|
return govProjectService.countIcEventEntities(customerId, staffOrgIds, search, true, gridId); |
|
|
} else if (CoveragePlaceTypeEnum.CITY_MANAGEMENT.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.CITY_MANAGEMENT.getCode().equals(placeType)) { |
|
|
// 城市资源管理
|
|
|
// 城市资源管理
|
|
|
return orgCoverageService.countCityResourceEntities(customerId, staffOrgIds, search, categoryKey); |
|
|
return orgCoverageService.countCityResourceEntities(customerId, staffOrgIds, search, categoryKey); |
|
@ -612,7 +529,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
return orgCoverageService.countDangerousChemicalEntities(customerId, staffOrgIds, search, categoryKey); |
|
|
return orgCoverageService.countDangerousChemicalEntities(customerId, staffOrgIds, search, categoryKey); |
|
|
} else if (CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode().equals(placeType)) { |
|
|
// 企事业单位巡查
|
|
|
// 企事业单位巡查
|
|
|
return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey,null,null); |
|
|
return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey, null, null); |
|
|
} else if (CoveragePlaceTypeEnum.GROUP_RENT.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.GROUP_RENT.getCode().equals(placeType)) { |
|
|
// 群租房。出租的房屋,住的人口超过5人属于群租房(是个规定
|
|
|
// 群租房。出租的房屋,住的人口超过5人属于群租房(是个规定
|
|
|
return orgCoverageService.countByResiNumber(customerId, staffOrgIds, search, 5, HOUSE_RENT_FLAG_RENT); |
|
|
return orgCoverageService.countByResiNumber(customerId, staffOrgIds, search, 5, HOUSE_RENT_FLAG_RENT); |
|
@ -622,11 +539,11 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
} else if (CoveragePlaceTypeEnum.SUPERIOR_RESOURCE.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.SUPERIOR_RESOURCE.getCode().equals(placeType)) { |
|
|
// 优势资源
|
|
|
// 优势资源
|
|
|
return orgCoverageService.countSuporiorResourceEntities(customerId, staffOrgIds, search, categoryKey); |
|
|
return orgCoverageService.countSuporiorResourceEntities(customerId, staffOrgIds, search, categoryKey); |
|
|
} else if(CoveragePlaceTypeEnum.ENTERPRISE_PATROL_UNQUALIFIED.getCode().equals(placeType)){ |
|
|
} else if (CoveragePlaceTypeEnum.ENTERPRISE_PATROL_UNQUALIFIED.getCode().equals(placeType)) { |
|
|
// 企事业单位巡查
|
|
|
// 企事业单位巡查
|
|
|
// 最新巡查结果【0:合格 1:不合格】
|
|
|
// 最新巡查结果【0:合格 1:不合格】
|
|
|
// 左侧用,可以到网格,
|
|
|
// 左侧用,可以到网格,
|
|
|
return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey,NumConstant.ONE_STR,gridId); |
|
|
return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey, NumConstant.ONE_STR, gridId); |
|
|
} else if (CoveragePlaceTypeEnum.VOLUNTEER.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.VOLUNTEER.getCode().equals(placeType)) { |
|
|
// 志愿者
|
|
|
// 志愿者
|
|
|
String[] parts = categoryKey.split("_"); |
|
|
String[] parts = categoryKey.split("_"); |
|
@ -634,9 +551,11 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
} else if (CoveragePlaceTypeEnum.VACCINE_POINT.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.VACCINE_POINT.getCode().equals(placeType)) { |
|
|
// 疫苗接种点
|
|
|
// 疫苗接种点
|
|
|
return epmetUserService.countVaccinePoint(customerId, agencyId, staffOrgIds, search); |
|
|
return epmetUserService.countVaccinePoint(customerId, agencyId, staffOrgIds, search); |
|
|
} else if (CoveragePlaceTypeEnum.NUCLEIC_POINT.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.NUCLEIC_POINT.getCode().equals(placeType)) { |
|
|
// 核酸检测点
|
|
|
// 核酸检测点
|
|
|
return epmetUserService.countNucleicPoint(customerId, agencyId, staffOrgIds, search); |
|
|
return epmetUserService.countNucleicPoint(customerId, agencyId, staffOrgIds, search); |
|
|
|
|
|
} else if (CoveragePlaceTypeEnum.KEY_UNIT.getCode().equals(placeType)) { |
|
|
|
|
|
return govOrgService.countKeyEnterprise();//重点单位数量统计 日照专用
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
@ -644,17 +563,18 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 执行数据查询 |
|
|
* 执行数据查询 |
|
|
|
|
|
* |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @param agencyId 查询的工作人员所在组织id |
|
|
* @param agencyId 查询的工作人员所在组织id |
|
|
* @param staffOrgIds 查询的工作人员所在组织的id path,包含agencyId |
|
|
* @param staffOrgIds 查询的工作人员所在组织的id path,包含agencyId |
|
|
* @param placeType 场所类型 |
|
|
* @param placeType 场所类型 |
|
|
* @param categoryKey 类别key |
|
|
* @param categoryKey 类别key |
|
|
* @param search 关键词 |
|
|
* @param search 关键词 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public List<CoverageAnalisisDataListResultDTO> doDataListSearch(String customerId, String agencyId, String staffOrgIds, |
|
|
public List<CoverageAnalisisDataListResultDTO> doDataListSearch(String customerId, String agencyId, String staffOrgIds, |
|
|
String placeType, String categoryKey, String search, |
|
|
String placeType, String categoryKey, String search, |
|
|
Integer pageNo, Integer pageSize,Boolean isPage, |
|
|
Integer pageNo, Integer pageSize, Boolean isPage, |
|
|
CustomerAgencyEntity rootAgency) { |
|
|
CustomerAgencyEntity rootAgency) { |
|
|
|
|
|
|
|
|
// 根据categoryKey查询类别名称
|
|
|
// 根据categoryKey查询类别名称
|
|
@ -747,7 +667,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
} else if (CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode().equals(placeType)) { |
|
|
// 企事业单位巡查
|
|
|
// 企事业单位巡查
|
|
|
List<IcEnterisePatrolResultDTO> list = orgCoverageService.listEnterprisePatrol( |
|
|
List<IcEnterisePatrolResultDTO> list = orgCoverageService.listEnterprisePatrol( |
|
|
customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize,null); |
|
|
customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize, null); |
|
|
|
|
|
|
|
|
return list.stream() |
|
|
return list.stream() |
|
|
.map(dc -> new CoverageAnalisisDataListResultDTO(dc.getEnterpriseId(), categoryKey, |
|
|
.map(dc -> new CoverageAnalisisDataListResultDTO(dc.getEnterpriseId(), categoryKey, |
|
@ -788,14 +708,14 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
.map(dc -> new CoverageAnalisisDataListResultDTO(dc.getId(), categoryKey, |
|
|
.map(dc -> new CoverageAnalisisDataListResultDTO(dc.getId(), categoryKey, |
|
|
isPage ? categoryDict.getCategoryName() : null, placeType, isPage ? dc.getName() : null, dc.getLatitude(), dc.getLongitude())) |
|
|
isPage ? categoryDict.getCategoryName() : null, placeType, isPage ? dc.getName() : null, dc.getLatitude(), dc.getLongitude())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
} else if(CoveragePlaceTypeEnum.ENTERPRISE_PATROL_UNQUALIFIED.getCode().equals(placeType)){ |
|
|
} else if (CoveragePlaceTypeEnum.ENTERPRISE_PATROL_UNQUALIFIED.getCode().equals(placeType)) { |
|
|
//最新巡查结果【0:合格 1:不合格】
|
|
|
//最新巡查结果【0:合格 1:不合格】
|
|
|
List<IcEnterisePatrolResultDTO> list = orgCoverageService.listEnterprisePatrol( |
|
|
List<IcEnterisePatrolResultDTO> list = orgCoverageService.listEnterprisePatrol( |
|
|
customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize,NumConstant.ONE_STR); |
|
|
customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize, NumConstant.ONE_STR); |
|
|
|
|
|
|
|
|
return list.stream() |
|
|
return list.stream() |
|
|
.map(dc -> new CoverageAnalisisDataListResultDTO(dc.getEnterpriseId(), categoryKey, |
|
|
.map(dc -> new CoverageAnalisisDataListResultDTO(dc.getEnterpriseId(), categoryKey, |
|
|
isPage ? categoryDict.getCategoryName() : null, placeType, dc.getPlaceOrgName() , |
|
|
isPage ? categoryDict.getCategoryName() : null, placeType, dc.getPlaceOrgName(), |
|
|
StringUtils.isNotBlank(dc.getLatitude()) ? dc.getLatitude() : rootAgency.getLatitude(), |
|
|
StringUtils.isNotBlank(dc.getLatitude()) ? dc.getLatitude() : rootAgency.getLatitude(), |
|
|
StringUtils.isNotBlank(dc.getLongitude()) ? dc.getLongitude() : rootAgency.getLongitude())) |
|
|
StringUtils.isNotBlank(dc.getLongitude()) ? dc.getLongitude() : rootAgency.getLongitude())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
@ -821,19 +741,26 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
.map(vp -> new CoverageAnalisisDataListResultDTO(vp.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, |
|
|
.map(vp -> new CoverageAnalisisDataListResultDTO(vp.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, |
|
|
placeType, vp.getName(), vp.getLatitude(), vp.getLongitude())) |
|
|
placeType, vp.getName(), vp.getLatitude(), vp.getLongitude())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
} else if (CoveragePlaceTypeEnum.NUCLEIC_POINT.getCode().equals(placeType)) { |
|
|
} else if (CoveragePlaceTypeEnum.NUCLEIC_POINT.getCode().equals(placeType)) { |
|
|
// 核酸检测点
|
|
|
// 核酸检测点
|
|
|
List<IcPointNucleicMonitoringEntity> nps = epmetUserService.listNucleicPoints(customerId, agencyId, staffOrgIds, search); |
|
|
List<IcPointNucleicMonitoringEntity> nps = epmetUserService.listNucleicPoints(customerId, agencyId, staffOrgIds, search); |
|
|
return nps.stream() |
|
|
return nps.stream() |
|
|
.map(np -> new CoverageAnalisisDataListResultDTO(np.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, |
|
|
.map(np -> new CoverageAnalisisDataListResultDTO(np.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, |
|
|
placeType, np.getName(), np.getLatitude(), np.getLongitude())) |
|
|
placeType, np.getName(), np.getLatitude(), np.getLongitude())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
} else if (CoveragePlaceTypeEnum.KEY_UNIT.getCode().equals(placeType)) { |
|
|
|
|
|
List<KeyEnterpriseEntity> enterpriseList = govOrgService.getKeyEnterprise(); |
|
|
|
|
|
if (null != enterpriseList && enterpriseList.size() > 0) { |
|
|
|
|
|
return enterpriseList.stream().map(enter -> new CoverageAnalisisDataListResultDTO(enter.getId(), |
|
|
|
|
|
categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, enter.getUnitName(), enter.getLatitude(), enter.getLongitude())).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
return new ArrayList<>(); |
|
|
return new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取用户的坐标信息 |
|
|
* 获取用户的坐标信息 |
|
|
|
|
|
* |
|
|
* @param resiId |
|
|
* @param resiId |
|
|
* @param buildingId |
|
|
* @param buildingId |
|
|
* @param rootAgency 跟组织,用于备选,从其中获取坐标 |
|
|
* @param rootAgency 跟组织,用于备选,从其中获取坐标 |
|
@ -861,6 +788,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 五大图层-可视化-右侧分类树列表 |
|
|
* 五大图层-可视化-右侧分类树列表 |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
@ -932,7 +860,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|
|
String userId = EpmetRequestHolder.getLoginUserId(); |
|
|
String userId = EpmetRequestHolder.getLoginUserId(); |
|
|
|
|
|
|
|
|
Map<String,String> stafInfoMap=getStaffPidsFromStaffInfo(customerId, userId, agencyId,OrgConstant.AGENCY); |
|
|
Map<String, String> stafInfoMap = getStaffPidsFromStaffInfo(customerId, userId, agencyId, OrgConstant.AGENCY); |
|
|
String staffOrgPath = stafInfoMap.get(OrgConstant.AGENC_PATH); |
|
|
String staffOrgPath = stafInfoMap.get(OrgConstant.AGENC_PATH); |
|
|
|
|
|
|
|
|
// 填充数量quantity字段
|
|
|
// 填充数量quantity字段
|
|
@ -978,8 +906,8 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
private void fillQuantities4ResourcesCategories(AnalysisResourceCategoriesResult coverage, |
|
|
private void fillQuantities4ResourcesCategories(AnalysisResourceCategoriesResult coverage, |
|
|
AnalysisResourceCategoriesResult.PlaceType placeType, |
|
|
AnalysisResourceCategoriesResult.PlaceType placeType, |
|
|
List<AnalysisResourceCategoriesResult.Category> categories, |
|
|
List<AnalysisResourceCategoriesResult.Category> categories, |
|
|
String customerId, String agencyId, String staffOrgIds) { |
|
|
String customerId, String agencyId, String staffOrgIds) { |
|
|
|
|
|
|
|
|
AtomicInteger total = new AtomicInteger(); |
|
|
AtomicInteger total = new AtomicInteger(); |
|
|
|
|
|
|
|
@ -1064,7 +992,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|
|
String staffId = EpmetRequestHolder.getLoginUserId(); |
|
|
String staffId = EpmetRequestHolder.getLoginUserId(); |
|
|
|
|
|
|
|
|
Map<String,String> agencyMap=getStaffPidsFromStaffInfo(customerId,staffId,agencyId,OrgConstant.AGENCY); |
|
|
Map<String, String> agencyMap = getStaffPidsFromStaffInfo(customerId, staffId, agencyId, OrgConstant.AGENCY); |
|
|
String agencyPath = agencyMap.get(OrgConstant.AGENC_PATH); |
|
|
String agencyPath = agencyMap.get(OrgConstant.AGENC_PATH); |
|
|
|
|
|
|
|
|
// 再最后,多线程setQuantity
|
|
|
// 再最后,多线程setQuantity
|
|
@ -1075,6 +1003,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 填充数量,接收参数为多个placeType(对应左侧菜单的所有一级) |
|
|
* 填充数量,接收参数为多个placeType(对应左侧菜单的所有一级) |
|
|
|
|
|
* |
|
|
* @param results |
|
|
* @param results |
|
|
*/ |
|
|
*/ |
|
|
private void fillQuantities4GovernedTarges(List<AnalysisGovernedTargetsResult> results, String customerId, String agencyId, String staffOrgIds) { |
|
|
private void fillQuantities4GovernedTarges(List<AnalysisGovernedTargetsResult> results, String customerId, String agencyId, String staffOrgIds) { |
|
@ -1103,6 +1032,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 填充数量,接收参数为左侧单个placeType |
|
|
* 填充数量,接收参数为左侧单个placeType |
|
|
|
|
|
* |
|
|
* @param targetsOfOnePlaceType |
|
|
* @param targetsOfOnePlaceType |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @param agencyId |
|
|
* @param agencyId |
|
@ -1132,7 +1062,6 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 五大图层,左侧菜单,点击事件,查询人.事的分布 |
|
|
* 五大图层,左侧菜单,点击事件,查询人.事的分布 |
|
|
* |
|
|
* |
|
@ -1150,7 +1079,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
); |
|
|
); |
|
|
List<CoverageAnalisisDataListResultDTOV2> list = new ArrayList<>(); |
|
|
List<CoverageAnalisisDataListResultDTOV2> list = new ArrayList<>(); |
|
|
if (CollectionUtils.isNotEmpty(page.getList())) { |
|
|
if (CollectionUtils.isNotEmpty(page.getList())) { |
|
|
Map<String, List<CoverageAnalisisDataListResultDTO>> group = page.getList().stream().collect(Collectors.groupingBy(x->Optional.ofNullable(x.getLongLat()).orElse("O"))); |
|
|
Map<String, List<CoverageAnalisisDataListResultDTO>> group = page.getList().stream().collect(Collectors.groupingBy(x -> Optional.ofNullable(x.getLongLat()).orElse("O"))); |
|
|
|
|
|
|
|
|
if (MapUtils.isNotEmpty(group)) { |
|
|
if (MapUtils.isNotEmpty(group)) { |
|
|
for (Map.Entry<String, List<CoverageAnalisisDataListResultDTO>> entry : group.entrySet()) { |
|
|
for (Map.Entry<String, List<CoverageAnalisisDataListResultDTO>> entry : group.entrySet()) { |
|
@ -1175,16 +1104,16 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
CoverageHomeSearchFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CoverageHomeSearchFormDTO.class); |
|
|
CoverageHomeSearchFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CoverageHomeSearchFormDTO.class); |
|
|
UserInfoResultDTO result = new UserInfoResultDTO(); |
|
|
UserInfoResultDTO result = new UserInfoResultDTO(); |
|
|
List<UserInfoResultDTO> allIcUser = icResiService.getAllIcUser(dto); |
|
|
List<UserInfoResultDTO> allIcUser = icResiService.getAllIcUser(dto); |
|
|
if (CollectionUtils.isNotEmpty(allIcUser)){ |
|
|
if (CollectionUtils.isNotEmpty(allIcUser)) { |
|
|
result = allIcUser.get(NumConstant.ZERO); |
|
|
result = allIcUser.get(NumConstant.ZERO); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(result.getGridId()); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(result.getGridId()); |
|
|
if (null == gridInfo){ |
|
|
if (null == gridInfo) { |
|
|
throw new EpmetException("获取网格信息失败:"+result.getGridId()); |
|
|
throw new EpmetException("获取网格信息失败:" + result.getGridId()); |
|
|
} |
|
|
} |
|
|
result.setGridName(gridInfo.getGridNamePath()); |
|
|
result.setGridName(gridInfo.getGridNamePath()); |
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), result.getHomeId()); |
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), result.getHomeId()); |
|
|
if (null == houseInfo){ |
|
|
if (null == houseInfo) { |
|
|
throw new EpmetException("获取房屋信息失败:"+result.getHomeId()); |
|
|
throw new EpmetException("获取房屋信息失败:" + result.getHomeId()); |
|
|
} |
|
|
} |
|
|
result.setHouseName(houseInfo.getAllName()); |
|
|
result.setHouseName(houseInfo.getAllName()); |
|
|
result.setLongitude(houseInfo.getBuildingLongitude()); |
|
|
result.setLongitude(houseInfo.getBuildingLongitude()); |
|
@ -1198,11 +1127,11 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
CoverageHomeSearchFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CoverageHomeSearchFormDTO.class); |
|
|
CoverageHomeSearchFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CoverageHomeSearchFormDTO.class); |
|
|
EventInfoResultDTO result = new EventInfoResultDTO(); |
|
|
EventInfoResultDTO result = new EventInfoResultDTO(); |
|
|
List<EventInfoResultDTO> eventInfos = govProjectService.getEventInfos(dto); |
|
|
List<EventInfoResultDTO> eventInfos = govProjectService.getEventInfos(dto); |
|
|
if (CollectionUtils.isNotEmpty(eventInfos)){ |
|
|
if (CollectionUtils.isNotEmpty(eventInfos)) { |
|
|
result = eventInfos.get(NumConstant.ZERO); |
|
|
result = eventInfos.get(NumConstant.ZERO); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(result.getGridId()); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(result.getGridId()); |
|
|
if (null == gridInfo){ |
|
|
if (null == gridInfo) { |
|
|
throw new EpmetException("获取网格信息失败:"+result.getGridId()); |
|
|
throw new EpmetException("获取网格信息失败:" + result.getGridId()); |
|
|
} |
|
|
} |
|
|
result.setGridName(gridInfo.getGridNamePath()); |
|
|
result.setGridName(gridInfo.getGridNamePath()); |
|
|
} |
|
|
} |
|
@ -1214,7 +1143,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
CoverageHomeSearchFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CoverageHomeSearchFormDTO.class); |
|
|
CoverageHomeSearchFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CoverageHomeSearchFormDTO.class); |
|
|
ResourceInfoResultDTO result = new ResourceInfoResultDTO(); |
|
|
ResourceInfoResultDTO result = new ResourceInfoResultDTO(); |
|
|
List<ResourceInfoResultDTO> infos = new ArrayList<>(); |
|
|
List<ResourceInfoResultDTO> infos = new ArrayList<>(); |
|
|
switch (formDTO.getResourceType()){ |
|
|
switch (formDTO.getResourceType()) { |
|
|
case "community_org": |
|
|
case "community_org": |
|
|
infos = heartService.getCommunitySelOrgInfos(dto); |
|
|
infos = heartService.getCommunitySelOrgInfos(dto); |
|
|
break; |
|
|
break; |
|
@ -1236,7 +1165,7 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
default: |
|
|
default: |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
if (CollectionUtils.isNotEmpty(infos)){ |
|
|
if (CollectionUtils.isNotEmpty(infos)) { |
|
|
result = infos.get(NumConstant.ZERO); |
|
|
result = infos.get(NumConstant.ZERO); |
|
|
} |
|
|
} |
|
|
return result; |
|
|
return result; |
|
@ -1250,26 +1179,26 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public List<DataListLeftSubTotalResDTO> dataListLeftSubTotal(DataListLeftSubTotalFormDTO formDTO) { |
|
|
public List<DataListLeftSubTotalResDTO> dataListLeftSubTotal(DataListLeftSubTotalFormDTO formDTO) { |
|
|
List<DataListLeftSubTotalResDTO> resultList=new ArrayList<>(); |
|
|
List<DataListLeftSubTotalResDTO> resultList = new ArrayList<>(); |
|
|
List<OrgInfoCommonDTO> list = SpringContextUtils.getBean(GovOrgService.class).queryNextOrgInfoDTO(formDTO.getCustomerId(), formDTO.getOrgId()); |
|
|
List<OrgInfoCommonDTO> list = SpringContextUtils.getBean(GovOrgService.class).queryNextOrgInfoDTO(formDTO.getCustomerId(), formDTO.getOrgId()); |
|
|
if(CollectionUtils.isNotEmpty(list)){ |
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
resultList=ConvertUtils.sourceToTarget(list,DataListLeftSubTotalResDTO.class); |
|
|
resultList = ConvertUtils.sourceToTarget(list, DataListLeftSubTotalResDTO.class); |
|
|
for(DataListLeftSubTotalResDTO orgRes:resultList){ |
|
|
for (DataListLeftSubTotalResDTO orgRes : resultList) { |
|
|
String gridId=StrConstant.EPMETY_STR; |
|
|
String gridId = StrConstant.EPMETY_STR; |
|
|
String agencyId=StrConstant.EPMETY_STR; |
|
|
String agencyId = StrConstant.EPMETY_STR; |
|
|
String orgIdPath=StrConstant.EPMETY_STR; |
|
|
String orgIdPath = StrConstant.EPMETY_STR; |
|
|
if(OrgConstant.AGENCY.equals(orgRes.getOrgType())){ |
|
|
if (OrgConstant.AGENCY.equals(orgRes.getOrgType())) { |
|
|
agencyId=orgRes.getOrgId(); |
|
|
agencyId = orgRes.getOrgId(); |
|
|
AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(orgRes.getOrgId()); |
|
|
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(orgRes.getOrgId()); |
|
|
if (StringUtils.isNotBlank(agencyInfoCache.getPids()) && !"0".equals(agencyInfoCache.getPids()) && !"0".equals(agencyInfoCache)) { |
|
|
if (StringUtils.isNotBlank(agencyInfoCache.getPids()) && !"0".equals(agencyInfoCache.getPids()) && !"0".equals(agencyInfoCache)) { |
|
|
orgIdPath = agencyInfoCache.getPids().concat(":").concat(agencyId); |
|
|
orgIdPath = agencyInfoCache.getPids().concat(":").concat(agencyId); |
|
|
} else { |
|
|
} else { |
|
|
orgIdPath = agencyId; |
|
|
orgIdPath = agencyId; |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
} else { |
|
|
gridId=orgRes.getOrgId(); |
|
|
gridId = orgRes.getOrgId(); |
|
|
GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(orgRes.getOrgId()); |
|
|
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(orgRes.getOrgId()); |
|
|
orgIdPath=gridInfoCache.getPids(); |
|
|
orgIdPath = gridInfoCache.getPids(); |
|
|
} |
|
|
} |
|
|
int count = doDataListCount(formDTO.getCustomerId(), agencyId, orgIdPath, formDTO.getPlaceType(), formDTO.getCategoryKey(), null, gridId); |
|
|
int count = doDataListCount(formDTO.getCustomerId(), agencyId, orgIdPath, formDTO.getPlaceType(), formDTO.getCategoryKey(), null, gridId); |
|
|
orgRes.setTotal(count); |
|
|
orgRes.setTotal(count); |
|
|