diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java index 59656cbdd..87c20798e 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java @@ -132,4 +132,40 @@ public class LocalDateTimeUtils { return LocalDateTimeUtil.between(dateTime, LocalDateTime.now(), ChronoUnit.DAYS); } + /** + * 获取今天的开始时间 + * + * @return 今天 + */ + public static LocalDateTime getToday() { + return LocalDateTimeUtil.beginOfDay(LocalDateTime.now()); + } + + /** + * 获取昨天的开始时间 + * + * @return 昨天 + */ + public static LocalDateTime getYesterday() { + return LocalDateTimeUtil.beginOfDay(LocalDateTime.now().minusDays(1)); + } + + /** + * 获取本月的开始时间 + * + * @return 本月 + */ + public static LocalDateTime getMonth() { + return beginOfMonth(LocalDateTime.now()); + } + + /** + * 获取本年的开始时间 + * + * @return 本年 + */ + public static LocalDateTime getYear() { + return LocalDateTime.now().with(TemporalAdjusters.firstDayOfYear()).with(LocalTime.MIN); + } + } 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 new file mode 100644 index 000000000..5e0657a75 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java @@ -0,0 +1,69 @@ +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 new file mode 100644 index 000000000..5f5cab109 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.http @@ -0,0 +1,11 @@ +### 请求 /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 new file mode 100644 index 000000000..3fcaf22e9 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.java @@ -0,0 +1,69 @@ +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 new file mode 100644 index 000000000..22635e745 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseSummaryRespVO.java @@ -0,0 +1,24 @@ +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 new file mode 100644 index 000000000..15ae817de --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseTimeSummaryRespVO.java @@ -0,0 +1,18 @@ +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 new file mode 100644 index 000000000..575d7da5e --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleSummaryRespVO.java @@ -0,0 +1,24 @@ +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 new file mode 100644 index 000000000..48b9b6e9a --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleTimeSummaryRespVO.java @@ -0,0 +1,18 @@ +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 new file mode 100644 index 000000000..14b4e517b --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpPurchaseStatisticsMapper.java @@ -0,0 +1,20 @@ +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 new file mode 100644 index 000000000..b29f1944d --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpSaleStatisticsMapper.java @@ -0,0 +1,20 @@ +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/purchase/ErpPurchaseInServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseInServiceImpl.java index 5d6ad6230..8a521d5ac 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseInServiceImpl.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseInServiceImpl.java @@ -164,7 +164,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService { throw exception(approve ? PURCHASE_IN_APPROVE_FAIL : PURCHASE_IN_PROCESS_FAIL); } // 1.3 校验已付款 - if (approve && purchaseIn.getPaymentPrice().compareTo(BigDecimal.ZERO) > 0) { + if (!approve && purchaseIn.getPaymentPrice().compareTo(BigDecimal.ZERO) > 0) { throw exception(PURCHASE_IN_PROCESS_FAIL_EXISTS_PAYMENT); } diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseReturnServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseReturnServiceImpl.java index 05960e896..9403c0b14 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseReturnServiceImpl.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseReturnServiceImpl.java @@ -160,7 +160,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService { throw exception(approve ? PURCHASE_RETURN_APPROVE_FAIL : PURCHASE_RETURN_PROCESS_FAIL); } // 1.3 校验已退款 - if (approve && purchaseReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { + if (!approve && purchaseReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { throw exception(PURCHASE_RETURN_PROCESS_FAIL_EXISTS_REFUND); } diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOutServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOutServiceImpl.java index d930c16bf..5f3566ae6 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOutServiceImpl.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOutServiceImpl.java @@ -172,7 +172,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService { throw exception(approve ? SALE_OUT_APPROVE_FAIL : SALE_OUT_PROCESS_FAIL); } // 1.3 校验已退款 - if (approve && saleOut.getReceiptPrice().compareTo(BigDecimal.ZERO) > 0) { + if (!approve && saleOut.getReceiptPrice().compareTo(BigDecimal.ZERO) > 0) { throw exception(SALE_OUT_PROCESS_FAIL_EXISTS_RECEIPT); } diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleReturnServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleReturnServiceImpl.java index 85d798e72..61a6fe1c4 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleReturnServiceImpl.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleReturnServiceImpl.java @@ -172,7 +172,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService { throw exception(approve ? SALE_RETURN_APPROVE_FAIL : SALE_RETURN_PROCESS_FAIL); } // 1.3 校验已退款 - if (approve && saleReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { + if (!approve && saleReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { throw exception(SALE_RETURN_PROCESS_FAIL_EXISTS_REFUND); } 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 new file mode 100644 index 000000000..913409487 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsService.java @@ -0,0 +1,24 @@ +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 new file mode 100644 index 000000000..b7a8be2a8 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsServiceImpl.java @@ -0,0 +1,26 @@ +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 new file mode 100644 index 000000000..3c28bc327 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsService.java @@ -0,0 +1,24 @@ +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 new file mode 100644 index 000000000..c487bf53e --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsServiceImpl.java @@ -0,0 +1,26 @@ +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/finance/ErpAccountMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/finance/ErpAccountMapper.xml deleted file mode 100644 index a3cf6877b..000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/finance/ErpAccountMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/product/ErpProductUnitMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/product/ErpProductUnitMapper.xml deleted file mode 100644 index 4666e48d4..000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/product/ErpProductUnitMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/sale/ErpCustomerMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/sale/ErpCustomerMapper.xml deleted file mode 100644 index c012f4467..000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/sale/ErpCustomerMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file 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 new file mode 100644 index 000000000..e2b25992a --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml @@ -0,0 +1,23 @@ + + + + + + + \ 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 new file mode 100644 index 000000000..8e74606c9 --- /dev/null +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/stock/ErpWarehouseMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/stock/ErpWarehouseMapper.xml deleted file mode 100644 index be2bc61cb..000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/stock/ErpWarehouseMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/supplier/ErpSupplierMapper.xml b/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/supplier/ErpSupplierMapper.xml deleted file mode 100644 index 54849af3f..000000000 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/supplier/ErpSupplierMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java index ec2192608..b89bc4d3f 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java @@ -39,7 +39,6 @@ public class MemberStatisticsController { @Resource private ApiAccessLogStatisticsService apiAccessLogStatisticsService; - // TODO 芋艿:已经 review @GetMapping("/summary") @Operation(summary = "获得会员统计(实时统计)") @PreAuthorize("@ss.hasPermission('statistics:member:query')") @@ -47,7 +46,6 @@ public class MemberStatisticsController { return success(memberStatisticsService.getMemberSummary()); } - // TODO 芋艿:已经 review @GetMapping("/analyse") @Operation(summary = "获得会员分析数据") @PreAuthorize("@ss.hasPermission('statistics:member:query')") @@ -76,7 +74,6 @@ public class MemberStatisticsController { return success(MemberStatisticsConvert.INSTANCE.convert(visitUserCount, orderUserCount, payUserCount, atv, comparisonData)); } - // TODO 芋艿:已经 review @GetMapping("/area-statistics-list") @Operation(summary = "按照省份,获得会员统计列表") @PreAuthorize("@ss.hasPermission('statistics:member:query')") @@ -84,7 +81,6 @@ public class MemberStatisticsController { return success(memberStatisticsService.getMemberAreaStatisticsList()); } - // TODO 芋艿:已经 review @GetMapping("/sex-statistics-list") @Operation(summary = "按照性别,获得会员统计列表") @PreAuthorize("@ss.hasPermission('statistics:member:query')") @@ -92,7 +88,6 @@ public class MemberStatisticsController { return success(memberStatisticsService.getMemberSexStatisticsList()); } - // TODO 芋艿:已经 review @GetMapping("/terminal-statistics-list") @Operation(summary = "按照终端,获得会员统计列表") @PreAuthorize("@ss.hasPermission('statistics:member:query')") @@ -100,7 +95,6 @@ public class MemberStatisticsController { return success(memberStatisticsService.getMemberTerminalStatisticsList()); } - // TODO 芋艿:已经 review // TODO @疯狂:要注意 date 的排序; @GetMapping("/user-count-comparison") @Operation(summary = "获得用户数量对照") @@ -109,7 +103,6 @@ public class MemberStatisticsController { return success(memberStatisticsService.getUserCountComparison()); } - // TODO 芋艿:已经 review @GetMapping("/register-count-list") @Operation(summary = "获得会员注册数量列表") @PreAuthorize("@ss.hasPermission('statistics:member:query')") diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/infra/ApiAccessLogStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/infra/ApiAccessLogStatisticsMapper.java index cf7f98a0e..5f76b58fd 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/infra/ApiAccessLogStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/infra/ApiAccessLogStatisticsMapper.java @@ -16,12 +16,10 @@ import java.time.LocalDateTime; @SuppressWarnings("rawtypes") public interface ApiAccessLogStatisticsMapper extends BaseMapperX { - // TODO 芋艿:已经 review Integer selectIpCountByUserTypeAndCreateTimeBetween(@Param("userType") Integer userType, @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Integer selectUserCountByUserTypeAndCreateTimeBetween(@Param("userType") Integer userType, @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/member/MemberStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/member/MemberStatisticsMapper.java index 1d215b818..595e93d9e 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/member/MemberStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/member/MemberStatisticsMapper.java @@ -20,20 +20,15 @@ import java.util.List; @SuppressWarnings("rawtypes") public interface MemberStatisticsMapper extends BaseMapperX { - // TODO @芋艿:已经 review List selectSummaryListByAreaId(); - // TODO @芋艿:已经 review List selectSummaryListBySex(); - // TODO @芋艿:已经 review List selectSummaryListByRegisterTerminal(); - // TODO @芋艿:已经 review Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO @芋艿:已经 review /** * 获得用户的每天注册数量列表 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java index 90ab0e0c6..b9b38fbbe 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java @@ -17,27 +17,22 @@ import java.time.LocalDateTime; @SuppressWarnings("rawtypes") public interface PayWalletStatisticsMapper extends BaseMapperX { - // TODO 芋艿:已经 review; WalletSummaryRespBO selectRechargeSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime, @Param("payStatus") Boolean payStatus); - // TODO 芋艿:已经 review; WalletSummaryRespBO selectRechargeSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime, @Param("refundStatus") Integer refundStatus); - // TODO 芋艿:已经 review; Integer selectPriceSummaryByBizTypeAndCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime, @Param("bizType") Integer bizType); - // TODO 芋艿:已经 review; RechargeSummaryRespBO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime, @Param("payStatus") Boolean payStatus); - // TODO 芋艿:已经 review; Integer selectRechargePriceSummary(@Param("payStatus") Integer payStatus); } diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java index 1d2bb8814..7de0cb07b 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java @@ -16,11 +16,9 @@ import java.time.LocalDateTime; @Mapper public interface AfterSaleStatisticsMapper extends BaseMapperX { - // TODO 芋艿:已 review AfterSaleSummaryRespBO selectSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Long selectCountByStatus(@Param("status") Integer status); } diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java index 46d651a75..94ad06812 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java @@ -15,13 +15,11 @@ import java.time.LocalDateTime; @Mapper public interface BrokerageStatisticsMapper extends BaseMapperX { - // TODO 芋艿:已经 review Integer selectSummaryPriceByStatusAndUnfreezeTimeBetween(@Param("bizType") Integer bizType, @Param("status") Integer status, @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Long selectWithdrawCountByStatus(@Param("status") Integer status); } diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java index 43b4c4dfd..1d7ffb644 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java @@ -19,30 +19,23 @@ import java.util.List; @Mapper public interface TradeOrderStatisticsMapper extends BaseMapperX { - // TODO 芋艿:已经 review List selectSummaryListByAreaId(); - // TODO 芋艿:已经 review Integer selectCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Integer selectCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Integer selectSummaryPriceByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Integer selectUserCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review Integer selectUserCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 按照支付时间统计订单(按天分组) * @@ -53,7 +46,6 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX selectListByPayTimeBetweenAndGroupByDay(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 按照支付时间统计订单(按月分组) * @@ -64,10 +56,8 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX selectListByPayTimeBetweenAndGroupByMonth(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO @芋艿:已经 review Long selectCountByStatusAndDeliveryType(@Param("status") Integer status, @Param("deliveryType") Integer deliveryType); - // TODO 芋艿:已经 review TradeOrderSummaryRespVO selectPaySummaryByStatusAndPayTimeBetween(@Param("status") Integer status, @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeStatisticsMapper.java index d5ed54cec..67d2d5007 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeStatisticsMapper.java @@ -25,17 +25,14 @@ public interface TradeStatisticsMapper extends BaseMapperX { TradeTrendSummaryRespVO selectVoByTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO @芋艿:已经 review default List selectListByTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { return selectList(new LambdaQueryWrapperX() .between(TradeStatisticsDO::getTime, beginTime, endTime)); } - // TODO @芋艿:已经 review Integer selectExpensePriceByTimeBetween(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - // TODO @芋艿:已经 review default TradeStatisticsDO selectByTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { return selectOne(new LambdaQueryWrapperX() .between(TradeStatisticsDO::getTime, beginTime, endTime)); diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsService.java index f4042730b..6c200fdef 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsService.java @@ -9,7 +9,6 @@ import java.time.LocalDateTime; */ public interface ApiAccessLogStatisticsService { - // TODO 芋艿:已经 review /** * 获取活跃用户数量 * @@ -20,7 +19,6 @@ public interface ApiAccessLogStatisticsService { */ Integer getUserCount(Integer userType, LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取访问用户数量 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java index 324905e59..253cba68a 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java @@ -13,7 +13,6 @@ import java.util.List; */ public interface MemberStatisticsService { - // TODO 芋艿:已经 review /** * 获取会员统计(实时统计) * @@ -21,7 +20,6 @@ public interface MemberStatisticsService { */ MemberSummaryRespVO getMemberSummary(); - // TODO 芋艿:已经 review /** * 获取会员分析对照数据 * @@ -32,7 +30,6 @@ public interface MemberStatisticsService { DataComparisonRespVO getMemberAnalyseComparisonData(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 按照省份,获得会员统计列表 * @@ -40,7 +37,6 @@ public interface MemberStatisticsService { */ List getMemberAreaStatisticsList(); - // TODO 芋艿:已经 review /** * 按照性别,获得会员统计列表 * @@ -55,7 +51,6 @@ public interface MemberStatisticsService { */ List getMemberTerminalStatisticsList(); - // TODO 芋艿:已经 review /** * 获取用户注册数量列表 * @@ -65,7 +60,6 @@ public interface MemberStatisticsService { */ List getMemberRegisterCountList(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获得用户数量量统计对照 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsService.java index 4801ad186..d43a57682 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsService.java @@ -12,7 +12,6 @@ import java.time.LocalDateTime; */ public interface PayWalletStatisticsService { - // TODO 芋艿:已经 review /** * 获取钱包统计 * @@ -22,7 +21,6 @@ public interface PayWalletStatisticsService { */ WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取钱包充值统计 * @@ -32,7 +30,6 @@ public interface PayWalletStatisticsService { */ RechargeSummaryRespBO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取充值金额合计 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java index 3904387d6..f584c3dc7 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java @@ -12,7 +12,6 @@ import java.time.LocalDateTime; */ public interface AfterSaleStatisticsService { - // TODO 芋艿:已经 review /** * 获取售后单统计 * @@ -22,7 +21,6 @@ public interface AfterSaleStatisticsService { */ AfterSaleSummaryRespBO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取指定状态的售后订单数量 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java index 5f856778d..6845b608a 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java @@ -11,7 +11,6 @@ import java.time.LocalDateTime; */ public interface BrokerageStatisticsService { - // TODO 芋艿:已经 review /** * 获取已结算的佣金金额 * @@ -21,7 +20,6 @@ public interface BrokerageStatisticsService { */ Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取指定状态的提现记录数量 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java index 982957e24..2197515c4 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java @@ -24,7 +24,6 @@ public interface TradeOrderStatisticsService { */ TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取地区订单统计 * @@ -32,7 +31,6 @@ public interface TradeOrderStatisticsService { */ List getSummaryListByAreaId(); - // TODO 芋艿:已经 review /** * 获取下单用户数量 * @@ -42,7 +40,6 @@ public interface TradeOrderStatisticsService { */ Integer getOrderUserCount(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取支付用户数量 * @@ -52,7 +49,6 @@ public interface TradeOrderStatisticsService { */ Integer getPayUserCount(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review /** * 获取支付金额 * @@ -69,7 +65,6 @@ public interface TradeOrderStatisticsService { */ Long getCountByStatusAndDeliveryType(Integer status, Integer deliveryType); - // TODO 芋艿:已经 review /** * 交易订单销售额对照 * @@ -77,7 +72,6 @@ public interface TradeOrderStatisticsService { */ DataComparisonRespVO getOrderComparison(); - // TODO 芋艿:已经 review /** * 获得订单量趋势统计 * diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsService.java index 225bccf9f..e175985fb 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsService.java @@ -41,7 +41,6 @@ public interface TradeStatisticsService { */ List getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime); - // TODO 芋艿:已经 review; /** * 统计指定天数的交易数据 * @@ -49,7 +48,6 @@ public interface TradeStatisticsService { */ String statisticsTrade(Integer days); - // TODO 芋艿:已经 review /** * 统计指定日期的交易数据 * @@ -58,7 +56,6 @@ public interface TradeStatisticsService { */ TradeSummaryRespBO getTradeSummaryByDays(int days); - // TODO 芋艿:已经 review /** * 统计指定月份的交易数据 * diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 4ead0bba8..ff17b298d 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -88,11 +88,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-crm-biz + ${revision} +