油站财务报表,交易
This commit is contained in:
parent
a6e8afbb91
commit
d64c1c8eb0
@ -286,3 +286,20 @@ export function getInstituionListApi6(query) {
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getInstituionListApi7(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/getInstituionListApi7',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getInstituionListApi9(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/getInstituionListApi9',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.page"
|
:page.sync="queryParams.page"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getDeptList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -433,6 +433,7 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
this.getDicts()
|
this.getDicts()
|
||||||
this.getStaffByStorId()
|
this.getStaffByStorId()
|
||||||
|
this.getOrderStatistics()
|
||||||
},
|
},
|
||||||
exportExcelCashier() {
|
exportExcelCashier() {
|
||||||
exportExcelOrderMsgsApi(this.queryParams).then(res => {
|
exportExcelOrderMsgsApi(this.queryParams).then(res => {
|
||||||
@ -455,17 +456,10 @@ export default {
|
|||||||
|
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getList(val) {
|
async getList(val) {
|
||||||
let dateRange = []
|
|
||||||
if (this.beginTime && this.endTime) {
|
|
||||||
dateRange.push(this.beginTime)
|
|
||||||
dateRange.push(this.endTime)
|
|
||||||
}
|
|
||||||
console.log(this.beginTime)
|
|
||||||
transactionList(this.queryParams).then(response => {
|
transactionList(this.queryParams).then(response => {
|
||||||
this.orderList = response.data.records;
|
this.orderList = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
this.getOrderStatistics()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -6,21 +6,15 @@
|
|||||||
<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-form-item label="">
|
<el-form-item label="">
|
||||||
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="beginTime"
|
v-model="queryParams.dataRange"
|
||||||
style="width: 140px"
|
type="daterange"
|
||||||
type="date"
|
range-separator="至"
|
||||||
@change="getDays()"
|
start-placeholder="开始日期"
|
||||||
placeholder="开始日期">
|
end-placeholder="结束日期"
|
||||||
</el-date-picker>
|
format="yyyy-MM-dd"
|
||||||
至
|
value-format="yyyy-MM-dd"
|
||||||
<el-date-picker
|
>
|
||||||
v-model="endTime"
|
|
||||||
style="width: 140px"
|
|
||||||
type="date"
|
|
||||||
@change="getDays()"
|
|
||||||
placeholder="结束日期">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -35,8 +29,8 @@
|
|||||||
<div class="wit_box">
|
<div class="wit_box">
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<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">0/0</div>
|
<div class="size-bole">{{orderStatisticsAll.orderMoney}}</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>
|
||||||
@ -44,8 +38,8 @@
|
|||||||
</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:#00CAFF;">0/0</div>
|
<div class="size-bole" style="color:#00CAFF;">{{orderStatisticsAll.discountAmount}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -55,7 +49,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:#F44522;" >0/0</div>
|
<div class="size-bole" style="color:#F44522;" >{{orderStatisticsAll.refMoney}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -65,7 +59,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}}/0</div>
|
<div class="size-bole" style="color:#FF7E00;" >{{orderStatisticsAll.accountPending}}/{{orderStatisticsAll.repaidAmount}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -75,7 +69,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:#0D2ED8;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#0D2ED8;" >{{orderStatisticsAll.trueMoney}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -85,7 +79,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:#790DD8;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#790DD8;" >{{orderStatisticsAll.bidBalance?orderStatisticsAll.bidBalance:0}}/{{orderStatisticsAll.memberMoney?orderStatisticsAll.memberMoney:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -95,7 +89,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:#D80D54;" >{{orderStatistics.balanceCount?orderStatistics.balanceCount:0}}/0</div>
|
<div class="size-bole" style="color:#D80D54;" >{{orderStatisticsAll.newNum?orderStatisticsAll.newNum:0}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<div class="size-hui">
|
<div class="size-hui">
|
||||||
@ -108,35 +102,30 @@
|
|||||||
|
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table
|
<el-table
|
||||||
:data="orderList"
|
:data="orderStatistics"
|
||||||
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="content" align="center" label="日期"> </el-table-column>
|
<el-table-column prop="days" align="center" label="日期"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="订单金额(元)"> </el-table-column>
|
<el-table-column prop="orderMoney" align="center" label="订单金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="优惠金额(元)"> </el-table-column>
|
<el-table-column prop="discountAmount" align="center" label="优惠金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="退款金额(元)"> </el-table-column>
|
<el-table-column prop="refMoney" align="center" label="退款金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="挂账金额(元)"> </el-table-column>
|
<el-table-column prop="accountPending" align="center" label="挂账金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="实收金额(元)"> </el-table-column>
|
<el-table-column prop="trueMoney" align="center" label="实收金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="充值金额(元)"> </el-table-column>
|
<el-table-column prop="bidBalance" align="center" label="充值金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="充值赠送金额(元)"> </el-table-column>
|
<el-table-column prop="giftBalance" align="center" label="充值赠送金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="会员消费金额(元)"> </el-table-column>
|
<el-table-column prop="memberMoney" align="center" label="会员消费金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="归还金额(元)"> </el-table-column>
|
<el-table-column prop="repaidAmount" align="center" label="归还金额(元)"> </el-table-column>
|
||||||
<el-table-column prop="content" align="center" label="新增会员数"> </el-table-column>
|
<el-table-column prop="newNum" align="center" label="新增会员数"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-box">
|
<pagination
|
||||||
<el-pagination
|
|
||||||
background
|
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
layout="prev, pager, next"
|
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.page"
|
:page.sync="queryParams.page"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@current-change="getList">
|
@pagination="getList"
|
||||||
</el-pagination>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -148,7 +137,9 @@ import {
|
|||||||
getRunningWaterByDataApi,
|
getRunningWaterByDataApi,
|
||||||
exportExcelOilDeptApi,
|
exportExcelOilDeptApi,
|
||||||
getmyDataApi,
|
getmyDataApi,
|
||||||
getInstituionListApi2
|
getInstituionListApi2,
|
||||||
|
getInstituionListApi7,
|
||||||
|
getInstituionListApi9
|
||||||
} from "@/api/allOrder";
|
} from "@/api/allOrder";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -173,15 +164,32 @@ export default {
|
|||||||
beginTime:"",
|
beginTime:"",
|
||||||
endTime:"",
|
endTime:"",
|
||||||
deptType:"3",
|
deptType:"3",
|
||||||
|
dataRange:[]
|
||||||
},
|
},
|
||||||
orderStatistics:{
|
orderStatistics:{
|
||||||
numberOfStrokes:'0',
|
day:'',
|
||||||
theTotalAmountOfTheOrder:'0',
|
orderMoney:'0',
|
||||||
theTotalAmountPaid:'0',
|
discountAmount:'0',
|
||||||
oilDiscounts:'0',
|
refMoney:'0',
|
||||||
theTotalAmountOfOil:'0',
|
accountPending:'0',
|
||||||
theTotalAmountOfTheItem:'0',
|
trueMoney:'0',
|
||||||
|
bidBalance:'0',
|
||||||
|
giftBalance:'0',
|
||||||
|
memberMoney:'0',
|
||||||
|
repaidAmount:'0',
|
||||||
|
newNum:'0',
|
||||||
|
},
|
||||||
|
orderStatisticsAll:{
|
||||||
|
orderMoney:'0',
|
||||||
|
discountAmount:'0',
|
||||||
|
refMoney:'0',
|
||||||
|
accountPending:'0',
|
||||||
|
trueMoney:'0',
|
||||||
|
bidBalance:'0',
|
||||||
|
giftBalance:'0',
|
||||||
|
memberMoney:'0',
|
||||||
|
repaidAmount:'0',
|
||||||
|
newNum:'0',
|
||||||
},
|
},
|
||||||
total:0,
|
total:0,
|
||||||
timeDifference:1,
|
timeDifference:1,
|
||||||
@ -193,22 +201,17 @@ export default {
|
|||||||
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.getOrderStatistics();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getDays(){
|
getDays(){
|
||||||
|
|
||||||
this.timeDifferenceMilliseconds = this.endTime - this.beginTime;
|
this.timeDifferenceMilliseconds = this.endTime - this.beginTime;
|
||||||
this.timeDifference = timeDifferenceMilliseconds / (1000 * 60 * 60 * 24);
|
this.timeDifference = timeDifferenceMilliseconds / (1000 * 60 * 60 * 24);
|
||||||
console.log("timeDifference",this.timeDifference)
|
console.log("timeDifference",this.timeDifference)
|
||||||
@ -228,13 +231,8 @@ export default {
|
|||||||
// 获取订单统计信息
|
// 获取订单统计信息
|
||||||
|
|
||||||
getOrderStatistics() {
|
getOrderStatistics() {
|
||||||
let dateRange = []
|
getInstituionListApi9(this.queryParams).then(res=>{
|
||||||
if (this.beginTime && this.endTime) {
|
this.orderStatisticsAll = res.data
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getRunningWaterByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
|
||||||
this.orderStatistics = res.data
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getDeptList() {
|
async getDeptList() {
|
||||||
@ -245,13 +243,8 @@ export default {
|
|||||||
|
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
getList(val){
|
getList(val){
|
||||||
let dateRange = []
|
getInstituionListApi7(this.queryParams).then( response => {
|
||||||
if (this.beginTime && this.endTime) {
|
this.orderStatistics = response.data.records;
|
||||||
dateRange.push(this.beginTime.toLocaleDateString())
|
|
||||||
dateRange.push(this.endTime.toLocaleDateString())
|
|
||||||
}
|
|
||||||
getInstituionListApi2(this.addDateRange(this.queryParams,dateRange)).then( response => {
|
|
||||||
this.orderList = response.data.records;
|
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.isSysDate = false
|
this.isSysDate = false
|
||||||
})
|
})
|
||||||
|
@ -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.StatisticsOneDayOrderAllDto;
|
||||||
import com.fuint.business.order.dto.StatisticsOrderAllDto;
|
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;
|
||||||
@ -505,4 +506,28 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
StatisticsOrderAllDto map = allOrderInfoService.getInstituionListApi3(allOrderInfoRes);
|
StatisticsOrderAllDto map = allOrderInfoService.getInstituionListApi3(allOrderInfoRes);
|
||||||
return getSuccessResult(map);
|
return getSuccessResult(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单流水分析
|
||||||
|
* @param allOrderInfoRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getInstituionListApi7")
|
||||||
|
public ResponseObject getInstituionListApi7(AllOrderInfoRes allOrderInfoRes,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||||
|
Page page =new Page(pageNo,pageSize);
|
||||||
|
IPage<StatisticsOneDayOrderAllDto> map = allOrderInfoService.getInstituionListApi7(page,allOrderInfoRes);
|
||||||
|
return getSuccessResult(map);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 订单流水分析
|
||||||
|
* @param allOrderInfoRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getInstituionListApi9")
|
||||||
|
public ResponseObject getInstituionListApi9(AllOrderInfoRes allOrderInfoRes){
|
||||||
|
StatisticsOneDayOrderAllDto map = allOrderInfoService.getInstituionListApi9(allOrderInfoRes);
|
||||||
|
return getSuccessResult(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.fuint.business.order.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StatisticsOneDayOrderAllDto implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
//日期时间
|
||||||
|
private String days;
|
||||||
|
//订单金额
|
||||||
|
private String orderMoney;
|
||||||
|
//优惠金额
|
||||||
|
private String discountAmount;
|
||||||
|
//退款金额
|
||||||
|
private String refMoney;
|
||||||
|
//挂在金额
|
||||||
|
private String accountPending;
|
||||||
|
//实收金额
|
||||||
|
private String trueMoney;
|
||||||
|
//充值金额
|
||||||
|
private String bidBalance;
|
||||||
|
//充值赠送金额
|
||||||
|
private String giftBalance;
|
||||||
|
//会员消费金额
|
||||||
|
private String memberMoney;
|
||||||
|
//归还金额
|
||||||
|
private String repaidAmount;
|
||||||
|
//新增人数
|
||||||
|
private String newNum;
|
||||||
|
}
|
@ -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.StatisticsOneDayOrderAllDto;
|
||||||
import com.fuint.business.order.dto.StatisticsOrderAllDto;
|
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;
|
||||||
@ -138,4 +139,10 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
|||||||
|
|
||||||
StatisticsOrderAllDto getInstituionListApi3(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
StatisticsOrderAllDto getInstituionListApi3(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
IPage<StatisticsOneDayOrderAllDto> getInstituionListApi7(@Param("page") Page page,@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||||
|
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
StatisticsOneDayOrderAllDto getInstituionListApi9(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||||
|
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||||
}
|
}
|
||||||
|
@ -1491,4 +1491,105 @@
|
|||||||
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getInstituionListApi7" resultType="com.fuint.business.order.dto.StatisticsOneDayOrderAllDto">
|
||||||
|
SELECT
|
||||||
|
c.Date as days,
|
||||||
|
IFNULL(d.orderMoney,0) as orderMoney,
|
||||||
|
IFNULL(d.discountAmount,0) as discountAmount,
|
||||||
|
IFNULL(d.refMoney,0) as refMoney,
|
||||||
|
IFNULL(d.accountPending,0) as accountPending,
|
||||||
|
IFNULL(d.trueMoney,0) as trueMoney,
|
||||||
|
IFNULL(d.bidBalance,0) as bidBalance,
|
||||||
|
IFNULL(d.giftBalance,0) as giftBalance,
|
||||||
|
IFNULL(d.memberMoney,0) as memberMoney,
|
||||||
|
IFNULL(d.repaidAmount,0) as repaidAmount,
|
||||||
|
IFNULL(d.newNum,0) as newNum
|
||||||
|
from (select a.Date
|
||||||
|
from (
|
||||||
|
select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a) + (1000 * d.a)) DAY as Date
|
||||||
|
from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a
|
||||||
|
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b
|
||||||
|
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c
|
||||||
|
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as d
|
||||||
|
) a
|
||||||
|
where a.Date between #{beginTime} and #{endTime}) c
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT
|
||||||
|
a.days as days,
|
||||||
|
a.orderMoney as orderMoney,
|
||||||
|
a.discountAmount as discountAmount,
|
||||||
|
a.refMoney as refMoney,
|
||||||
|
a.accountPending as accountPending,
|
||||||
|
a.trueMoney as trueMoney,
|
||||||
|
a.bidBalance as bidBalance,
|
||||||
|
a.giftBalance as giftBalance,
|
||||||
|
a.memberMoney as memberMoney,
|
||||||
|
a.repaidAmount as repaidAmount,
|
||||||
|
b.newNum as newNum
|
||||||
|
from (SELECT
|
||||||
|
DATE_FORMAT(aoi.create_time, '%Y-%m-%d') as days,
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.discount_amount),0) AS discountAmount,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0) AS refMoney,
|
||||||
|
IFNULL(SUM(hb.amount),0) AS accountPending,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(SUM(cvo.bid_balance),0) AS bidBalance,
|
||||||
|
IFNULL(SUM(cvo.gift_balance),0) AS giftBalance,
|
||||||
|
IFNULL(SUM(CASE WHEN mu.id is not null THEN pay_money ELSE 0 END),0) AS memberMoney,
|
||||||
|
IFNULL(SUM(hb.repaid_amount),0) AS repaidAmount
|
||||||
|
from
|
||||||
|
all_order_info aoi
|
||||||
|
LEFT JOIN hang_bill hb on aoi.user_id=hb.id
|
||||||
|
LEFT JOIN mt_user mu on aoi.user_id = mu.id
|
||||||
|
LEFT JOIN card_value_orders cvo on aoi.order_no= cvo.order_no
|
||||||
|
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 >= concat(#{beginTime},' 00:00:00') ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||||
|
</if>
|
||||||
|
group by DATE_FORMAT(aoi.create_time, '%Y-%m-%d')) a
|
||||||
|
LEFT JOIN (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') as dayss, IFNULL(count(*),0) as newNum from mt_user
|
||||||
|
group by DATE_FORMAT(create_time, '%Y-%m-%d')) b on a.days=b.dayss) d on c.Date=d.days
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getInstituionListApi9" resultType="com.fuint.business.order.dto.StatisticsOneDayOrderAllDto">
|
||||||
|
SELECT
|
||||||
|
DATE_FORMAT(aoi.create_time, '%Y-%m-%d') as days,
|
||||||
|
IFNULL(SUM(aoi.goods_money),0) AS orderMoney,
|
||||||
|
IFNULL(SUM(aoi.discount_amount),0) AS discountAmount,
|
||||||
|
IFNULL(SUM(aoi.ref_money),0) AS refMoney,
|
||||||
|
IFNULL(SUM(hb.amount),0) AS accountPending,
|
||||||
|
IFNULL(SUM(aoi.pay_money),0) AS trueMoney,
|
||||||
|
IFNULL(SUM(cvo.bid_balance),0) AS bidBalance,
|
||||||
|
IFNULL(SUM(cvo.gift_balance),0) AS giftBalance,
|
||||||
|
IFNULL(SUM(CASE WHEN mu.id is not null THEN pay_money ELSE 0 END),0) AS memberMoney,
|
||||||
|
IFNULL(SUM(hb.repaid_amount),0) AS repaidAmount,
|
||||||
|
IFNULL((SELECT COUNT(*) from mt_user where 1=1
|
||||||
|
<if test="beginTime != null and beginTime != ''">
|
||||||
|
<![CDATA[and create_time >= concat(#{beginTime},' 00:00:00') ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||||
|
</if>),0) AS newNum
|
||||||
|
from
|
||||||
|
all_order_info aoi
|
||||||
|
LEFT JOIN hang_bill hb on aoi.user_id=hb.id
|
||||||
|
LEFT JOIN mt_user mu on aoi.user_id = mu.id
|
||||||
|
LEFT JOIN card_value_orders cvo on aoi.order_no= cvo.order_no
|
||||||
|
where 1=1 and aoi.store_id = 157 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 >= concat(#{beginTime},' 00:00:00') ]]>
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||||
|
</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.StatisticsOneDayOrderAllDto;
|
||||||
import com.fuint.business.order.dto.StatisticsOrderAllDto;
|
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;
|
||||||
@ -217,4 +218,7 @@ AllOrderActivityVo getOneByOrderId(Integer orderId);
|
|||||||
List<StatisticsOrderAllDto> getInstituionListApi2(AllOrderInfoRes allOrderInfoRes);
|
List<StatisticsOrderAllDto> getInstituionListApi2(AllOrderInfoRes allOrderInfoRes);
|
||||||
|
|
||||||
StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes);
|
StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes);
|
||||||
|
IPage<StatisticsOneDayOrderAllDto> getInstituionListApi7(Page page,AllOrderInfoRes allOrderInfoRes);
|
||||||
|
|
||||||
|
StatisticsOneDayOrderAllDto getInstituionListApi9(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.StatisticsOneDayOrderAllDto;
|
||||||
import com.fuint.business.order.dto.StatisticsOrderAllDto;
|
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;
|
||||||
@ -2637,4 +2638,20 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public IPage<StatisticsOneDayOrderAllDto> getInstituionListApi7(Page page,AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return allOrderInfoMapper.getInstituionListApi7(page,allOrderInfoRes,
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public StatisticsOneDayOrderAllDto getInstituionListApi9(AllOrderInfoRes allOrderInfoRes) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return allOrderInfoMapper.getInstituionListApi9(allOrderInfoRes,
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||||
|
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user