diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index fa1010d5be..ffce4482d0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -74,7 +74,7 @@ public interface EpmetHeartOpenFeignClient { * @return */ @PostMapping("/heart/residemand/autoevaluate") - Result AutoEvaluateDemand(@RequestBody AutoEvaluateDemandFormDTO formDTO); + Result autoEvaluateDemand(@RequestBody AutoEvaluateDemandFormDTO formDTO); /** * 查询志愿者数量 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 3f1b877e63..db83d85a27 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -68,7 +68,7 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli * @return */ @Override - public Result AutoEvaluateDemand(AutoEvaluateDemandFormDTO formDTO) { + public Result autoEvaluateDemand(AutoEvaluateDemandFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "autoEvaluate",formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java index f9467f995b..ed5609eed3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java @@ -153,10 +153,10 @@ public class ResiVolunteerController { */ @PostMapping("count") public Result getVolunteerCount(@RequestBody VolunteerCommonFormDTO input) { - ValidatorUtils.validateEntity(input, VolunteerCommonFormDTO.VolunteerPage.class); String customerId = input.getCustomerId(); + String pidsPrefix = input.getSuperiorAgencyId(); - Integer volunteerCount = volunteerInfoService.getVolunteerCount(customerId); + Integer volunteerCount = volunteerInfoService.getVolunteerCount(customerId, pidsPrefix); return new Result().ok(volunteerCount); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java index 6f7f26df7b..adf45e6437 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java @@ -102,5 +102,5 @@ public interface VolunteerInfoService extends BaseService { * @param customerId * @return */ - Integer getVolunteerCount(String customerId); + Integer getVolunteerCount(String customerId, String pidsPrefix); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 408627e3ae..0713d4bfdd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -385,9 +385,17 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper<>(); - query.eq(VolunteerInfoEntity::getCustomerId, customerId); + + Optional.ofNullable(customerId).ifPresent((cId) -> { + query.eq(VolunteerInfoEntity::getCustomerId, cId); + }); + + Optional.ofNullable(pidsPrefix).ifPresent((pidsPrefixt) -> { + query.likeRight(VolunteerInfoEntity::getPids, pidsPrefixt); + }); + return baseDao.selectCount(query); } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java index c1ce071d0e..23d5d34787 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java @@ -26,6 +26,6 @@ public class AutoEvaluateDemandTask implements ITask { if (StringUtils.isNotBlank(params)) { formDTO = JSON.parseObject(params, AutoEvaluateDemandFormDTO.class); } - Result result = heartOpenFeignClient.AutoEvaluateDemand(formDTO); + Result result = heartOpenFeignClient.autoEvaluateDemand(formDTO); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index 2eed9f1d3f..9aa05b6b27 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -103,6 +103,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve String vcErrorMsg = "【志愿者分布】查询志愿者总数出错"; VolunteerCommonFormDTO volunteerCountForm = new VolunteerCommonFormDTO(); volunteerCountForm.setCustomerId(customerId); + volunteerCountForm.setSuperiorAgencyId(agencyId); Integer volunteerCount = getResultDataOrThrowsException(epmetHeartOpenFeignClient.getVolunteerCount(volunteerCountForm), ServiceConstant.EPMET_HEART_SERVER, EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),