油站财务报表,交易
This commit is contained in:
parent
aab5f350a0
commit
5eaa98f544
@ -365,5 +365,61 @@ export function getRunningWaterByDataApi17(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getInstituionListApi19(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getInstituionListApi19',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
export function getRunningWaterByDataApi21(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getRunningWaterByDataApi21',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
export function getInstituionListApi23(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getInstituionListApi23',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getRunningWaterByDataApi25(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getRunningWaterByDataApi25',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
export function getInstituionListApi27(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getInstituionListApi27',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getRunningWaterByDataApi29(query) {
|
||||
return request({
|
||||
url: 'business/allOrderInfo/getRunningWaterByDataApi29',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div class="box-gang">
|
||||
<div class="box">
|
||||
<el-tooltip class="item" effect="dark" content="总加油升数" placement="top-start">
|
||||
<div class="size-bole" style="color: #0DC291">0</div>
|
||||
<div class="size-bole" style="color: #0DC291">{{orderStatistics.addOilMl}}</div>
|
||||
</el-tooltip>
|
||||
<div class="size-hui">
|
||||
<div class="dian" style="background: #0DC291"></div>
|
||||
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<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;">{{orderStatistics.addOilNum}}</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div class="size-hui">
|
||||
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<el-tooltip class="item" effect="dark" content="订单总金额(元)" placement="top-start">
|
||||
<div class="size-bole" style="color:#F44522;" >0</div>
|
||||
<div class="size-bole" style="color:#F44522;" >{{orderStatistics.orderNum}}</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div class="size-hui">
|
||||
@ -57,7 +57,7 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<el-tooltip class="item" effect="dark" content="优惠总金额(元)" placement="top-start">
|
||||
<div class="size-bole" style="color:#FF7E00;" >0</div>
|
||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.discountAmount}}</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div class="size-hui">
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
<div class="box">
|
||||
<el-tooltip class="item" effect="dark" content="实收总金额(元)" placement="top-start">
|
||||
<div class="size-bole" style="color:#E05295;" >0</div>
|
||||
<div class="size-bole" style="color:#E05295;" >{{orderStatistics.payAmount}}</div>
|
||||
</el-tooltip>
|
||||
<div class="size-hui">
|
||||
<div class="dian" style="background: #E05295"></div>
|
||||
@ -77,7 +77,7 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<el-tooltip class="item" effect="dark" content="退款总金额" placement="top-start">
|
||||
<div class="size-bole" style="color:#0047FF;" >0</div>
|
||||
<div class="size-bole" style="color:#0047FF;" >{{orderStatistics.refMoney}}</div>
|
||||
</el-tooltip>
|
||||
<div class="size-hui">
|
||||
<div class="dian" style="background: #0047FF"></div>
|
||||
@ -89,35 +89,30 @@
|
||||
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
:data="orderStatisticsAllMsg"
|
||||
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="userName" 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>
|
||||
<!-- <div slot="empty" class="empty">-->
|
||||
<!-- <el-empty description="暂无数据"></el-empty>-->
|
||||
<!-- </div>-->
|
||||
</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 +124,9 @@ import {
|
||||
getRunningWaterByDataApi,
|
||||
exportExcelOilDeptApi,
|
||||
getmyDataApi,
|
||||
getInstituionListApi2
|
||||
getInstituionListApi2,
|
||||
getInstituionListApi19,
|
||||
getRunningWaterByDataApi21
|
||||
} from "@/api/allOrder";
|
||||
|
||||
export default {
|
||||
@ -158,12 +155,22 @@ export default {
|
||||
|
||||
},
|
||||
orderStatistics:{
|
||||
numberOfStrokes:'0',
|
||||
theTotalAmountOfTheOrder:'0',
|
||||
theTotalAmountPaid:'0',
|
||||
oilDiscounts:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheItem:'0',
|
||||
addOilMl:'0',
|
||||
addOilNum:'0',
|
||||
orderNum:'0',
|
||||
discountAmount:'0',
|
||||
refMoney:'0',
|
||||
payAmount:'0',
|
||||
},
|
||||
orderStatisticsAllMsg:{
|
||||
days:'',
|
||||
userName:'',
|
||||
addOilMl:'0',
|
||||
addOilNum:'0',
|
||||
orderNum:'0',
|
||||
discountAmount:'0',
|
||||
refMoney:'0',
|
||||
payAmount:'0',
|
||||
},
|
||||
total:0,
|
||||
timeDifference:1,
|
||||
@ -175,17 +182,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:{
|
||||
@ -215,7 +219,7 @@ export default {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getRunningWaterByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
getRunningWaterByDataApi21(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
@ -227,17 +231,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;
|
||||
getInstituionListApi19(this.queryParams).then( response => {
|
||||
this.orderStatisticsAllMsg = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getOrderStatistics()
|
||||
|
||||
},
|
||||
|
||||
// 搜索按钮操作
|
||||
@ -256,8 +255,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();
|
||||
},
|
||||
|
@ -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.salesNum}}</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.buyingPrice}}</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>
|
||||
@ -99,31 +93,28 @@
|
||||
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="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="goodName" align="center" label="商品名称"> </el-table-column>
|
||||
<el-table-column prop="goodNum" align="center" label="商品编号"> </el-table-column>
|
||||
<el-table-column prop="pinYin" align="center" label="拼音码"> </el-table-column>
|
||||
<el-table-column prop="goodSpecs" align="center" label="商品规格"> </el-table-column>
|
||||
<el-table-column prop="salesNum" align="center" label="销售数量"> </el-table-column>
|
||||
<el-table-column prop="buyingPrice" 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
|
||||
<div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -135,7 +126,9 @@ import {
|
||||
getRunningWaterByDataApi,
|
||||
exportExcelOilDeptApi,
|
||||
getmyDataApi,
|
||||
getInstituionListApi2
|
||||
getInstituionListApi2,
|
||||
getInstituionListApi23,
|
||||
getRunningWaterByDataApi25
|
||||
} from "@/api/allOrder";
|
||||
|
||||
export default {
|
||||
@ -160,15 +153,15 @@ export default {
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
deptType:"3",
|
||||
|
||||
dataRange:[]
|
||||
},
|
||||
orderStatistics:{
|
||||
numberOfStrokes:'0',
|
||||
theTotalAmountOfTheOrder:'0',
|
||||
theTotalAmountPaid:'0',
|
||||
oilDiscounts:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheItem:'0',
|
||||
salesNum:'0',
|
||||
buyingPrice:'0',
|
||||
orderNum:'0',
|
||||
discountAmount:'0',
|
||||
refMoney:'0',
|
||||
payAmount:'0',
|
||||
},
|
||||
total:0,
|
||||
timeDifference:1,
|
||||
@ -180,18 +173,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(){
|
||||
@ -215,12 +204,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=>{
|
||||
getRunningWaterByDataApi25(this.queryParams).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
@ -232,17 +216,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 => {
|
||||
getInstituionListApi23(this.queryParams).then( response => {
|
||||
this.orderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getOrderStatistics()
|
||||
|
||||
},
|
||||
|
||||
// 搜索按钮操作
|
||||
@ -261,8 +240,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();
|
||||
},
|
||||
|
@ -6,19 +6,14 @@
|
||||
<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>
|
||||
@ -31,26 +26,26 @@
|
||||
<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">0/0</div>
|
||||
<el-tooltip class="item" effect="dark" content="总兑换数量" placement="top-start">
|
||||
<div class="size-bole">{{orderStatistics.exchangeNum}}</div>
|
||||
</el-tooltip>
|
||||
<div class="size-hui">
|
||||
<div class="dian" style="background: #0DC291"></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">
|
||||
<div class="size-bole" style="color:#00CAFF;">0/0</div>
|
||||
<el-tooltip class="item" effect="dark" content="总消耗积分" placement="top-start">
|
||||
<div class="size-bole" style="color:#00CAFF;">{{orderStatistics.consumeInter}}</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">
|
||||
<div class="size-bole" style="color:#F44522;" >0/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">
|
||||
<div class="dian" style="background: #F44522"></div>
|
||||
@ -58,8 +53,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/0</div>
|
||||
<el-tooltip class="item" effect="dark" content="优惠总金额(元)" placement="top-start">
|
||||
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.payAmount}}</div>
|
||||
</el-tooltip>
|
||||
<div class="size-hui">
|
||||
<div class="dian" style="background: #FF7E00"></div>
|
||||
@ -73,27 +68,22 @@
|
||||
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="goodsMoney" align="center" label="商品编号"> </el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="兑换数量"> </el-table-column>
|
||||
<el-table-column prop="count" align="center" label="消耗积分"> </el-table-column>
|
||||
<el-table-column prop="count" 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="goodName" align="center" label="商品名称"> </el-table-column>
|
||||
<el-table-column prop="goodNum" align="center" label="商品编号"> </el-table-column>
|
||||
<el-table-column prop="exchangeNum" align="center" label="兑换数量"> </el-table-column>
|
||||
<el-table-column prop="consumeInter" align="center" label="消耗积分"> </el-table-column>
|
||||
<el-table-column prop="orderNum" 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
|
||||
<pagination
|
||||
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="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -105,7 +95,9 @@ import {
|
||||
getRunningWaterByDataApi,
|
||||
exportExcelOilDeptApi,
|
||||
getmyDataApi,
|
||||
getInstituionListApi2
|
||||
getInstituionListApi2,
|
||||
getInstituionListApi27,
|
||||
getRunningWaterByDataApi29
|
||||
} from "@/api/allOrder";
|
||||
export default {
|
||||
name: "runningWater-oilDepot",
|
||||
@ -129,15 +121,13 @@ export default {
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
deptType:"3",
|
||||
|
||||
dataRange:[]
|
||||
},
|
||||
orderStatistics:{
|
||||
numberOfStrokes:'0',
|
||||
theTotalAmountOfTheOrder:'0',
|
||||
theTotalAmountPaid:'0',
|
||||
oilDiscounts:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheItem:'0',
|
||||
exchangeNum:'0',
|
||||
consumeInter:'0',
|
||||
orderNum:'0',
|
||||
payAmount:'0',
|
||||
},
|
||||
total:0,
|
||||
timeDifference:1,
|
||||
@ -149,18 +139,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(){
|
||||
@ -184,13 +170,10 @@ 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=>{
|
||||
console.log(11111111)
|
||||
getRunningWaterByDataApi29(this.queryParams).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
console.log(this.orderStatistics)
|
||||
})
|
||||
},
|
||||
async getDeptList() {
|
||||
@ -201,17 +184,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 => {
|
||||
getInstituionListApi27(this.queryParams).then( response => {
|
||||
this.orderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getOrderStatistics()
|
||||
|
||||
},
|
||||
|
||||
// 搜索按钮操作
|
||||
@ -219,6 +197,7 @@ export default {
|
||||
this.queryParams.page = 1;
|
||||
await this.getDeptList();
|
||||
this.getList();
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
// 重置按钮操作
|
||||
|
||||
@ -230,8 +209,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();
|
||||
},
|
||||
|
@ -104,16 +104,14 @@
|
||||
<!-- </div>-->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
<div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -618,4 +618,78 @@ public class AllOrderInfoController extends BaseController {
|
||||
StatisticsSaleOilOrderByGunDto map = allOrderInfoService.getRunningWaterByDataApi17(allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 销售员统计
|
||||
* @param allOrderInfoRes
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getInstituionListApi19")
|
||||
public ResponseObject getInstituionListApi19(AllOrderInfoRes allOrderInfoRes,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<StatisticsSaleUserOrderDto> map = allOrderInfoService.getInstituionListApi19(page,allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
/**
|
||||
* 油枪销售统计
|
||||
* @param allOrderInfoRes
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getRunningWaterByDataApi21")
|
||||
public ResponseObject getRunningWaterByDataApi21(AllOrderInfoRes allOrderInfoRes){
|
||||
StatisticsSaleUserOrderDto map = allOrderInfoService.getRunningWaterByDataApi21(allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
/**
|
||||
* 销售员统计
|
||||
* @param allOrderInfoRes
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getInstituionListApi23")
|
||||
public ResponseObject getInstituionListApi23(AllOrderInfoRes allOrderInfoRes,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<StatisticsSaleGoodOrderDto> map = allOrderInfoService.getInstituionListApi23(page,allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品销售统计
|
||||
* @param allOrderInfoRes
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getRunningWaterByDataApi25")
|
||||
public ResponseObject getRunningWaterByDataApi25(AllOrderInfoRes allOrderInfoRes){
|
||||
StatisticsSaleGoodOrderDto map = allOrderInfoService.getRunningWaterByDataApi25(allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分兑换商品统计
|
||||
* @param allOrderInfoRes
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getInstituionListApi27")
|
||||
public ResponseObject getInstituionListApi27(AllOrderInfoRes allOrderInfoRes,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<StatisticsGoodInterOrderDto> map = allOrderInfoService.getInstituionListApi27(page,allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 积分兑换商品统计
|
||||
* @param allOrderInfoRes
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getRunningWaterByDataApi29")
|
||||
public ResponseObject getRunningWaterByDataApi29(AllOrderInfoRes allOrderInfoRes){
|
||||
StatisticsGoodInterOrderDto map = allOrderInfoService.getRunningWaterByDataApi29(allOrderInfoRes);
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.fuint.business.order.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class StatisticsGoodInterOrderDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
//商品名称
|
||||
private String goodName;
|
||||
//商品编号
|
||||
private String goodNum;
|
||||
//兑换数量
|
||||
private String exchangeNum;
|
||||
//消耗积分
|
||||
private String consumeInter;
|
||||
//订单金额
|
||||
private String orderNum;
|
||||
//实收金额
|
||||
private String payAmount;
|
||||
//统计周期
|
||||
private String days;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.fuint.business.order.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class StatisticsSaleGoodOrderDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
//商品名称
|
||||
private String goodName;
|
||||
//商品编号
|
||||
private String goodNum;
|
||||
//拼音码
|
||||
private String pinYin;
|
||||
//商品的规格
|
||||
private String goodSpecs;
|
||||
//销量
|
||||
private String salesNum;
|
||||
//成本金额
|
||||
private String buyingPrice;
|
||||
//订单金额
|
||||
private String orderNum;
|
||||
//优惠金额
|
||||
private String discountAmount;
|
||||
//退款金额
|
||||
private String refMoney;
|
||||
//实收金额
|
||||
private String payAmount;
|
||||
//统计周期
|
||||
private String days;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.fuint.business.order.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class StatisticsSaleUserOrderDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
//统计周期
|
||||
private String days;
|
||||
//加油油号
|
||||
private String userName;
|
||||
//加油升数
|
||||
private String addOilMl;
|
||||
//加油笔数
|
||||
private String addOilNum;
|
||||
//订单金额
|
||||
private String orderNum;
|
||||
//优惠金额
|
||||
private String discountAmount;
|
||||
//退款金额
|
||||
private String refMoney;
|
||||
//实收金额
|
||||
private String payAmount;
|
||||
}
|
@ -155,5 +155,21 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
|
||||
StatisticsSaleOilOrderByGunDto getRunningWaterByDataApi17(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
IPage<StatisticsSaleUserOrderDto> getInstituionListApi19(@Param("page") Page page, @Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
StatisticsSaleUserOrderDto getRunningWaterByDataApi21(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
IPage<StatisticsSaleGoodOrderDto> getInstituionListApi23(@Param("page") Page page, @Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
StatisticsSaleGoodOrderDto getRunningWaterByDataApi25(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
IPage<StatisticsGoodInterOrderDto> getInstituionListApi27(@Param("page") Page page, @Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
StatisticsGoodInterOrderDto getRunningWaterByDataApi29(@Param("obj") AllOrderInfoRes allOrderInfoRes,
|
||||
@Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
}
|
||||
|
@ -1688,4 +1688,144 @@
|
||||
</if>
|
||||
where og.store_id=#{obj.storeId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getInstituionListApi19" resultType="com.fuint.business.order.dto.StatisticsSaleUserOrderDto">
|
||||
SELECT
|
||||
ta.real_name userName,
|
||||
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 t_account ta
|
||||
LEFT JOIN oil_order oo on ta.acct_id=oo.create_by
|
||||
<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 ta.store_id=#{obj.storeId}
|
||||
GROUP BY ta.acct_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getRunningWaterByDataApi21" resultType="com.fuint.business.order.dto.StatisticsSaleUserOrderDto">
|
||||
SELECT
|
||||
ta.real_name userName,
|
||||
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 t_account ta
|
||||
LEFT JOIN oil_order oo on ta.acct_id=oo.create_by
|
||||
<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 ta.store_id=#{obj.storeId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getInstituionListApi23" resultType="com.fuint.business.order.dto.StatisticsSaleGoodOrderDto">
|
||||
SELECT
|
||||
mg.name as goodName,
|
||||
mg.goods_no as goodNum,
|
||||
mg.pinyin_code as pinYin,
|
||||
mg.goods_specs as goodSpecs,
|
||||
IFNULL(count(mor.id),0) as salesNum,
|
||||
mg.buying_price as buyingPrice,
|
||||
IFNULL(sum(mor.amount),0) orderNum,
|
||||
IFNULL(sum(mor.discount),0) discountAmount,
|
||||
SUM(CASE WHEN mor.status = 'refund' THEN mor.pay_amount ELSE 0 END) AS refMoney,
|
||||
IFNULL(sum(mor.pay_amount),0) payAmount,
|
||||
concat(#{beginTime},'~',#{endTime}) days
|
||||
from mt_goods mg
|
||||
LEFT JOIN mt_order_goods mog on mg.id=mog.goods_id
|
||||
LEFT JOIN mt_order mor on mog.order_id=mor.id
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
<![CDATA[and mog.create_time >= concat(#{beginTime},' 00:00:00') ]]>
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
<![CDATA[ and mog.create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||
</if>
|
||||
where mg.store_id=#{obj.storeId}
|
||||
GROUP BY mg.id order by count(mor.id),mg.id desc
|
||||
</select>
|
||||
|
||||
<select id="getRunningWaterByDataApi25" resultType="com.fuint.business.order.dto.StatisticsSaleGoodOrderDto">
|
||||
SELECT
|
||||
mg.name as goodName,
|
||||
mg.goods_no as goodNum,
|
||||
mg.pinyin_code as pinYin,
|
||||
mg.goods_specs as goodSpecs,
|
||||
IFNULL(count(mor.id),0) as salesNum,
|
||||
SUM(CASE WHEN mor.id is not null THEN mg.buying_price ELSE 0 END) AS buyingPrice,
|
||||
IFNULL(sum(mor.amount),0) orderNum,
|
||||
IFNULL(sum(mor.discount),0) discountAmount,
|
||||
SUM(CASE WHEN mor.status = 'refund' THEN mor.pay_amount ELSE 0 END) AS refMoney,
|
||||
IFNULL(sum(mor.pay_amount),0) payAmount,
|
||||
concat(#{beginTime},'~',#{endTime}) days
|
||||
from mt_goods mg
|
||||
LEFT JOIN mt_order_goods mog on mg.id=mog.goods_id
|
||||
LEFT JOIN mt_order mor on mog.order_id=mor.id
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
<![CDATA[and mog.create_time >= concat(#{beginTime},' 00:00:00') ]]>
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
<![CDATA[ and mog.create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||
</if>
|
||||
where mg.store_id=#{obj.storeId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getInstituionListApi27" resultType="com.fuint.business.order.dto.StatisticsGoodInterOrderDto">
|
||||
SELECT
|
||||
CASE WHEN mt.name is not null THEN concat(ig.gift_name,'-',mt.`name`) ELSE ig.gift_name END as goodName,
|
||||
IFNULL(mt.goods_no,'--')as goodNum,
|
||||
IFNULL(count(io.id),0) as exchangeNum,
|
||||
IFNULL(sum(io.integral),0) consumeInter,
|
||||
IFNULL(sum(io.amount),0) orderNum,
|
||||
IFNULL(sum(io.actual_payment),0) payAmount,
|
||||
concat(#{beginTime},'~',#{endTime}) days
|
||||
FROM
|
||||
integral_gift ig
|
||||
LEFT JOIN integral_orders io on ig.id=io.gift_id
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
<![CDATA[and ig.create_time >= concat(#{beginTime},' 00:00:00') ]]>
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
<![CDATA[ and ig.create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||
</if>
|
||||
LEFT JOIN mt_goods mt on ig.goods_id=mt.id
|
||||
where ig.store_id=#{obj.storeId}
|
||||
GROUP BY ig.id order by count(io.id) desc,ig.id desc
|
||||
</select>
|
||||
|
||||
<select id="getRunningWaterByDataApi29" resultType="com.fuint.business.order.dto.StatisticsGoodInterOrderDto">
|
||||
SELECT
|
||||
IFNULL(count(io.id),0) as exchangeNum,
|
||||
IFNULL(sum(io.integral),0) consumeInter,
|
||||
IFNULL(sum(io.amount),0) orderNum,
|
||||
IFNULL(sum(io.actual_payment),0) payAmount
|
||||
FROM
|
||||
integral_gift ig
|
||||
LEFT JOIN integral_orders io on ig.id=io.gift_id
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
<![CDATA[and ig.create_time >= concat(#{beginTime},' 00:00:00') ]]>
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
<![CDATA[ and ig.create_time <= concat(#{endTime},' 23:59:59') ]]>
|
||||
</if>
|
||||
LEFT JOIN mt_goods mt on ig.goods_id=mt.id
|
||||
where ig.store_id=#{obj.storeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -230,4 +230,12 @@ AllOrderActivityVo getOneByOrderId(Integer orderId);
|
||||
IPage<StatisticsSaleOilOrderByGunDto> getInstituionListApi15(Page page, AllOrderInfoRes allOrderInfoRes);
|
||||
|
||||
StatisticsSaleOilOrderByGunDto getRunningWaterByDataApi17(AllOrderInfoRes allOrderInfoRes);
|
||||
|
||||
IPage<StatisticsSaleUserOrderDto> getInstituionListApi19(Page page, AllOrderInfoRes allOrderInfoRes);
|
||||
StatisticsSaleUserOrderDto getRunningWaterByDataApi21(AllOrderInfoRes allOrderInfoRes);
|
||||
IPage<StatisticsSaleGoodOrderDto> getInstituionListApi23(Page page, AllOrderInfoRes allOrderInfoRes);
|
||||
|
||||
StatisticsSaleGoodOrderDto getRunningWaterByDataApi25(AllOrderInfoRes allOrderInfoRes);
|
||||
IPage<StatisticsGoodInterOrderDto> getInstituionListApi27(Page page, AllOrderInfoRes allOrderInfoRes);
|
||||
StatisticsGoodInterOrderDto getRunningWaterByDataApi29(AllOrderInfoRes allOrderInfoRes);
|
||||
}
|
||||
|
@ -2771,4 +2771,57 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<StatisticsSaleUserOrderDto> getInstituionListApi19(Page page, AllOrderInfoRes allOrderInfoRes) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||
return allOrderInfoMapper.getInstituionListApi19(page,allOrderInfoRes,
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
@Override
|
||||
public StatisticsSaleUserOrderDto getRunningWaterByDataApi21(AllOrderInfoRes allOrderInfoRes) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||
return allOrderInfoMapper.getRunningWaterByDataApi21(allOrderInfoRes,
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StatisticsSaleGoodOrderDto> getInstituionListApi23(Page page, AllOrderInfoRes allOrderInfoRes) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||
return allOrderInfoMapper.getInstituionListApi23(page,allOrderInfoRes,
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
@Override
|
||||
public StatisticsSaleGoodOrderDto getRunningWaterByDataApi25(AllOrderInfoRes allOrderInfoRes) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||
return allOrderInfoMapper.getRunningWaterByDataApi25(allOrderInfoRes,
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StatisticsGoodInterOrderDto> getInstituionListApi27(Page page, AllOrderInfoRes allOrderInfoRes) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||
return allOrderInfoMapper.getInstituionListApi27(page,allOrderInfoRes,
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatisticsGoodInterOrderDto getRunningWaterByDataApi29(AllOrderInfoRes allOrderInfoRes) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||
return allOrderInfoMapper.getRunningWaterByDataApi29(allOrderInfoRes,
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user