油站财务报表,交易
This commit is contained in:
parent
4d5d426b4d
commit
71e06407e2
@ -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
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -396,7 +396,6 @@ export default {
|
|||||||
|
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
async getList(val){
|
async getList(val){
|
||||||
|
|
||||||
getTradingNewPageApi(this.queryParams).then( response => {
|
getTradingNewPageApi(this.queryParams).then( response => {
|
||||||
this.orderList = response.data.records;
|
this.orderList = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="退款总金额(元)" placement="top-start">
|
||||||
<div class="size-bole" style="color:#F44522;" >0/0</div>
|
<div class="size-bole" style="color:#F44522;" >0/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="挂账总金额/归还总金额" placement="top-start">
|
||||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -74,7 +74,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
|
||||||
<div class="size-bole" style="color:#0D2ED8;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#0D2ED8;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="充值总金额/会员消费总金额" placement="top-start">
|
||||||
<div class="size-bole" style="color:#790DD8;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#790DD8;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -94,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="新增会员数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#D80D54;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#D80D54;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div style="display: flex;align-items: center ">
|
<div style="display: flex;align-items: center ">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="this.dateRange"
|
v-model="queryParams.dataRange"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
@ -26,7 +26,9 @@
|
|||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="订单总金额(元)/笔数" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="订单总金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole">0/0</div>
|
<div class="size-bole">
|
||||||
|
{{orderNewStatisticstow.orderMoney?orderNewStatisticstow.orderMoney:0}}/
|
||||||
|
{{orderNewStatisticstow.orderNum?orderNewStatisticstow.orderNum:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #0DC291"></div>
|
<div class="dian" style="background: #0DC291"></div>
|
||||||
@ -35,7 +37,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
|
||||||
<div class="size-bole" style="color:#00CAFF;">0</div>
|
<div class="size-bole" style="color:#00CAFF;">
|
||||||
|
{{orderNewStatisticstow.trueMoney?orderNewStatisticstow.trueMoney:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #00CAFF"></div>
|
<div class="dian" style="background: #00CAFF"></div>
|
||||||
@ -44,7 +47,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="退款总金额(元)/笔数" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="退款总金额(元)/笔数" placement="top-start">
|
||||||
<div class="size-bole" style="color:#F44522;" >0/0</div>
|
<div class="size-bole" style="color:#F44522;" >{{orderNewStatisticstow.backOrderMoney?orderNewStatisticstow.backOrderMoney:0}}/
|
||||||
|
{{orderNewStatisticstow.backOrderNum?orderNewStatisticstow.backOrderNum:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -54,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-tooltip class="item" effect="dark" content="日均订单金额(元)" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="日均订单金额(元)" placement="top-start">
|
||||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}</div>
|
<div class="size-bole" style="color:#FF7E00;" >{{orderNewStatisticstow.dayaverageOrderMoney?orderNewStatisticstow.dayaverageOrderMoney:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
<div class="dian" style="background: #FF7E00"></div>
|
<div class="dian" style="background: #FF7E00"></div>
|
||||||
@ -66,40 +70,26 @@
|
|||||||
|
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table
|
<el-table
|
||||||
:data="orderList"
|
:data="orderNewStatistics"
|
||||||
border
|
border
|
||||||
style="width: 100%;margin-top: 15px">
|
style="width: 100%;margin-top: 15px">
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<!-- <el-table-column prop="deptId" align="center" label="门店编号"> </el-table-column>-->
|
<!-- <el-table-column prop="deptId" align="center" label="门店编号"> </el-table-column>-->
|
||||||
<el-table-column prop="content" align="center" label="订单分类"> </el-table-column>
|
<el-table-column prop="orderType" align="center" label="订单分类"> </el-table-column>
|
||||||
<el-table-column prop="goodsMoney" align="center" label="订单金额"> </el-table-column>
|
<el-table-column prop="orderMoney" align="center" label="订单金额"> </el-table-column>
|
||||||
<el-table-column prop="payMoney" align="center" label="实收金额"> </el-table-column>
|
<el-table-column prop="trueMoney" align="center" label="实收金额"> </el-table-column>
|
||||||
<el-table-column prop="count" align="center" label="订单笔数"> </el-table-column>
|
<el-table-column prop="orderNum" align="center" label="订单笔数"> </el-table-column>
|
||||||
<el-table-column prop="unitPrice" align="center" label="笔单价">
|
<el-table-column prop="oneOrderMoney" align="center" label="笔单价">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dayaverageOrderMoney" align="center" label="日均交易金额">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dayaverageOrderNum" align="center" label="日订单笔数">
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ (scope.row.payMoney/scope.row.count).toFixed(2) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="dailyAmount" align="center" label="日均交易金额">
|
<el-table-column prop="backOrderMoney" align="center" label="退款金额"> </el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="backOrderNum" align="center" label="退款笔数"> </el-table-column>
|
||||||
{{ (scope.row.payMoney / timeDifference).toFixed(2) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="strokesPerDay" align="center" label="日订单笔数">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ (scope.row.count / timeDifference).toFixed(2) }} </template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column prop="parentStoreId" align="center" label="机构编号"> </el-table-column>-->
|
|
||||||
<el-table-column prop="parentStoreName" align="center" label="退款金额"> </el-table-column>
|
|
||||||
<el-table-column prop="leaderName" align="center" label="退款笔数"> </el-table-column>
|
|
||||||
<el-table-column prop="leaderName" align="center" label="统计周期">
|
<el-table-column prop="leaderName" align="center" label="统计周期">
|
||||||
{{this.beginTime }} 至 {{this.endTime}}
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="seekZero" align="center" label="品牌编号"> </el-table-column>-->
|
|
||||||
<!-- <el-table-column prop="seekZero" align="center" label="品牌名称"> </el-table-column>-->
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-box">
|
<div class="pagination-box">
|
||||||
@ -125,9 +115,10 @@ import {
|
|||||||
getRunningWaterByDataApi,
|
getRunningWaterByDataApi,
|
||||||
exportExcelOilDeptApi,
|
exportExcelOilDeptApi,
|
||||||
getmyDataApi,
|
getmyDataApi,
|
||||||
getInstituionListApi2
|
getInstituionListApi2,
|
||||||
|
getInstituionListApi6
|
||||||
} from "@/api/allOrder";
|
} from "@/api/allOrder";
|
||||||
|
import {getInstituionListApi3} from "../../../../api/allOrder";
|
||||||
export default {
|
export default {
|
||||||
name: "runningWater-oilDepot",
|
name: "runningWater-oilDepot",
|
||||||
data(){
|
data(){
|
||||||
@ -136,7 +127,7 @@ import {
|
|||||||
// 员工列表
|
// 员工列表
|
||||||
staffList:[],
|
staffList:[],
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dataRange: [],
|
||||||
beginTime:"",
|
beginTime:"",
|
||||||
endTime:"",
|
endTime:"",
|
||||||
// 是否为当天时间
|
// 是否为当天时间
|
||||||
@ -150,7 +141,7 @@ import {
|
|||||||
beginTime:"",
|
beginTime:"",
|
||||||
endTime:"",
|
endTime:"",
|
||||||
deptType:"3",
|
deptType:"3",
|
||||||
|
dataRange: [],
|
||||||
},
|
},
|
||||||
orderStatistics:{
|
orderStatistics:{
|
||||||
numberOfStrokes:'0',
|
numberOfStrokes:'0',
|
||||||
@ -160,6 +151,30 @@ import {
|
|||||||
theTotalAmountOfOil:'0',
|
theTotalAmountOfOil:'0',
|
||||||
theTotalAmountOfTheItem:'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,
|
total:0,
|
||||||
timeDifference:1,
|
timeDifference:1,
|
||||||
}
|
}
|
||||||
@ -170,17 +185,14 @@ import {
|
|||||||
start.setMinutes(0)
|
start.setMinutes(0)
|
||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.dateRange = [start,new Date()];
|
let year = start.getFullYear(); // 获取年份
|
||||||
this.beginTime = start
|
let month = String(start.getMonth() + 1).padStart(2, '0'); // 获取月份,月份从0开始所以要+1
|
||||||
this.endTime = new Date()
|
let date = String(start.getDate()).padStart(2, '0'); // 获取日期
|
||||||
|
this.queryParams.dataRange = [ year+'-'+month+'-'+date, year+'-'+month+'-'+date];
|
||||||
this.timeDifferenceMilliseconds = this.endTime - this.beginTime;
|
|
||||||
this.timeDifference = timeDifferenceMilliseconds / (1000 * 60 * 60 * 24);
|
|
||||||
|
|
||||||
console.log("timeDifference",this.timeDifference)
|
|
||||||
this.isSysDate = true
|
this.isSysDate = true
|
||||||
await this.getDeptList();
|
await this.getDeptList();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getStatisticsAll()
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@ -222,18 +234,26 @@ import {
|
|||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
getList(val){
|
getList(val){
|
||||||
getInstituionListApi2(this.queryParams).then( response => {
|
getInstituionListApi2(this.queryParams).then( response => {
|
||||||
this.orderList = response.data.records;
|
this.orderNewStatistics = response.data
|
||||||
this.total = response.data.total;
|
console.log(this.orderNewStatistics.orderMoney)
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
})
|
})
|
||||||
//this.getOrderStatistics()
|
//this.getOrderStatistics()
|
||||||
},
|
},
|
||||||
|
// 获取列表信息
|
||||||
|
getStatisticsAll(val){
|
||||||
|
getInstituionListApi6(this.queryParams).then( response => {
|
||||||
|
this.orderNewStatisticstow = response.data
|
||||||
|
console.log(this.orderNewStatisticstow.orderMoney)
|
||||||
|
})
|
||||||
|
//this.getOrderStatistics()
|
||||||
|
},
|
||||||
// 搜索按钮操作
|
// 搜索按钮操作
|
||||||
async handleQuery() {
|
async handleQuery() {
|
||||||
this.queryParams.page = 1;
|
this.queryParams.page = 1;
|
||||||
await this.getDeptList();
|
await this.getDeptList();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getStatisticsAll();
|
||||||
},
|
},
|
||||||
// 重置按钮操作
|
// 重置按钮操作
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.fuint.business.integral.entity.IntegralDetail;
|
import com.fuint.business.integral.entity.IntegralDetail;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoRes;
|
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.AllOrderInfo;
|
||||||
import com.fuint.business.order.entity.CardBalanceChange;
|
import com.fuint.business.order.entity.CardBalanceChange;
|
||||||
import com.fuint.business.order.entity.CashierOrder;
|
import com.fuint.business.order.entity.CashierOrder;
|
||||||
@ -483,4 +484,25 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
AllOrderInfoVo list = allOrderInfoService.getTradingNewData(allOrderInfo);
|
AllOrderInfoVo list = allOrderInfoService.getTradingNewData(allOrderInfo);
|
||||||
return getSuccessResult(list);
|
return getSuccessResult(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单流水分析
|
||||||
|
* @param allOrderInfoRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getInstituionListApi2")
|
||||||
|
public ResponseObject getInstituionListApi2(AllOrderInfoRes allOrderInfoRes){
|
||||||
|
List<StatisticsOrderAllDto> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
@ -8,6 +8,7 @@ import com.fuint.business.marketingActivity.cardValueRule.dto.CardValueOrdersDTO
|
|||||||
import com.fuint.business.marketingActivity.cardValueRule.vo.CardValueOrdersVo;
|
import com.fuint.business.marketingActivity.cardValueRule.vo.CardValueOrdersVo;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoRes;
|
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.AllOrderInfo;
|
||||||
import com.fuint.business.order.entity.CardBalanceChange;
|
import com.fuint.business.order.entity.CardBalanceChange;
|
||||||
import com.fuint.business.order.entity.HandoverRecord;
|
import com.fuint.business.order.entity.HandoverRecord;
|
||||||
@ -132,4 +133,9 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
|||||||
|
|
||||||
AllOrderInfoVo getTradingNewData(@Param("obj") AllOrderInfoDto allOrderInfo,
|
AllOrderInfoVo getTradingNewData(@Param("obj") AllOrderInfoDto allOrderInfo,
|
||||||
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
@Param("beginTime") String beginTime,@Param("endTime") String endTime);
|
||||||
|
List<StatisticsOrderAllDto> 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);
|
||||||
}
|
}
|
||||||
|
@ -1380,4 +1380,115 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getInstituionListApi2" resultType="com.fuint.business.order.dto.StatisticsOrderAllDto">
|
||||||
|
select
|
||||||
|
'油品订单'
|
||||||
|
as orderType,
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(COUNT(*),0) AS orderNum,
|
||||||
|
IFNULL(SUM(aoi.goods_money)/if(COUNT(*) =0,1,COUNT(*)),0) as oneOrderMoney,
|
||||||
|
IFNULL(COUNT(aoi.pay_money)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderMoney,
|
||||||
|
IFNULL(COUNT(*)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderNum,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0)AS backOrderMoney,
|
||||||
|
IFNULL(sum(CASE WHEN aoi.ref_order_no is not null THEN 1 ELSE 0 END),0) as backOrderNum,
|
||||||
|
concat(#{beginTime},'-', #{endTime}) as leaderName
|
||||||
|
from all_order_info aoi
|
||||||
|
where 1=1 and aoi.store_id = #{obj.storeId} and
|
||||||
|
aoi.type='1'
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and aoi.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
union all
|
||||||
|
select
|
||||||
|
'积分商城订单' as orderType,
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(COUNT(*),0) AS orderNum,
|
||||||
|
IFNULL(SUM(aoi.goods_money)/if(COUNT(*) =0,1,COUNT(*)),0) as oneOrderMoney,
|
||||||
|
IFNULL(COUNT(aoi.pay_money)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderMoney,
|
||||||
|
IFNULL(COUNT(*)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderNum,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0)AS backOrderMoney,
|
||||||
|
IFNULL(sum(CASE WHEN aoi.ref_order_no is not null THEN 1 ELSE 0 END),0) as backOrderNum,
|
||||||
|
concat(#{beginTime},'-', #{endTime}) as leaderName
|
||||||
|
from all_order_info aoi
|
||||||
|
where 1=1 and aoi.store_id = #{obj.storeId} and
|
||||||
|
aoi.type='4'
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and aoi.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
union all
|
||||||
|
select
|
||||||
|
'收银台订单' as orderType,
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(COUNT(*),0) AS orderNum,
|
||||||
|
IFNULL(SUM(aoi.goods_money)/if(COUNT(*) =0,1,COUNT(*)),0) as oneOrderMoney,
|
||||||
|
IFNULL(COUNT(aoi.pay_money)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderMoney,
|
||||||
|
IFNULL(COUNT(*)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderNum,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0)AS backOrderMoney,
|
||||||
|
IFNULL(sum(CASE WHEN aoi.ref_order_no is not null THEN 1 ELSE 0 END),0) as backOrderNum,
|
||||||
|
concat(#{beginTime},'-', #{endTime}) as leaderName
|
||||||
|
from all_order_info aoi
|
||||||
|
where 1=1 and aoi.store_id = #{obj.storeId} and
|
||||||
|
aoi.type='6'
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and aoi.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
union all
|
||||||
|
select
|
||||||
|
'挂账订单'
|
||||||
|
as orderType,
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(COUNT(*),0) AS orderNum,
|
||||||
|
IFNULL(SUM(aoi.goods_money)/if(COUNT(*) =0,1,COUNT(*)),0) as oneOrderMoney,
|
||||||
|
IFNULL(COUNT(aoi.pay_money)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderMoney,
|
||||||
|
IFNULL(COUNT(*)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderNum,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0)AS backOrderMoney,
|
||||||
|
IFNULL(sum(CASE WHEN aoi.ref_order_no is not null THEN 1 ELSE 0 END),0) as backOrderNum,
|
||||||
|
concat(#{beginTime},'-', #{endTime}) as leaderName
|
||||||
|
from all_order_info aoi
|
||||||
|
where 1=1 and aoi.store_id = #{obj.storeId} and
|
||||||
|
aoi.type = '7'
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and aoi.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getInstituionListApi3" resultType="com.fuint.business.order.dto.StatisticsOrderAllDto">
|
||||||
|
select
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(COUNT(*),0) AS orderNum,
|
||||||
|
IFNULL(SUM(aoi.goods_money)/if(COUNT(*) =0,1,COUNT(*)),0) as oneOrderMoney,
|
||||||
|
IFNULL(COUNT(aoi.pay_money)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderMoney,
|
||||||
|
IFNULL(COUNT(*)/((TIMESTAMPDIFF(day, #{beginTime}, #{endTime}))+1),0) as dayaverageOrderNum,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0)AS backOrderMoney,
|
||||||
|
IFNULL(sum(CASE WHEN aoi.ref_order_no is not null THEN 1 ELSE 0 END),0) as backOrderNum,
|
||||||
|
concat(#{beginTime},'-', #{endTime}) as leaderName
|
||||||
|
from all_order_info aoi
|
||||||
|
where 1=1 and aoi.store_id = #{obj.storeId} and
|
||||||
|
(aoi.type='1' or aoi.type='4' or aoi.type='6' or aoi.type='7')
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and aoi.create_time >= #{beginTime} ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoRes;
|
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.AllOrderInfo;
|
||||||
import com.fuint.business.order.entity.CashierOrder;
|
import com.fuint.business.order.entity.CashierOrder;
|
||||||
import com.fuint.business.order.entity.HandoverRecord;
|
import com.fuint.business.order.entity.HandoverRecord;
|
||||||
@ -212,4 +213,8 @@ AllOrderActivityVo getOneByOrderId(Integer orderId);
|
|||||||
|
|
||||||
IPage<AllOrderInfoVo> tradingNewList(Page page, AllOrderInfoDto allOrderInfo);
|
IPage<AllOrderInfoVo> tradingNewList(Page page, AllOrderInfoDto allOrderInfo);
|
||||||
AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
|
List<StatisticsOrderAllDto> getInstituionListApi2(AllOrderInfoRes allOrderInfoRes);
|
||||||
|
|
||||||
|
StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper
|
|||||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||||
import com.fuint.business.order.dto.AllOrderInfoRes;
|
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.entity.*;
|
||||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||||
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
||||||
@ -2619,4 +2620,21 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StatisticsOrderAllDto> 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]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user