From 71e06407e2cc7d0a93ab5f6ee108b252c044ae53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Sat, 2 Nov 2024 13:50:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=B9=E7=AB=99=E8=B4=A2=E5=8A=A1=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E4=BA=A4=E6=98=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/api/allOrder.js | 18 +++ .../reconciliation/tab/favourable.vue | 1 - .../runningWater/tab/day.vue | 10 +- .../runningWater/tab/oilDepot.vue | 116 ++++++++++-------- .../controller/AllOrderInfoController.java | 22 ++++ .../order/dto/StatisticsOrderAllDto.java | 32 +++++ .../order/mapper/AllOrderInfoMapper.java | 6 + .../order/mapper/xml/AllOrderInfoMapper.xml | 111 +++++++++++++++++ .../order/service/AllOrderInfoService.java | 5 + .../service/impl/AllOrderInfoServiceImpl.java | 18 +++ 10 files changed, 285 insertions(+), 54 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/dto/StatisticsOrderAllDto.java diff --git a/fuintAdmin/src/api/allOrder.js b/fuintAdmin/src/api/allOrder.js index abcfa2410..577d09148 100644 --- a/fuintAdmin/src/api/allOrder.js +++ b/fuintAdmin/src/api/allOrder.js @@ -268,3 +268,21 @@ export function getTissueByDataNewsApi(query) { }) } + +export function getInstituionListApi2(query) { + return request({ + url: 'business/allOrderInfo/getInstituionListApi2', + method: 'get', + params: query + + }) +} + +export function getInstituionListApi6(query) { + return request({ + url: 'business/allOrderInfo/getInstituionListApi3', + method: 'get', + params: query + + }) +} diff --git a/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue b/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue index 2b0ad6974..b537981f9 100644 --- a/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue +++ b/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue @@ -396,7 +396,6 @@ export default { // 获取列表信息 async getList(val){ - getTradingNewPageApi(this.queryParams).then( response => { this.orderList = response.data.records; this.total = response.data.total; diff --git a/fuintAdmin/src/views/financialStatement/runningWater/tab/day.vue b/fuintAdmin/src/views/financialStatement/runningWater/tab/day.vue index 858998a9a..99004b600 100644 --- a/fuintAdmin/src/views/financialStatement/runningWater/tab/day.vue +++ b/fuintAdmin/src/views/financialStatement/runningWater/tab/day.vue @@ -54,7 +54,7 @@
- +
0/0
@@ -64,7 +64,7 @@
- +
{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0
@@ -74,7 +74,7 @@
- +
{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0
@@ -84,7 +84,7 @@
- +
{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0
@@ -94,7 +94,7 @@
- +
{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0
diff --git a/fuintAdmin/src/views/financialStatement/runningWater/tab/oilDepot.vue b/fuintAdmin/src/views/financialStatement/runningWater/tab/oilDepot.vue index c0c77d2dd..7cd348561 100644 --- a/fuintAdmin/src/views/financialStatement/runningWater/tab/oilDepot.vue +++ b/fuintAdmin/src/views/financialStatement/runningWater/tab/oilDepot.vue @@ -6,7 +6,7 @@
-
0/0
+
+ {{orderNewStatisticstow.orderMoney?orderNewStatisticstow.orderMoney:0}}/ + {{orderNewStatisticstow.orderNum?orderNewStatisticstow.orderNum:0}}
@@ -35,7 +37,8 @@
-
0
+
+ {{orderNewStatisticstow.trueMoney?orderNewStatisticstow.trueMoney:0}}
@@ -44,7 +47,8 @@
-
0/0
+
{{orderNewStatisticstow.backOrderMoney?orderNewStatisticstow.backOrderMoney:0}}/ + {{orderNewStatisticstow.backOrderNum?orderNewStatisticstow.backOrderNum:0}}
@@ -54,7 +58,7 @@
-
{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}
+
{{orderNewStatisticstow.dayaverageOrderMoney?orderNewStatisticstow.dayaverageOrderMoney:0}}
@@ -66,40 +70,26 @@
- - - - - + + + + + + + + + - - - - - - - - - - - + + - {{this.beginTime }} 至 {{this.endTime}} - - -
@@ -125,9 +115,10 @@ import { getRunningWaterByDataApi, exportExcelOilDeptApi, getmyDataApi, - getInstituionListApi2 + getInstituionListApi2, + getInstituionListApi6 } from "@/api/allOrder"; - +import {getInstituionListApi3} from "../../../../api/allOrder"; export default { name: "runningWater-oilDepot", data(){ @@ -136,7 +127,7 @@ import { // 员工列表 staffList:[], // 日期范围 - dateRange: [], + dataRange: [], beginTime:"", endTime:"", // 是否为当天时间 @@ -150,7 +141,7 @@ import { beginTime:"", endTime:"", deptType:"3", - + dataRange: [], }, orderStatistics:{ numberOfStrokes:'0', @@ -160,6 +151,30 @@ import { theTotalAmountOfOil:'0', theTotalAmountOfTheItem:'0', }, + + orderNewStatistics:{ + orderType:'', + orderMoney:"0", + trueMoney:"0", + orderNum:"0", + oneOrderMoney:"0", + dayaverageOrderMoney:"0", + dayaverageOrderNum:"0", + backOrderMoney:"0", + backOrderNum:"0", + }, + + orderNewStatisticstow:{ + orderType:'', + orderMoney:"0", + trueMoney:"0", + orderNum:"0", + oneOrderMoney:"0", + dayaverageOrderMoney:"0", + dayaverageOrderNum:"0", + backOrderMoney:"0", + backOrderNum:"0", + }, total:0, timeDifference:1, } @@ -170,17 +185,14 @@ import { start.setMinutes(0) start.setSeconds(0) start.setMilliseconds(0) - this.dateRange = [start,new Date()]; - this.beginTime = start - this.endTime = new Date() - - this.timeDifferenceMilliseconds = this.endTime - this.beginTime; - this.timeDifference = timeDifferenceMilliseconds / (1000 * 60 * 60 * 24); - - console.log("timeDifference",this.timeDifference) + let year = start.getFullYear(); // 获取年份 + let month = String(start.getMonth() + 1).padStart(2, '0'); // 获取月份,月份从0开始所以要+1 + let date = String(start.getDate()).padStart(2, '0'); // 获取日期 + this.queryParams.dataRange = [ year+'-'+month+'-'+date, year+'-'+month+'-'+date]; this.isSysDate = true await this.getDeptList(); this.getList(); + this.getStatisticsAll() }, methods:{ @@ -220,20 +232,28 @@ import { }, // 获取列表信息 - getList(val){ - getInstituionListApi2(this.queryParams).then( response => { - this.orderList = response.data.records; - this.total = response.data.total; + getList(val){ + getInstituionListApi2(this.queryParams).then( response => { + this.orderNewStatistics = response.data + console.log(this.orderNewStatistics.orderMoney) this.isSysDate = false }) //this.getOrderStatistics() }, - + // 获取列表信息 + getStatisticsAll(val){ + getInstituionListApi6(this.queryParams).then( response => { + this.orderNewStatisticstow = response.data + console.log(this.orderNewStatisticstow.orderMoney) + }) + //this.getOrderStatistics() + }, // 搜索按钮操作 async handleQuery() { this.queryParams.page = 1; await this.getDeptList(); this.getList(); + this.getStatisticsAll(); }, // 重置按钮操作 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java index 757e43014..2d496ea01 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.integral.entity.IntegralDetail; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.dto.AllOrderInfoRes; +import com.fuint.business.order.dto.StatisticsOrderAllDto; import com.fuint.business.order.entity.AllOrderInfo; import com.fuint.business.order.entity.CardBalanceChange; import com.fuint.business.order.entity.CashierOrder; @@ -483,4 +484,25 @@ public class AllOrderInfoController extends BaseController { AllOrderInfoVo list = allOrderInfoService.getTradingNewData(allOrderInfo); return getSuccessResult(list); } + + /** + * 订单流水分析 + * @param allOrderInfoRes + * @return + */ + @GetMapping("/getInstituionListApi2") + public ResponseObject getInstituionListApi2(AllOrderInfoRes allOrderInfoRes){ + List map = allOrderInfoService.getInstituionListApi2(allOrderInfoRes); + return getSuccessResult(map); + } + /** + * 订单流水分析 + * @param allOrderInfoRes + * @return + */ + @GetMapping("/getInstituionListApi3") + public ResponseObject getInstituionListApi3(AllOrderInfoRes allOrderInfoRes){ + StatisticsOrderAllDto map = allOrderInfoService.getInstituionListApi3(allOrderInfoRes); + return getSuccessResult(map); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/dto/StatisticsOrderAllDto.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/dto/StatisticsOrderAllDto.java new file mode 100644 index 000000000..39a4e0584 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/dto/StatisticsOrderAllDto.java @@ -0,0 +1,32 @@ +package com.fuint.business.order.dto; + + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class StatisticsOrderAllDto implements Serializable { + private static final long serialVersionUID = 1L; + //订单类型 + private String orderType; + //订单金额 + private String orderMoney; + //实收金额 + private String trueMoney; + //订单数量 + private String orderNum; + //订单单价 + private String oneOrderMoney; + //日均订单金额 + private String dayaverageOrderMoney; + //日均订单数 + private String dayaverageOrderNum; + //退款金额 + private String backOrderMoney; + //退款订单数 + private String backOrderNum; + //计算周期 + private String leaderName; +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/AllOrderInfoMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/AllOrderInfoMapper.java index b8e00a2f7..97aa22672 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/AllOrderInfoMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/AllOrderInfoMapper.java @@ -8,6 +8,7 @@ import com.fuint.business.marketingActivity.cardValueRule.dto.CardValueOrdersDTO import com.fuint.business.marketingActivity.cardValueRule.vo.CardValueOrdersVo; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.dto.AllOrderInfoRes; +import com.fuint.business.order.dto.StatisticsOrderAllDto; import com.fuint.business.order.entity.AllOrderInfo; import com.fuint.business.order.entity.CardBalanceChange; import com.fuint.business.order.entity.HandoverRecord; @@ -132,4 +133,9 @@ public interface AllOrderInfoMapper extends BaseMapper { AllOrderInfoVo getTradingNewData(@Param("obj") AllOrderInfoDto allOrderInfo, @Param("beginTime") String beginTime,@Param("endTime") String endTime); + List getInstituionListApi2(@Param("obj") AllOrderInfoRes allOrderInfoRes, + @Param("beginTime") String beginTime, @Param("endTime") String endTime); + + StatisticsOrderAllDto getInstituionListApi3(@Param("obj") AllOrderInfoRes allOrderInfoRes, + @Param("beginTime") String beginTime, @Param("endTime") String endTime); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml index 13f1f5c25..53428ed71 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml @@ -1380,4 +1380,115 @@ + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java index b28292061..7c5c9e553 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.dto.AllOrderInfoRes; +import com.fuint.business.order.dto.StatisticsOrderAllDto; import com.fuint.business.order.entity.AllOrderInfo; import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.HandoverRecord; @@ -212,4 +213,8 @@ AllOrderActivityVo getOneByOrderId(Integer orderId); IPage tradingNewList(Page page, AllOrderInfoDto allOrderInfo); AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo); + + List getInstituionListApi2(AllOrderInfoRes allOrderInfoRes); + + StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java index d815f9fa5..ac9ded358 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java @@ -37,6 +37,7 @@ import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.dto.AllOrderInfoRes; +import com.fuint.business.order.dto.StatisticsOrderAllDto; import com.fuint.business.order.entity.*; import com.fuint.business.order.mapper.AllOrderInfoMapper; import com.fuint.business.order.mapper.CardBalanceChangeMapper; @@ -2619,4 +2620,21 @@ public class AllOrderInfoServiceImpl extends ServiceImpl getInstituionListApi2(AllOrderInfoRes allOrderInfoRes) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId()); + return allOrderInfoMapper.getInstituionListApi2(allOrderInfoRes, + allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0], + allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]); + } + @Override + public StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId()); + return allOrderInfoMapper.getInstituionListApi3(allOrderInfoRes, + allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0], + allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]); + } }