Commit 9ea7bde7512459564886870043216d5ccbb2f2c5
1 parent
63f322cb
📖 ERP:增加 ERP 首页的统计
Showing
41 changed files
with
464 additions
and
129 deletions
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java
| ... | ... | @@ -132,4 +132,40 @@ public class LocalDateTimeUtils { |
| 132 | 132 | return LocalDateTimeUtil.between(dateTime, LocalDateTime.now(), ChronoUnit.DAYS); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | + /** | |
| 136 | + * 获取今天的开始时间 | |
| 137 | + * | |
| 138 | + * @return 今天 | |
| 139 | + */ | |
| 140 | + public static LocalDateTime getToday() { | |
| 141 | + return LocalDateTimeUtil.beginOfDay(LocalDateTime.now()); | |
| 142 | + } | |
| 143 | + | |
| 144 | + /** | |
| 145 | + * 获取昨天的开始时间 | |
| 146 | + * | |
| 147 | + * @return 昨天 | |
| 148 | + */ | |
| 149 | + public static LocalDateTime getYesterday() { | |
| 150 | + return LocalDateTimeUtil.beginOfDay(LocalDateTime.now().minusDays(1)); | |
| 151 | + } | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 获取本月的开始时间 | |
| 155 | + * | |
| 156 | + * @return 本月 | |
| 157 | + */ | |
| 158 | + public static LocalDateTime getMonth() { | |
| 159 | + return beginOfMonth(LocalDateTime.now()); | |
| 160 | + } | |
| 161 | + | |
| 162 | + /** | |
| 163 | + * 获取本年的开始时间 | |
| 164 | + * | |
| 165 | + * @return 本年 | |
| 166 | + */ | |
| 167 | + public static LocalDateTime getYear() { | |
| 168 | + return LocalDateTime.now().with(TemporalAdjusters.firstDayOfYear()).with(LocalTime.MIN); | |
| 169 | + } | |
| 170 | + | |
| 135 | 171 | } | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.controller.admin.statistics; | |
| 2 | + | |
| 3 | +import cn.hutool.core.date.LocalDateTimeUtil; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; | |
| 6 | +import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase.ErpPurchaseSummaryRespVO; | |
| 7 | +import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase.ErpPurchaseTimeSummaryRespVO; | |
| 8 | +import cn.iocoder.yudao.module.erp.service.statistics.ErpPurchaseStatisticsService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import jakarta.annotation.Resource; | |
| 13 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 16 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 17 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 18 | +import org.springframework.web.bind.annotation.RestController; | |
| 19 | + | |
| 20 | +import java.time.LocalDateTime; | |
| 21 | +import java.util.ArrayList; | |
| 22 | +import java.util.List; | |
| 23 | + | |
| 24 | +import static cn.hutool.core.date.DatePattern.NORM_MONTH_PATTERN; | |
| 25 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 26 | + | |
| 27 | +@Tag(name = "管理后台 - ERP 采购统计") | |
| 28 | +@RestController | |
| 29 | +@RequestMapping("/erp/purchase-statistics") | |
| 30 | +@Validated | |
| 31 | +public class ErpPurchaseStatisticsController { | |
| 32 | + | |
| 33 | + @Resource | |
| 34 | + private ErpPurchaseStatisticsService purchaseStatisticsService; | |
| 35 | + | |
| 36 | + @GetMapping("/summary") | |
| 37 | + @Operation(summary = "获得采购统计") | |
| 38 | + @PreAuthorize("@ss.hasPermission('erp:statistics:query')") | |
| 39 | + public CommonResult<ErpPurchaseSummaryRespVO> getPurchaseSummary() { | |
| 40 | + LocalDateTime today = LocalDateTimeUtils.getToday(); | |
| 41 | + LocalDateTime yesterday = LocalDateTimeUtils.getYesterday(); | |
| 42 | + LocalDateTime month = LocalDateTimeUtils.getMonth(); | |
| 43 | + LocalDateTime year = LocalDateTimeUtils.getYear(); | |
| 44 | + ErpPurchaseSummaryRespVO summary = new ErpPurchaseSummaryRespVO() | |
| 45 | + .setTodayPrice(purchaseStatisticsService.getPurchasePrice(today, null)) | |
| 46 | + .setYesterdayPrice(purchaseStatisticsService.getPurchasePrice(yesterday, today)) | |
| 47 | + .setMonthPrice(purchaseStatisticsService.getPurchasePrice(month, null)) | |
| 48 | + .setYearPrice(purchaseStatisticsService.getPurchasePrice(year, null)); | |
| 49 | + return success(summary); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @GetMapping("/time-summary") | |
| 53 | + @Operation(summary = "获得采购时间段统计") | |
| 54 | + @Parameter(name = "count", description = "时间段数量", example = "6") | |
| 55 | + @PreAuthorize("@ss.hasPermission('erp:statistics:query')") | |
| 56 | + public CommonResult<List<ErpPurchaseTimeSummaryRespVO>> getPurchaseTimeSummary( | |
| 57 | + @RequestParam(value = "count", defaultValue = "6") Integer count) { | |
| 58 | + List<ErpPurchaseTimeSummaryRespVO> summaryList = new ArrayList<>(); | |
| 59 | + for (int i = count - 1; i >= 0; i--) { | |
| 60 | + LocalDateTime startTime = LocalDateTimeUtils.beginOfMonth(LocalDateTime.now().minusMonths(i)); | |
| 61 | + LocalDateTime endTime = LocalDateTimeUtils.endOfMonth(startTime); | |
| 62 | + summaryList.add(new ErpPurchaseTimeSummaryRespVO() | |
| 63 | + .setTime(LocalDateTimeUtil.format(startTime, NORM_MONTH_PATTERN)) | |
| 64 | + .setPrice(purchaseStatisticsService.getPurchasePrice(startTime, endTime))); | |
| 65 | + } | |
| 66 | + return success(summaryList); | |
| 67 | + } | |
| 68 | + | |
| 69 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.http
0 → 100644
| 1 | +### 请求 /erp/sale-statistics/summary 接口 => 成功 | |
| 2 | +GET {{baseUrl}}/erp/sale-statistics/summary | |
| 3 | +Content-Type: application/json | |
| 4 | +tenant-id: {{adminTenentId}} | |
| 5 | +Authorization: Bearer {{token}} | |
| 6 | + | |
| 7 | +### 请求 /erp/sale-statistics/time-summary 接口 => 成功 | |
| 8 | +GET {{baseUrl}}/erp/sale-statistics/time-summary | |
| 9 | +Content-Type: application/json | |
| 10 | +tenant-id: {{adminTenentId}} | |
| 11 | +Authorization: Bearer {{token}} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpSaleStatisticsController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.controller.admin.statistics; | |
| 2 | + | |
| 3 | +import cn.hutool.core.date.LocalDateTimeUtil; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; | |
| 6 | +import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale.ErpSaleSummaryRespVO; | |
| 7 | +import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale.ErpSaleTimeSummaryRespVO; | |
| 8 | +import cn.iocoder.yudao.module.erp.service.statistics.ErpSaleStatisticsService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import jakarta.annotation.Resource; | |
| 13 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 16 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 17 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 18 | +import org.springframework.web.bind.annotation.RestController; | |
| 19 | + | |
| 20 | +import java.time.LocalDateTime; | |
| 21 | +import java.util.ArrayList; | |
| 22 | +import java.util.List; | |
| 23 | + | |
| 24 | +import static cn.hutool.core.date.DatePattern.NORM_MONTH_PATTERN; | |
| 25 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 26 | + | |
| 27 | +@Tag(name = "管理后台 - ERP 销售统计") | |
| 28 | +@RestController | |
| 29 | +@RequestMapping("/erp/sale-statistics") | |
| 30 | +@Validated | |
| 31 | +public class ErpSaleStatisticsController { | |
| 32 | + | |
| 33 | + @Resource | |
| 34 | + private ErpSaleStatisticsService saleStatisticsService; | |
| 35 | + | |
| 36 | + @GetMapping("/summary") | |
| 37 | + @Operation(summary = "获得销售统计") | |
| 38 | + @PreAuthorize("@ss.hasPermission('erp:statistics:query')") | |
| 39 | + public CommonResult<ErpSaleSummaryRespVO> getSaleSummary() { | |
| 40 | + LocalDateTime today = LocalDateTimeUtils.getToday(); | |
| 41 | + LocalDateTime yesterday = LocalDateTimeUtils.getYesterday(); | |
| 42 | + LocalDateTime month = LocalDateTimeUtils.getMonth(); | |
| 43 | + LocalDateTime year = LocalDateTimeUtils.getYear(); | |
| 44 | + ErpSaleSummaryRespVO summary = new ErpSaleSummaryRespVO() | |
| 45 | + .setTodayPrice(saleStatisticsService.getSalePrice(today, null)) | |
| 46 | + .setYesterdayPrice(saleStatisticsService.getSalePrice(yesterday, today)) | |
| 47 | + .setMonthPrice(saleStatisticsService.getSalePrice(month, null)) | |
| 48 | + .setYearPrice(saleStatisticsService.getSalePrice(year, null)); | |
| 49 | + return success(summary); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @GetMapping("/time-summary") | |
| 53 | + @Operation(summary = "获得销售时间段统计") | |
| 54 | + @Parameter(name = "count", description = "时间段数量", example = "6") | |
| 55 | + @PreAuthorize("@ss.hasPermission('erp:statistics:query')") | |
| 56 | + public CommonResult<List<ErpSaleTimeSummaryRespVO>> getSaleTimeSummary( | |
| 57 | + @RequestParam(value = "count", defaultValue = "6") Integer count) { | |
| 58 | + List<ErpSaleTimeSummaryRespVO> summaryList = new ArrayList<>(); | |
| 59 | + for (int i = count - 1; i >= 0; i--) { | |
| 60 | + LocalDateTime startTime = LocalDateTimeUtils.beginOfMonth(LocalDateTime.now().minusMonths(i)); | |
| 61 | + LocalDateTime endTime = LocalDateTimeUtils.endOfMonth(startTime); | |
| 62 | + summaryList.add(new ErpSaleTimeSummaryRespVO() | |
| 63 | + .setTime(LocalDateTimeUtil.format(startTime, NORM_MONTH_PATTERN)) | |
| 64 | + .setPrice(saleStatisticsService.getSalePrice(startTime, endTime))); | |
| 65 | + } | |
| 66 | + return success(summaryList); | |
| 67 | + } | |
| 68 | + | |
| 69 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseSummaryRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - ERP 采购全局统计 Response VO") | |
| 9 | +@Data | |
| 10 | +public class ErpPurchaseSummaryRespVO { | |
| 11 | + | |
| 12 | + @Schema(description = "今日采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 13 | + private BigDecimal todayPrice; | |
| 14 | + | |
| 15 | + @Schema(description = "昨日采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "888") | |
| 16 | + private BigDecimal yesterdayPrice; | |
| 17 | + | |
| 18 | + @Schema(description = "本月采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 19 | + private BigDecimal monthPrice; | |
| 20 | + | |
| 21 | + @Schema(description = "今年采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "88888") | |
| 22 | + private BigDecimal yearPrice; | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/purchase/ErpPurchaseTimeSummaryRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - ERP 采购某个时间段的统计 Response VO") | |
| 9 | +@Data | |
| 10 | +public class ErpPurchaseTimeSummaryRespVO { | |
| 11 | + | |
| 12 | + @Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-03") | |
| 13 | + private String time; | |
| 14 | + | |
| 15 | + @Schema(description = "采购金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 16 | + private BigDecimal price; | |
| 17 | + | |
| 18 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleSummaryRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - ERP 销售全局统计 Response VO") | |
| 9 | +@Data | |
| 10 | +public class ErpSaleSummaryRespVO { | |
| 11 | + | |
| 12 | + @Schema(description = "今日销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 13 | + private BigDecimal todayPrice; | |
| 14 | + | |
| 15 | + @Schema(description = "昨日销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "888") | |
| 16 | + private BigDecimal yesterdayPrice; | |
| 17 | + | |
| 18 | + @Schema(description = "本月销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 19 | + private BigDecimal monthPrice; | |
| 20 | + | |
| 21 | + @Schema(description = "今年销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "88888") | |
| 22 | + private BigDecimal yearPrice; | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/vo/sale/ErpSaleTimeSummaryRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.sale; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - ERP 销售某个时间段的统计 Response VO") | |
| 9 | +@Data | |
| 10 | +public class ErpSaleTimeSummaryRespVO { | |
| 11 | + | |
| 12 | + @Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-03") | |
| 13 | + private String time; | |
| 14 | + | |
| 15 | + @Schema(description = "销售金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 16 | + private BigDecimal price; | |
| 17 | + | |
| 18 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpPurchaseStatisticsMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.dal.mysql.statistics; | |
| 2 | + | |
| 3 | +import org.apache.ibatis.annotations.Mapper; | |
| 4 | +import org.apache.ibatis.annotations.Param; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * ERP 采购统计 Mapper | |
| 11 | + * | |
| 12 | + * @author 芋道源码 | |
| 13 | + */ | |
| 14 | +@Mapper | |
| 15 | +public interface ErpPurchaseStatisticsMapper { | |
| 16 | + | |
| 17 | + BigDecimal getPurchasePrice(@Param("beginTime") LocalDateTime beginTime, | |
| 18 | + @Param("endTime") LocalDateTime endTime); | |
| 19 | + | |
| 20 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/statistics/ErpSaleStatisticsMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.dal.mysql.statistics; | |
| 2 | + | |
| 3 | +import org.apache.ibatis.annotations.Mapper; | |
| 4 | +import org.apache.ibatis.annotations.Param; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * ERP 销售统计 Mapper | |
| 11 | + * | |
| 12 | + * @author 芋道源码 | |
| 13 | + */ | |
| 14 | +@Mapper | |
| 15 | +public interface ErpSaleStatisticsMapper { | |
| 16 | + | |
| 17 | + BigDecimal getSalePrice(@Param("beginTime") LocalDateTime beginTime, | |
| 18 | + @Param("endTime") LocalDateTime endTime); | |
| 19 | + | |
| 20 | +} | ... | ... |
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 { |
| 164 | 164 | throw exception(approve ? PURCHASE_IN_APPROVE_FAIL : PURCHASE_IN_PROCESS_FAIL); |
| 165 | 165 | } |
| 166 | 166 | // 1.3 校验已付款 |
| 167 | - if (approve && purchaseIn.getPaymentPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 167 | + if (!approve && purchaseIn.getPaymentPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 168 | 168 | throw exception(PURCHASE_IN_PROCESS_FAIL_EXISTS_PAYMENT); |
| 169 | 169 | } |
| 170 | 170 | ... | ... |
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 { |
| 160 | 160 | throw exception(approve ? PURCHASE_RETURN_APPROVE_FAIL : PURCHASE_RETURN_PROCESS_FAIL); |
| 161 | 161 | } |
| 162 | 162 | // 1.3 校验已退款 |
| 163 | - if (approve && purchaseReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 163 | + if (!approve && purchaseReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 164 | 164 | throw exception(PURCHASE_RETURN_PROCESS_FAIL_EXISTS_REFUND); |
| 165 | 165 | } |
| 166 | 166 | ... | ... |
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 { |
| 172 | 172 | throw exception(approve ? SALE_OUT_APPROVE_FAIL : SALE_OUT_PROCESS_FAIL); |
| 173 | 173 | } |
| 174 | 174 | // 1.3 校验已退款 |
| 175 | - if (approve && saleOut.getReceiptPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 175 | + if (!approve && saleOut.getReceiptPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 176 | 176 | throw exception(SALE_OUT_PROCESS_FAIL_EXISTS_RECEIPT); |
| 177 | 177 | } |
| 178 | 178 | ... | ... |
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 { |
| 172 | 172 | throw exception(approve ? SALE_RETURN_APPROVE_FAIL : SALE_RETURN_PROCESS_FAIL); |
| 173 | 173 | } |
| 174 | 174 | // 1.3 校验已退款 |
| 175 | - if (approve && saleReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 175 | + if (!approve && saleReturn.getRefundPrice().compareTo(BigDecimal.ZERO) > 0) { | |
| 176 | 176 | throw exception(SALE_RETURN_PROCESS_FAIL_EXISTS_REFUND); |
| 177 | 177 | } |
| 178 | 178 | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.service.statistics; | |
| 2 | + | |
| 3 | +import java.math.BigDecimal; | |
| 4 | +import java.time.LocalDateTime; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * ERP 采购统计 Service 接口 | |
| 8 | + * | |
| 9 | + * @author 芋道源码 | |
| 10 | + */ | |
| 11 | +public interface ErpPurchaseStatisticsService { | |
| 12 | + | |
| 13 | + /** | |
| 14 | + * 获得采购金额 | |
| 15 | + * | |
| 16 | + * 计算逻辑:采购出库的金额 - 采购退货的金额 | |
| 17 | + * | |
| 18 | + * @param beginTime >= 开始时间 | |
| 19 | + * @param endTime < 结束时间 | |
| 20 | + * @return 采购金额 | |
| 21 | + */ | |
| 22 | + BigDecimal getPurchasePrice(LocalDateTime beginTime, LocalDateTime endTime); | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpPurchaseStatisticsServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.service.statistics; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.erp.dal.mysql.statistics.ErpPurchaseStatisticsMapper; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * ERP 采购统计 Service 实现类 | |
| 12 | + * | |
| 13 | + * @author 芋道源码 | |
| 14 | + */ | |
| 15 | +@Service | |
| 16 | +public class ErpPurchaseStatisticsServiceImpl implements ErpPurchaseStatisticsService { | |
| 17 | + | |
| 18 | + @Resource | |
| 19 | + private ErpPurchaseStatisticsMapper purchaseStatisticsMapper; | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public BigDecimal getPurchasePrice(LocalDateTime beginTime, LocalDateTime endTime) { | |
| 23 | + return purchaseStatisticsMapper.getPurchasePrice(beginTime, endTime); | |
| 24 | + } | |
| 25 | + | |
| 26 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.service.statistics; | |
| 2 | + | |
| 3 | +import java.math.BigDecimal; | |
| 4 | +import java.time.LocalDateTime; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * ERP 销售统计 Service 接口 | |
| 8 | + * | |
| 9 | + * @author 芋道源码 | |
| 10 | + */ | |
| 11 | +public interface ErpSaleStatisticsService { | |
| 12 | + | |
| 13 | + /** | |
| 14 | + * 获得销售金额 | |
| 15 | + * | |
| 16 | + * 计算逻辑:销售出库的金额 - 销售退货的金额 | |
| 17 | + * | |
| 18 | + * @param beginTime >= 开始时间 | |
| 19 | + * @param endTime < 结束时间 | |
| 20 | + * @return 销售金额 | |
| 21 | + */ | |
| 22 | + BigDecimal getSalePrice(LocalDateTime beginTime, LocalDateTime endTime); | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/statistics/ErpSaleStatisticsServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.erp.service.statistics; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.erp.dal.mysql.statistics.ErpSaleStatisticsMapper; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * ERP 销售统计 Service 实现类 | |
| 12 | + * | |
| 13 | + * @author 芋道源码 | |
| 14 | + */ | |
| 15 | +@Service | |
| 16 | +public class ErpSaleStatisticsServiceImpl implements ErpSaleStatisticsService { | |
| 17 | + | |
| 18 | + @Resource | |
| 19 | + private ErpSaleStatisticsMapper saleStatisticsMapper; | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public BigDecimal getSalePrice(LocalDateTime beginTime, LocalDateTime endTime) { | |
| 23 | + return saleStatisticsMapper.getSalePrice(beginTime, endTime); | |
| 24 | + } | |
| 25 | + | |
| 26 | +} | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/finance/ErpAccountMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | -<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.finance.ErpAccountMapper"> | |
| 4 | - | |
| 5 | - <!-- | |
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | - --> | |
| 11 | - | |
| 12 | -</mapper> | |
| 13 | 0 | \ No newline at end of file |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/product/ErpProductUnitMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | -<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.product.ErpProductUnitMapper"> | |
| 4 | - | |
| 5 | - <!-- | |
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | - --> | |
| 11 | - | |
| 12 | -</mapper> | |
| 13 | 0 | \ No newline at end of file |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/sale/ErpCustomerMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | -<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.sale.ErpCustomerMapper"> | |
| 4 | - | |
| 5 | - <!-- | |
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | - --> | |
| 11 | - | |
| 12 | -</mapper> | |
| 13 | 0 | \ No newline at end of file |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.statistics.ErpPurchaseStatisticsMapper"> | |
| 4 | + | |
| 5 | + <select id="getPurchasePrice" resultType="java.math.BigDecimal"> | |
| 6 | + SELECT | |
| 7 | + (SELECT IFNULL(SUM(total_price), 0) | |
| 8 | + FROM erp_purchase_in | |
| 9 | + WHERE in_time >= #{beginTime} | |
| 10 | + <if test="endTime != null"> | |
| 11 | + AND in_time < #{endTime} | |
| 12 | + </if> | |
| 13 | + AND deleted = 0) - | |
| 14 | + (SELECT IFNULL(SUM(total_price), 0) | |
| 15 | + FROM erp_purchase_return | |
| 16 | + WHERE return_time >= #{beginTime} | |
| 17 | + <if test="endTime != null"> | |
| 18 | + AND return_time < #{endTime} | |
| 19 | + </if> | |
| 20 | + AND deleted = 0) | |
| 21 | + </select> | |
| 22 | + | |
| 23 | +</mapper> | |
| 0 | 24 | \ No newline at end of file | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.statistics.ErpSaleStatisticsMapper"> | |
| 4 | + | |
| 5 | + <select id="getSalePrice" resultType="java.math.BigDecimal"> | |
| 6 | + SELECT | |
| 7 | + (SELECT IFNULL(SUM(total_price), 0) | |
| 8 | + FROM erp_sale_out | |
| 9 | + WHERE out_time >= #{beginTime} | |
| 10 | + <if test="endTime != null"> | |
| 11 | + AND out_time < #{endTime} | |
| 12 | + </if> | |
| 13 | + AND deleted = 0) - | |
| 14 | + (SELECT IFNULL(SUM(total_price), 0) | |
| 15 | + FROM erp_sale_return | |
| 16 | + WHERE return_time >= #{beginTime} | |
| 17 | + <if test="endTime != null"> | |
| 18 | + AND return_time < #{endTime} | |
| 19 | + </if> | |
| 20 | + AND deleted = 0) | |
| 21 | + </select> | |
| 22 | + | |
| 23 | +</mapper> | |
| 0 | 24 | \ No newline at end of file | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/stock/ErpWarehouseMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | -<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.stock.ErpWarehouseMapper"> | |
| 4 | - | |
| 5 | - <!-- | |
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | - --> | |
| 11 | - | |
| 12 | -</mapper> | |
| 13 | 0 | \ No newline at end of file |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/supplier/ErpSupplierMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | -<mapper namespace="cn.iocoder.yudao.module.erp.dal.mysql.purchase.ErpSupplierMapper"> | |
| 4 | - | |
| 5 | - <!-- | |
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | - --> | |
| 11 | - | |
| 12 | -</mapper> | |
| 13 | 0 | \ No newline at end of file |
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 { |
| 39 | 39 | @Resource |
| 40 | 40 | private ApiAccessLogStatisticsService apiAccessLogStatisticsService; |
| 41 | 41 | |
| 42 | - // TODO 芋艿:已经 review | |
| 43 | 42 | @GetMapping("/summary") |
| 44 | 43 | @Operation(summary = "获得会员统计(实时统计)") |
| 45 | 44 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| ... | ... | @@ -47,7 +46,6 @@ public class MemberStatisticsController { |
| 47 | 46 | return success(memberStatisticsService.getMemberSummary()); |
| 48 | 47 | } |
| 49 | 48 | |
| 50 | - // TODO 芋艿:已经 review | |
| 51 | 49 | @GetMapping("/analyse") |
| 52 | 50 | @Operation(summary = "获得会员分析数据") |
| 53 | 51 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| ... | ... | @@ -76,7 +74,6 @@ public class MemberStatisticsController { |
| 76 | 74 | return success(MemberStatisticsConvert.INSTANCE.convert(visitUserCount, orderUserCount, payUserCount, atv, comparisonData)); |
| 77 | 75 | } |
| 78 | 76 | |
| 79 | - // TODO 芋艿:已经 review | |
| 80 | 77 | @GetMapping("/area-statistics-list") |
| 81 | 78 | @Operation(summary = "按照省份,获得会员统计列表") |
| 82 | 79 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| ... | ... | @@ -84,7 +81,6 @@ public class MemberStatisticsController { |
| 84 | 81 | return success(memberStatisticsService.getMemberAreaStatisticsList()); |
| 85 | 82 | } |
| 86 | 83 | |
| 87 | - // TODO 芋艿:已经 review | |
| 88 | 84 | @GetMapping("/sex-statistics-list") |
| 89 | 85 | @Operation(summary = "按照性别,获得会员统计列表") |
| 90 | 86 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| ... | ... | @@ -92,7 +88,6 @@ public class MemberStatisticsController { |
| 92 | 88 | return success(memberStatisticsService.getMemberSexStatisticsList()); |
| 93 | 89 | } |
| 94 | 90 | |
| 95 | - // TODO 芋艿:已经 review | |
| 96 | 91 | @GetMapping("/terminal-statistics-list") |
| 97 | 92 | @Operation(summary = "按照终端,获得会员统计列表") |
| 98 | 93 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| ... | ... | @@ -100,7 +95,6 @@ public class MemberStatisticsController { |
| 100 | 95 | return success(memberStatisticsService.getMemberTerminalStatisticsList()); |
| 101 | 96 | } |
| 102 | 97 | |
| 103 | - // TODO 芋艿:已经 review | |
| 104 | 98 | // TODO @疯狂:要注意 date 的排序; |
| 105 | 99 | @GetMapping("/user-count-comparison") |
| 106 | 100 | @Operation(summary = "获得用户数量对照") |
| ... | ... | @@ -109,7 +103,6 @@ public class MemberStatisticsController { |
| 109 | 103 | return success(memberStatisticsService.getUserCountComparison()); |
| 110 | 104 | } |
| 111 | 105 | |
| 112 | - // TODO 芋艿:已经 review | |
| 113 | 106 | @GetMapping("/register-count-list") |
| 114 | 107 | @Operation(summary = "获得会员注册数量列表") |
| 115 | 108 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") | ... | ... |
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; |
| 16 | 16 | @SuppressWarnings("rawtypes") |
| 17 | 17 | public interface ApiAccessLogStatisticsMapper extends BaseMapperX { |
| 18 | 18 | |
| 19 | - // TODO 芋艿:已经 review | |
| 20 | 19 | Integer selectIpCountByUserTypeAndCreateTimeBetween(@Param("userType") Integer userType, |
| 21 | 20 | @Param("beginTime") LocalDateTime beginTime, |
| 22 | 21 | @Param("endTime") LocalDateTime endTime); |
| 23 | 22 | |
| 24 | - // TODO 芋艿:已经 review | |
| 25 | 23 | Integer selectUserCountByUserTypeAndCreateTimeBetween(@Param("userType") Integer userType, |
| 26 | 24 | @Param("beginTime") LocalDateTime beginTime, |
| 27 | 25 | @Param("endTime") LocalDateTime endTime); | ... | ... |
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; |
| 20 | 20 | @SuppressWarnings("rawtypes") |
| 21 | 21 | public interface MemberStatisticsMapper extends BaseMapperX { |
| 22 | 22 | |
| 23 | - // TODO @芋艿:已经 review | |
| 24 | 23 | List<MemberAreaStatisticsRespBO> selectSummaryListByAreaId(); |
| 25 | 24 | |
| 26 | - // TODO @芋艿:已经 review | |
| 27 | 25 | List<MemberSexStatisticsRespVO> selectSummaryListBySex(); |
| 28 | 26 | |
| 29 | - // TODO @芋艿:已经 review | |
| 30 | 27 | List<MemberTerminalStatisticsRespVO> selectSummaryListByRegisterTerminal(); |
| 31 | 28 | |
| 32 | - // TODO @芋艿:已经 review | |
| 33 | 29 | Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime, |
| 34 | 30 | @Param("endTime") LocalDateTime endTime); |
| 35 | 31 | |
| 36 | - // TODO @芋艿:已经 review | |
| 37 | 32 | /** |
| 38 | 33 | * 获得用户的每天注册数量列表 |
| 39 | 34 | * | ... | ... |
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; |
| 17 | 17 | @SuppressWarnings("rawtypes") |
| 18 | 18 | public interface PayWalletStatisticsMapper extends BaseMapperX { |
| 19 | 19 | |
| 20 | - // TODO 芋艿:已经 review; | |
| 21 | 20 | WalletSummaryRespBO selectRechargeSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 22 | 21 | @Param("endTime") LocalDateTime endTime, |
| 23 | 22 | @Param("payStatus") Boolean payStatus); |
| 24 | 23 | |
| 25 | - // TODO 芋艿:已经 review; | |
| 26 | 24 | WalletSummaryRespBO selectRechargeSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 27 | 25 | @Param("endTime") LocalDateTime endTime, |
| 28 | 26 | @Param("refundStatus") Integer refundStatus); |
| 29 | 27 | |
| 30 | - // TODO 芋艿:已经 review; | |
| 31 | 28 | Integer selectPriceSummaryByBizTypeAndCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 32 | 29 | @Param("endTime") LocalDateTime endTime, |
| 33 | 30 | @Param("bizType") Integer bizType); |
| 34 | 31 | |
| 35 | - // TODO 芋艿:已经 review; | |
| 36 | 32 | RechargeSummaryRespBO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime, |
| 37 | 33 | @Param("endTime") LocalDateTime endTime, |
| 38 | 34 | @Param("payStatus") Boolean payStatus); |
| 39 | 35 | |
| 40 | - // TODO 芋艿:已经 review; | |
| 41 | 36 | Integer selectRechargePriceSummary(@Param("payStatus") Integer payStatus); |
| 42 | 37 | |
| 43 | 38 | } | ... | ... |
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; |
| 16 | 16 | @Mapper |
| 17 | 17 | public interface AfterSaleStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 18 | 18 | |
| 19 | - // TODO 芋艿:已 review | |
| 20 | 19 | AfterSaleSummaryRespBO selectSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 21 | 20 | @Param("endTime") LocalDateTime endTime); |
| 22 | 21 | |
| 23 | - // TODO 芋艿:已经 review | |
| 24 | 22 | Long selectCountByStatus(@Param("status") Integer status); |
| 25 | 23 | |
| 26 | 24 | } | ... | ... |
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; |
| 15 | 15 | @Mapper |
| 16 | 16 | public interface BrokerageStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 17 | 17 | |
| 18 | - // TODO 芋艿:已经 review | |
| 19 | 18 | Integer selectSummaryPriceByStatusAndUnfreezeTimeBetween(@Param("bizType") Integer bizType, |
| 20 | 19 | @Param("status") Integer status, |
| 21 | 20 | @Param("beginTime") LocalDateTime beginTime, |
| 22 | 21 | @Param("endTime") LocalDateTime endTime); |
| 23 | 22 | |
| 24 | - // TODO 芋艿:已经 review | |
| 25 | 23 | Long selectWithdrawCountByStatus(@Param("status") Integer status); |
| 26 | 24 | |
| 27 | 25 | } | ... | ... |
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; |
| 19 | 19 | @Mapper |
| 20 | 20 | public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 21 | 21 | |
| 22 | - // TODO 芋艿:已经 review | |
| 23 | 22 | List<MemberAreaStatisticsRespBO> selectSummaryListByAreaId(); |
| 24 | 23 | |
| 25 | - // TODO 芋艿:已经 review | |
| 26 | 24 | Integer selectCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 27 | 25 | @Param("endTime") LocalDateTime endTime); |
| 28 | 26 | |
| 29 | - // TODO 芋艿:已经 review | |
| 30 | 27 | Integer selectCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 31 | 28 | @Param("endTime") LocalDateTime endTime); |
| 32 | 29 | |
| 33 | - // TODO 芋艿:已经 review | |
| 34 | 30 | Integer selectSummaryPriceByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 35 | 31 | @Param("endTime") LocalDateTime endTime); |
| 36 | 32 | |
| 37 | - // TODO 芋艿:已经 review | |
| 38 | 33 | Integer selectUserCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 39 | 34 | @Param("endTime") LocalDateTime endTime); |
| 40 | 35 | |
| 41 | - // TODO 芋艿:已经 review | |
| 42 | 36 | Integer selectUserCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 43 | 37 | @Param("endTime") LocalDateTime endTime); |
| 44 | 38 | |
| 45 | - // TODO 芋艿:已经 review | |
| 46 | 39 | /** |
| 47 | 40 | * 按照支付时间统计订单(按天分组) |
| 48 | 41 | * |
| ... | ... | @@ -53,7 +46,6 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsD |
| 53 | 46 | List<TradeOrderTrendRespVO> selectListByPayTimeBetweenAndGroupByDay(@Param("beginTime") LocalDateTime beginTime, |
| 54 | 47 | @Param("endTime") LocalDateTime endTime); |
| 55 | 48 | |
| 56 | - // TODO 芋艿:已经 review | |
| 57 | 49 | /** |
| 58 | 50 | * 按照支付时间统计订单(按月分组) |
| 59 | 51 | * |
| ... | ... | @@ -64,10 +56,8 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsD |
| 64 | 56 | List<TradeOrderTrendRespVO> selectListByPayTimeBetweenAndGroupByMonth(@Param("beginTime") LocalDateTime beginTime, |
| 65 | 57 | @Param("endTime") LocalDateTime endTime); |
| 66 | 58 | |
| 67 | - // TODO @芋艿:已经 review | |
| 68 | 59 | Long selectCountByStatusAndDeliveryType(@Param("status") Integer status, @Param("deliveryType") Integer deliveryType); |
| 69 | 60 | |
| 70 | - // TODO 芋艿:已经 review | |
| 71 | 61 | TradeOrderSummaryRespVO selectPaySummaryByStatusAndPayTimeBetween(@Param("status") Integer status, |
| 72 | 62 | @Param("beginTime") LocalDateTime beginTime, |
| 73 | 63 | @Param("endTime") LocalDateTime endTime); | ... | ... |
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<TradeStatisticsDO> { |
| 25 | 25 | TradeTrendSummaryRespVO selectVoByTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 26 | 26 | @Param("endTime") LocalDateTime endTime); |
| 27 | 27 | |
| 28 | - // TODO @芋艿:已经 review | |
| 29 | 28 | default List<TradeStatisticsDO> selectListByTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { |
| 30 | 29 | return selectList(new LambdaQueryWrapperX<TradeStatisticsDO>() |
| 31 | 30 | .between(TradeStatisticsDO::getTime, beginTime, endTime)); |
| 32 | 31 | } |
| 33 | 32 | |
| 34 | - // TODO @芋艿:已经 review | |
| 35 | 33 | Integer selectExpensePriceByTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 36 | 34 | @Param("endTime") LocalDateTime endTime); |
| 37 | 35 | |
| 38 | - // TODO @芋艿:已经 review | |
| 39 | 36 | default TradeStatisticsDO selectByTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { |
| 40 | 37 | return selectOne(new LambdaQueryWrapperX<TradeStatisticsDO>() |
| 41 | 38 | .between(TradeStatisticsDO::getTime, beginTime, endTime)); | ... | ... |
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; |
| 9 | 9 | */ |
| 10 | 10 | public interface ApiAccessLogStatisticsService { |
| 11 | 11 | |
| 12 | - // TODO 芋艿:已经 review | |
| 13 | 12 | /** |
| 14 | 13 | * 获取活跃用户数量 |
| 15 | 14 | * |
| ... | ... | @@ -20,7 +19,6 @@ public interface ApiAccessLogStatisticsService { |
| 20 | 19 | */ |
| 21 | 20 | Integer getUserCount(Integer userType, LocalDateTime beginTime, LocalDateTime endTime); |
| 22 | 21 | |
| 23 | - // TODO 芋艿:已经 review | |
| 24 | 22 | /** |
| 25 | 23 | * 获取访问用户数量 |
| 26 | 24 | * | ... | ... |
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; |
| 13 | 13 | */ |
| 14 | 14 | public interface MemberStatisticsService { |
| 15 | 15 | |
| 16 | - // TODO 芋艿:已经 review | |
| 17 | 16 | /** |
| 18 | 17 | * 获取会员统计(实时统计) |
| 19 | 18 | * |
| ... | ... | @@ -21,7 +20,6 @@ public interface MemberStatisticsService { |
| 21 | 20 | */ |
| 22 | 21 | MemberSummaryRespVO getMemberSummary(); |
| 23 | 22 | |
| 24 | - // TODO 芋艿:已经 review | |
| 25 | 23 | /** |
| 26 | 24 | * 获取会员分析对照数据 |
| 27 | 25 | * |
| ... | ... | @@ -32,7 +30,6 @@ public interface MemberStatisticsService { |
| 32 | 30 | DataComparisonRespVO<MemberAnalyseDataRespVO> getMemberAnalyseComparisonData(LocalDateTime beginTime, |
| 33 | 31 | LocalDateTime endTime); |
| 34 | 32 | |
| 35 | - // TODO 芋艿:已经 review | |
| 36 | 33 | /** |
| 37 | 34 | * 按照省份,获得会员统计列表 |
| 38 | 35 | * |
| ... | ... | @@ -40,7 +37,6 @@ public interface MemberStatisticsService { |
| 40 | 37 | */ |
| 41 | 38 | List<MemberAreaStatisticsRespVO> getMemberAreaStatisticsList(); |
| 42 | 39 | |
| 43 | - // TODO 芋艿:已经 review | |
| 44 | 40 | /** |
| 45 | 41 | * 按照性别,获得会员统计列表 |
| 46 | 42 | * |
| ... | ... | @@ -55,7 +51,6 @@ public interface MemberStatisticsService { |
| 55 | 51 | */ |
| 56 | 52 | List<MemberTerminalStatisticsRespVO> getMemberTerminalStatisticsList(); |
| 57 | 53 | |
| 58 | - // TODO 芋艿:已经 review | |
| 59 | 54 | /** |
| 60 | 55 | * 获取用户注册数量列表 |
| 61 | 56 | * |
| ... | ... | @@ -65,7 +60,6 @@ public interface MemberStatisticsService { |
| 65 | 60 | */ |
| 66 | 61 | List<MemberRegisterCountRespVO> getMemberRegisterCountList(LocalDateTime beginTime, LocalDateTime endTime); |
| 67 | 62 | |
| 68 | - // TODO 芋艿:已经 review | |
| 69 | 63 | /** |
| 70 | 64 | * 获得用户数量量统计对照 |
| 71 | 65 | * | ... | ... |
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; |
| 12 | 12 | */ |
| 13 | 13 | public interface PayWalletStatisticsService { |
| 14 | 14 | |
| 15 | - // TODO 芋艿:已经 review | |
| 16 | 15 | /** |
| 17 | 16 | * 获取钱包统计 |
| 18 | 17 | * |
| ... | ... | @@ -22,7 +21,6 @@ public interface PayWalletStatisticsService { |
| 22 | 21 | */ |
| 23 | 22 | WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 24 | 23 | |
| 25 | - // TODO 芋艿:已经 review | |
| 26 | 24 | /** |
| 27 | 25 | * 获取钱包充值统计 |
| 28 | 26 | * |
| ... | ... | @@ -32,7 +30,6 @@ public interface PayWalletStatisticsService { |
| 32 | 30 | */ |
| 33 | 31 | RechargeSummaryRespBO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 34 | 32 | |
| 35 | - // TODO 芋艿:已经 review | |
| 36 | 33 | /** |
| 37 | 34 | * 获取充值金额合计 |
| 38 | 35 | * | ... | ... |
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; |
| 12 | 12 | */ |
| 13 | 13 | public interface AfterSaleStatisticsService { |
| 14 | 14 | |
| 15 | - // TODO 芋艿:已经 review | |
| 16 | 15 | /** |
| 17 | 16 | * 获取售后单统计 |
| 18 | 17 | * |
| ... | ... | @@ -22,7 +21,6 @@ public interface AfterSaleStatisticsService { |
| 22 | 21 | */ |
| 23 | 22 | AfterSaleSummaryRespBO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 24 | 23 | |
| 25 | - // TODO 芋艿:已经 review | |
| 26 | 24 | /** |
| 27 | 25 | * 获取指定状态的售后订单数量 |
| 28 | 26 | * | ... | ... |
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; |
| 11 | 11 | */ |
| 12 | 12 | public interface BrokerageStatisticsService { |
| 13 | 13 | |
| 14 | - // TODO 芋艿:已经 review | |
| 15 | 14 | /** |
| 16 | 15 | * 获取已结算的佣金金额 |
| 17 | 16 | * |
| ... | ... | @@ -21,7 +20,6 @@ public interface BrokerageStatisticsService { |
| 21 | 20 | */ |
| 22 | 21 | Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 23 | 22 | |
| 24 | - // TODO 芋艿:已经 review | |
| 25 | 23 | /** |
| 26 | 24 | * 获取指定状态的提现记录数量 |
| 27 | 25 | * | ... | ... |
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 { |
| 24 | 24 | */ |
| 25 | 25 | TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 26 | 26 | |
| 27 | - // TODO 芋艿:已经 review | |
| 28 | 27 | /** |
| 29 | 28 | * 获取地区订单统计 |
| 30 | 29 | * |
| ... | ... | @@ -32,7 +31,6 @@ public interface TradeOrderStatisticsService { |
| 32 | 31 | */ |
| 33 | 32 | List<MemberAreaStatisticsRespBO> getSummaryListByAreaId(); |
| 34 | 33 | |
| 35 | - // TODO 芋艿:已经 review | |
| 36 | 34 | /** |
| 37 | 35 | * 获取下单用户数量 |
| 38 | 36 | * |
| ... | ... | @@ -42,7 +40,6 @@ public interface TradeOrderStatisticsService { |
| 42 | 40 | */ |
| 43 | 41 | Integer getOrderUserCount(LocalDateTime beginTime, LocalDateTime endTime); |
| 44 | 42 | |
| 45 | - // TODO 芋艿:已经 review | |
| 46 | 43 | /** |
| 47 | 44 | * 获取支付用户数量 |
| 48 | 45 | * |
| ... | ... | @@ -52,7 +49,6 @@ public interface TradeOrderStatisticsService { |
| 52 | 49 | */ |
| 53 | 50 | Integer getPayUserCount(LocalDateTime beginTime, LocalDateTime endTime); |
| 54 | 51 | |
| 55 | - // TODO 芋艿:已经 review | |
| 56 | 52 | /** |
| 57 | 53 | * 获取支付金额 |
| 58 | 54 | * |
| ... | ... | @@ -69,7 +65,6 @@ public interface TradeOrderStatisticsService { |
| 69 | 65 | */ |
| 70 | 66 | Long getCountByStatusAndDeliveryType(Integer status, Integer deliveryType); |
| 71 | 67 | |
| 72 | - // TODO 芋艿:已经 review | |
| 73 | 68 | /** |
| 74 | 69 | * 交易订单销售额对照 |
| 75 | 70 | * |
| ... | ... | @@ -77,7 +72,6 @@ public interface TradeOrderStatisticsService { |
| 77 | 72 | */ |
| 78 | 73 | DataComparisonRespVO<TradeOrderSummaryRespVO> getOrderComparison(); |
| 79 | 74 | |
| 80 | - // TODO 芋艿:已经 review | |
| 81 | 75 | /** |
| 82 | 76 | * 获得订单量趋势统计 |
| 83 | 77 | * | ... | ... |
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 { |
| 41 | 41 | */ |
| 42 | 42 | List<TradeStatisticsDO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime); |
| 43 | 43 | |
| 44 | - // TODO 芋艿:已经 review; | |
| 45 | 44 | /** |
| 46 | 45 | * 统计指定天数的交易数据 |
| 47 | 46 | * |
| ... | ... | @@ -49,7 +48,6 @@ public interface TradeStatisticsService { |
| 49 | 48 | */ |
| 50 | 49 | String statisticsTrade(Integer days); |
| 51 | 50 | |
| 52 | - // TODO 芋艿:已经 review | |
| 53 | 51 | /** |
| 54 | 52 | * 统计指定日期的交易数据 |
| 55 | 53 | * |
| ... | ... | @@ -58,7 +56,6 @@ public interface TradeStatisticsService { |
| 58 | 56 | */ |
| 59 | 57 | TradeSummaryRespBO getTradeSummaryByDays(int days); |
| 60 | 58 | |
| 61 | - // TODO 芋艿:已经 review | |
| 62 | 59 | /** |
| 63 | 60 | * 统计指定月份的交易数据 |
| 64 | 61 | * | ... | ... |
yudao-server/pom.xml
| ... | ... | @@ -88,11 +88,11 @@ |
| 88 | 88 | <!-- </dependency>--> |
| 89 | 89 | |
| 90 | 90 | <!-- CRM 相关模块。默认注释,保证编译速度 --> |
| 91 | -<!-- <dependency>--> | |
| 92 | -<!-- <groupId>cn.iocoder.boot</groupId>--> | |
| 93 | -<!-- <artifactId>yudao-module-crm-biz</artifactId>--> | |
| 94 | -<!-- <version>${revision}</version>--> | |
| 95 | -<!-- </dependency>--> | |
| 91 | + <dependency> | |
| 92 | + <groupId>cn.iocoder.boot</groupId> | |
| 93 | + <artifactId>yudao-module-crm-biz</artifactId> | |
| 94 | + <version>${revision}</version> | |
| 95 | + </dependency> | |
| 96 | 96 | |
| 97 | 97 | <!-- ERP 相关模块。默认注释,保证编译速度 --> |
| 98 | 98 | <dependency> | ... | ... |