diff --git a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/EnterpriseInformationController.java b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/EnterpriseInformationController.java index 6b8cd17..f331d93 100644 --- a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/EnterpriseInformationController.java +++ b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/EnterpriseInformationController.java @@ -126,4 +126,11 @@ public class EnterpriseInformationController { Map stringLongMap = enterpriseInformationService.selectEnterpriseByMonth(); return success(stringLongMap); } + + @GetMapping("/statisticByStatus") + @Operation(summary = "根据审核状态统计企业数据") + public CommonResult> statisticByStatus(){ + Map integerLongMap = enterpriseInformationService.statisticByStatus(); + return success(integerLongMap); + } } diff --git a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationService.java b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationService.java index b4004e5..56fe038 100644 --- a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationService.java +++ b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationService.java @@ -100,4 +100,10 @@ public interface EnterpriseInformationService { * @return */ Map selectEnterpriseByMonth(); + + /** + * 根据审核状态统计企业数据 + * @return + */ + Map statisticByStatus(); } diff --git a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationServiceImpl.java b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationServiceImpl.java index b648c00..fa56bc0 100644 --- a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationServiceImpl.java +++ b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/service/enterpriseinformation/EnterpriseInformationServiceImpl.java @@ -308,6 +308,17 @@ public class EnterpriseInformationServiceImpl implements EnterpriseInformationSe return monthlyCounts; } + /** + * 根据审核状态统计企业数据 + * @return + */ + @Override + public Map statisticByStatus() { + List enterpriseInformationDOS = enterpriseInformationMapper.selectList(); + Map statusCounts = enterpriseInformationDOS.stream().collect(Collectors.groupingBy(EnterpriseInformationDO::getStatus, Collectors.counting())); + return statusCounts; + } + private void validateLeaveExists(Long id) { if (enterpriseInformationMapper.selectById(id) == null) { throw exception(ENTERPRISE_INFORMATION_NOT_EXISTS);