From d183e759124bca5be81b277b7f609f065fadf23a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 28 Feb 2024 22:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=202.0.1=20=E7=89=88=E6=9C=AC=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-framework/pom.xml | 7 +- .../pom.xml | 44 ------ .../yudao-spring-boot-starter-excel/pom.xml | 7 - .../yudao-spring-boot-starter-file/pom.xml | 77 ----------- .../business/CrmBusinessEndStatusEnum.java | 45 ------- .../CrmReceivableReturnTypeEnum.java | 43 ------ .../business/CrmBusinessStatusController.java | 126 ------------------ .../CrmBusinessUpdateStatusReqVO.java | 30 ----- .../contact/vo/CrmContactBusiness2ReqVO.java | 22 --- .../contract/CrmContractConfigController.java | 44 ------ .../vo/config/CrmContractConfigRespVO.java | 16 --- .../vo/config/CrmContractConfigSaveReqVO.java | 33 ----- .../vo/plan/CrmReceivablePlanSaveReqVO.java | 45 ------- .../vo/receivable/CrmReceivableSaveReqVO.java | 58 -------- .../CrmStatisticsRankController.http | 9 -- .../contract/CrmContractConfigDO.java | 33 ----- .../contract/CrmContractConfigMapper.java | 20 --- .../crm/dal/redis/RedisKeyConstants.java | 18 --- .../crm/dal/redis/no/CrmNoRedisDAO.java | 52 -------- .../core/CrmReceivablePlanParseFunction.java | 44 ------ .../CrmReceivableReturnTypeParseFunction.java | 40 ------ .../web/config/CrmWebConfiguration.java | 24 ---- .../crm/framework/web/package-info.java | 4 - .../contract/CrmContractConfigService.java | 28 ---- .../CrmContractConfigServiceImpl.java | 56 -------- .../listener/CrmReceivableResultListener.java | 31 ----- .../module/crm/util/CrmAuditStatusUtils.java | 27 ---- .../ErpPurchaseStatisticsController.java | 69 ---------- .../ErpSaleStatisticsController.http | 11 -- .../ErpSaleStatisticsController.java | 69 ---------- .../vo/purchase/ErpPurchaseSummaryRespVO.java | 24 ---- .../ErpPurchaseTimeSummaryRespVO.java | 18 --- .../vo/sale/ErpSaleSummaryRespVO.java | 24 ---- .../vo/sale/ErpSaleTimeSummaryRespVO.java | 18 --- .../ErpPurchaseStatisticsMapper.java | 20 --- .../statistics/ErpSaleStatisticsMapper.java | 20 --- .../ErpPurchaseStatisticsService.java | 24 ---- .../ErpPurchaseStatisticsServiceImpl.java | 26 ---- .../statistics/ErpSaleStatisticsService.java | 24 ---- .../ErpSaleStatisticsServiceImpl.java | 26 ---- .../ErpPurchaseStatisticsMapper.xml | 23 ---- .../statistics/ErpSaleStatisticsMapper.xml | 23 ---- 42 files changed, 1 insertion(+), 1401 deletions(-) delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-dict/pom.xml delete mode 100644 yudao-framework/yudao-spring-boot-starter-file/pom.xml delete mode 100644 yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java delete mode 100644 yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessStatusController.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessUpdateStatusReqVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactBusiness2ReqVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractConfigController.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigRespVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigSaveReqVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanSaveReqVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableSaveReqVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.http delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/contract/CrmContractConfigDO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractConfigMapper.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/RedisKeyConstants.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/no/CrmNoRedisDAO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivablePlanParseFunction.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivableReturnTypeParseFunction.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigService.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigServiceImpl.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.http delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseSummaryRespVO.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseTimeSummaryRespVO.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleSummaryRespVO.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleTimeSummaryRespVO.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpPurchaseStatisticsMapper.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpSaleStatisticsMapper.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsService.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsServiceImpl.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsService.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsServiceImpl.java delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml delete mode 100644 yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml index a9ef0a5a5e..fba24dca58 100644 --- a/yudao-framework/pom.xml +++ b/yudao-framework/pom.xml @@ -15,8 +15,8 @@ yudao-spring-boot-starter-redis yudao-spring-boot-starter-web yudao-spring-boot-starter-security + yudao-spring-boot-starter-websocket - yudao-spring-boot-starter-file yudao-spring-boot-starter-monitor yudao-spring-boot-starter-protection yudao-spring-boot-starter-job @@ -25,14 +25,9 @@ yudao-spring-boot-starter-excel yudao-spring-boot-starter-biz-operatelog - yudao-spring-boot-starter-biz-dict - yudao-spring-boot-starter-biz-tenant yudao-spring-boot-starter-biz-data-permission yudao-spring-boot-starter-biz-ip - - yudao-spring-boot-starter-captcha - yudao-spring-boot-starter-websocket yudao-framework diff --git a/yudao-framework/yudao-spring-boot-starter-biz-dict/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-dict/pom.xml deleted file mode 100644 index 01d6cd614f..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-dict/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - cn.iocoder.boot - yudao-framework - ${revision} - - 4.0.0 - yudao-spring-boot-starter-biz-dict - jar - - ${project.artifactId} - 字典类型、数据 - https://github.com/YunaiV/ruoyi-vue-pro - - - - cn.iocoder.boot - yudao-common - - - - - org.springframework.boot - spring-boot-starter - - - - - cn.iocoder.boot - yudao-module-system-api - ${revision} - - - - - com.google.guava - guava - - - - diff --git a/yudao-framework/yudao-spring-boot-starter-excel/pom.xml b/yudao-framework/yudao-spring-boot-starter-excel/pom.xml index 3da22b0527..8d778c7d4a 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-excel/pom.xml @@ -63,13 +63,6 @@ yudao-spring-boot-starter-biz-ip true - - - - cn.iocoder.boot - yudao-spring-boot-starter-test - test - diff --git a/yudao-framework/yudao-spring-boot-starter-file/pom.xml b/yudao-framework/yudao-spring-boot-starter-file/pom.xml deleted file mode 100644 index 93fad220b5..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-file/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - yudao-framework - cn.iocoder.boot - ${revision} - - 4.0.0 - yudao-spring-boot-starter-file - - ${project.artifactId} - 文件客户端,支持多种存储器 - 1. file:本地磁盘 - 2. ftp:FTP 服务器 - 2. sftp:SFTP 服务器 - 4. db:数据库 - 5. s3:支持 S3 协议的云存储服务,例如说 MinIO、阿里云、华为云、腾讯云、七牛云等等 - - https://github.com/YunaiV/ruoyi-vue-pro - - - - cn.iocoder.boot - yudao-common - - - - - org.springframework.boot - spring-boot-starter - - - - - org.springframework.boot - spring-boot-starter-validation - - - - org.slf4j - slf4j-api - - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-core - - - - commons-net - commons-net - - - com.jcraft - jsch - - - - org.apache.tika - tika-core - - - - - io.minio - minio - - - - - diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java deleted file mode 100644 index 4736c01b77..0000000000 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/business/CrmBusinessEndStatusEnum.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.yudao.module.crm.enums.business; - -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - -import java.util.Arrays; - -/** - * 商机的结束状态枚举 - * - * @author lzxhqs - */ -@RequiredArgsConstructor -@Getter -public enum CrmBusinessEndStatusEnum implements IntArrayValuable { - - WIN(1, "赢单"), - LOSE(2, "输单"), - INVALID(3, "无效"); - - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBusinessEndStatusEnum::getStatus).toArray(); - - /** - * 场景类型 - */ - private final Integer status; - /** - * 场景名称 - */ - private final String name; - - @Override - public int[] array() { - return ARRAYS; - } - - public static CrmBusinessEndStatusEnum fromStatus(Integer status) { - return Arrays.stream(values()) - .filter(value -> value.getStatus().equals(status)) - .findFirst() - .orElse(null); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java deleted file mode 100644 index 3c01fe95c1..0000000000 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/receivable/CrmReceivableReturnTypeEnum.java +++ /dev/null @@ -1,43 +0,0 @@ -package cn.iocoder.yudao.module.crm.enums.receivable; - -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.util.Arrays; - -/** - * CRM 回款方式枚举 - * - * @author HUIHUI - */ -@Getter -@AllArgsConstructor -public enum CrmReceivableReturnTypeEnum implements IntArrayValuable { - - CHECK(1, "支票"), - CASH(2, "现金"), - POSTAL_REMITTANCE(3, "邮政汇款"), - TELEGRAPHIC_TRANSFER(4, "电汇"), - ONLINE_TRANSFER(5, "网上转账"), - ALIPAY(6, "支付宝"), - WECHAT_PAY(7, "微信支付"), - OTHER(8, "其它"); - - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmReceivableReturnTypeEnum::getType).toArray(); - - /** - * 类型 - */ - private final Integer type; - /** - * 名称 - */ - private final String name; - - @Override - public int[] array() { - return ARRAYS; - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessStatusController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessStatusController.java deleted file mode 100644 index 0663d1f28c..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessStatusController.java +++ /dev/null @@ -1,126 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.business; - -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.crm.controller.admin.business.vo.status.CrmBusinessStatusRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.business.vo.status.CrmBusinessStatusSaveReqVO; -import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessStatusDO; -import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessStatusTypeDO; -import cn.iocoder.yudao.module.crm.service.business.CrmBusinessStatusService; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; -import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; - -@Tag(name = "管理后台 - CRM 商机状态") -@RestController -@RequestMapping("/crm/business-status") -@Validated -public class CrmBusinessStatusController { - - @Resource - private CrmBusinessStatusService businessStatusTypeService; - - @Resource - private AdminUserApi adminUserApi; - @Resource - private DeptApi deptApi; - - @PostMapping("/create") - @Operation(summary = "创建商机状态") - @PreAuthorize("@ss.hasPermission('crm:business-status:create')") - public CommonResult createBusinessStatus(@Valid @RequestBody CrmBusinessStatusSaveReqVO createReqVO) { - return success(businessStatusTypeService.createBusinessStatus(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新商机状态") - @PreAuthorize("@ss.hasPermission('crm:business-status:update')") - public CommonResult updateBusinessStatus(@Valid @RequestBody CrmBusinessStatusSaveReqVO updateReqVO) { - businessStatusTypeService.updateBusinessStatus(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除商机状态") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('crm:business-status:delete')") - public CommonResult deleteBusinessStatusType(@RequestParam("id") Long id) { - businessStatusTypeService.deleteBusinessStatusType(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得商机状态") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('crm:business-status:query')") - public CommonResult getBusinessStatusType(@RequestParam("id") Long id) { - CrmBusinessStatusTypeDO statusType = businessStatusTypeService.getBusinessStatusType(id); - if (statusType == null) { - return success(null); - } - List statuses = businessStatusTypeService.getBusinessStatusListByTypeId(id); - return success(BeanUtils.toBean(statusType, CrmBusinessStatusRespVO.class, - statusTypeVO -> statusTypeVO.setStatuses(BeanUtils.toBean(statuses, CrmBusinessStatusRespVO.Status.class)))); - } - - @GetMapping("/page") - @Operation(summary = "获得商机状态分页") - @PreAuthorize("@ss.hasPermission('crm:business-status:query')") - public CommonResult> getBusinessStatusPage(@Valid PageParam pageReqVO) { - // 1. 查询数据 - PageResult pageResult = businessStatusTypeService.getBusinessStatusTypePage(pageReqVO); - if (CollUtil.isEmpty(pageResult.getList())) { - return success(PageResult.empty(pageResult.getTotal())); - } - // 2. 拼接数据 - Map userMap = adminUserApi.getUserMap( - convertSet(pageResult.getList(), statusType -> Long.parseLong(statusType.getCreator()))); - Map deptMap = deptApi.getDeptMap( - convertSetByFlatMap(pageResult.getList(), CrmBusinessStatusTypeDO::getDeptIds, Collection::stream)); - return success(BeanUtils.toBean(pageResult, CrmBusinessStatusRespVO.class, statusTypeVO -> { - statusTypeVO.setCreator(userMap.get(NumberUtils.parseLong(statusTypeVO.getCreator())).getNickname()); - statusTypeVO.setDeptNames(convertList(statusTypeVO.getDeptIds(), - deptId -> deptMap.containsKey(deptId) ? deptMap.get(deptId).getName() : null)); - })); - } - - @GetMapping("/type-simple-list") - @Operation(summary = "获得商机状态组列表") - public CommonResult> getBusinessStatusTypeSimpleList() { - List list = businessStatusTypeService.getBusinessStatusTypeList(); - // 过滤掉部门不匹配的 - Long deptId = adminUserApi.getUser(getLoginUserId()).getDeptId(); - list.removeIf(statusType -> CollUtil.isNotEmpty(statusType.getDeptIds()) && !statusType.getDeptIds().contains(deptId)); - return success(BeanUtils.toBean(list, CrmBusinessStatusRespVO.class)); - } - - @GetMapping("/status-simple-list") - @Operation(summary = "获得商机状态列表") - @Parameter(name = "typeId", description = "商机状态组", required = true, example = "1024") - public CommonResult> getBusinessStatusSimpleList(@RequestParam("typeId") Long typeId) { - List list = businessStatusTypeService.getBusinessStatusListByTypeId(typeId); - return success(BeanUtils.toBean(list, CrmBusinessStatusRespVO.Status.class)); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessUpdateStatusReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessUpdateStatusReqVO.java deleted file mode 100644 index 7bfd1df93e..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessUpdateStatusReqVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.business.vo.business; - -import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.crm.enums.business.CrmBusinessEndStatusEnum; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.AssertTrue; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -@Schema(description = "管理后台 - CRM 商机更新状态 Request VO") -@Data -public class CrmBusinessUpdateStatusReqVO { - - @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32129") - @NotNull(message = "商机编号不能为空") - private Long id; - - @Schema(description = "状态编号", example = "1") - private Long statusId; - - @Schema(description = "结束状态", example = "1") - @InEnum(value = CrmBusinessEndStatusEnum.class) - private Integer endStatus; - - @AssertTrue(message = "变更状态不正确") - public boolean isStatusValid() { - return statusId != null || endStatus != null; - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactBusiness2ReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactBusiness2ReqVO.java deleted file mode 100644 index 5fac57cffe..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactBusiness2ReqVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.contact.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.util.List; - -@Schema(description = "管理后台 - CRM 联系人商机 Request VO") // 【商机关联联系人】用于关联,取消关联的操作 -@Data -public class CrmContactBusiness2ReqVO { - - @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638") - @NotNull(message="商机不能为空") - private Long businessId; - - @Schema(description = "联系人编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878") - @NotEmpty(message="联系人数组不能为空") - private List contactIds; - -} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractConfigController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractConfigController.java deleted file mode 100644 index a97c3bfd62..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractConfigController.java +++ /dev/null @@ -1,44 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.contract; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.config.CrmContractConfigRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.config.CrmContractConfigSaveReqVO; -import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractConfigDO; -import cn.iocoder.yudao.module.crm.service.contract.CrmContractConfigService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - CRM 合同配置") -@RestController -@RequestMapping("/crm/contract-config") -@Validated -public class CrmContractConfigController { - - @Resource - private CrmContractConfigService contractConfigService; - - @GetMapping("/get") - @Operation(summary = "获取合同配置") - @PreAuthorize("@ss.hasPermission('crm:contract-config:query')") - public CommonResult getCustomerPoolConfig() { - CrmContractConfigDO config = contractConfigService.getContractConfig(); - return success(BeanUtils.toBean(config, CrmContractConfigRespVO.class)); - } - - @PutMapping("/save") - @Operation(summary = "更新合同配置") - @PreAuthorize("@ss.hasPermission('crm:contract-config:update')") - public CommonResult saveCustomerPoolConfig(@Valid @RequestBody CrmContractConfigSaveReqVO updateReqVO) { - contractConfigService.saveContractConfig(updateReqVO); - return success(true); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigRespVO.java deleted file mode 100644 index c39cf92692..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigRespVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.contract.vo.config; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Schema(description = "管理后台 - CRM 合同配置 Response VO") -@Data -public class CrmContractConfigRespVO { - - @Schema(description = "是否开启提前提醒", example = "true") - private Boolean notifyEnabled; - - @Schema(description = "提前提醒天数", example = "2") - private Integer notifyDays; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigSaveReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigSaveReqVO.java deleted file mode 100644 index 7ecd650e31..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/config/CrmContractConfigSaveReqVO.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.contract.vo.config; - -import cn.hutool.core.util.BooleanUtil; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.mzt.logapi.starter.annotation.DiffLogField; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.AssertTrue; -import lombok.Data; - -import java.util.Objects; - -@Schema(description = "管理后台 - CRM 合同配置 Request VO") -@Data -public class CrmContractConfigSaveReqVO { - - @Schema(description = "是否开启提前提醒", example = "true") - @DiffLogField(name = "是否开启提前提醒") - private Boolean notifyEnabled; - - @Schema(description = "提前提醒天数", example = "2") - @DiffLogField(name = "提前提醒天数") - private Integer notifyDays; - - @AssertTrue(message = "提前提醒天数不能为空") - @JsonIgnore - public boolean isNotifyDaysValid() { - if (!BooleanUtil.isTrue(getNotifyEnabled())) { - return true; - } - return Objects.nonNull(getNotifyDays()); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanSaveReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanSaveReqVO.java deleted file mode 100644 index 470734c658..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanSaveReqVO.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - CRM 回款计划新增/修改 Request VO") -@Data -public class CrmReceivablePlanSaveReqVO { - - @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Long id; - - @Schema(description = "客户编号", hidden = true, example = "2") - private Long customerId; // 该字段不通过前端传递,而是 contractId 查询出来设置进去 - - @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - @NotNull(message = "合同编号不能为空") - private Long contractId; - - @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - @NotNull(message = "负责人编号不能为空") - private Long ownerUserId; - - @Schema(description = "计划回款日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02") - @NotNull(message = "计划回款日期不能为空") - private LocalDateTime returnTime; - - @Schema(description = "回款方式", example = "1") - private Integer returnType; - - @Schema(description = "计划回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000") - @NotNull(message = "计划回款金额不能为空") - private BigDecimal price; - - @Schema(description = "提前几天提醒", example = "1") - private Integer remindDays; - - @Schema(description = "备注", example = "备注") - private String remark; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableSaveReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableSaveReqVO.java deleted file mode 100644 index 8ab85daebe..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableSaveReqVO.java +++ /dev/null @@ -1,58 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable; - -import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.crm.enums.receivable.CrmReceivableReturnTypeEnum; -import cn.iocoder.yudao.module.crm.framework.operatelog.core.*; -import com.mzt.logapi.starter.annotation.DiffLogField; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - CRM 回款新增/修改 Request VO") -@Data -public class CrmReceivableSaveReqVO { - - @Schema(description = "编号", example = "25787") - private Long id; - - @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - @DiffLogField(name = "负责人", function = SysAdminUserParseFunction.NAME) - @NotNull(message = "负责人编号不能为空") - private Long ownerUserId; - - @Schema(description = "客户编号", example = "2") - @DiffLogField(name = "客户", function = CrmCustomerParseFunction.NAME) - private Long customerId; // 该字段不通过前端传递,而是 contractId 查询出来设置进去 - - @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - @DiffLogField(name = "合同", function = CrmContractParseFunction.NAME) - @NotNull(message = "合同编号不能为空") - private Long contractId; - - @Schema(description = "回款计划编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @DiffLogField(name = "合同", function = CrmReceivablePlanParseFunction.NAME) - private Long planId; - - @Schema(description = "回款方式", example = "2") - @DiffLogField(name = "回款方式", function = CrmReceivableReturnTypeParseFunction.NAME) - @InEnum(CrmReceivableReturnTypeEnum.class) - private Integer returnType; - - @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000") - @DiffLogField(name = "回款金额") - @NotNull(message = "回款金额不能为空") - private BigDecimal price; - - @Schema(description = "回款日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02") - @NotNull(message = "回款日期不能为空") - @DiffLogField(name = "回款日期") - private LocalDateTime returnTime; - - @Schema(description = "备注", example = "备注") - @DiffLogField(name = "备注") - private String remark; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.http deleted file mode 100644 index e878ba1a93..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.http +++ /dev/null @@ -1,9 +0,0 @@ -### 合同金额排行榜 -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 -Authorization: Bearer {{token}} -tenant-id: {{adminTenentId}} - -### 回款金额排行榜 -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 -Authorization: Bearer {{token}} -tenant-id: {{adminTenentId}} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/contract/CrmContractConfigDO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/contract/CrmContractConfigDO.java deleted file mode 100644 index ab0c2d28e8..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/contract/CrmContractConfigDO.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.crm.dal.dataobject.contract; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.*; -import lombok.*; - -@TableName("crm_contract_config") -@KeySequence("crm_contract_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class CrmContractConfigDO extends BaseDO { - - /** - * 编号 - */ - @TableId - private Long id; - /** - * 是否开启提前提醒 - */ - @TableField(updateStrategy = FieldStrategy.ALWAYS) - private Boolean notifyEnabled; - /** - * 提前提醒天数 - */ - @TableField(updateStrategy = FieldStrategy.ALWAYS) - private Integer notifyDays; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractConfigMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractConfigMapper.java deleted file mode 100644 index 64e6f918bc..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractConfigMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.crm.dal.mysql.contract; - -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractConfigDO; -import org.apache.ibatis.annotations.Mapper; - -/** - * 合同配置 Mapper - * - * @author Wanwan - */ -@Mapper -public interface CrmContractConfigMapper extends BaseMapperX { - - default CrmContractConfigDO selectOne() { - return selectOne(new QueryWrapperX().limitN(1)); - } - -} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/RedisKeyConstants.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/RedisKeyConstants.java deleted file mode 100644 index 2932c1db14..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/RedisKeyConstants.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.crm.dal.redis; - -/** - * CRM Redis Key 枚举类 - * - * @author 芋道源码 - */ -public interface RedisKeyConstants { - - /** - * 序号的缓存 - * - * KEY 格式:trade_no:{prefix} - * VALUE 数据格式:编号自增 - */ - String NO = "crm:seq_no:"; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/no/CrmNoRedisDAO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/no/CrmNoRedisDAO.java deleted file mode 100644 index e917b13fd4..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/redis/no/CrmNoRedisDAO.java +++ /dev/null @@ -1,52 +0,0 @@ -package cn.iocoder.yudao.module.crm.dal.redis.no; - -import cn.hutool.core.date.DatePattern; -import cn.hutool.core.date.DateUtil; -import cn.iocoder.yudao.module.crm.dal.redis.RedisKeyConstants; -import jakarta.annotation.Resource; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.stereotype.Repository; - -import java.time.Duration; -import java.time.LocalDateTime; - - -/** - * Crm 订单序号的 Redis DAO - * - * @author HUIHUI - */ -@Repository -public class CrmNoRedisDAO { - - /** - * 合同 {@link cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO} - */ - public static final String CONTRACT_NO_PREFIX = "HT"; - - /** - * 回款 {@link cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO} - */ - public static final String RECEIVABLE_PREFIX = "HK"; - - @Resource - private StringRedisTemplate stringRedisTemplate; - - /** - * 生成序号,使用当前日期,格式为 {PREFIX} + yyyyMMdd + 6 位自增 - * 例如说:QTRK 202109 000001 (没有中间空格) - * - * @param prefix 前缀 - * @return 序号 - */ - public String generate(String prefix) { - // 递增序号 - String noPrefix = prefix + DateUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN); - String key = RedisKeyConstants.NO + noPrefix; - Long no = stringRedisTemplate.opsForValue().increment(key); - // 设置过期时间 - stringRedisTemplate.expire(key, Duration.ofDays(1L)); - return noPrefix + String.format("%06d", no); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivablePlanParseFunction.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivablePlanParseFunction.java deleted file mode 100644 index b43074a8df..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivablePlanParseFunction.java +++ /dev/null @@ -1,44 +0,0 @@ -package cn.iocoder.yudao.module.crm.framework.operatelog.core; - -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO; -import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivablePlanService; -import com.mzt.logapi.service.IParseFunction; -import jakarta.annotation.Resource; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * CRM 回款计划的 {@link IParseFunction} 实现类 - * - * @author HUIHUI - */ -@Component -@Slf4j -public class CrmReceivablePlanParseFunction implements IParseFunction { - - public static final String NAME = "getReceivablePlanServiceById"; - - @Resource - private CrmReceivablePlanService receivablePlanService; - - @Override - public boolean executeBefore() { - return true; // 先转换值后对比 - } - - @Override - public String functionName() { - return NAME; - } - - @Override - public String apply(Object value) { - if (StrUtil.isEmptyIfStr(value)) { - return ""; - } - CrmReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(Long.parseLong(value.toString())); - return receivablePlan == null ? "" : receivablePlan.getPeriod().toString(); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivableReturnTypeParseFunction.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivableReturnTypeParseFunction.java deleted file mode 100644 index a8e8f8d130..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/core/CrmReceivableReturnTypeParseFunction.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.crm.framework.operatelog.core; - -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.dict.util.DictFrameworkUtils; -import com.mzt.logapi.service.IParseFunction; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_RECEIVABLE_RETURN_TYPE; - -/** - * CRM 回款方式的 {@link IParseFunction} 实现类 - * - * @author HUIHUI - */ -@Slf4j -@Component -public class CrmReceivableReturnTypeParseFunction implements IParseFunction { - - public static final String NAME = "getReceivableReturnType"; - - @Override - public boolean executeBefore() { - return true; // 先转换值后对比 - } - - @Override - public String functionName() { - return NAME; - } - - @Override - public String apply(Object value) { - if (StrUtil.isEmptyIfStr(value)) { - return ""; - } - return DictFrameworkUtils.getDictDataLabel(CRM_RECEIVABLE_RETURN_TYPE, value.toString()); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java deleted file mode 100644 index 5b68d8e2ee..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.crm.framework.web.config; - -import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration; -import org.springdoc.core.models.GroupedOpenApi; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * crm 模块的 web 组件的 Configuration - * - * @author 芋道源码 - */ -@Configuration(proxyBeanMethods = false) -public class CrmWebConfiguration { - - /** - * crm 模块的 API 分组 - */ - @Bean - public GroupedOpenApi crmGroupedOpenApi() { - return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("crm"); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java deleted file mode 100644 index e18c3cdb51..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * trade 模块的 web 配置 - */ -package cn.iocoder.yudao.module.crm.framework.web; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigService.java deleted file mode 100644 index 79471aaf98..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigService.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.crm.service.contract; - -import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.config.CrmContractConfigSaveReqVO; -import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractConfigDO; -import jakarta.validation.Valid; - -/** - * 合同配置 Service 接口 - * - * @author 芋道源码 - */ -public interface CrmContractConfigService { - - /** - * 获得合同配置 - * - * @return 合同配置 - */ - CrmContractConfigDO getContractConfig(); - - /** - * 保存合同配置 - * - * @param saveReqVO 更新信息 - */ - void saveContractConfig(@Valid CrmContractConfigSaveReqVO saveReqVO); - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigServiceImpl.java deleted file mode 100644 index c9379dcecb..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractConfigServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -package cn.iocoder.yudao.module.crm.service.contract; - -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.config.CrmContractConfigSaveReqVO; -import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractConfigDO; -import cn.iocoder.yudao.module.crm.dal.mysql.contract.CrmContractConfigMapper; -import com.mzt.logapi.context.LogRecordContext; -import com.mzt.logapi.starter.annotation.LogRecord; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import java.util.Objects; - -import static cn.iocoder.yudao.module.crm.enums.LogRecordConstants.*; - -/** - * 合同配置 Service 实现类 - * - * @author 芋道源码 - */ -@Service -@Validated -public class CrmContractConfigServiceImpl implements CrmContractConfigService { - - @Resource - private CrmContractConfigMapper contractConfigMapper; - - @Override - public CrmContractConfigDO getContractConfig() { - return contractConfigMapper.selectOne(); - } - - @Override - @LogRecord(type = CRM_CONTRACT_CONFIG_TYPE, subType = CRM_CONTRACT_CONFIG_SUB_TYPE, bizNo = "{{#configId}}", - success = CRM_CONTRACT_CONFIG_SUCCESS) - public void saveContractConfig(CrmContractConfigSaveReqVO saveReqVO) { - // 1. 存在,则进行更新 - CrmContractConfigDO dbConfig = getContractConfig(); - CrmContractConfigDO config = BeanUtils.toBean(saveReqVO, CrmContractConfigDO.class); - if (Objects.nonNull(dbConfig)) { - contractConfigMapper.updateById(config.setId(dbConfig.getId())); - // 记录操作日志上下文 - LogRecordContext.putVariable("isConfigUpdate", Boolean.TRUE); - LogRecordContext.putVariable("configId", config.getId()); - return; - } - - // 2. 不存在,则进行插入 - contractConfigMapper.insert(config); - // 记录操作日志上下文 - LogRecordContext.putVariable("isConfigUpdate", Boolean.FALSE); - LogRecordContext.putVariable("configId", config.getId()); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java deleted file mode 100644 index 8c4f3e974d..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.crm.service.receivable.listener; - -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEventListener; -import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableService; -import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableServiceImpl; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Component; - -/** - * 回款审批的结果的监听器实现类 - * - * @author HUIHUI - */ -@Component -public class CrmReceivableResultListener extends BpmProcessInstanceResultEventListener { - - @Resource - private CrmReceivableService receivableService; - - @Override - public String getProcessDefinitionKey() { - return CrmReceivableServiceImpl.BPM_PROCESS_DEFINITION_KEY; - } - - @Override - public void onEvent(BpmProcessInstanceResultEvent event) { - receivableService.updateReceivableAuditStatus(Long.parseLong(event.getBusinessKey()), event.getResult()); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java deleted file mode 100644 index 665e98fbed..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java +++ /dev/null @@ -1,27 +0,0 @@ -package cn.iocoder.yudao.module.crm.util; - -import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; -import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum; - -/** - * CRM 流程工具类 - * - * @author HUIHUI - */ -public class CrmAuditStatusUtils { - - /** - * BPM 审批结果转换 - * - * @param bpmResult BPM 审批结果 - */ - public static Integer convertBpmResultToAuditStatus(Integer bpmResult) { - Integer auditStatus = BpmProcessInstanceResultEnum.APPROVE.getResult().equals(bpmResult) ? CrmAuditStatusEnum.APPROVE.getStatus() - : BpmProcessInstanceResultEnum.REJECT.getResult().equals(bpmResult) ? CrmAuditStatusEnum.REJECT.getStatus() - : BpmProcessInstanceResultEnum.CANCEL.getResult().equals(bpmResult) ? BpmProcessInstanceResultEnum.CANCEL.getResult() : null; - Assert.notNull(auditStatus, "BPM 审批结果({}) 转换失败", bpmResult); - return auditStatus; - } - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java deleted file mode 100644 index 5e0657a75b..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java +++ /dev/null @@ -1,69 +0,0 @@ -package cn.iocoder.yudao.module.erp.controller.admin.statistics; - -import cn.hutool.core.date.LocalDateTimeUtil; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; -import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase.ErpPurchaseSummaryRespVO; -import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase.ErpPurchaseTimeSummaryRespVO; -import cn.iocoder.yudao.module.erp.service.statistics.ErpPurchaseStatisticsService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; - -import static cn.hutool.core.date.DatePattern.NORM_MONTH_PATTERN; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - ERP 采购统计") -@RestController -@RequestMapping("/erp/purchase-statistics") -@Validated -public class ErpPurchaseStatisticsController { - - @Resource - private ErpPurchaseStatisticsService purchaseStatisticsService; - - @GetMapping("/summary") - @Operation(summary = "获得采购统计") - @PreAuthorize("@ss.hasPermission('erp:statistics:query')") - public CommonResult getPurchaseSummary() { - LocalDateTime today = LocalDateTimeUtils.getToday(); - LocalDateTime yesterday = LocalDateTimeUtils.getYesterday(); - LocalDateTime month = LocalDateTimeUtils.getMonth(); - LocalDateTime year = LocalDateTimeUtils.getYear(); - ErpPurchaseSummaryRespVO summary = new ErpPurchaseSummaryRespVO() - .setTodayPrice(purchaseStatisticsService.getPurchasePrice(today, null)) - .setYesterdayPrice(purchaseStatisticsService.getPurchasePrice(yesterday, today)) - .setMonthPrice(purchaseStatisticsService.getPurchasePrice(month, null)) - .setYearPrice(purchaseStatisticsService.getPurchasePrice(year, null)); - return success(summary); - } - - @GetMapping("/time-summary") - @Operation(summary = "获得采购时间段统计") - @Parameter(name = "count", description = "时间段数量", example = "6") - @PreAuthorize("@ss.hasPermission('erp:statistics:query')") - public CommonResult> getPurchaseTimeSummary( - @RequestParam(value = "count", defaultValue = "6") Integer count) { - List summaryList = new ArrayList<>(); - for (int i = count - 1; i >= 0; i--) { - LocalDateTime startTime = LocalDateTimeUtils.beginOfMonth(LocalDateTime.now().minusMonths(i)); - LocalDateTime endTime = LocalDateTimeUtils.endOfMonth(startTime); - summaryList.add(new ErpPurchaseTimeSummaryRespVO() - .setTime(LocalDateTimeUtil.format(startTime, NORM_MONTH_PATTERN)) - .setPrice(purchaseStatisticsService.getPurchasePrice(startTime, endTime))); - } - return success(summaryList); - } - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.http b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.http deleted file mode 100644 index 5f5cab1094..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.http +++ /dev/null @@ -1,11 +0,0 @@ -### 请求 /erp/sale-statistics/summary 接口 => 成功 -GET {{baseUrl}}/erp/sale-statistics/summary -Content-Type: application/json -tenant-id: {{adminTenentId}} -Authorization: Bearer {{token}} - -### 请求 /erp/sale-statistics/time-summary 接口 => 成功 -GET {{baseUrl}}/erp/sale-statistics/time-summary -Content-Type: application/json -tenant-id: {{adminTenentId}} -Authorization: Bearer {{token}} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.java deleted file mode 100644 index 3fcaf22e98..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.java +++ /dev/null @@ -1,69 +0,0 @@ -package cn.iocoder.yudao.module.erp.controller.admin.statistics; - -import cn.hutool.core.date.LocalDateTimeUtil; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; -import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale.ErpSaleSummaryRespVO; -import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale.ErpSaleTimeSummaryRespVO; -import cn.iocoder.yudao.module.erp.service.statistics.ErpSaleStatisticsService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; - -import static cn.hutool.core.date.DatePattern.NORM_MONTH_PATTERN; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - ERP 销售统计") -@RestController -@RequestMapping("/erp/sale-statistics") -@Validated -public class ErpSaleStatisticsController { - - @Resource - private ErpSaleStatisticsService saleStatisticsService; - - @GetMapping("/summary") - @Operation(summary = "获得销售统计") - @PreAuthorize("@ss.hasPermission('erp:statistics:query')") - public CommonResult getSaleSummary() { - LocalDateTime today = LocalDateTimeUtils.getToday(); - LocalDateTime yesterday = LocalDateTimeUtils.getYesterday(); - LocalDateTime month = LocalDateTimeUtils.getMonth(); - LocalDateTime year = LocalDateTimeUtils.getYear(); - ErpSaleSummaryRespVO summary = new ErpSaleSummaryRespVO() - .setTodayPrice(saleStatisticsService.getSalePrice(today, null)) - .setYesterdayPrice(saleStatisticsService.getSalePrice(yesterday, today)) - .setMonthPrice(saleStatisticsService.getSalePrice(month, null)) - .setYearPrice(saleStatisticsService.getSalePrice(year, null)); - return success(summary); - } - - @GetMapping("/time-summary") - @Operation(summary = "获得销售时间段统计") - @Parameter(name = "count", description = "时间段数量", example = "6") - @PreAuthorize("@ss.hasPermission('erp:statistics:query')") - public CommonResult> getSaleTimeSummary( - @RequestParam(value = "count", defaultValue = "6") Integer count) { - List summaryList = new ArrayList<>(); - for (int i = count - 1; i >= 0; i--) { - LocalDateTime startTime = LocalDateTimeUtils.beginOfMonth(LocalDateTime.now().minusMonths(i)); - LocalDateTime endTime = LocalDateTimeUtils.endOfMonth(startTime); - summaryList.add(new ErpSaleTimeSummaryRespVO() - .setTime(LocalDateTimeUtil.format(startTime, NORM_MONTH_PATTERN)) - .setPrice(saleStatisticsService.getSalePrice(startTime, endTime))); - } - return success(summaryList); - } - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseSummaryRespVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseSummaryRespVO.java deleted file mode 100644 index 22635e7457..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseSummaryRespVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.math.BigDecimal; - -@Schema(description = "管理后台 - ERP 采购全局统计 Response VO") -@Data -public class ErpPurchaseSummaryRespVO { - - @Schema(description = "今日采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private BigDecimal todayPrice; - - @Schema(description = "昨日采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "888") - private BigDecimal yesterdayPrice; - - @Schema(description = "本月采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private BigDecimal monthPrice; - - @Schema(description = "今年采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "88888") - private BigDecimal yearPrice; - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseTimeSummaryRespVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseTimeSummaryRespVO.java deleted file mode 100644 index 15ae817de1..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseTimeSummaryRespVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.math.BigDecimal; - -@Schema(description = "管理后台 - ERP 采购某个时间段的统计 Response VO") -@Data -public class ErpPurchaseTimeSummaryRespVO { - - @Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-03") - private String time; - - @Schema(description = "采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private BigDecimal price; - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleSummaryRespVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleSummaryRespVO.java deleted file mode 100644 index 575d7da5e7..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleSummaryRespVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.math.BigDecimal; - -@Schema(description = "管理后台 - ERP 销售全局统计 Response VO") -@Data -public class ErpSaleSummaryRespVO { - - @Schema(description = "今日销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private BigDecimal todayPrice; - - @Schema(description = "昨日销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "888") - private BigDecimal yesterdayPrice; - - @Schema(description = "本月销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private BigDecimal monthPrice; - - @Schema(description = "今年销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "88888") - private BigDecimal yearPrice; - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleTimeSummaryRespVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleTimeSummaryRespVO.java deleted file mode 100644 index 48b9b6e9ac..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleTimeSummaryRespVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.math.BigDecimal; - -@Schema(description = "管理后台 - ERP 销售某个时间段的统计 Response VO") -@Data -public class ErpSaleTimeSummaryRespVO { - - @Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-03") - private String time; - - @Schema(description = "销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private BigDecimal price; - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpPurchaseStatisticsMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpPurchaseStatisticsMapper.java deleted file mode 100644 index 14b4e517bf..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpPurchaseStatisticsMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.erp.dal.mysql.statistics; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * ERP 采购统计 Mapper - * - * @author 芋道源码 - */ -@Mapper -public interface ErpPurchaseStatisticsMapper { - - BigDecimal getPurchasePrice(@Param("beginTime") LocalDateTime beginTime, - @Param("endTime") LocalDateTime endTime); - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpSaleStatisticsMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpSaleStatisticsMapper.java deleted file mode 100644 index b29f1944d4..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpSaleStatisticsMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.erp.dal.mysql.statistics; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * ERP 销售统计 Mapper - * - * @author 芋道源码 - */ -@Mapper -public interface ErpSaleStatisticsMapper { - - BigDecimal getSalePrice(@Param("beginTime") LocalDateTime beginTime, - @Param("endTime") LocalDateTime endTime); - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsService.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsService.java deleted file mode 100644 index 9134094879..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsService.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.erp.service.statistics; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * ERP 采购统计 Service 接口 - * - * @author 芋道源码 - */ -public interface ErpPurchaseStatisticsService { - - /** - * 获得采购金额 - * - * 计算逻辑:采购出库的金额 - 采购退货的金额 - * - * @param beginTime >= 开始时间 - * @param endTime < 结束时间 - * @return 采购金额 - */ - BigDecimal getPurchasePrice(LocalDateTime beginTime, LocalDateTime endTime); - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsServiceImpl.java deleted file mode 100644 index b7a8be2a85..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsServiceImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package cn.iocoder.yudao.module.erp.service.statistics; - -import cn.iocoder.yudao.module.erp.dal.mysql.statistics.ErpPurchaseStatisticsMapper; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * ERP 采购统计 Service 实现类 - * - * @author 芋道源码 - */ -@Service -public class ErpPurchaseStatisticsServiceImpl implements ErpPurchaseStatisticsService { - - @Resource - private ErpPurchaseStatisticsMapper purchaseStatisticsMapper; - - @Override - public BigDecimal getPurchasePrice(LocalDateTime beginTime, LocalDateTime endTime) { - return purchaseStatisticsMapper.getPurchasePrice(beginTime, endTime); - } - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsService.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsService.java deleted file mode 100644 index 3c28bc327e..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsService.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.erp.service.statistics; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * ERP 销售统计 Service 接口 - * - * @author 芋道源码 - */ -public interface ErpSaleStatisticsService { - - /** - * 获得销售金额 - * - * 计算逻辑:销售出库的金额 - 销售退货的金额 - * - * @param beginTime >= 开始时间 - * @param endTime < 结束时间 - * @return 销售金额 - */ - BigDecimal getSalePrice(LocalDateTime beginTime, LocalDateTime endTime); - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsServiceImpl.java deleted file mode 100644 index c487bf53e0..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsServiceImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package cn.iocoder.yudao.module.erp.service.statistics; - -import cn.iocoder.yudao.module.erp.dal.mysql.statistics.ErpSaleStatisticsMapper; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * ERP 销售统计 Service 实现类 - * - * @author 芋道源码 - */ -@Service -public class ErpSaleStatisticsServiceImpl implements ErpSaleStatisticsService { - - @Resource - private ErpSaleStatisticsMapper saleStatisticsMapper; - - @Override - public BigDecimal getSalePrice(LocalDateTime beginTime, LocalDateTime endTime) { - return saleStatisticsMapper.getSalePrice(beginTime, endTime); - } - -} diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml deleted file mode 100644 index e2b25992a4..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml deleted file mode 100644 index 8e74606c9e..0000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - \ No newline at end of file