From dc6551a581e06efb20d15a5e71d4d9b23ba26db7 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Tue, 29 Oct 2024 10:21:37 +0800 Subject: [PATCH] 10.29 --- .../src/views/convenienceStore/goodsSale.vue | 297 +++++++++++++++ .../views/convenienceStore/saleStatistic.vue | 345 ++++-------------- .../mapper/xml/SaleStatisticMapper.xml | 3 +- .../impl/SaleStatisticServiceImpl.java | 44 +-- .../convenienceSore/vo/SaleStatisticVo.java | 6 + 5 files changed, 401 insertions(+), 294 deletions(-) create mode 100644 fuintAdmin/src/views/convenienceStore/goodsSale.vue diff --git a/fuintAdmin/src/views/convenienceStore/goodsSale.vue b/fuintAdmin/src/views/convenienceStore/goodsSale.vue new file mode 100644 index 000000000..3d3d6d99c --- /dev/null +++ b/fuintAdmin/src/views/convenienceStore/goodsSale.vue @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + 至 + + + + + 搜索 + 重置 + 导出 + + + + + + + + + + + + + + + + + + + {{ beginTime ? parseTime(beginTime) + '~' : '--' }}{{ parseTime(endTime) || '' }} + + + + + 销售记录 + + + + + + + + + + + + 商品名称:{{goodsInfo.name || 0}} + 品类名称:{{goodsInfo.pinLeiName || 0}} + 销售总额:{{goodsInfo.saleTotal || 0}} + 统计周期:{{ beginTime ? parseTime(beginTime) + '~' : '--' }}{{ parseTime(endTime) || '' }} + + + + + + + + + + + + + + + {{ parseTime(scope.row.createTime) }} + + + + + + + + + + 导出文档已生成,请点击下载按钮进行下载 + + 取 消 + + 确 定 + + + + + + + + + + diff --git a/fuintAdmin/src/views/convenienceStore/saleStatistic.vue b/fuintAdmin/src/views/convenienceStore/saleStatistic.vue index 81eea1dfd..4c59fbd6a 100644 --- a/fuintAdmin/src/views/convenienceStore/saleStatistic.vue +++ b/fuintAdmin/src/views/convenienceStore/saleStatistic.vue @@ -1,291 +1,94 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 至 - - - - - 搜索 - 重置 - 导出 - - - - - - - - - - - - - - - - - 详细信息 - - - - - + + + {{item.name}} - - - - - - - - - - - - - - - - - {{ parseTime(scope.row.createTime) }} - - - - - - - - - 导出文档已生成,请点击下载按钮进行下载 - - 取 消 - - 确 定 - - - - + + + + - diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SaleStatisticMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SaleStatisticMapper.xml index 7adae0b2e..4577edeb3 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SaleStatisticMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SaleStatisticMapper.xml @@ -2,8 +2,9 @@ - select sa.*,mg.name,mg.goods_no,mg.pinyin_code,mg.unit from sale_statistic sa + select sa.*,mg.name,mg.goods_no,mg.pinyin_code,mg.unit,mg.goods_specs,cg.name pinLeiName from sale_statistic sa left join mt_goods mg on sa.goods_id = mg.id + left join cvs_goods cg on mg.cvs_good_id = cg.id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/SaleStatisticServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/SaleStatisticServiceImpl.java index 0ff249f80..8e8c84b8b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/SaleStatisticServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/SaleStatisticServiceImpl.java @@ -39,28 +39,28 @@ public class SaleStatisticServiceImpl extends ServiceImpl saleStatisticVoIPage = baseMapper.selectSaleList(page, saleStatisticVo); - for (SaleStatisticVo record : saleStatisticVoIPage.getRecords()) { - SaleDetailVo saleDetailVo = new SaleDetailVo(); - saleDetailVo.setSaleId(record.getId()); - saleDetailVo.setParams(saleStatisticVo.getParams()); - List saleDetailVos = saleDetailService.selectSaleDetails(saleDetailVo); - Integer saleNumber = 0; - Double saleTotal = 0.0; - Double costTotal = 0.0; - Double profitTotal = 0.0; - if (CollectionUtil.isNotEmpty(saleDetailVos)){ - for (SaleDetailVo detailVo : saleDetailVos) { - saleNumber += detailVo.getSaleNumber(); - saleTotal += detailVo.getSaleTotal(); - costTotal += detailVo.getCostTotal(); - profitTotal += detailVo.getProfitTotal(); - } - } - record.setSaleNumber(saleNumber); - record.setSaleTotal(saleTotal); - record.setCostTotal(costTotal); - record.setProfitTotal(profitTotal); - } +// for (SaleStatisticVo record : saleStatisticVoIPage.getRecords()) { +// SaleDetailVo saleDetailVo = new SaleDetailVo(); +// saleDetailVo.setSaleId(record.getId()); +// saleDetailVo.setParams(saleStatisticVo.getParams()); +// List saleDetailVos = saleDetailService.selectSaleDetails(saleDetailVo); +// Integer saleNumber = 0; +// Double saleTotal = 0.0; +// Double costTotal = 0.0; +// Double profitTotal = 0.0; +// if (CollectionUtil.isNotEmpty(saleDetailVos)){ +// for (SaleDetailVo detailVo : saleDetailVos) { +// saleNumber += detailVo.getSaleNumber(); +// saleTotal += detailVo.getSaleTotal(); +// costTotal += detailVo.getCostTotal(); +// profitTotal += detailVo.getProfitTotal(); +// } +// } +// record.setSaleNumber(saleNumber); +// record.setSaleTotal(saleTotal); +// record.setCostTotal(costTotal); +// record.setProfitTotal(profitTotal); +// } return saleStatisticVoIPage; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/SaleStatisticVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/SaleStatisticVo.java index de25cd116..29b059a72 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/SaleStatisticVo.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/SaleStatisticVo.java @@ -24,12 +24,18 @@ public class SaleStatisticVo extends BaseEntity { // 商品名称 @ExcelProperty(value = "商品名称") private String name; + // 品类名称 + @ExcelProperty(value = "品类名称") + private String pinLeiName; // 条码 @ExcelProperty(value = "条码") private String goodsNo; // 拼音码 @ExcelProperty(value = "拼音码") private String pinyinCode; + // 商品规格 + @ExcelProperty(value = "商品规格") + private String goodsSpecs; // 单位 @ExcelProperty(value = "单位") private String unit;