Commit c726cd3aff1500e5a9affbb53f9a0c42d9409b88
1 parent
cd87f2e4
✨ CRM:将 bi 调整成 statistics
Showing
8 changed files
with
96 additions
and
96 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/bi/CrmBiRankController.http renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.http
| 1 | ### 合同金额排行榜 | 1 | ### 合同金额排行榜 |
| 2 | -GET {{baseUrl}}/crm/bi-rank/get-contract-price-rank?deptId=100×[0]=2022-12-12 00:00:00×[1]=2024-12-12 23:59:59 | 2 | +GET {{baseUrl}}/crm/statistics-rank/get-contract-price-rank?deptId=100×[0]=2022-12-12 00:00:00×[1]=2024-12-12 23:59:59 |
| 3 | Authorization: Bearer {{token}} | 3 | Authorization: Bearer {{token}} |
| 4 | tenant-id: {{adminTenentId}} | 4 | tenant-id: {{adminTenentId}} |
| 5 | 5 | ||
| 6 | ### 回款金额排行榜 | 6 | ### 回款金额排行榜 |
| 7 | -GET {{baseUrl}}/crm/bi-rank/get-receivable-price-rank?deptId=100×[0]=2022-12-12 00:00:00×[1]=2024-12-12 23:59:59 | 7 | +GET {{baseUrl}}/crm/statistics-rank/get-receivable-price-rank?deptId=100×[0]=2022-12-12 00:00:00×[1]=2024-12-12 23:59:59 |
| 8 | Authorization: Bearer {{token}} | 8 | Authorization: Bearer {{token}} |
| 9 | tenant-id: {{adminTenentId}} | 9 | tenant-id: {{adminTenentId}} |
| 10 | \ No newline at end of file | 10 | \ No newline at end of file |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/bi/CrmBiRankController.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java
| 1 | -package cn.iocoder.yudao.module.crm.controller.admin.bi; | 1 | +package cn.iocoder.yudao.module.crm.controller.admin.statistics; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO; | ||
| 5 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRankReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.crm.service.bi.CrmBiRankingService; | 4 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; |
| 5 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; | ||
| 6 | +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsRankingService; | ||
| 7 | import io.swagger.v3.oas.annotations.Operation; | 7 | import io.swagger.v3.oas.annotations.Operation; |
| 8 | import io.swagger.v3.oas.annotations.tags.Tag; | 8 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 9 | import jakarta.annotation.Resource; | 9 | import jakarta.annotation.Resource; |
| @@ -19,68 +19,68 @@ import java.util.List; | @@ -19,68 +19,68 @@ import java.util.List; | ||
| 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -@Tag(name = "管理后台 - CRM BI 排行榜") | 22 | +@Tag(name = "管理后台 - CRM 排行榜统计") |
| 23 | @RestController | 23 | @RestController |
| 24 | -@RequestMapping("/crm/bi-rank") | 24 | +@RequestMapping("/crm/statistics-rank") |
| 25 | @Validated | 25 | @Validated |
| 26 | -public class CrmBiRankController { | 26 | +public class CrmStatisticsRankController { |
| 27 | 27 | ||
| 28 | @Resource | 28 | @Resource |
| 29 | - private CrmBiRankingService rankingService; | 29 | + private CrmStatisticsRankingService rankingService; |
| 30 | 30 | ||
| 31 | @GetMapping("/get-contract-price-rank") | 31 | @GetMapping("/get-contract-price-rank") |
| 32 | @Operation(summary = "获得合同金额排行榜") | 32 | @Operation(summary = "获得合同金额排行榜") |
| 33 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 34 | - public CommonResult<List<CrmBiRanKRespVO>> getContractPriceRank(@Valid CrmBiRankReqVO rankingReqVO) { | 33 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 34 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getContractPriceRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 35 | return success(rankingService.getContractPriceRank(rankingReqVO)); | 35 | return success(rankingService.getContractPriceRank(rankingReqVO)); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | @GetMapping("/get-receivable-price-rank") | 38 | @GetMapping("/get-receivable-price-rank") |
| 39 | @Operation(summary = "获得回款金额排行榜") | 39 | @Operation(summary = "获得回款金额排行榜") |
| 40 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 41 | - public CommonResult<List<CrmBiRanKRespVO>> getReceivablePriceRank(@Valid CrmBiRankReqVO rankingReqVO) { | 40 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 41 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getReceivablePriceRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 42 | return success(rankingService.getReceivablePriceRank(rankingReqVO)); | 42 | return success(rankingService.getReceivablePriceRank(rankingReqVO)); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | @GetMapping("/get-contract-count-rank") | 45 | @GetMapping("/get-contract-count-rank") |
| 46 | @Operation(summary = "获得签约合同数量排行榜") | 46 | @Operation(summary = "获得签约合同数量排行榜") |
| 47 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 48 | - public CommonResult<List<CrmBiRanKRespVO>> getContractCountRank(@Valid CrmBiRankReqVO rankingReqVO) { | 47 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 48 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getContractCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 49 | return success(rankingService.getContractCountRank(rankingReqVO)); | 49 | return success(rankingService.getContractCountRank(rankingReqVO)); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | @GetMapping("/get-product-sales-rank") | 52 | @GetMapping("/get-product-sales-rank") |
| 53 | @Operation(summary = "获得产品销量排行榜") | 53 | @Operation(summary = "获得产品销量排行榜") |
| 54 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 55 | - public CommonResult<List<CrmBiRanKRespVO>> getProductSalesRank(@Valid CrmBiRankReqVO rankingReqVO) { | 54 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 55 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getProductSalesRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 56 | return success(rankingService.getProductSalesRank(rankingReqVO)); | 56 | return success(rankingService.getProductSalesRank(rankingReqVO)); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | @GetMapping("/get-customer-count-rank") | 59 | @GetMapping("/get-customer-count-rank") |
| 60 | @Operation(summary = "获得新增客户数排行榜") | 60 | @Operation(summary = "获得新增客户数排行榜") |
| 61 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 62 | - public CommonResult<List<CrmBiRanKRespVO>> getCustomerCountRank(@Valid CrmBiRankReqVO rankingReqVO) { | 61 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 62 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getCustomerCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 63 | return success(rankingService.getCustomerCountRank(rankingReqVO)); | 63 | return success(rankingService.getCustomerCountRank(rankingReqVO)); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | @GetMapping("/get-contacts-count-rank") | 66 | @GetMapping("/get-contacts-count-rank") |
| 67 | @Operation(summary = "获得新增联系人数排行榜") | 67 | @Operation(summary = "获得新增联系人数排行榜") |
| 68 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 69 | - public CommonResult<List<CrmBiRanKRespVO>> getContactsCountRank(@Valid CrmBiRankReqVO rankingReqVO) { | 68 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 69 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getContactsCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 70 | return success(rankingService.getContactsCountRank(rankingReqVO)); | 70 | return success(rankingService.getContactsCountRank(rankingReqVO)); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | @GetMapping("/get-follow-count-rank") | 73 | @GetMapping("/get-follow-count-rank") |
| 74 | @Operation(summary = "获得跟进次数排行榜") | 74 | @Operation(summary = "获得跟进次数排行榜") |
| 75 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 76 | - public CommonResult<List<CrmBiRanKRespVO>> getFollowCountRank(@Valid CrmBiRankReqVO rankingReqVO) { | 75 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 76 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getFollowCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 77 | return success(rankingService.getFollowCountRank(rankingReqVO)); | 77 | return success(rankingService.getFollowCountRank(rankingReqVO)); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | @GetMapping("/get-follow-customer-count-rank") | 80 | @GetMapping("/get-follow-customer-count-rank") |
| 81 | @Operation(summary = "获得跟进客户数排行榜") | 81 | @Operation(summary = "获得跟进客户数排行榜") |
| 82 | - @PreAuthorize("@ss.hasPermission('crm:bi-rank:query')") | ||
| 83 | - public CommonResult<List<CrmBiRanKRespVO>> getFollowCustomerCountRank(@Valid CrmBiRankReqVO rankingReqVO) { | 82 | + @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") |
| 83 | + public CommonResult<List<CrmStatisticsRanKRespVO>> getFollowCustomerCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { | ||
| 84 | return success(rankingService.getFollowCustomerCountRank(rankingReqVO)); | 84 | return success(rankingService.getFollowCustomerCountRank(rankingReqVO)); |
| 85 | } | 85 | } |
| 86 | 86 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/bi/vo/CrmBiRanKRespVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRanKRespVO.java
| 1 | -package cn.iocoder.yudao.module.crm.controller.admin.bi.vo; | 1 | +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | -@Schema(description = "管理后台 - CRM BI 排行榜 Response VO") | 7 | +@Schema(description = "管理后台 - CRM BI 排行榜统计 Response VO") |
| 8 | @Data | 8 | @Data |
| 9 | -public class CrmBiRanKRespVO { | 9 | +public class CrmStatisticsRanKRespVO { |
| 10 | 10 | ||
| 11 | @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 11 | @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 12 | private Long ownerUserId; | 12 | private Long ownerUserId; |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/bi/vo/CrmBiRankReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRankReqVO.java
| 1 | -package cn.iocoder.yudao.module.crm.controller.admin.bi.vo; | 1 | +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.NotEmpty; | 4 | import jakarta.validation.constraints.NotEmpty; |
| @@ -11,9 +11,9 @@ import java.util.List; | @@ -11,9 +11,9 @@ import java.util.List; | ||
| 11 | 11 | ||
| 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 13 | 13 | ||
| 14 | -@Schema(description = "管理后台 - CRM BI 排行榜 Request VO") | 14 | +@Schema(description = "管理后台 - CRM 排行榜统计 Request VO") |
| 15 | @Data | 15 | @Data |
| 16 | -public class CrmBiRankReqVO { | 16 | +public class CrmStatisticsRankReqVO { |
| 17 | 17 | ||
| 18 | @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 18 | @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 19 | @NotNull(message = "部门 id 不能为空") | 19 | @NotNull(message = "部门 id 不能为空") |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/bi/CrmBiRankingMapper.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankingMapper.java
| 1 | -package cn.iocoder.yudao.module.crm.dal.mysql.bi; | 1 | +package cn.iocoder.yudao.module.crm.dal.mysql.statistics; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO; | ||
| 4 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRankReqVO; | 3 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; |
| 4 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; | ||
| 5 | import org.apache.ibatis.annotations.Mapper; | 5 | import org.apache.ibatis.annotations.Mapper; |
| 6 | 6 | ||
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | 8 | ||
| 9 | /** | 9 | /** |
| 10 | - * CRM BI 排行榜 Mapper | 10 | + * CRM 排行榜统计 Mapper |
| 11 | * | 11 | * |
| 12 | * @author anhaohao | 12 | * @author anhaohao |
| 13 | */ | 13 | */ |
| 14 | @Mapper | 14 | @Mapper |
| 15 | -public interface CrmBiRankingMapper { | 15 | +public interface CrmStatisticsRankingMapper { |
| 16 | 16 | ||
| 17 | /** | 17 | /** |
| 18 | * 查询合同金额排行榜 | 18 | * 查询合同金额排行榜 |
| @@ -20,7 +20,7 @@ public interface CrmBiRankingMapper { | @@ -20,7 +20,7 @@ public interface CrmBiRankingMapper { | ||
| 20 | * @param rankReqVO 参数 | 20 | * @param rankReqVO 参数 |
| 21 | * @return 合同金额排行榜 | 21 | * @return 合同金额排行榜 |
| 22 | */ | 22 | */ |
| 23 | - List<CrmBiRanKRespVO> selectContractPriceRank(CrmBiRankReqVO rankReqVO); | 23 | + List<CrmStatisticsRanKRespVO> selectContractPriceRank(CrmStatisticsRankReqVO rankReqVO); |
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * 查询回款金额排行榜 | 26 | * 查询回款金额排行榜 |
| @@ -28,7 +28,7 @@ public interface CrmBiRankingMapper { | @@ -28,7 +28,7 @@ public interface CrmBiRankingMapper { | ||
| 28 | * @param rankReqVO 参数 | 28 | * @param rankReqVO 参数 |
| 29 | * @return 回款金额排行榜 | 29 | * @return 回款金额排行榜 |
| 30 | */ | 30 | */ |
| 31 | - List<CrmBiRanKRespVO> selectReceivablePriceRank(CrmBiRankReqVO rankReqVO); | 31 | + List<CrmStatisticsRanKRespVO> selectReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO); |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | * 查询签约合同数量排行榜 | 34 | * 查询签约合同数量排行榜 |
| @@ -36,7 +36,7 @@ public interface CrmBiRankingMapper { | @@ -36,7 +36,7 @@ public interface CrmBiRankingMapper { | ||
| 36 | * @param rankReqVO 参数 | 36 | * @param rankReqVO 参数 |
| 37 | * @return 签约合同数量排行榜 | 37 | * @return 签约合同数量排行榜 |
| 38 | */ | 38 | */ |
| 39 | - List<CrmBiRanKRespVO> selectContractCountRank(CrmBiRankReqVO rankReqVO); | 39 | + List<CrmStatisticsRanKRespVO> selectContractCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 40 | 40 | ||
| 41 | /** | 41 | /** |
| 42 | * 查询产品销量排行榜 | 42 | * 查询产品销量排行榜 |
| @@ -44,7 +44,7 @@ public interface CrmBiRankingMapper { | @@ -44,7 +44,7 @@ public interface CrmBiRankingMapper { | ||
| 44 | * @param rankReqVO 参数 | 44 | * @param rankReqVO 参数 |
| 45 | * @return 产品销量排行榜 | 45 | * @return 产品销量排行榜 |
| 46 | */ | 46 | */ |
| 47 | - List<CrmBiRanKRespVO> selectProductSalesRank(CrmBiRankReqVO rankReqVO); | 47 | + List<CrmStatisticsRanKRespVO> selectProductSalesRank(CrmStatisticsRankReqVO rankReqVO); |
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| 50 | * 查询新增客户数排行榜 | 50 | * 查询新增客户数排行榜 |
| @@ -52,7 +52,7 @@ public interface CrmBiRankingMapper { | @@ -52,7 +52,7 @@ public interface CrmBiRankingMapper { | ||
| 52 | * @param rankReqVO 参数 | 52 | * @param rankReqVO 参数 |
| 53 | * @return 新增客户数排行榜 | 53 | * @return 新增客户数排行榜 |
| 54 | */ | 54 | */ |
| 55 | - List<CrmBiRanKRespVO> selectCustomerCountRank(CrmBiRankReqVO rankReqVO); | 55 | + List<CrmStatisticsRanKRespVO> selectCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 56 | 56 | ||
| 57 | /** | 57 | /** |
| 58 | * 查询联系人数量排行榜 | 58 | * 查询联系人数量排行榜 |
| @@ -60,7 +60,7 @@ public interface CrmBiRankingMapper { | @@ -60,7 +60,7 @@ public interface CrmBiRankingMapper { | ||
| 60 | * @param rankReqVO 参数 | 60 | * @param rankReqVO 参数 |
| 61 | * @return 联系人数量排行榜 | 61 | * @return 联系人数量排行榜 |
| 62 | */ | 62 | */ |
| 63 | - List<CrmBiRanKRespVO> selectContactsCountRank(CrmBiRankReqVO rankReqVO); | 63 | + List<CrmStatisticsRanKRespVO> selectContactsCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 64 | 64 | ||
| 65 | /** | 65 | /** |
| 66 | * 查询跟进次数排行榜 | 66 | * 查询跟进次数排行榜 |
| @@ -68,7 +68,7 @@ public interface CrmBiRankingMapper { | @@ -68,7 +68,7 @@ public interface CrmBiRankingMapper { | ||
| 68 | * @param rankReqVO 参数 | 68 | * @param rankReqVO 参数 |
| 69 | * @return 跟进次数排行榜 | 69 | * @return 跟进次数排行榜 |
| 70 | */ | 70 | */ |
| 71 | - List<CrmBiRanKRespVO> selectFollowCountRank(CrmBiRankReqVO rankReqVO); | 71 | + List<CrmStatisticsRanKRespVO> selectFollowCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 72 | 72 | ||
| 73 | /** | 73 | /** |
| 74 | * 查询跟进客户数排行榜 | 74 | * 查询跟进客户数排行榜 |
| @@ -76,6 +76,6 @@ public interface CrmBiRankingMapper { | @@ -76,6 +76,6 @@ public interface CrmBiRankingMapper { | ||
| 76 | * @param rankReqVO 参数 | 76 | * @param rankReqVO 参数 |
| 77 | * @return 跟进客户数排行榜 | 77 | * @return 跟进客户数排行榜 |
| 78 | */ | 78 | */ |
| 79 | - List<CrmBiRanKRespVO> selectFollowCustomerCountRank(CrmBiRankReqVO rankReqVO); | 79 | + List<CrmStatisticsRanKRespVO> selectFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 80 | 80 | ||
| 81 | } | 81 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/bi/CrmBiRankingService.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingService.java
| 1 | -package cn.iocoder.yudao.module.crm.service.bi; | 1 | +package cn.iocoder.yudao.module.crm.service.statistics; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO; | ||
| 5 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRankReqVO; | 4 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; |
| 5 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; | ||
| 6 | 6 | ||
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | 8 | ||
| 9 | /** | 9 | /** |
| 10 | - * CRM BI 排行榜 Service 接口 | 10 | + * CRM 排行榜统计 Service 接口 |
| 11 | * | 11 | * |
| 12 | * @author anhaohao | 12 | * @author anhaohao |
| 13 | */ | 13 | */ |
| 14 | -public interface CrmBiRankingService { | 14 | +public interface CrmStatisticsRankingService { |
| 15 | 15 | ||
| 16 | /** | 16 | /** |
| 17 | * 获得合同金额排行榜 | 17 | * 获得合同金额排行榜 |
| @@ -19,7 +19,7 @@ public interface CrmBiRankingService { | @@ -19,7 +19,7 @@ public interface CrmBiRankingService { | ||
| 19 | * @param rankReqVO 排行参数 | 19 | * @param rankReqVO 排行参数 |
| 20 | * @return 合同金额排行榜 | 20 | * @return 合同金额排行榜 |
| 21 | */ | 21 | */ |
| 22 | - List<CrmBiRanKRespVO> getContractPriceRank(CrmBiRankReqVO rankReqVO); | 22 | + List<CrmStatisticsRanKRespVO> getContractPriceRank(CrmStatisticsRankReqVO rankReqVO); |
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | * 获得回款金额排行榜 | 25 | * 获得回款金额排行榜 |
| @@ -27,7 +27,7 @@ public interface CrmBiRankingService { | @@ -27,7 +27,7 @@ public interface CrmBiRankingService { | ||
| 27 | * @param rankReqVO 排行参数 | 27 | * @param rankReqVO 排行参数 |
| 28 | * @return 回款金额排行榜 | 28 | * @return 回款金额排行榜 |
| 29 | */ | 29 | */ |
| 30 | - List<CrmBiRanKRespVO> getReceivablePriceRank(CrmBiRankReqVO rankReqVO); | 30 | + List<CrmStatisticsRanKRespVO> getReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO); |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| 33 | * 获得签约合同数量排行榜 | 33 | * 获得签约合同数量排行榜 |
| @@ -35,7 +35,7 @@ public interface CrmBiRankingService { | @@ -35,7 +35,7 @@ public interface CrmBiRankingService { | ||
| 35 | * @param rankReqVO 排行参数 | 35 | * @param rankReqVO 排行参数 |
| 36 | * @return 签约合同数量排行榜 | 36 | * @return 签约合同数量排行榜 |
| 37 | */ | 37 | */ |
| 38 | - List<CrmBiRanKRespVO> getContractCountRank(CrmBiRankReqVO rankReqVO); | 38 | + List<CrmStatisticsRanKRespVO> getContractCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| 41 | * 获得产品销量排行榜 | 41 | * 获得产品销量排行榜 |
| @@ -43,7 +43,7 @@ public interface CrmBiRankingService { | @@ -43,7 +43,7 @@ public interface CrmBiRankingService { | ||
| 43 | * @param rankReqVO 排行参数 | 43 | * @param rankReqVO 排行参数 |
| 44 | * @return 产品销量排行榜 | 44 | * @return 产品销量排行榜 |
| 45 | */ | 45 | */ |
| 46 | - List<CrmBiRanKRespVO> getProductSalesRank(CrmBiRankReqVO rankReqVO); | 46 | + List<CrmStatisticsRanKRespVO> getProductSalesRank(CrmStatisticsRankReqVO rankReqVO); |
| 47 | 47 | ||
| 48 | /** | 48 | /** |
| 49 | * 获得新增客户数排行榜 | 49 | * 获得新增客户数排行榜 |
| @@ -51,7 +51,7 @@ public interface CrmBiRankingService { | @@ -51,7 +51,7 @@ public interface CrmBiRankingService { | ||
| 51 | * @param rankReqVO 排行参数 | 51 | * @param rankReqVO 排行参数 |
| 52 | * @return 新增客户数排行榜 | 52 | * @return 新增客户数排行榜 |
| 53 | */ | 53 | */ |
| 54 | - List<CrmBiRanKRespVO> getCustomerCountRank(CrmBiRankReqVO rankReqVO); | 54 | + List<CrmStatisticsRanKRespVO> getCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 55 | 55 | ||
| 56 | /** | 56 | /** |
| 57 | * 获得联系人数量排行榜 | 57 | * 获得联系人数量排行榜 |
| @@ -59,7 +59,7 @@ public interface CrmBiRankingService { | @@ -59,7 +59,7 @@ public interface CrmBiRankingService { | ||
| 59 | * @param rankReqVO 排行参数 | 59 | * @param rankReqVO 排行参数 |
| 60 | * @return 联系人数量排行榜 | 60 | * @return 联系人数量排行榜 |
| 61 | */ | 61 | */ |
| 62 | - List<CrmBiRanKRespVO> getContactsCountRank(CrmBiRankReqVO rankReqVO); | 62 | + List<CrmStatisticsRanKRespVO> getContactsCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 63 | 63 | ||
| 64 | /** | 64 | /** |
| 65 | * 获得跟进次数排行榜 | 65 | * 获得跟进次数排行榜 |
| @@ -67,7 +67,7 @@ public interface CrmBiRankingService { | @@ -67,7 +67,7 @@ public interface CrmBiRankingService { | ||
| 67 | * @param rankReqVO 排行参数 | 67 | * @param rankReqVO 排行参数 |
| 68 | * @return 跟进次数排行榜 | 68 | * @return 跟进次数排行榜 |
| 69 | */ | 69 | */ |
| 70 | - List<CrmBiRanKRespVO> getFollowCountRank(CrmBiRankReqVO rankReqVO); | 70 | + List<CrmStatisticsRanKRespVO> getFollowCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | * 获得跟进客户数排行榜 | 73 | * 获得跟进客户数排行榜 |
| @@ -75,6 +75,6 @@ public interface CrmBiRankingService { | @@ -75,6 +75,6 @@ public interface CrmBiRankingService { | ||
| 75 | * @param rankReqVO 排行参数 | 75 | * @param rankReqVO 排行参数 |
| 76 | * @return 跟进客户数排行榜 | 76 | * @return 跟进客户数排行榜 |
| 77 | */ | 77 | */ |
| 78 | - List<CrmBiRanKRespVO> getFollowCustomerCountRank(CrmBiRankReqVO rankReqVO); | 78 | + List<CrmStatisticsRanKRespVO> getFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); |
| 79 | 79 | ||
| 80 | } | 80 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/bi/CrmBiRankingServiceImpl.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingServiceImpl.java
| 1 | -package cn.iocoder.yudao.module.crm.service.bi; | 1 | +package cn.iocoder.yudao.module.crm.service.statistics; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | 4 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 5 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO; | ||
| 6 | -import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRankReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.crm.dal.mysql.bi.CrmBiRankingMapper; | 5 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; | ||
| 7 | +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsRankingMapper; | ||
| 8 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; | 8 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; |
| 9 | import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; | 9 | import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; |
| 10 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; | 10 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
| @@ -23,16 +23,16 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | @@ -23,16 +23,16 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | ||
| 23 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | 23 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | - * CRM BI 排行榜 Service 实现类 | 26 | + * CRM 排行榜统计 Service 实现类 |
| 27 | * | 27 | * |
| 28 | * @author anhaohao | 28 | * @author anhaohao |
| 29 | */ | 29 | */ |
| 30 | @Service | 30 | @Service |
| 31 | @Validated | 31 | @Validated |
| 32 | -public class CrmBiRankingServiceImpl implements CrmBiRankingService { | 32 | +public class CrmStatisticsRankingServiceImpl implements CrmStatisticsRankingService { |
| 33 | 33 | ||
| 34 | @Resource | 34 | @Resource |
| 35 | - private CrmBiRankingMapper biRankingMapper; | 35 | + private CrmStatisticsRankingMapper rankMapper; |
| 36 | 36 | ||
| 37 | @Resource | 37 | @Resource |
| 38 | private AdminUserApi adminUserApi; | 38 | private AdminUserApi adminUserApi; |
| @@ -40,43 +40,43 @@ public class CrmBiRankingServiceImpl implements CrmBiRankingService { | @@ -40,43 +40,43 @@ public class CrmBiRankingServiceImpl implements CrmBiRankingService { | ||
| 40 | private DeptApi deptApi; | 40 | private DeptApi deptApi; |
| 41 | 41 | ||
| 42 | @Override | 42 | @Override |
| 43 | - public List<CrmBiRanKRespVO> getContractPriceRank(CrmBiRankReqVO rankReqVO) { | ||
| 44 | - return getRank(rankReqVO, biRankingMapper::selectContractPriceRank); | 43 | + public List<CrmStatisticsRanKRespVO> getContractPriceRank(CrmStatisticsRankReqVO rankReqVO) { |
| 44 | + return getRank(rankReqVO, rankMapper::selectContractPriceRank); | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | @Override | 47 | @Override |
| 48 | - public List<CrmBiRanKRespVO> getReceivablePriceRank(CrmBiRankReqVO rankReqVO) { | ||
| 49 | - return getRank(rankReqVO, biRankingMapper::selectReceivablePriceRank); | 48 | + public List<CrmStatisticsRanKRespVO> getReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO) { |
| 49 | + return getRank(rankReqVO, rankMapper::selectReceivablePriceRank); | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | @Override | 52 | @Override |
| 53 | - public List<CrmBiRanKRespVO> getContractCountRank(CrmBiRankReqVO rankReqVO) { | ||
| 54 | - return getRank(rankReqVO, biRankingMapper::selectContractCountRank); | 53 | + public List<CrmStatisticsRanKRespVO> getContractCountRank(CrmStatisticsRankReqVO rankReqVO) { |
| 54 | + return getRank(rankReqVO, rankMapper::selectContractCountRank); | ||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | @Override | 57 | @Override |
| 58 | - public List<CrmBiRanKRespVO> getProductSalesRank(CrmBiRankReqVO rankReqVO) { | ||
| 59 | - return getRank(rankReqVO, biRankingMapper::selectProductSalesRank); | 58 | + public List<CrmStatisticsRanKRespVO> getProductSalesRank(CrmStatisticsRankReqVO rankReqVO) { |
| 59 | + return getRank(rankReqVO, rankMapper::selectProductSalesRank); | ||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | @Override | 62 | @Override |
| 63 | - public List<CrmBiRanKRespVO> getCustomerCountRank(CrmBiRankReqVO rankReqVO) { | ||
| 64 | - return getRank(rankReqVO, biRankingMapper::selectCustomerCountRank); | 63 | + public List<CrmStatisticsRanKRespVO> getCustomerCountRank(CrmStatisticsRankReqVO rankReqVO) { |
| 64 | + return getRank(rankReqVO, rankMapper::selectCustomerCountRank); | ||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | @Override | 67 | @Override |
| 68 | - public List<CrmBiRanKRespVO> getContactsCountRank(CrmBiRankReqVO rankReqVO) { | ||
| 69 | - return getRank(rankReqVO, biRankingMapper::selectContactsCountRank); | 68 | + public List<CrmStatisticsRanKRespVO> getContactsCountRank(CrmStatisticsRankReqVO rankReqVO) { |
| 69 | + return getRank(rankReqVO, rankMapper::selectContactsCountRank); | ||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | @Override | 72 | @Override |
| 73 | - public List<CrmBiRanKRespVO> getFollowCountRank(CrmBiRankReqVO rankReqVO) { | ||
| 74 | - return getRank(rankReqVO, biRankingMapper::selectFollowCountRank); | 73 | + public List<CrmStatisticsRanKRespVO> getFollowCountRank(CrmStatisticsRankReqVO rankReqVO) { |
| 74 | + return getRank(rankReqVO, rankMapper::selectFollowCountRank); | ||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | @Override | 77 | @Override |
| 78 | - public List<CrmBiRanKRespVO> getFollowCustomerCountRank(CrmBiRankReqVO rankReqVO) { | ||
| 79 | - return getRank(rankReqVO, biRankingMapper::selectFollowCustomerCountRank); | 78 | + public List<CrmStatisticsRanKRespVO> getFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO) { |
| 79 | + return getRank(rankReqVO, rankMapper::selectFollowCustomerCountRank); | ||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /** | 82 | /** |
| @@ -86,18 +86,18 @@ public class CrmBiRankingServiceImpl implements CrmBiRankingService { | @@ -86,18 +86,18 @@ public class CrmBiRankingServiceImpl implements CrmBiRankingService { | ||
| 86 | * @param rankFunction 排行榜方法 | 86 | * @param rankFunction 排行榜方法 |
| 87 | * @return 排行版数据 | 87 | * @return 排行版数据 |
| 88 | */ | 88 | */ |
| 89 | - private List<CrmBiRanKRespVO> getRank(CrmBiRankReqVO rankReqVO, Function<CrmBiRankReqVO, List<CrmBiRanKRespVO>> rankFunction) { | 89 | + private List<CrmStatisticsRanKRespVO> getRank(CrmStatisticsRankReqVO rankReqVO, Function<CrmStatisticsRankReqVO, List<CrmStatisticsRanKRespVO>> rankFunction) { |
| 90 | // 1. 获得用户编号数组 | 90 | // 1. 获得用户编号数组 |
| 91 | rankReqVO.setUserIds(getUserIds(rankReqVO.getDeptId())); | 91 | rankReqVO.setUserIds(getUserIds(rankReqVO.getDeptId())); |
| 92 | if (CollUtil.isEmpty(rankReqVO.getUserIds())) { | 92 | if (CollUtil.isEmpty(rankReqVO.getUserIds())) { |
| 93 | return Collections.emptyList(); | 93 | return Collections.emptyList(); |
| 94 | } | 94 | } |
| 95 | // 2. 获得排行数据 | 95 | // 2. 获得排行数据 |
| 96 | - List<CrmBiRanKRespVO> ranks = rankFunction.apply(rankReqVO); | 96 | + List<CrmStatisticsRanKRespVO> ranks = rankFunction.apply(rankReqVO); |
| 97 | if (CollUtil.isEmpty(ranks)) { | 97 | if (CollUtil.isEmpty(ranks)) { |
| 98 | return Collections.emptyList(); | 98 | return Collections.emptyList(); |
| 99 | } | 99 | } |
| 100 | - ranks.sort(Comparator.comparing(CrmBiRanKRespVO::getCount).reversed()); | 100 | + ranks.sort(Comparator.comparing(CrmStatisticsRanKRespVO::getCount).reversed()); |
| 101 | // 3. 拼接用户信息 | 101 | // 3. 拼接用户信息 |
| 102 | appendUserInfo(ranks); | 102 | appendUserInfo(ranks); |
| 103 | return ranks; | 103 | return ranks; |
| @@ -108,8 +108,8 @@ public class CrmBiRankingServiceImpl implements CrmBiRankingService { | @@ -108,8 +108,8 @@ public class CrmBiRankingServiceImpl implements CrmBiRankingService { | ||
| 108 | * | 108 | * |
| 109 | * @param ranks 排行榜数据 | 109 | * @param ranks 排行榜数据 |
| 110 | */ | 110 | */ |
| 111 | - private void appendUserInfo(List<CrmBiRanKRespVO> ranks) { | ||
| 112 | - Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSet(ranks, CrmBiRanKRespVO::getOwnerUserId)); | 111 | + private void appendUserInfo(List<CrmStatisticsRanKRespVO> ranks) { |
| 112 | + Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSet(ranks, CrmStatisticsRanKRespVO::getOwnerUserId)); | ||
| 113 | Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); | 113 | Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); |
| 114 | ranks.forEach(rank -> MapUtils.findAndThen(userMap, rank.getOwnerUserId(), user -> { | 114 | ranks.forEach(rank -> MapUtils.findAndThen(userMap, rank.getOwnerUserId(), user -> { |
| 115 | rank.setNickname(user.getNickname()); | 115 | rank.setNickname(user.getNickname()); |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiRankingMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.bi.CrmBiRankingMapper"> | 3 | +<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsRankingMapper"> |
| 4 | 4 | ||
| 5 | <select id="selectContractPriceRank" | 5 | <select id="selectContractPriceRank" |
| 6 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | ||
| 7 | - SELECT IFNULL(SUM(price), 0) AS count, owner_user_id | 6 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 7 | + SELECT IFNULL(SUM(total_price), 0) AS count, owner_user_id | ||
| 8 | FROM crm_contract | 8 | FROM crm_contract |
| 9 | WHERE deleted = 0 | 9 | WHERE deleted = 0 |
| 10 | AND audit_status = 20 | 10 | AND audit_status = 20 |
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | </select> | 18 | </select> |
| 19 | 19 | ||
| 20 | <select id="selectReceivablePriceRank" | 20 | <select id="selectReceivablePriceRank" |
| 21 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 21 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 22 | SELECT IFNULL(SUM(price), 0) AS count, owner_user_id | 22 | SELECT IFNULL(SUM(price), 0) AS count, owner_user_id |
| 23 | FROM crm_receivable | 23 | FROM crm_receivable |
| 24 | WHERE deleted = 0 | 24 | WHERE deleted = 0 |
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | </select> | 33 | </select> |
| 34 | 34 | ||
| 35 | <select id="selectContractCountRank" | 35 | <select id="selectContractCountRank" |
| 36 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 36 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 37 | SELECT COUNT(1) AS count, owner_user_id | 37 | SELECT COUNT(1) AS count, owner_user_id |
| 38 | FROM crm_contract | 38 | FROM crm_contract |
| 39 | WHERE deleted = 0 | 39 | WHERE deleted = 0 |
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | 49 | ||
| 50 | <!-- TODO 待定 这里是否需要关联 crm_contract_product 表,计算销售额 --> | 50 | <!-- TODO 待定 这里是否需要关联 crm_contract_product 表,计算销售额 --> |
| 51 | <select id="selectProductSalesRank" | 51 | <select id="selectProductSalesRank" |
| 52 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 52 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 53 | SELECT COUNT(1) AS count, owner_user_id | 53 | SELECT COUNT(1) AS count, owner_user_id |
| 54 | FROM crm_contract | 54 | FROM crm_contract |
| 55 | WHERE deleted = 0 | 55 | WHERE deleted = 0 |
| @@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
| 64 | </select> | 64 | </select> |
| 65 | 65 | ||
| 66 | <select id="selectCustomerCountRank" | 66 | <select id="selectCustomerCountRank" |
| 67 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 67 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 68 | SELECT COUNT(1) AS count, owner_user_id | 68 | SELECT COUNT(1) AS count, owner_user_id |
| 69 | FROM crm_customer | 69 | FROM crm_customer |
| 70 | WHERE deleted = 0 | 70 | WHERE deleted = 0 |
| @@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
| 78 | </select> | 78 | </select> |
| 79 | 79 | ||
| 80 | <select id="selectContactsCountRank" | 80 | <select id="selectContactsCountRank" |
| 81 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 81 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 82 | SELECT COUNT(1) AS count, owner_user_id | 82 | SELECT COUNT(1) AS count, owner_user_id |
| 83 | FROM crm_contact | 83 | FROM crm_contact |
| 84 | WHERE deleted = 0 | 84 | WHERE deleted = 0 |
| @@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
| 92 | </select> | 92 | </select> |
| 93 | 93 | ||
| 94 | <select id="selectFollowCountRank" | 94 | <select id="selectFollowCountRank" |
| 95 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 95 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 96 | SELECT COUNT(1) AS count, cc.owner_user_id | 96 | SELECT COUNT(1) AS count, cc.owner_user_id |
| 97 | FROM crm_follow_up_record AS cfur | 97 | FROM crm_follow_up_record AS cfur |
| 98 | LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids) | 98 | LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids) |
| @@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
| 108 | </select> | 108 | </select> |
| 109 | 109 | ||
| 110 | <select id="selectFollowCustomerCountRank" | 110 | <select id="selectFollowCustomerCountRank" |
| 111 | - resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO"> | 111 | + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO"> |
| 112 | SELECT COUNT(DISTINCT cc.id) AS count, cc.owner_user_id | 112 | SELECT COUNT(DISTINCT cc.id) AS count, cc.owner_user_id |
| 113 | FROM crm_follow_up_record AS cfur | 113 | FROM crm_follow_up_record AS cfur |
| 114 | LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids) | 114 | LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids) |