油站财务报表,交易

This commit is contained in:
齐天大圣 2024-11-04 11:56:55 +08:00
parent 62c20b2c15
commit 5a98c707ba
11 changed files with 464 additions and 194 deletions

View File

@ -302,4 +302,39 @@ export function getInstituionListApi9(query) {
})
}
export function getInstituionListApi11(query) {
return request({
url: 'business/allOrderInfo/getInstituionListApi11',
method: 'get',
params: query
})
}
export function getRunningWaterByDataApi13(query) {
return request({
url: 'business/allOrderInfo/getRunningWaterByDataApi13',
method: 'get',
params: query
})
}
export function getInstituionListApi15(query) {
return request({
url: 'business/allOrderInfo/getInstituionListApi15',
method: 'get',
params: query
})
}
export function getRunningWaterByDataApi17(query) {
return request({
url: 'business/allOrderInfo/getRunningWaterByDataApi17',
method: 'get',
params: query
})
}

View File

@ -6,21 +6,15 @@
<div style="display: flex;align-items: center ">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
@change="getDays()"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
@change="getDays()"
placeholder="结束日期">
v-model="queryParams.dataRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
</el-form>
@ -33,7 +27,7 @@
<div class="wit_box">
<div class="box-gang">
<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: #0DC291">0</div>
</el-tooltip>
<div class="size-hui">
@ -42,17 +36,17 @@
</div>
</div>
<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</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #00CAFF"></div>
<div class="nei">总加油笔数</div>
<div class="nei">总加油笔数</div>
</div>
</div>
<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</div>
</el-tooltip>
@ -62,7 +56,7 @@
</div>
</div>
<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;" >0</div>
</el-tooltip>
@ -73,7 +67,7 @@
</div>
<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:#E05295;" >0</div>
</el-tooltip>
<div class="size-hui">
@ -82,7 +76,7 @@
</div>
</div>
<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:#0047FF;" >0</div>
</el-tooltip>
<div class="size-hui">
@ -160,6 +154,7 @@ export default {
beginTime:"",
endTime:"",
deptType:"3",
dataRange:[]
},
orderStatistics:{

View File

@ -5,21 +5,15 @@
<div style="display: flex;align-items: center ">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
@change="getDays()"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
@change="getDays()"
placeholder="结束日期">
v-model="queryParams.dataRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
</el-form>
@ -32,8 +26,8 @@
<div class="wit_box">
<div class="box-gang">
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color: #0DC291">0</div>
<el-tooltip class="item" effect="dark" content="总加油升数" placement="top-start">
<div class="size-bole" style="color: #0DC291">{{orderStatistics.addOilMl}}</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #0DC291"></div>
@ -41,8 +35,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#00CAFF;">0</div>
<el-tooltip class="item" effect="dark" content="总加油笔数" placement="top-start">
<div class="size-bole" style="color:#00CAFF;">{{orderStatistics.addOilNum}}</div>
</el-tooltip>
<div class="size-hui">
@ -51,8 +45,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#F44522;" >0</div>
<el-tooltip class="item" effect="dark" content="订单总金额(元)" placement="top-start">
<div class="size-bole" style="color:#F44522;" >{{orderStatistics.orderNum}}</div>
</el-tooltip>
<div class="size-hui">
@ -61,8 +55,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#FF7E00;" >0</div>
<el-tooltip class="item" effect="dark" content="优惠总金额(元)" placement="top-start">
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.discountAmount}}</div>
</el-tooltip>
<div class="size-hui">
@ -72,8 +66,8 @@
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#E05295;" >0</div>
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
<div class="size-bole" style="color:#E05295;" >{{orderStatistics.payAmount}}</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #E05295"></div>
@ -81,8 +75,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#0047FF;" >0</div>
<el-tooltip class="item" effect="dark" content="退款总金额" placement="top-start">
<div class="size-bole" style="color:#0047FF;" >{{orderStatistics.refMoney}}</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #0047FF"></div>
@ -92,32 +86,27 @@
</div>
<div class="table-box">
<el-table
:data="orderList"
:data="soieorderStatistics"
border
style="width: 100%;margin-top: 15px">
<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="content" align="center" label="加油升数(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="加油笔数"> </el-table-column>
<el-table-column prop="content" align="center" label="订单金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="优惠金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="退款金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="实收金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="统计周期"> </el-table-column>
<el-table-column prop="gunName" align="center" label="油枪名称"> </el-table-column>
<el-table-column prop="addOilMl" align="center" label="加油升数(元)"> </el-table-column>
<el-table-column prop="addOilNum" align="center" label="加油笔数"> </el-table-column>
<el-table-column prop="orderNum" align="center" label="订单金额(元)"> </el-table-column>
<el-table-column prop="discountAmount" align="center" label="优惠金额(元)"> </el-table-column>
<el-table-column prop="refMoney" align="center" label="退款金额(元)"> </el-table-column>
<el-table-column prop="payAmount" align="center" label="实收金额(元)"> </el-table-column>
<el-table-column prop="days" align="center" label="统计周期"> </el-table-column>
</el-table>
</div>
<div class="pagination-box">
<el-pagination
background
v-show="total>0"
layout="prev, pager, next"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@current-change="getList">
</el-pagination>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</template>
@ -129,7 +118,9 @@ import {
getRunningWaterByDataApi,
exportExcelOilDeptApi,
getmyDataApi,
getInstituionListApi2
getInstituionListApi2,
getInstituionListApi15,
getRunningWaterByDataApi17
} from "@/api/allOrder";
export default {
@ -154,15 +145,27 @@ export default {
beginTime:"",
endTime:"",
deptType:"3",
dataRange:[]
},
orderStatistics:{
numberOfStrokes:'0',
theTotalAmountOfTheOrder:'0',
theTotalAmountPaid:'0',
oilDiscounts:'0',
theTotalAmountOfOil:'0',
theTotalAmountOfTheItem:'0',
gunName:'0',
addOilMl:'0',
addOilNum:'0',
orderNum:'0',
discountAmount:'0',
refMoney:'0',
payAmount:'0',
},
soieorderStatistics:{
days:'',
gunName:'0',
addOilMl:'0',
addOilNum:'0',
orderNum:'0',
discountAmount:'0',
refMoney:'0',
payAmount:'0',
},
total:0,
timeDifference:1,
@ -174,17 +177,14 @@ export default {
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.getOrderStatistics()
},
methods:{
@ -209,12 +209,7 @@ export default {
//
getOrderStatistics() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getRunningWaterByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
getRunningWaterByDataApi17(this.queryParams).then(res=>{
this.orderStatistics = res.data
})
},
@ -226,17 +221,11 @@ export default {
//
getList(val){
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getInstituionListApi2(this.addDateRange(this.queryParams,dateRange)).then( response => {
this.orderList = response.data.records;
getInstituionListApi15(this.queryParams).then( response => {
this.soieorderStatistics = response.data.records;
this.total = response.data.total;
this.isSysDate = false
})
this.getOrderStatistics()
},
//
@ -244,6 +233,7 @@ export default {
this.queryParams.page = 1;
await this.getDeptList();
this.getList();
this.getOrderStatistics()
},
//
@ -255,8 +245,16 @@ export default {
deptType:"3",
}
this.beginTime = ""
this.endTime = ""
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
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.handleQuery();
},

View File

@ -6,21 +6,15 @@
<div style="display: flex;align-items: center ">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
@change="getDays()"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
@change="getDays()"
placeholder="结束日期">
v-model="queryParams.dataRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
</el-form>
@ -33,8 +27,8 @@
<div class="wit_box">
<div class="box-gang">
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color: #0DC291">0</div>
<el-tooltip class="item" effect="dark" content="总加油升数" placement="top-start">
<div class="size-bole" style="color: #0DC291">{{orderStatistics.addOilMl}}</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #0DC291"></div>
@ -42,8 +36,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#00CAFF;">0</div>
<el-tooltip class="item" effect="dark" content="总加油笔数(元)" placement="top-start">
<div class="size-bole" style="color:#00CAFF;">{{orderStatistics.addOilNum}}</div>
</el-tooltip>
<div class="size-hui">
@ -52,8 +46,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#F44522;" >0</div>
<el-tooltip class="item" effect="dark" content="订单总金额(元)" placement="top-start">
<div class="size-bole" style="color:#F44522;" >{{orderStatistics.orderNum}}</div>
</el-tooltip>
<div class="size-hui">
@ -62,8 +56,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#FF7E00;" >0</div>
<el-tooltip class="item" effect="dark" content="优惠总金额(元)" placement="top-start">
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.discountAmount}}</div>
</el-tooltip>
<div class="size-hui">
@ -73,8 +67,8 @@
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#E05295;" >0</div>
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
<div class="size-bole" style="color:#E05295;" >{{orderStatistics.payAmount}}</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #E05295"></div>
@ -82,8 +76,8 @@
</div>
</div>
<div class="box">
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
<div class="size-bole" style="color:#0047FF;" >0</div>
<el-tooltip class="item" effect="dark" content="退款总金额" placement="top-start">
<div class="size-bole" style="color:#0047FF;" >{{orderStatistics.refMoney}}</div>
</el-tooltip>
<div class="size-hui">
<div class="dian" style="background: #0047FF"></div>
@ -93,18 +87,18 @@
</div>
<div class="table-box">
<el-table
:data="orderList"
:data="soieorderStatistics"
border
style="width: 100%;margin-top: 15px">
<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="content" align="center" label="加油升数(元"> </el-table-column>
<el-table-column prop="content" align="center" label="加油笔数"> </el-table-column>
<el-table-column prop="content" align="center" label="订单金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="优惠金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="退款金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="实收金额(元)"> </el-table-column>
<el-table-column prop="content" align="center" label="统计周期"> </el-table-column>
<el-table-column prop="oilNum" align="center" label="油品油号"> </el-table-column>
<el-table-column prop="addOilMl" align="center" label="加油升数ml"> </el-table-column>
<el-table-column prop="addOilNum" align="center" label="加油笔数"> </el-table-column>
<el-table-column prop="orderNum" align="center" label="订单金额(元)"> </el-table-column>
<el-table-column prop="discountAmount" align="center" label="优惠金额(元)"> </el-table-column>
<el-table-column prop="refMoney" align="center" label="退款金额(元)"> </el-table-column>
<el-table-column prop="payAmount" align="center" label="实收金额(元)"> </el-table-column>
<el-table-column prop="days" align="center" label="统计周期"> </el-table-column>
<!-- <div slot="empty" class="empty">-->
<!-- <el-empty description="暂无数据"></el-empty>-->
<!-- </div>-->
@ -133,7 +127,9 @@ import {
getRunningWaterByDataApi,
exportExcelOilDeptApi,
getmyDataApi,
getInstituionListApi2
getInstituionListApi2,
getInstituionListApi11,
getRunningWaterByDataApi13
} from "@/api/allOrder";
export default {
@ -158,15 +154,26 @@ export default {
beginTime:"",
endTime:"",
deptType:"3",
dataRange:[],
},
orderStatistics:{
numberOfStrokes:'0',
theTotalAmountOfTheOrder:'0',
theTotalAmountPaid:'0',
oilDiscounts:'0',
theTotalAmountOfOil:'0',
theTotalAmountOfTheItem:'0',
oilNum:'0',
addOilMl:'0',
addOilNum:'0',
orderNum:'0',
discountAmount:'0',
refMoney:'0',
payAmount:'0',
},
soieorderStatistics:{
days:'',
oilNum:'0',
addOilMl:'0',
addOilNum:'0',
orderNum:'0',
discountAmount:'0',
refMoney:'0',
payAmount:'0',
},
total:0,
timeDifference:1,
@ -178,18 +185,14 @@ export default {
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.getOrderStatistics()
},
methods:{
getDays(){
@ -213,12 +216,7 @@ export default {
//
getOrderStatistics() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getRunningWaterByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
getRunningWaterByDataApi13(this.queryParams).then(res=>{
this.orderStatistics = res.data
})
},
@ -230,17 +228,12 @@ export default {
//
getList(val){
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getInstituionListApi2(this.addDateRange(this.queryParams,dateRange)).then( response => {
this.orderList = response.data.records;
getInstituionListApi11(this.queryParams).then( response => {
this.soieorderStatistics = response.data.records;
this.total = response.data.total;
this.isSysDate = false
})
this.getOrderStatistics()
},
//
@ -248,6 +241,7 @@ export default {
this.queryParams.page = 1;
await this.getDeptList();
this.getList();
this.getOrderStatistics()
},
//
@ -259,8 +253,15 @@ export default {
deptType:"3",
}
this.beginTime = ""
this.endTime = ""
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
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.handleQuery();
},

View File

@ -3,10 +3,7 @@ package com.fuint.business.order.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.StatisticsOneDayOrderAllDto;
import com.fuint.business.order.dto.StatisticsOrderAllDto;
import com.fuint.business.order.dto.*;
import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.CashierOrder;
@ -530,4 +527,53 @@ public class AllOrderInfoController extends BaseController {
StatisticsOneDayOrderAllDto map = allOrderInfoService.getInstituionListApi9(allOrderInfoRes);
return getSuccessResult(map);
}
/**
* 油品销售统计
* @param allOrderInfoRes
* @return
*/
@GetMapping("/getInstituionListApi11")
public ResponseObject getInstituionListApi11(AllOrderInfoRes allOrderInfoRes,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<StatisticsSaleOilOrderDto> map = allOrderInfoService.getInstituionListApi11(page,allOrderInfoRes);
return getSuccessResult(map);
}
/**
* 油品销售统计
* @param allOrderInfoRes
* @return
*/
@GetMapping("/getRunningWaterByDataApi13")
public ResponseObject getRunningWaterByDataApi13(AllOrderInfoRes allOrderInfoRes){
StatisticsSaleOilOrderDto map = allOrderInfoService.getRunningWaterByDataApi13(allOrderInfoRes);
return getSuccessResult(map);
}
/**
* 油枪销售统计
* @param allOrderInfoRes
* @return
*/
@GetMapping("/getInstituionListApi15")
public ResponseObject getInstituionListApi15(AllOrderInfoRes allOrderInfoRes,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<StatisticsSaleOilOrderByGunDto> map = allOrderInfoService.getInstituionListApi15(page,allOrderInfoRes);
return getSuccessResult(map);
}
/**
* 油枪销售统计
* @param allOrderInfoRes
* @return
*/
@GetMapping("/getRunningWaterByDataApi17")
public ResponseObject getRunningWaterByDataApi17(AllOrderInfoRes allOrderInfoRes){
StatisticsSaleOilOrderByGunDto map = allOrderInfoService.getRunningWaterByDataApi17(allOrderInfoRes);
return getSuccessResult(map);
}
}

View File

@ -0,0 +1,27 @@
package com.fuint.business.order.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class StatisticsSaleOilOrderByGunDto implements Serializable {
private static final long serialVersionUID = 1L;
//统计周期
private String days;
//加油油号
private String gunName;
//加油升数
private String addOilMl;
//加油笔数
private String addOilNum;
//订单金额
private String orderNum;
//优惠金额
private String discountAmount;
//退款金额
private String refMoney;
//实收金额
private String payAmount;
}

View File

@ -0,0 +1,26 @@
package com.fuint.business.order.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class StatisticsSaleOilOrderDto implements Serializable {
private static final long serialVersionUID = 1L;
//统计周期
private String days;
//加油油号
private String oilNum;
//加油升数
private String addOilMl;
//加油笔数
private String addOilNum;
//订单金额
private String orderNum;
//优惠金额
private String discountAmount;
//退款金额
private String refMoney;
//实收金额
private String payAmount;
}

View File

@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
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.StatisticsOneDayOrderAllDto;
import com.fuint.business.order.dto.StatisticsOrderAllDto;
import com.fuint.business.order.dto.*;
import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.HandoverRecord;
@ -145,4 +142,18 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
StatisticsOneDayOrderAllDto getInstituionListApi9(@Param("obj") AllOrderInfoRes allOrderInfoRes,
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
IPage<StatisticsSaleOilOrderDto> getInstituionListApi11(@Param("page") Page page, @Param("obj") AllOrderInfoRes allOrderInfoRes,
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
StatisticsSaleOilOrderDto getRunningWaterByDataApi13(@Param("obj") AllOrderInfoRes allOrderInfoRes,
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
IPage<StatisticsSaleOilOrderByGunDto> getInstituionListApi15(@Param("page") Page page, @Param("obj") AllOrderInfoRes allOrderInfoRes,
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
StatisticsSaleOilOrderByGunDto getRunningWaterByDataApi17(@Param("obj") AllOrderInfoRes allOrderInfoRes,
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
}

View File

@ -1398,10 +1398,10 @@
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} ]]>
<![CDATA[and aoi.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 00:00:00')]]>
</if>
union all
select
@ -1419,10 +1419,10 @@
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} ]]>
<![CDATA[and aoi.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 00:00:00')]]>
</if>
union all
select
@ -1440,10 +1440,10 @@
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} ]]>
<![CDATA[and aoi.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 00:00:00')]]>
</if>
union all
select
@ -1462,10 +1462,10 @@
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} ]]>
<![CDATA[and aoi.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 00:00:00')]]>
</if>
</select>
@ -1485,10 +1485,10 @@
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} ]]>
<![CDATA[and aoi.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and aoi.create_time <= #{endTime} ]]>
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 00:00:00')]]>
</if>
</select>
@ -1583,7 +1583,7 @@
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
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') ]]>
@ -1592,4 +1592,100 @@
<![CDATA[ and aoi.create_time <= concat(#{endTime},' 23:59:59') ]]>
</if>
</select>
<select id="getInstituionListApi11" resultType="com.fuint.business.order.dto.StatisticsSaleOilOrderDto">
SELECT
non.oil_name oilNum,
IFNULL(sum(oo.oil_num),0) addOilMl,
IFNULL(count(oo.oils),0) addOilNum,
IFNULL(sum(oo.order_amount),0) orderNum,
IFNULL(sum(oo.discount_amount),0) discountAmount,
IFNULL(sum(oo.ref_money),0) refMoney,
IFNULL(sum(oo.pay_amount),0) payAmount,
concat(#{beginTime},'-',#{endTime}) days
FROM
oil_gun og
LEFT JOIN oil_number as ons on og.number_id=ons.number_id
LEFT JOIN oil_name non on non.id=ons.oil_name
LEFT JOIN oil_order oo on oo.oils=non.id and oo.create_time
<if test="beginTime != null and beginTime != ''">
<![CDATA[and oo.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and oo.create_time <= concat(#{endTime},' 23:59:59') ]]>
</if>
where og.store_id=#{obj.storeId}
GROUP BY og.number_id
</select>
<select id="getRunningWaterByDataApi13" resultType="com.fuint.business.order.dto.StatisticsSaleOilOrderDto">
SELECT
non.oil_name oilNum,
IFNULL(sum(oo.oil_num),0) addOilMl,
IFNULL(count(oo.oils),0) addOilNum,
IFNULL(sum(oo.order_amount),0) orderNum,
IFNULL(sum(oo.discount_amount),0) discountAmount,
IFNULL(sum(oo.ref_money),0) refMoney,
IFNULL(sum(oo.pay_amount),0) payAmount,
concat(#{beginTime},'-',#{endTime}) days
FROM
oil_gun og
LEFT JOIN oil_number as ons on og.number_id=ons.number_id
LEFT JOIN oil_name non on non.id=ons.oil_name
LEFT JOIN oil_order oo on oo.oils=non.id and oo.create_time
<if test="beginTime != null and beginTime != ''">
<![CDATA[and oo.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and oo.create_time <= concat(#{endTime},' 23:59:59') ]]>
</if>
where og.store_id=#{obj.storeId}
</select>
<select id="getInstituionListApi15" resultType="com.fuint.business.order.dto.StatisticsSaleOilOrderByGunDto">
SELECT
og.gun_name gunName,
IFNULL(sum(oo.oil_num),0) addOilMl,
IFNULL(count(oo.oils),0) addOilNum,
IFNULL(sum(oo.order_amount),0) orderNum,
IFNULL(sum(oo.discount_amount),0) discountAmount,
IFNULL(sum(oo.ref_money),0) refMoney,
IFNULL(sum(oo.pay_amount),0) payAmount,
concat(#{beginTime},'-',#{endTime}) days
from oil_gun og
LEFT JOIN oil_order oo on og.id=oo.oil_gun_num
<if test="beginTime != null and beginTime != ''">
<![CDATA[and oo.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and oo.create_time <= concat(#{endTime},' 23:59:59') ]]>
</if>
where og.store_id=#{obj.storeId}
GROUP BY og.id
</select>
<select id="getRunningWaterByDataApi17" resultType="com.fuint.business.order.dto.StatisticsSaleOilOrderByGunDto">
SELECT
og.gun_name gunName,
IFNULL(sum(oo.oil_num),0) addOilMl,
IFNULL(count(oo.oils),0) addOilNum,
IFNULL(sum(oo.order_amount),0) orderNum,
IFNULL(sum(oo.discount_amount),0) discountAmount,
IFNULL(sum(oo.ref_money),0) refMoney,
IFNULL(sum(oo.pay_amount),0) payAmount,
concat(#{beginTime},'-',#{endTime}) days
from oil_gun og
LEFT JOIN oil_order oo on og.id=oo.oil_gun_num
<if test="beginTime != null and beginTime != ''">
<![CDATA[and oo.create_time >= concat(#{beginTime},' 00:00:00') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ and oo.create_time <= concat(#{endTime},' 23:59:59') ]]>
</if>
where og.store_id=#{obj.storeId}
</select>
</mapper>

View File

@ -3,10 +3,7 @@ package com.fuint.business.order.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.StatisticsOneDayOrderAllDto;
import com.fuint.business.order.dto.StatisticsOrderAllDto;
import com.fuint.business.order.dto.*;
import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.entity.HandoverRecord;
@ -221,4 +218,12 @@ AllOrderActivityVo getOneByOrderId(Integer orderId);
IPage<StatisticsOneDayOrderAllDto> getInstituionListApi7(Page page,AllOrderInfoRes allOrderInfoRes);
StatisticsOneDayOrderAllDto getInstituionListApi9(AllOrderInfoRes allOrderInfoRes);
IPage<StatisticsSaleOilOrderDto> getInstituionListApi11(Page page, AllOrderInfoRes allOrderInfoRes);
StatisticsSaleOilOrderDto getRunningWaterByDataApi13(AllOrderInfoRes allOrderInfoRes);
IPage<StatisticsSaleOilOrderByGunDto> getInstituionListApi15(Page page, AllOrderInfoRes allOrderInfoRes);
StatisticsSaleOilOrderByGunDto getRunningWaterByDataApi17(AllOrderInfoRes allOrderInfoRes);
}

View File

@ -35,10 +35,7 @@ import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelChangeMapper;
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.StatisticsOneDayOrderAllDto;
import com.fuint.business.order.dto.StatisticsOrderAllDto;
import com.fuint.business.order.dto.*;
import com.fuint.business.order.entity.*;
import com.fuint.business.order.mapper.AllOrderInfoMapper;
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
@ -2654,4 +2651,37 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
}
@Override
public IPage<StatisticsSaleOilOrderDto> getInstituionListApi11(Page page, AllOrderInfoRes allOrderInfoRes) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
return allOrderInfoMapper.getInstituionListApi11(page,allOrderInfoRes,
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
}
@Override
public StatisticsSaleOilOrderDto getRunningWaterByDataApi13(AllOrderInfoRes allOrderInfoRes) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
return allOrderInfoMapper.getRunningWaterByDataApi13(allOrderInfoRes,
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
}
@Override
public IPage<StatisticsSaleOilOrderByGunDto> getInstituionListApi15(Page page, AllOrderInfoRes allOrderInfoRes) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
return allOrderInfoMapper.getInstituionListApi15(page,allOrderInfoRes,
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
}
@Override
public StatisticsSaleOilOrderByGunDto getRunningWaterByDataApi17(AllOrderInfoRes allOrderInfoRes) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
return allOrderInfoMapper.getRunningWaterByDataApi17(allOrderInfoRes,
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
}
}