Browse Source

【图层】找回合丢的志愿者数量和搜索的代码

dev
wangxianzhang 3 years ago
parent
commit
6605605033
  1. 23
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java

23
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java

@ -39,6 +39,7 @@ import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity;
import com.epmet.dataaggre.enums.MenusEnums; import com.epmet.dataaggre.enums.MenusEnums;
import com.epmet.dataaggre.redis.GovCustomerMenuRedis; import com.epmet.dataaggre.redis.GovCustomerMenuRedis;
import com.epmet.dataaggre.service.CoverageService; import com.epmet.dataaggre.service.CoverageService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.epmetuser.IcResiService; import com.epmet.dataaggre.service.epmetuser.IcResiService;
import com.epmet.dataaggre.service.govorg.GovOrgCoverageService; import com.epmet.dataaggre.service.govorg.GovOrgCoverageService;
import com.epmet.dataaggre.service.govorg.GovOrgService; import com.epmet.dataaggre.service.govorg.GovOrgService;
@ -93,6 +94,9 @@ public class CoverageServiceImpl implements CoverageService {
@Autowired @Autowired
private ExecutorService executorService; private ExecutorService executorService;
@Autowired
private EpmetUserService epmetUserService;
// 1:出租 0:自住 2:闲置 3:未售出 // 1:出租 0:自住 2:闲置 3:未售出
public static final Integer HOUSE_RENT_FLAG_RENT = 1; public static final Integer HOUSE_RENT_FLAG_RENT = 1;
@ -609,6 +613,10 @@ public class CoverageServiceImpl implements CoverageService {
// 最新巡查结果【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)) {
// 志愿者
String[] parts = categoryKey.split("_");
return epmetUserService.countVolunteers(customerId, agencyId, staffOrgIds, search, parts[1]);
} }
return 0; return 0;
@ -771,6 +779,21 @@ public class CoverageServiceImpl implements CoverageService {
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());
} else if (CoveragePlaceTypeEnum.VOLUNTEER.getCode().equals(placeType)) {
// 志愿者
String[] parts = categoryKey.split("_");
List<IcResiUserEntity> resiEntities = epmetUserService.listVolunteers(customerId, agencyId, staffOrgIds, search, parts[1]);
return resiEntities.parallelStream().map(re -> {
// 使用楼栋的坐标补充居民的坐标信息
String[] coordinates = getUserCoordinates(re.getId(), re.getBuildId(), rootAgency);
return new CoverageAnalisisDataListResultDTO(
re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType,
re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdCard()).concat(StrConstant.BRACKET_RIGNT),
coordinates[1], coordinates[0]);
}).collect(Collectors.toList());
} }
return new ArrayList<>(); return new ArrayList<>();
} }

Loading…
Cancel
Save