From 35a9915bc17214d017b345f830cbb48b76f3a25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Fri, 28 Feb 2025 15:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=9F=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../k3cloud/constants/fileds/K3ProdField.java | 1 + .../com/ruoyi/common/mapper/CommonMapper.java | 8 ++++ .../com/ruoyi/common/mapper/CommonMapper.xml | 26 ++++++++++++ .../java/com/ruoyi/common/vo/FileNameVO.java | 15 +++++++ .../com/ruoyi/common/vo/IntegerIntegerVO.java | 13 ++++++ .../ruoyi/common/vo/LocalDateIntegerVO.java | 17 ++++++++ .../com/ruoyi/common/vo/LongDecimalVO.java | 18 ++++++++ .../com/ruoyi/common/vo/LongIntegerVO.java | 11 +++++ .../com/ruoyi/common/vo/StringIntegerVO.java | 12 ++++++ .../report/domain/sum/ReportProdSumVO.java | 18 ++++++++ .../report/domain/sum/ReportSumVO.java | 13 ++++++ .../domain/sum/ReportUserProdSumVO.java | 14 +++++++ .../service/ReportDashboardService.java | 19 +++++++++ .../service/ReportProdDashboardService.java | 18 ++++++++ .../ReportUserProdDashboardService.java | 18 ++++++++ .../domain/sum/ReportOrderProdSumVO.java | 17 ++++++++ .../ReportOrderProdDashboardService.java | 19 +++++++++ .../yh/dashboard/mapper/DashboardMapper.xml | 2 +- .../ruoyi/yh/prodOrder/domain/ProdOrder.java | 3 ++ .../yh/prodOrder/mapper/ProdOrderMapper.xml | 8 +++- .../service/impl/ProdOrderConverterImpl.java | 3 ++ .../service/impl/ProdOrderServiceImpl.java | 3 +- .../com/ruoyi/yh/report/domain/ReportVO.java | 3 ++ .../ruoyi/yh/report/mapper/ReportMapper.java | 8 ++++ .../ruoyi/yh/report/mapper/ReportMapper.xml | 21 +++++++++- .../yh/report/service/ReportAssembler.java | 7 ++++ .../service/impl/ReportAssemblerImpl.java | 22 ++++++++++ .../domain/ReportOrderProdVO.java | 19 +++++++++ .../mapper/ReportOrderProdMapper.java | 6 +++ .../mapper/ReportOrderProdMapper.xml | 36 +++++++++++++++- .../reportProd/mapper/ReportProdMapper.java | 12 ++++++ .../yh/reportProd/mapper/ReportProdMapper.xml | 41 +++++++++++++++++-- .../reportProd/service/ReportProdService.java | 8 ++++ .../service/impl/ReportProdServiceImpl.java | 6 +++ .../domain/ReportUserProdVO.java | 12 ++++++ .../mapper/ReportUserProdMapper.java | 6 +++ .../mapper/ReportUserProdMapper.xml | 27 +++++++++++- .../dashboard/DashboardReportController.java | 25 +++++++++++ .../DashboardReportOrderProdController.java | 25 +++++++++++ .../DashboardReportProdController.java | 25 +++++++++++ .../DashboardReportUserProdController.java | 25 +++++++++++ .../com/ruoyi/web/yh/ReportController.java | 4 +- .../main/resources/mybatis/mybatis-config.xml | 4 ++ 43 files changed, 604 insertions(+), 14 deletions(-) create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.xml create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/FileNameVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/IntegerIntegerVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LocalDateIntegerVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongDecimalVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongIntegerVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/StringIntegerVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportProdSumVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportSumVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportUserProdSumVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportDashboardService.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportProdDashboardService.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportUserProdDashboardService.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/domain/sum/ReportOrderProdSumVO.java create mode 100644 common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/service/ReportOrderProdDashboardService.java create mode 100644 ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportController.java create mode 100644 ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportOrderProdController.java create mode 100644 ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportProdController.java create mode 100644 ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportUserProdController.java diff --git a/common-ruoyi/ruoyi-common/src/main/java/com/ruoyi/common/k3cloud/constants/fileds/K3ProdField.java b/common-ruoyi/ruoyi-common/src/main/java/com/ruoyi/common/k3cloud/constants/fileds/K3ProdField.java index 6b3ad44..5216cf3 100644 --- a/common-ruoyi/ruoyi-common/src/main/java/com/ruoyi/common/k3cloud/constants/fileds/K3ProdField.java +++ b/common-ruoyi/ruoyi-common/src/main/java/com/ruoyi/common/k3cloud/constants/fileds/K3ProdField.java @@ -14,6 +14,7 @@ public class K3ProdField { public static final String F_DATE = "FDate"; // 单据日期 public static final String F_IS_REWORK = "FIsRework"; // 是否返工 public static final String F_MATERIAL_ID = "FMaterialId"; // 物料ID + public static final String FMTONO = "FMTONO"; // 计划跟踪号 public static final String F_ROW_ID = "FRowId"; // 明细.行标识 public static final String F_MEMO_ITEM = "FMemoItem"; // 明细.备注 public static final String F_CONVEY_DATE = "FConveyDate"; // 明细.下达日期 diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.java new file mode 100644 index 0000000..0ea7bd4 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.java @@ -0,0 +1,8 @@ +package com.ruoyi.common.mapper; + +/** + * @author wjh + * 2024/12/20 + */ +public interface CommonMapper { +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.xml new file mode 100644 index 0000000..458b8ef --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/mapper/CommonMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/FileNameVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/FileNameVO.java new file mode 100644 index 0000000..e4daf23 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/FileNameVO.java @@ -0,0 +1,15 @@ +package com.ruoyi.common.vo; + +import lombok.Data; + +/** + * 文件名VO + * 用于前端可改名称的文件展示 + */ +@Data +public class FileNameVO { + + private String name; // 文件名 + private String url; // 文件url + +} \ No newline at end of file diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/IntegerIntegerVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/IntegerIntegerVO.java new file mode 100644 index 0000000..7df5b51 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/IntegerIntegerVO.java @@ -0,0 +1,13 @@ +package com.ruoyi.common.vo; + +import lombok.Data; + +/** + * @author wjh + * 2025/2/7 + */ +@Data +public class IntegerIntegerVO { + private Integer key; + private Integer value; +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LocalDateIntegerVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LocalDateIntegerVO.java new file mode 100644 index 0000000..dc8e604 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LocalDateIntegerVO.java @@ -0,0 +1,17 @@ +package com.ruoyi.common.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDate; + +@Data +public class LocalDateIntegerVO { + + @ApiModelProperty("日期") + private LocalDate key; + + @ApiModelProperty("数量") + private Integer value; + +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongDecimalVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongDecimalVO.java new file mode 100644 index 0000000..09ce40b --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongDecimalVO.java @@ -0,0 +1,18 @@ +package com.ruoyi.common.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author wjh + * 2024/12/20 + */ +@Data +public class LongDecimalVO { + + private Long key; + + private BigDecimal value; + +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongIntegerVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongIntegerVO.java new file mode 100644 index 0000000..8ae911b --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/LongIntegerVO.java @@ -0,0 +1,11 @@ +package com.ruoyi.common.vo; + +import lombok.Data; + +@Data +public class LongIntegerVO { + + private Long key; + + private Integer value; +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/StringIntegerVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/StringIntegerVO.java new file mode 100644 index 0000000..dc36b11 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/common/vo/StringIntegerVO.java @@ -0,0 +1,12 @@ +package com.ruoyi.common.vo; + +import lombok.Data; + +@Data +public class StringIntegerVO { + + private String key; + + private Integer value; + +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportProdSumVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportProdSumVO.java new file mode 100644 index 0000000..0303bfc --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportProdSumVO.java @@ -0,0 +1,18 @@ +package com.ruoyi.dashboard.report.domain.sum; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class ReportProdSumVO { + /** + * 良品数量 + */ + private Integer num; + + /** + * 金额 + */ + private BigDecimal totalAmount; +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportSumVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportSumVO.java new file mode 100644 index 0000000..036ccaf --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportSumVO.java @@ -0,0 +1,13 @@ +package com.ruoyi.dashboard.report.domain.sum; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class ReportSumVO { + + @ApiModelProperty("总金额") + private BigDecimal totalAmount; +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportUserProdSumVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportUserProdSumVO.java new file mode 100644 index 0000000..2bef022 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/domain/sum/ReportUserProdSumVO.java @@ -0,0 +1,14 @@ +package com.ruoyi.dashboard.report.domain.sum; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class ReportUserProdSumVO { + /** 良品数量 */ + private Integer num; + + /** 金额 */ + private BigDecimal totalAmount; +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportDashboardService.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportDashboardService.java new file mode 100644 index 0000000..89d696c --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportDashboardService.java @@ -0,0 +1,19 @@ +package com.ruoyi.dashboard.report.service; + +import com.ruoyi.dashboard.report.domain.sum.ReportSumVO; +import com.ruoyi.yh.report.domain.ReportQuery; +import com.ruoyi.yh.report.mapper.ReportMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ReportDashboardService { + + @Autowired + private ReportMapper reportMapper; + + public ReportSumVO selectSum(ReportQuery query) { + return reportMapper.selectSum(query); + } + +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportProdDashboardService.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportProdDashboardService.java new file mode 100644 index 0000000..2f71a1e --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportProdDashboardService.java @@ -0,0 +1,18 @@ +package com.ruoyi.dashboard.report.service; + +import com.ruoyi.dashboard.report.domain.sum.ReportProdSumVO; +import com.ruoyi.yh.reportProd.domain.ReportProdQuery; +import com.ruoyi.yh.reportProd.mapper.ReportProdMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ReportProdDashboardService { + + @Autowired + private ReportProdMapper reportProdMapper; + + public ReportProdSumVO selectSum(ReportProdQuery query) { + return reportProdMapper.selectSum(query); + } +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportUserProdDashboardService.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportUserProdDashboardService.java new file mode 100644 index 0000000..e40e50f --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/report/service/ReportUserProdDashboardService.java @@ -0,0 +1,18 @@ +package com.ruoyi.dashboard.report.service; + +import com.ruoyi.dashboard.report.domain.sum.ReportUserProdSumVO; +import com.ruoyi.yh.reportUserProd.domain.ReportUserProdQuery; +import com.ruoyi.yh.reportUserProd.mapper.ReportUserProdMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ReportUserProdDashboardService { + + @Autowired + private ReportUserProdMapper reportUserProdMapper; + + public ReportUserProdSumVO selectSum(ReportUserProdQuery query) { + return reportUserProdMapper.selectSum(query); + } +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/domain/sum/ReportOrderProdSumVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/domain/sum/ReportOrderProdSumVO.java new file mode 100644 index 0000000..49bff50 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/domain/sum/ReportOrderProdSumVO.java @@ -0,0 +1,17 @@ +package com.ruoyi.dashboard.reportOrderProd.domain.sum; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 订单产量统计 + */ +@Data +public class ReportOrderProdSumVO { + + @ApiModelProperty("良品数") + private BigDecimal num; + +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/service/ReportOrderProdDashboardService.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/service/ReportOrderProdDashboardService.java new file mode 100644 index 0000000..8d3cf56 --- /dev/null +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/dashboard/reportOrderProd/service/ReportOrderProdDashboardService.java @@ -0,0 +1,19 @@ +package com.ruoyi.dashboard.reportOrderProd.service; + +import com.ruoyi.dashboard.reportOrderProd.domain.sum.ReportOrderProdSumVO; +import com.ruoyi.yh.reportOrderProd.domain.ReportOrderProdQuery; +import com.ruoyi.yh.reportOrderProd.mapper.ReportOrderProdMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ReportOrderProdDashboardService { + + @Autowired + private ReportOrderProdMapper reportOrderProdMapper; + + public ReportOrderProdSumVO selectSum(ReportOrderProdQuery query) { + return reportOrderProdMapper.selectSum(query); + } + +} diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/dashboard/mapper/DashboardMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/dashboard/mapper/DashboardMapper.xml index 38c39bd..e2e0c60 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/dashboard/mapper/DashboardMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/dashboard/mapper/DashboardMapper.xml @@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select sum(brup.num) as total_num, sum(brp.price_price * brup.num) as total_price - + from diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/domain/ProdOrder.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/domain/ProdOrder.java index c4d225f..31849e6 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/domain/ProdOrder.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/domain/ProdOrder.java @@ -143,4 +143,7 @@ public class ProdOrder extends BaseEntity @Excel(name = "基本单位") @ApiModelProperty("基本单位名称") private String baseUnitName; + + @ApiModelProperty("计划跟踪号") + private String erpMtoNo; } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/mapper/ProdOrderMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/mapper/ProdOrderMapper.xml index 340051c..f2a90ab 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/mapper/ProdOrderMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/mapper/ProdOrderMapper.xml @@ -45,6 +45,7 @@ bpo.material_graphics, bpo.unit_name, bpo.base_unit_name, + bpo.erp_mto_no, sd.dept_name as work_shop_name from bst_prod_order bpo left join sys_dept sd on sd.dept_id = bpo.dept_id @@ -67,7 +68,8 @@ and bpo.erp_req_src = #{query.erpReqSrc} and bpo.dept_id = #{query.deptId} and bpo.erp_material_id = #{query.erpMaterialId} - and erp_base_unit_id = #{query.erpBaseUnitId} + and bpo.erp_base_unit_id = #{query.erpBaseUnitId} + and bpo.erp_mto_no = #{query.erpMtoNo} and bpo.material_number like concat('%',#{query.materialNumber},'%') @@ -90,6 +92,7 @@ and ( bpo.erp_bill_no like concat('%',#{query.keyword},'%') or bpo.material_number like concat('%',#{query.keyword},'%') + or bpo.erp_mto_no like concat('%',#{query.keyword},'%') ) @@ -187,6 +190,7 @@ material_graphics, unit_name, base_unit_name, + erp_mto_no, #{erpId}, @@ -223,6 +227,7 @@ #{materialGraphics}, #{unitName}, #{baseUnitName}, + #{erpMtoNo}, @@ -275,6 +280,7 @@ material_graphics = #{data.materialGraphics}, unit_name = #{data.unitName}, base_unit_name = #{data.baseUnitName}, + erp_mto_no = #{data.erpMtoNo}, diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderConverterImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderConverterImpl.java index be322fa..3c61a92 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderConverterImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderConverterImpl.java @@ -132,6 +132,9 @@ public class ProdOrderConverterImpl implements ProdOrderConverter { case K3ProdField.F_BASE_NO_STOCK_IN_QTY: po.setErpBaseNoStockInQty(row.getBigDecimal(i)); break; + case K3ProdField.FMTONO: + po.setErpMtoNo(row.getString(i)); + break; default: break; } } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderServiceImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderServiceImpl.java index 0838f9e..2157599 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderServiceImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/prodOrder/service/impl/ProdOrderServiceImpl.java @@ -181,7 +181,8 @@ public class ProdOrderServiceImpl implements ProdOrderService K3ProdField.F_BASE_UNIT_ID, K3ProdField.F_MATERIAL_ID, K3ProdField.F_NO_STOCK_IN_QTY, - K3ProdField.F_BASE_NO_STOCK_IN_QTY + K3ProdField.F_BASE_NO_STOCK_IN_QTY, + K3ProdField.FMTONO ); int startRow = 0; int limit = 10000; diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/domain/ReportVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/domain/ReportVO.java index d22eaf8..2688d88 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/domain/ReportVO.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/domain/ReportVO.java @@ -25,6 +25,9 @@ public class ReportVO extends Report { @ApiModelProperty("部门ERP ID") private String deptErpId; + @ApiModelProperty("产量数量") + private Integer productCount; + @ApiModelProperty("产量明细") @Size(min = 1, message = "至少填写一个产量明细") @Valid diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.java index b102bc7..b33d647 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.java @@ -1,5 +1,6 @@ package com.ruoyi.yh.report.mapper; +import com.ruoyi.dashboard.report.domain.sum.ReportSumVO; import com.ruoyi.yh.report.domain.Report; import com.ruoyi.yh.report.domain.ReportQuery; import com.ruoyi.yh.report.domain.ReportVO; @@ -84,4 +85,11 @@ public interface ReportMapper * @return 报表总价 */ int calcTotalAmount(@Param("query") ReportQuery query); + + /** + * 查询报表统计 + * @param query 报表查询条件 + * @return 报表统计 + */ + ReportSumVO selectSum(@Param("query") ReportQuery query); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.xml index 82338ee..958a40e 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/mapper/ReportMapper.xml @@ -27,7 +27,11 @@ br.deleted, sd.dept_name as dept_name, sd.erp_id as dept_erp_id - from bst_report br + from + + + + bst_report br left join sys_dept sd on sd.dept_id = br.dept_id left join sys_user su on su.user_id = br.create_id @@ -206,5 +210,20 @@ + + + + + + + + diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/ReportAssembler.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/ReportAssembler.java index 52cb419..172ff9b 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/ReportAssembler.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/ReportAssembler.java @@ -19,4 +19,11 @@ public interface ReportAssembler { */ void assembleProductList(List list, boolean assembleUserProd, boolean assembleOrderProd); + /** + * 拼接产量数量 + * + * @param list 待拼接列表 + */ + void assembleProductCount(List list); + } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/impl/ReportAssemblerImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/impl/ReportAssemblerImpl.java index a5bf91d..c1d74c1 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/impl/ReportAssemblerImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/report/service/impl/ReportAssemblerImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.yh.report.service.impl; import com.ruoyi.common.utils.collection.CollectionUtils; +import com.ruoyi.common.vo.LongIntegerVO; import com.ruoyi.yh.report.domain.ReportVO; import com.ruoyi.yh.report.service.ReportAssembler; import com.ruoyi.yh.report.service.ReportService; @@ -66,4 +67,25 @@ public class ReportAssemblerImpl implements ReportAssembler { report.setProductList(productList); } } + + @Override + public void assembleProductCount(List list) { + if (CollectionUtils.isEmptyElement(list)) { + return; + } + // 查询产量数量并按报表分组 + ReportProdQuery query = new ReportProdQuery(); + query.setReportIds(CollectionUtils.map(list, ReportVO::getReportId)); + List prodList = reportProdService.selectCountGroupByReportId(query); + + for (ReportVO report : list) { + LongIntegerVO vo = prodList.stream().filter(p -> p.getKey().equals(report.getReportId())).findFirst().orElse(null); + if (vo != null && vo.getValue() != null) { + report.setProductCount(vo.getValue()); + } else { + report.setProductCount(0); + } + + } + } } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/domain/ReportOrderProdVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/domain/ReportOrderProdVO.java index 227de43..76251ed 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/domain/ReportOrderProdVO.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/domain/ReportOrderProdVO.java @@ -66,6 +66,9 @@ public class ReportOrderProdVO extends ReportOrderProd { @ApiModelProperty("订单已审核通过的基础产量") private BigDecimal verifiedBaseNum; + @ApiModelProperty("订单计划跟踪号") + private String orderErpMtoNo; + @ApiModelProperty("工序倍数分子") private BigDecimal priceQuantityNumerator; @@ -82,4 +85,20 @@ public class ReportOrderProdVO extends ReportOrderProd { @Excel(name = "单价(元)") @ApiModelProperty("工序单价") private BigDecimal pricePrice; + + @ApiModelProperty("车间") + private String reportDeptName; + + @ApiModelProperty("车间ID") + private Long reportDeptId; + + @ApiModelProperty("工序类别") + private String priceCategory; + + @ApiModelProperty("工序大小") + private String priceSize; + + @ApiModelProperty("工序图案") + private String pricePattern; + } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.java index 87d2e2f..1700d4d 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.java @@ -1,5 +1,6 @@ package com.ruoyi.yh.reportOrderProd.mapper; +import com.ruoyi.dashboard.reportOrderProd.domain.sum.ReportOrderProdSumVO; import com.ruoyi.yh.reportOrderProd.domain.ReportOrderProd; import com.ruoyi.yh.reportOrderProd.domain.ReportOrderProdQuery; import com.ruoyi.yh.reportOrderProd.domain.ReportOrderProdVO; @@ -85,4 +86,9 @@ public interface ReportOrderProdMapper List selectSumOfBaseNumGroupByOrderId(@Param("query") ReportOrderProdQuery query); int logicDelByReportId(Long reportId); + + /** + * 查询订单产量统计 + */ + ReportOrderProdSumVO selectSum(@Param("query") ReportOrderProdQuery query); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.xml index 2ffc540..8366ebb 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportOrderProd/mapper/ReportOrderProdMapper.xml @@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" brp.price_unit as price_unit, brp.price_name as price_name, brp.price_price as price_price, + brp.price_category as price_category, + brp.price_size as price_size, + brp.price_pattern as price_pattern, bpo.erp_bill_no as order_erp_bill_no, bpo.erp_qty as order_erp_qty, bpo.erp_no_stock_in_qty as order_erp_no_stock_in_qty, @@ -28,16 +31,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bpo.dept_id as order_dept_id, bpo.erp_status as order_erp_status, bpo.material_number as order_material_number, + bpo.erp_mto_no as order_erp_mto_no, bu.erp_name as unit_name, bu_b.erp_name as base_unit_name, br.report_date as report_date, - br.status as report_status - from bst_report_order_prod brop + br.status as report_status, + br.dept_id as report_dept_id, + sd.dept_name as report_dept_name + from + + + + bst_report_order_prod brop left join bst_report_prod brp on brp.id = brop.report_prod_id left join bst_report br on br.report_id = brp.report_id left join bst_prod_order bpo on bpo.id = brop.order_id left join bst_unit bu on bu.erp_id = bpo.erp_unit_id left join bst_unit bu_b on bu_b.erp_id = bpo.erp_base_unit_id + left join sys_dept sd on sd.dept_id = br.dept_id @@ -49,6 +60,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and brop.deleted = #{query.deleted} and br.status = #{query.reportStatus} and bpo.erp_bill_no like concat('%', #{query.orderErpBillNo}, '%') + and bpo.erp_mto_no like concat('%', #{query.orderErpMtoNo}, '%') + and br.dept_id = #{query.reportDeptId} + and brp.price_category = #{query.priceCategory} + and brp.price_size = #{query.priceSize} + and brp.price_pattern = #{query.pricePattern} and brop.report_prod_id in @@ -212,4 +228,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + + + + + + + + diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.java index 599584f..92b5dfe 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.java @@ -1,5 +1,7 @@ package com.ruoyi.yh.reportProd.mapper; +import com.ruoyi.common.vo.LongIntegerVO; +import com.ruoyi.dashboard.report.domain.sum.ReportProdSumVO; import com.ruoyi.yh.reportProd.domain.ReportProd; import com.ruoyi.yh.reportProd.domain.ReportProdQuery; import com.ruoyi.yh.reportProd.domain.ReportProdVO; @@ -98,4 +100,14 @@ public interface ReportProdMapper * 重置单价ID */ int resetPriceId(@Param("ids") List ids); + + /** + * 根据报表ID查询产量数量 + */ + List selectCountGroupByReportId(@Param("query") ReportProdQuery query); + + /** + * 查询报表产量统计 + */ + ReportProdSumVO selectSum(@Param("query") ReportProdQuery query); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.xml index fba4350..856c64d 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/mapper/ReportProdMapper.xml @@ -42,10 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sd.dept_name as dept_name, sd.dept_id as dept_id, br.report_date as report_date - from bst_report_prod brp - left join bst_report br on br.report_id = brp.report_id - left join bst_price bp on bp.price_id = brp.price_id - left join sys_dept sd on sd.dept_id = br.dept_id + from + + + + bst_report_prod brp + left join bst_report br on br.report_id = brp.report_id + left join bst_price bp on bp.price_id = brp.price_id + left join sys_dept sd on sd.dept_id = br.dept_id @@ -622,4 +626,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} + + + + + + + + + + + + diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/ReportProdService.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/ReportProdService.java index 6149e5c..cade86f 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/ReportProdService.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/ReportProdService.java @@ -1,5 +1,6 @@ package com.ruoyi.yh.reportProd.service; +import com.ruoyi.common.vo.LongIntegerVO; import com.ruoyi.yh.reportProd.domain.ReportProd; import com.ruoyi.yh.reportProd.domain.ReportProdQuery; import com.ruoyi.yh.reportProd.domain.ReportProdVO; @@ -110,4 +111,11 @@ public interface ReportProdService * 重置单价ID */ int resetPriceId(List ids); + + /** + * 根据报表ID查询产量数量 + * @param query + * @return + */ + List selectCountGroupByReportId(ReportProdQuery query); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/impl/ReportProdServiceImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/impl/ReportProdServiceImpl.java index 5fe8ccd..75276ff 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/impl/ReportProdServiceImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportProd/service/impl/ReportProdServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.yh.reportProd.service.impl; import com.ruoyi.common.utils.ServiceUtil; import com.ruoyi.common.utils.collection.CollectionUtils; +import com.ruoyi.common.vo.LongIntegerVO; import com.ruoyi.yh.price.domain.PriceQuery; import com.ruoyi.yh.price.domain.PriceVO; import com.ruoyi.yh.price.service.PriceService; @@ -254,4 +255,9 @@ public class ReportProdServiceImpl implements ReportProdService query.setIds(ids); return reportProdMapper.selectReportProdList(query); } + + @Override + public List selectCountGroupByReportId(ReportProdQuery query) { + return reportProdMapper.selectCountGroupByReportId(query); + } } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/domain/ReportUserProdVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/domain/ReportUserProdVO.java index 3599ffd..12ff395 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/domain/ReportUserProdVO.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/domain/ReportUserProdVO.java @@ -60,4 +60,16 @@ public class ReportUserProdVO extends ReportUserProd { @Excel(name = "工序代码") @ApiModelProperty("工序代码") private String priceCode; + + @Excel(name = "工序类别") + @ApiModelProperty("工序类别") + private String priceCategory; + + @Excel(name = "工序大小") + @ApiModelProperty("工序大小") + private String priceSize; + + @Excel(name = "工序图案") + @ApiModelProperty("工序图案") + private String pricePattern; } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.java index 05202dc..3ae9a54 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.java @@ -1,5 +1,6 @@ package com.ruoyi.yh.reportUserProd.mapper; +import com.ruoyi.dashboard.report.domain.sum.ReportUserProdSumVO; import com.ruoyi.yh.reportUserProd.domain.ReportUserProd; import com.ruoyi.yh.reportUserProd.domain.ReportUserProdQuery; import com.ruoyi.yh.reportUserProd.domain.ReportUserProdVO; @@ -91,4 +92,9 @@ public interface ReportUserProdMapper List selectListGroupByDate(@Param("query") ReportUserProdQuery query); int logicDelByReportId(Long reportId); + + /** + * 查询报表产量统计 + */ + ReportUserProdSumVO selectSum(@Param("query") ReportUserProdQuery query); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.xml index fd7e1cd..21e1e99 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/reportUserProd/mapper/ReportUserProdMapper.xml @@ -23,15 +23,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" brp.report_id as report_id, brp.price_price * brup.num as total_price, brp.price_code as price_code, + brp.price_category as price_category, + brp.price_size as price_size, + brp.price_pattern as price_pattern, br.report_date as report_date, br.status as report_status, br.dept_id as dept_id, sd.dept_name as dept_name - + from - from bst_report_user_prod brup + bst_report_user_prod brup left join sys_user su on su.user_id = brup.user_id left join bst_report_prod brp on brp.id = brup.prod_id left join bst_report br on br.report_id = brp.report_id @@ -55,6 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and brp.price_code like concat('%', #{query.priceCode}, '%') and su.user_no like concat('%', #{query.userNo}, '%') and br.status = #{query.reportStatus} + and brp.price_category like concat('%', #{query.priceCategory}, '%') + and brp.price_size like concat('%', #{query.priceSize}, '%') + and brp.price_pattern like concat('%', #{query.pricePattern}, '%') and br.dept_id = #{query.deptId} and brup.prod_id in @@ -255,4 +261,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + + + + + + + + diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportController.java b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportController.java new file mode 100644 index 0000000..531addf --- /dev/null +++ b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportController.java @@ -0,0 +1,25 @@ +package com.ruoyi.web.dashboard; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.dashboard.report.service.ReportDashboardService; +import com.ruoyi.yh.report.domain.ReportQuery; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/dashboard/report") +public class DashboardReportController extends BaseController { + + @Autowired + private ReportDashboardService reportDashboardService; + + @ApiOperation("报表统计") + @GetMapping("/sum") + public AjaxResult sum(ReportQuery query) { + return AjaxResult.success(reportDashboardService.selectSum(query)); + } +} diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportOrderProdController.java b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportOrderProdController.java new file mode 100644 index 0000000..945dcff --- /dev/null +++ b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportOrderProdController.java @@ -0,0 +1,25 @@ +package com.ruoyi.web.dashboard; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.dashboard.reportOrderProd.service.ReportOrderProdDashboardService; +import com.ruoyi.yh.reportOrderProd.domain.ReportOrderProdQuery; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/dashboard/reportOrderProd") +public class DashboardReportOrderProdController extends BaseController{ + + @Autowired + private ReportOrderProdDashboardService reportOrderProdDashboardService; + + @ApiOperation("订单产量统计") + @GetMapping("/sum") + public AjaxResult sum(ReportOrderProdQuery query) { + return AjaxResult.success(reportOrderProdDashboardService.selectSum(query)); + } +} diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportProdController.java b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportProdController.java new file mode 100644 index 0000000..b86f309 --- /dev/null +++ b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportProdController.java @@ -0,0 +1,25 @@ +package com.ruoyi.web.dashboard; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.dashboard.report.service.ReportProdDashboardService; +import com.ruoyi.yh.reportProd.domain.ReportProdQuery; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/dashboard/reportProd") +public class DashboardReportProdController extends BaseController { + + @Autowired + private ReportProdDashboardService reportProdDashboardService; + + @ApiOperation("产品报表统计") + @GetMapping("/sum") + public AjaxResult sum(ReportProdQuery query) { + return AjaxResult.success(reportProdDashboardService.selectSum(query)); + } +} diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportUserProdController.java b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportUserProdController.java new file mode 100644 index 0000000..2e4b30c --- /dev/null +++ b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardReportUserProdController.java @@ -0,0 +1,25 @@ +package com.ruoyi.web.dashboard; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.dashboard.report.service.ReportUserProdDashboardService; +import com.ruoyi.yh.reportUserProd.domain.ReportUserProdQuery; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/dashboard/reportUserProd") +public class DashboardReportUserProdController extends BaseController { + + @Autowired + private ReportUserProdDashboardService reportUserProdDashboardService; + + @ApiOperation("用户产品报表统计") + @GetMapping("/sum") + public AjaxResult sum(ReportUserProdQuery query) { + return AjaxResult.success(reportUserProdDashboardService.selectSum(query)); + } +} diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/yh/ReportController.java b/ruoyi-web/src/main/java/com/ruoyi/web/yh/ReportController.java index 756d526..8c2c6f1 100644 --- a/ruoyi-web/src/main/java/com/ruoyi/web/yh/ReportController.java +++ b/ruoyi-web/src/main/java/com/ruoyi/web/yh/ReportController.java @@ -58,6 +58,7 @@ public class ReportController extends BaseController startPage(); startOrderBy(); List list = reportService.selectReportList(query); + reportAssembler.assembleProductCount(list); return getDataTable(list); } @@ -102,8 +103,7 @@ public class ReportController extends BaseController @Log(title = LOG_TITLE, businessType = BusinessType.INSERT, bizType = LogBizType.REPORT, bizIdName = "arg0") @PostMapping public AjaxResult add(@RequestBody @Validated(ValidGroup.Create.class) ReportVO data, - @RequestParam(required = false, defaultValue = "true") Boolean submit) - { + @RequestParam(required = false, defaultValue = "true") Boolean submit){ ReportBO bo = reportConverter.toBoByCreate(data, submit); return toAjax(reportService.addReport(bo)); } diff --git a/ruoyi-web/src/main/resources/mybatis/mybatis-config.xml b/ruoyi-web/src/main/resources/mybatis/mybatis-config.xml index 87b8061..ed5a69c 100644 --- a/ruoyi-web/src/main/resources/mybatis/mybatis-config.xml +++ b/ruoyi-web/src/main/resources/mybatis/mybatis-config.xml @@ -17,4 +17,8 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN" + + + +