1
This commit is contained in:
parent
95b7fab796
commit
8f285b0166
@ -201,6 +201,35 @@ export function getDataAnalysis(query) {
|
|||||||
params:query
|
params:query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 油站首页 数据分析 第一个饼状图
|
||||||
|
export function getOilPercentage(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/getOilPercentage',
|
||||||
|
method: 'get',
|
||||||
|
params:query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 油站首页 数据分析 第二个饼状图
|
||||||
|
export function getOilAndGoodsPercentage(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/getOilAndGoodsPercentage',
|
||||||
|
method: 'get',
|
||||||
|
params:query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 油站首页 数据分析 第三个饼状图
|
||||||
|
export function getOilAndGoodsAndVipAndPoints(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/allOrderInfo/getOilAndGoodsAndVipAndPoints',
|
||||||
|
method: 'get',
|
||||||
|
params:query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 油站首页数据展示
|
// 油站首页数据展示
|
||||||
export function getDataShow(query) {
|
export function getDataShow(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>-->
|
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>-->
|
||||||
<div class="hang_" v-for="(item,index) in noticeList" :key="index">
|
<div class="hang_" v-for="(item,index) in noticeList" :key="index">
|
||||||
【{{item.notificationType}}】{{ item.templateContent }}
|
【{{ item.notificationType }}】{{ item.templateContent }}
|
||||||
</div>
|
</div>
|
||||||
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
|
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
|
||||||
</div>
|
</div>
|
||||||
@ -48,10 +48,12 @@
|
|||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="h-tt" style="margin-right: 15px">数据看板</div>
|
<div class="h-tt" style="margin-right: 15px">数据看板</div>
|
||||||
<el-dropdown placement="bottom-start " @command="sjkbStoreAmount">
|
<el-dropdown placement="bottom-start " @command="sjkbStoreAmount">
|
||||||
<div class="h-anniu" :class="{'q-anniu' : dataTimeShow == false}" @click="dataTimeShow = false ">{{sjkbTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : dataTimeShow == false}" @click="dataTimeShow = false ">
|
||||||
|
{{ sjkbTitle }} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown" >
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{ item }}
|
||||||
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div class="h-anniu" :class="{'q-anniu' : dataTimeShow == true}" @click="dataTimeShow = true"> 自定义
|
<div class="h-anniu" :class="{'q-anniu' : dataTimeShow == true}" @click="dataTimeShow = true"> 自定义
|
||||||
@ -104,9 +106,7 @@
|
|||||||
<div class="h-tt" style="position: absolute;top: 0px">数据分析</div>
|
<div class="h-tt" style="position: absolute;top: 0px">数据分析</div>
|
||||||
<div id="ccc" style="width: 400px;height: 200px; "></div>
|
<div id="ccc" style="width: 400px;height: 200px; "></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="h-r-ba"></div>-->
|
|
||||||
<div>
|
<div>
|
||||||
<!-- <div class="h-tt" >活跃油站</div>-->
|
|
||||||
<div class="d-s" style="justify-content: space-between">
|
<div class="d-s" style="justify-content: space-between">
|
||||||
<div id="cccc" style="width: 400px;height: 200px;"></div>
|
<div id="cccc" style="width: 400px;height: 200px;"></div>
|
||||||
<div id="ccct" style="width: 400px;height: 200px;"></div>
|
<div id="ccct" style="width: 400px;height: 200px;"></div>
|
||||||
@ -141,14 +141,16 @@
|
|||||||
<div class="d-s" style="margin-bottom: 10px">
|
<div class="d-s" style="margin-bottom: 10px">
|
||||||
<div class="h-tt" style="margin-right: 15px">油品交易分析</div>
|
<div class="h-tt" style="margin-right: 15px">油品交易分析</div>
|
||||||
<el-dropdown placement="bottom-start" @command="editShow">
|
<el-dropdown placement="bottom-start" @command="editShow">
|
||||||
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == false}" @click="showTimeShow = false ">{{ypjyTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == false}" @click="showTimeShow = false ">
|
||||||
|
{{ ypjyTitle }} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <el-dropdown-item command="近一周" index="2">近一周</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一周" index="2">近一周</el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item command="近一月" index="2">本月</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一月" index="2">本月</el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item command="近一年" index="2">本季度</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一年" index="2">本季度</el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item command="近一年" index="2">本年</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一年" index="2">本年</el-dropdown-item>-->
|
||||||
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{ item }}
|
||||||
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == true}" @click="showTimeShow = true"> 自定义
|
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == true}" @click="showTimeShow = true"> 自定义
|
||||||
@ -164,17 +166,18 @@
|
|||||||
@blur="getDataShow">
|
@blur="getDataShow">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="cccf"
|
<div id="cccf"
|
||||||
style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-box-t">
|
<div class="right-box-t">
|
||||||
<div style="font-size: 16px;font-weight: bold"><span style="margin-right: 15px">员工排行</span>
|
<div style="font-size: 16px;font-weight: bold"><span style="margin-right: 15px">员工排行</span>
|
||||||
<el-dropdown placement="bottom-start" @command="editColor">
|
<el-dropdown placement="bottom-start" @command="editColor">
|
||||||
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">{{ygphTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">{{ ygphTitle }} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{ item }}
|
||||||
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
@ -213,14 +216,16 @@
|
|||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="h-tt" style="margin-right: 15px">数据统计</div>
|
<div class="h-tt" style="margin-right: 15px">数据统计</div>
|
||||||
<el-dropdown placement="bottom-start" @command="editCount">
|
<el-dropdown placement="bottom-start" @command="editCount">
|
||||||
<div class="h-anniu" :class="{'q-anniu' : countTimeShow == false}" @click="countTimeShow = false ">{{sjtjTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : countTimeShow == false}" @click="countTimeShow = false ">
|
||||||
|
{{ sjtjTitle }} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <el-dropdown-item command="近一周" index="1">近一周</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一周" index="1">近一周</el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item command="近一月" index="1">本月</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一月" index="1">本月</el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item command="近一年" index="1">本季度</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一年" index="1">本季度</el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item command="近一年" index="1">本年</el-dropdown-item>-->
|
<!-- <el-dropdown-item command="近一年" index="1">本年</el-dropdown-item>-->
|
||||||
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{ item }}
|
||||||
|
</el-dropdown-item>
|
||||||
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@ -256,19 +261,28 @@ import {parseTime} from "@/utils/fuint";
|
|||||||
import {getBannerListApi} from "@/api/sys/banner";
|
import {getBannerListApi} from "@/api/sys/banner";
|
||||||
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
|
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
|
||||||
import {employeeSalesApi} from "@/api/indexStatistics";
|
import {employeeSalesApi} from "@/api/indexStatistics";
|
||||||
import {getDataAnalysis, getDataBoard, getDataCount, getDataShow, getTotalAmount} from "@/api/allOrder";
|
import {
|
||||||
|
getDataAnalysis,
|
||||||
|
getDataBoard,
|
||||||
|
getDataCount,
|
||||||
|
getDataShow,
|
||||||
|
getTotalAmount,
|
||||||
|
getOilPercentage,
|
||||||
|
getOilAndGoodsPercentage,
|
||||||
|
getOilAndGoodsAndVipAndPoints
|
||||||
|
} from "@/api/allOrder";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
props: ["accountId"],
|
props: ["accountId"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
amountList:[
|
amountList: [
|
||||||
// "今日" ,
|
// "今日" ,
|
||||||
// "昨日" ,
|
// "昨日" ,
|
||||||
"近一周" ,
|
"近一周",
|
||||||
"本月" ,
|
"本月",
|
||||||
"本季度" ,
|
"本季度",
|
||||||
"本年"
|
"本年"
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -278,7 +292,7 @@ export default {
|
|||||||
sjtjTitle: "近一周",
|
sjtjTitle: "近一周",
|
||||||
xShow: false,
|
xShow: false,
|
||||||
timeShow: false,
|
timeShow: false,
|
||||||
dataTimeShow : false,
|
dataTimeShow: false,
|
||||||
showTimeShow: false,
|
showTimeShow: false,
|
||||||
countTimeShow: false,
|
countTimeShow: false,
|
||||||
form: {},
|
form: {},
|
||||||
@ -307,8 +321,8 @@ export default {
|
|||||||
}],
|
}],
|
||||||
value: '',
|
value: '',
|
||||||
value1: [],
|
value1: [],
|
||||||
showValue:[],
|
showValue: [],
|
||||||
countValue:[],
|
countValue: [],
|
||||||
value2: [],
|
value2: [],
|
||||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||||
queryParams: {},
|
queryParams: {},
|
||||||
@ -362,35 +376,35 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sjkbStoreAmount(e){
|
sjkbStoreAmount(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.sjkbTitle = e
|
this.sjkbTitle = e
|
||||||
let command = e
|
let command = e
|
||||||
if (command=='今日'){
|
if (command == '今日') {
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
start.setMinutes(0)
|
start.setMinutes(0)
|
||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.value1 = [parseTime(new Date()),parseTime(new Date())]
|
this.value1 = [parseTime(new Date()), parseTime(new Date())]
|
||||||
}else if (command=='昨日'){
|
} else if (command == '昨日') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
|
||||||
this.value1 = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
|
this.value1 = [parseTime(oneWeekAgo), parseTime(oneWeekAgo)]
|
||||||
} else if (command=='近一周'){
|
} else if (command == '近一周') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.value1 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
} else if (command=='本月'){
|
} else if (command == '本月') {
|
||||||
const [startTime, endTime] = this.getMonthStartAndToday();
|
const [startTime, endTime] = this.getMonthStartAndToday();
|
||||||
this.value1 = [parseTime(startTime),parseTime(endTime)]
|
this.value1 = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='本季度'){
|
} else if (command == '本季度') {
|
||||||
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
||||||
this.value1 = [parseTime(startTime), parseTime(endTime)];
|
this.value1 = [parseTime(startTime), parseTime(endTime)];
|
||||||
} else if (command=='本年'){
|
} else if (command == '本年') {
|
||||||
const [startTime, endTime] = this.getYearStartAndEnd();
|
const [startTime, endTime] = this.getYearStartAndEnd();
|
||||||
this.value1 = [parseTime(startTime),parseTime(endTime)]
|
this.value1 = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='自定义'){
|
} else if (command == '自定义') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
this.getStoreAmount()
|
this.getStoreAmount()
|
||||||
@ -399,108 +413,108 @@ export default {
|
|||||||
goList() {
|
goList() {
|
||||||
this.$router.push('/notificationList/index')
|
this.$router.push('/notificationList/index')
|
||||||
},
|
},
|
||||||
editShow(e){
|
editShow(e) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.ypjyTitle = e
|
this.ypjyTitle = e
|
||||||
let command = e
|
let command = e
|
||||||
if (command=='今日'){
|
if (command == '今日') {
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
start.setMinutes(0)
|
start.setMinutes(0)
|
||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.showValue = [parseTime(new Date()),parseTime(new Date())]
|
this.showValue = [parseTime(new Date()), parseTime(new Date())]
|
||||||
}else if (command=='昨日'){
|
} else if (command == '昨日') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
|
||||||
this.showValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
|
this.showValue = [parseTime(oneWeekAgo), parseTime(oneWeekAgo)]
|
||||||
} else if (command=='近一周'){
|
} else if (command == '近一周') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.showValue = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
} else if (command=='本月'){
|
} else if (command == '本月') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||||
const [startTime, endTime] = this.getMonthStartAndToday();
|
const [startTime, endTime] = this.getMonthStartAndToday();
|
||||||
this.showValue = [parseTime(startTime),parseTime(endTime)]
|
this.showValue = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='本季度'){
|
} else if (command == '本季度') {
|
||||||
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
||||||
this.showValue = [parseTime(startTime), parseTime(endTime)];
|
this.showValue = [parseTime(startTime), parseTime(endTime)];
|
||||||
} else if (command=='本年'){
|
} else if (command == '本年') {
|
||||||
const [startTime, endTime] = this.getYearStartAndEnd();
|
const [startTime, endTime] = this.getYearStartAndEnd();
|
||||||
this.showValue = [parseTime(startTime),parseTime(endTime)]
|
this.showValue = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='自定义'){
|
} else if (command == '自定义') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
this.getDataShow()
|
this.getDataShow()
|
||||||
},
|
},
|
||||||
editCount(e){
|
editCount(e) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.sjtjTitle = e
|
this.sjtjTitle = e
|
||||||
console.log("e",e)
|
console.log("e", e)
|
||||||
let command = e
|
let command = e
|
||||||
if (command=='今日'){
|
if (command == '今日') {
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
start.setMinutes(0)
|
start.setMinutes(0)
|
||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
// this.countValue = [start,new Date()]
|
// this.countValue = [start,new Date()]
|
||||||
this.countValue = [parseTime(new Date()),parseTime(new Date())]
|
this.countValue = [parseTime(new Date()), parseTime(new Date())]
|
||||||
}else if (command=='昨日'){
|
} else if (command == '昨日') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
|
||||||
this.countValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
|
this.countValue = [parseTime(oneWeekAgo), parseTime(oneWeekAgo)]
|
||||||
} else if (command=='近一周'){
|
} else if (command == '近一周') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.countValue = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
} else if (command=='本月'){
|
} else if (command == '本月') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||||
const [startTime, endTime] = this.getMonthStartAndToday();
|
const [startTime, endTime] = this.getMonthStartAndToday();
|
||||||
this.countValue = [parseTime(startTime),parseTime(endTime)]
|
this.countValue = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='本季度'){
|
} else if (command == '本季度') {
|
||||||
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
||||||
this.countValue = [parseTime(startTime), parseTime(endTime)];
|
this.countValue = [parseTime(startTime), parseTime(endTime)];
|
||||||
} else if (command=='本年'){
|
} else if (command == '本年') {
|
||||||
const [startTime, endTime] = this.getYearStartAndEnd();
|
const [startTime, endTime] = this.getYearStartAndEnd();
|
||||||
this.countValue = [parseTime(startTime),parseTime(endTime)]
|
this.countValue = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='自定义'){
|
} else if (command == '自定义') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
this.getDataCount()
|
this.getDataCount()
|
||||||
},
|
},
|
||||||
editColor(command){
|
editColor(command) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.ygphTitle = command
|
this.ygphTitle = command
|
||||||
if (command=='今日'){
|
if (command == '今日') {
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
start.setMinutes(0)
|
start.setMinutes(0)
|
||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.value2 = [start,new Date()]
|
this.value2 = [start, new Date()]
|
||||||
} else if (command=='近一周'){
|
} else if (command == '近一周') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
} else if (command=='本月'){
|
} else if (command == '本月') {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||||
const [startTime, endTime] = this.getMonthStartAndToday();
|
const [startTime, endTime] = this.getMonthStartAndToday();
|
||||||
this.value2 = [parseTime(startTime),parseTime(endTime)]
|
this.value2 = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='本季度'){
|
} else if (command == '本季度') {
|
||||||
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
const [startTime, endTime] = this.getQuarterStartAndEnd();
|
||||||
this.value2 = [parseTime(startTime), parseTime(endTime)];
|
this.value2 = [parseTime(startTime), parseTime(endTime)];
|
||||||
} else if (command=='本年'){
|
} else if (command == '本年') {
|
||||||
const [startTime, endTime] = this.getYearStartAndEnd();
|
const [startTime, endTime] = this.getYearStartAndEnd();
|
||||||
this.value2 = [parseTime(startTime),parseTime(endTime)]
|
this.value2 = [parseTime(startTime), parseTime(endTime)]
|
||||||
}else if (command=='自定义'){
|
} else if (command == '自定义') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
this.getEmployeList()
|
this.getEmployeList()
|
||||||
},
|
},
|
||||||
getMonthStartAndToday() {
|
getMonthStartAndToday() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@ -600,26 +614,20 @@ export default {
|
|||||||
startTime: this.value1[0],
|
startTime: this.value1[0],
|
||||||
endTime: this.value1[1]
|
endTime: this.value1[1]
|
||||||
}
|
}
|
||||||
getDataAnalysis(data).then(res => {
|
//获取第一个饼状图数据
|
||||||
// console.log('数据分析的数据', res)
|
getOilPercentage(data).then(res => {
|
||||||
this.dataAnalysisAllList = []
|
this.dataAnalysisOilNumberList = res.data
|
||||||
this.dataAnalysisOilNumberList = []
|
console.log("饼状图一数据",this.dataAnalysisOilNumberList )
|
||||||
this.dataAnalysisIfOilList = []
|
})
|
||||||
if (res.code == 200) {
|
//获取第二个饼状图数据
|
||||||
for (let i = 0; i < res.data.length; i++) {
|
getOilAndGoodsPercentage(data).then(res => {
|
||||||
if (res.data[i].type == 1) {
|
this.dataAnalysisIfOilList = res.data
|
||||||
this.dataAnalysisOilNumberList.push(res.data[i])
|
console.log("饼状图二数据",this.dataAnalysisIfOilList)
|
||||||
} else if (res.data[i].type == 2) {
|
})
|
||||||
this.dataAnalysisIfOilList.push(res.data[i])
|
//获取第三个饼状图数据
|
||||||
} else if (res.data[i].type == 3) {
|
getOilAndGoodsAndVipAndPoints(data).then(res => {
|
||||||
this.dataAnalysisAllList.push(res.data[i])
|
this.dataAnalysisAllList = res.data
|
||||||
}
|
console.log("饼状图三数据",this.dataAnalysisAllList )
|
||||||
}
|
|
||||||
// console.log('dataAnalysisOilNumberList', this.dataAnalysisOilNumberList)
|
|
||||||
// console.log('dataAnalysisIfOilList', this.dataAnalysisIfOilList)
|
|
||||||
// console.log('dataAnalysisAllList', this.dataAnalysisAllList)
|
|
||||||
this.initChart()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//油站首页数据展示
|
//油站首页数据展示
|
||||||
@ -629,7 +637,7 @@ export default {
|
|||||||
"endTime": this.showValue[1].split(' ')[0]
|
"endTime": this.showValue[1].split(' ')[0]
|
||||||
}
|
}
|
||||||
getDataShow(data).then(res => {
|
getDataShow(data).then(res => {
|
||||||
// console.log('首页数据展示', res.data)
|
console.log('首页数据展示', res.data)
|
||||||
this.dataShows = res.data
|
this.dataShows = res.data
|
||||||
this.initChart()
|
this.initChart()
|
||||||
})
|
})
|
||||||
@ -758,13 +766,13 @@ export default {
|
|||||||
let countType = []
|
let countType = []
|
||||||
count.push(c)
|
count.push(c)
|
||||||
this.dataCount.oilNames.forEach(item => {
|
this.dataCount.oilNames.forEach(item => {
|
||||||
let type={
|
let type = {
|
||||||
type: 'bar'
|
type: 'bar'
|
||||||
}
|
}
|
||||||
countType.push(type)
|
countType.push(type)
|
||||||
})
|
})
|
||||||
this.dataCount.oilData.forEach(item => {
|
this.dataCount.oilData.forEach(item => {
|
||||||
let a =[item.time, ...item.money]
|
let a = [item.time, ...item.money]
|
||||||
count.push(a)
|
count.push(a)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -776,19 +784,19 @@ export default {
|
|||||||
let showCountType = []
|
let showCountType = []
|
||||||
console.log("看看执行")
|
console.log("看看执行")
|
||||||
this.dataShows.oilNames.forEach(item => {
|
this.dataShows.oilNames.forEach(item => {
|
||||||
let type={
|
let type = {
|
||||||
type: 'bar'
|
type: 'bar'
|
||||||
}
|
}
|
||||||
showCountType.push(type)
|
showCountType.push(type)
|
||||||
})
|
})
|
||||||
console.log(this.dataShows.oilData)
|
console.log(this.dataShows.oilData)
|
||||||
this.dataShows.oilData.forEach(item => {
|
this.dataShows.oilData.forEach(item => {
|
||||||
let a =[item.day, ...item.oilPrices]
|
let a = [item.day, ...item.oilPrices]
|
||||||
showCount.push(a)
|
showCount.push(a)
|
||||||
console.log("showCount",a)
|
console.log("showCount", a)
|
||||||
})
|
})
|
||||||
console.log("showCount",showCount)
|
console.log("showCount", showCount)
|
||||||
console.log("showCountType",showCountType)
|
console.log("showCountType", showCountType)
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
color: [
|
color: [
|
||||||
@ -802,32 +810,31 @@ export default {
|
|||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
type:'scroll',
|
type: 'scroll',
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
right: '0%',
|
right: '0%',
|
||||||
bottom: '0%',
|
bottom: '0%',
|
||||||
left:'right',
|
left: 'right',
|
||||||
size:8
|
size: 8
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius:8,
|
borderRadius: 8,
|
||||||
borderColor:'#fff',
|
borderColor: '#fff',
|
||||||
borderWidth:4
|
borderWidth: 4
|
||||||
},
|
},
|
||||||
radius: ['40%', '80%'],
|
radius: ['40%', '80%'],
|
||||||
data: this.dataAnalysisOilNumberList,
|
data: this.dataAnalysisOilNumberList,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: "inside",
|
position: "inside",
|
||||||
color:'#fff',
|
color: '#fff',
|
||||||
formatter: `{d}%`,
|
formatter: `{d}%`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
const option1 = {
|
const option1 = {
|
||||||
@ -839,12 +846,12 @@ export default {
|
|||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
type:'scroll',
|
type: 'scroll',
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
right: '0%',
|
right: '0%',
|
||||||
bottom: '0%',
|
bottom: '0%',
|
||||||
left:'right',
|
left: 'right',
|
||||||
size:8
|
size: 8
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -863,7 +870,7 @@ export default {
|
|||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: "inside",
|
position: "inside",
|
||||||
color:'#fff',
|
color: '#fff',
|
||||||
formatter: `{d}%`,
|
formatter: `{d}%`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -882,12 +889,12 @@ export default {
|
|||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
type:'scroll',
|
type: 'scroll',
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
right: '0%',
|
right: '0%',
|
||||||
bottom: '0%',
|
bottom: '0%',
|
||||||
left:'right',
|
left: 'right',
|
||||||
size:8
|
size: 8
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -906,7 +913,7 @@ export default {
|
|||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: "inside",
|
position: "inside",
|
||||||
color:'#fff',
|
color: '#fff',
|
||||||
formatter: `{d}%`,
|
formatter: `{d}%`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 油站首页 数据展示
|
* 油站首页 数据看板
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("getDataBoard")
|
@GetMapping("getDataBoard")
|
||||||
@ -375,6 +375,48 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
return getSuccessResult(allOrderInfoService.getDataAnalysis(map));
|
return getSuccessResult(allOrderInfoService.getDataAnalysis(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 油站首页 数据分析 第一个饼状图
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getOilPercentage")
|
||||||
|
public ResponseObject getOilPercentage(String startTime, String endTime){
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("startTime", startTime);
|
||||||
|
map.put("endTime", endTime);
|
||||||
|
return getSuccessResult(allOrderInfoService.getOilPercentage(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 油站首页 数据分析 第二个饼状图
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getOilAndGoodsPercentage")
|
||||||
|
public ResponseObject getOilAndGoodsPercentage(String startTime, String endTime){
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("startTime", startTime);
|
||||||
|
map.put("endTime", endTime);
|
||||||
|
return getSuccessResult(allOrderInfoService.getOilAndGoodsPercentage(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 油站首页 数据分析 第三个饼状图
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getOilAndGoodsAndVipAndPoints")
|
||||||
|
public ResponseObject getOilAndGoodsAndVipAndPoints(String startTime, String endTime){
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("startTime", startTime);
|
||||||
|
map.put("endTime", endTime);
|
||||||
|
return getSuccessResult(allOrderInfoService.getOilAndGoodsAndVipAndPoints(map));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 油站首页数据展示
|
* 油站首页数据展示
|
||||||
* @param map
|
* @param map
|
||||||
|
@ -165,6 +165,10 @@ public interface AllOrderInfoService {
|
|||||||
*/
|
*/
|
||||||
List<HomeDataAnalysisVo> getDataAnalysis(Map<String, String> map);
|
List<HomeDataAnalysisVo> getDataAnalysis(Map<String, String> map);
|
||||||
|
|
||||||
|
|
||||||
|
Object getOilPercentage(Map<String, Object> map);
|
||||||
|
Object getOilAndGoodsPercentage(Map<String, Object> map);
|
||||||
|
Object getOilAndGoodsAndVipAndPoints(Map<String, Object> map);
|
||||||
/**
|
/**
|
||||||
* 油站首页数据展示
|
* 油站首页数据展示
|
||||||
* @param map
|
* @param map
|
||||||
|
@ -79,6 +79,7 @@ import com.fuint.system.dept.entity.SysDept;
|
|||||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||||
import com.fuint.system.dept.service.ISysDeptService;
|
import com.fuint.system.dept.service.ISysDeptService;
|
||||||
import com.fuint.system.dept.vo.SysDeptVo;
|
import com.fuint.system.dept.vo.SysDeptVo;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -140,10 +141,11 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MtUserMapper mtUserMapper;
|
private MtUserMapper mtUserMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> orderStatistics(AllOrderInfoRes allOrderInfoRes) {
|
public Map<String, Object> orderStatistics(AllOrderInfoRes allOrderInfoRes) {
|
||||||
return allOrderInfoMapper.orderStatistics(allOrderInfoRes, allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
return allOrderInfoMapper.orderStatistics(allOrderInfoRes, allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0],
|
||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -852,7 +854,6 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
MemberService memberService;
|
MemberService memberService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AllOrderInfoVo getTradingData(AllOrderInfoDto allOrderInfo) {
|
public AllOrderInfoVo getTradingData(AllOrderInfoDto allOrderInfo) {
|
||||||
|
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
@ -885,8 +886,8 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return allOrderInfoMapper.getTradingsData(allOrderInfo,
|
return allOrderInfoMapper.getTradingsData(allOrderInfo,
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0],
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -978,21 +979,20 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.gettradingListPage(page, allOrderInfo,
|
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.gettradingListPage(page, allOrderInfo,
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0],
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]);
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<AllOrderInfoVo> transactionList(Page page, AllOrderInfoRes allOrderInfoRes) {
|
public IPage<AllOrderInfoVo> transactionList(Page page, AllOrderInfoRes allOrderInfoRes) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> allOrderInfoVoIPage = super.baseMapper.transactionList(page, allOrderInfoRes,
|
IPage<AllOrderInfoVo> allOrderInfoVoIPage = super.baseMapper.transactionList(page, allOrderInfoRes,
|
||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0],
|
||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]);
|
||||||
return allOrderInfoVoIPage;
|
return allOrderInfoVoIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1916,6 +1916,78 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
return map1;
|
return map1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 油站首页 数据分析 第一个饼状图
|
||||||
|
*/
|
||||||
|
public Object getOilPercentage(Map<String, Object> map) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
map.put("storeId", nowAccountInfo.getStoreId());
|
||||||
|
List<Map<String, Object>> s1 = oilNumberMapper.getS1(map);
|
||||||
|
|
||||||
|
return s1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 油站首页 数据分析 第二个饼状图
|
||||||
|
*/
|
||||||
|
public Object getOilAndGoodsPercentage(Map<String, Object> map) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
map.put("storeId", nowAccountInfo.getStoreId());
|
||||||
|
Map<String, Object> m1 = oilNumberMapper.getOilAndGoodsPercentage(map);
|
||||||
|
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (int i = 1; i <= 2; i++) {
|
||||||
|
HashMap<String, Object> m2 = new HashMap<>();
|
||||||
|
if (i == 1) {
|
||||||
|
|
||||||
|
m2.put("name", "油品交易占比");
|
||||||
|
m2.put("value", m1.get("oil_order_total"));
|
||||||
|
}
|
||||||
|
if (i == 2) {
|
||||||
|
|
||||||
|
m2.put("name", "非油品交易占比");
|
||||||
|
m2.put("value", m1.get("mt_order_total"));
|
||||||
|
}
|
||||||
|
list.add(m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 油站首页 数据分析 第三个饼状图
|
||||||
|
*/
|
||||||
|
public Object getOilAndGoodsAndVipAndPoints(Map<String, Object> map) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
map.put("storeId", nowAccountInfo.getStoreId());
|
||||||
|
Map<String, Object> oilAndGoodsAndVipAndPoints = oilNumberMapper.getOilAndGoodsAndVipAndPoints(map);
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (int i = 1; i <=4 ; i++) {
|
||||||
|
HashMap<String, Object> m2 = new HashMap<>();
|
||||||
|
if (i==1){
|
||||||
|
m2.put("name","会员充值交易占比");
|
||||||
|
m2.put("value",oilAndGoodsAndVipAndPoints.get("all_order_type_3_total"));
|
||||||
|
}
|
||||||
|
if (i==2){
|
||||||
|
m2.put("name","积分商城交易占比");
|
||||||
|
m2.put("value",oilAndGoodsAndVipAndPoints.get("all_order_type_4_total"));
|
||||||
|
}
|
||||||
|
if (i==3){
|
||||||
|
m2.put("name","油品交易占比");
|
||||||
|
m2.put("value",oilAndGoodsAndVipAndPoints.get("oil_order_total"));
|
||||||
|
}
|
||||||
|
if (i==4){
|
||||||
|
m2.put("name","非油品交易占比");
|
||||||
|
m2.put("value",oilAndGoodsAndVipAndPoints.get("mt_order_total"));
|
||||||
|
}
|
||||||
|
|
||||||
|
list.add(m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 油站首页数据分析
|
* 油站首页数据分析
|
||||||
*
|
*
|
||||||
@ -2522,15 +2594,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
public List getStaffByStorId() {
|
public List getStaffByStorId() {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
nowAccountInfo.getStoreId();
|
nowAccountInfo.getStoreId();
|
||||||
List<TAccount> mtStaffs= mtStaffMapper.getStaffByStorId(nowAccountInfo.getStoreId());
|
List<TAccount> mtStaffs = mtStaffMapper.getStaffByStorId(nowAccountInfo.getStoreId());
|
||||||
return mtStaffs;
|
return mtStaffs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportExcelOrderMsgApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) {
|
public void exportExcelOrderMsgApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) {
|
||||||
List<TradingOrderExcel> list= transactionAllList(allOrderInfoRes);
|
List<TradingOrderExcel> list = transactionAllList(allOrderInfoRes);
|
||||||
List<TradingOrderExcel> tradingExcel = new ArrayList<>();
|
List<TradingOrderExcel> tradingExcel = new ArrayList<>();
|
||||||
for (TradingOrderExcel record : list) {
|
for (TradingOrderExcel record : list) {
|
||||||
TradingOrderExcel excel = new TradingOrderExcel();
|
TradingOrderExcel excel = new TradingOrderExcel();
|
||||||
@ -2553,6 +2624,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部订单数据
|
* 查询全部订单数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @param allOrderInfoRes
|
* @param allOrderInfoRes
|
||||||
* @return
|
* @return
|
||||||
@ -2562,14 +2634,15 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
System.out.println(allOrderInfoRes.getDataRange());
|
System.out.println(allOrderInfoRes.getDataRange());
|
||||||
List allOrderInfoVo = super.baseMapper.transactionAllList(allOrderInfoRes,
|
List allOrderInfoVo = super.baseMapper.transactionAllList(allOrderInfoRes,
|
||||||
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[0],
|
allOrderInfoRes.getDataRange().length == 0 ? "" : allOrderInfoRes.getDataRange()[0],
|
||||||
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[1]);
|
allOrderInfoRes.getDataRange().length == 0 ? "" : allOrderInfoRes.getDataRange()[1]);
|
||||||
|
|
||||||
return allOrderInfoVo;
|
return allOrderInfoVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportExcelBackOrderMsgsApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) {
|
public void exportExcelBackOrderMsgsApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) {
|
||||||
List<TradingBackOrderExcel> list= transactionBackAllList(allOrderInfoRes);
|
List<TradingBackOrderExcel> list = transactionBackAllList(allOrderInfoRes);
|
||||||
List<TradingBackOrderExcel> tradingExcel = new ArrayList<>();
|
List<TradingBackOrderExcel> tradingExcel = new ArrayList<>();
|
||||||
for (TradingBackOrderExcel record : list) {
|
for (TradingBackOrderExcel record : list) {
|
||||||
TradingBackOrderExcel excel1 = new TradingBackOrderExcel();
|
TradingBackOrderExcel excel1 = new TradingBackOrderExcel();
|
||||||
@ -2590,9 +2663,9 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询退单订单数据
|
* 查询退单订单数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @param allOrderInfoRes
|
* @param allOrderInfoRes
|
||||||
* @return
|
* @return
|
||||||
@ -2601,13 +2674,15 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
List allOrderInfoVo = super.baseMapper.transactionBackAllList(allOrderInfoRes,
|
List allOrderInfoVo = super.baseMapper.transactionBackAllList(allOrderInfoRes,
|
||||||
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[0],
|
allOrderInfoRes.getDataRange().length == 0 ? "" : allOrderInfoRes.getDataRange()[0],
|
||||||
allOrderInfoRes.getDataRange().length==0?"":allOrderInfoRes.getDataRange()[1]);
|
allOrderInfoRes.getDataRange().length == 0 ? "" : allOrderInfoRes.getDataRange()[1]);
|
||||||
|
|
||||||
return allOrderInfoVo;
|
return allOrderInfoVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询退单订单数据
|
* 查询退单订单数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @param allOrderInfo
|
* @param allOrderInfo
|
||||||
* @return
|
* @return
|
||||||
@ -2617,17 +2692,18 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
public IPage<AllOrderInfoVo> tradingNewList(Page page, AllOrderInfoDto allOrderInfo) {
|
public IPage<AllOrderInfoVo> tradingNewList(Page page, AllOrderInfoDto allOrderInfo) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return baseMapper.tradingNewList(page,allOrderInfo,
|
return baseMapper.tradingNewList(page, allOrderInfo,
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0],
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo) {
|
public AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return allOrderInfoMapper.getTradingNewData(allOrderInfo,
|
return allOrderInfoMapper.getTradingNewData(allOrderInfo,
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0],
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0],
|
||||||
allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]);
|
allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -2635,31 +2711,34 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return allOrderInfoMapper.getInstituionListApi2(allOrderInfoRes,
|
return allOrderInfoMapper.getInstituionListApi2(allOrderInfoRes,
|
||||||
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
|
@Override
|
||||||
public StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes) {
|
public StatisticsOrderAllDto getInstituionListApi3(AllOrderInfoRes allOrderInfoRes) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return allOrderInfoMapper.getInstituionListApi3(allOrderInfoRes,
|
return allOrderInfoMapper.getInstituionListApi3(allOrderInfoRes,
|
||||||
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
|
@Override
|
||||||
public IPage<StatisticsOneDayOrderAllDto> getInstituionListApi7(Page page,AllOrderInfoRes allOrderInfoRes) {
|
public IPage<StatisticsOneDayOrderAllDto> getInstituionListApi7(Page page, AllOrderInfoRes allOrderInfoRes) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return allOrderInfoMapper.getInstituionListApi7(page,allOrderInfoRes,
|
return allOrderInfoMapper.getInstituionListApi7(page, allOrderInfoRes,
|
||||||
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
|
@Override
|
||||||
public StatisticsOneDayOrderAllDto getInstituionListApi9(AllOrderInfoRes allOrderInfoRes) {
|
public StatisticsOneDayOrderAllDto getInstituionListApi9(AllOrderInfoRes allOrderInfoRes) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return allOrderInfoMapper.getInstituionListApi9(allOrderInfoRes,
|
return allOrderInfoMapper.getInstituionListApi9(allOrderInfoRes,
|
||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0],
|
allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0],
|
||||||
allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]);
|
allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import io.swagger.models.auth.In;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (ChainStoreInfo)表数据库访问层
|
* (ChainStoreInfo)表数据库访问层
|
||||||
@ -65,5 +66,9 @@ public interface OilNumberMapper extends BaseMapper<OilNumber> {
|
|||||||
double getOilPriceById(@Param("oilId") Integer oilId,@Param("storeId") Integer storeId);
|
double getOilPriceById(@Param("oilId") Integer oilId,@Param("storeId") Integer storeId);
|
||||||
|
|
||||||
List<OilNumber> selectAllOil(Integer storeId);
|
List<OilNumber> selectAllOil(Integer storeId);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getS1(@Param("obj") Map<String, Object> map);
|
||||||
|
Map<String, Object> getOilAndGoodsPercentage(@Param("obj") Map<String, Object> map);
|
||||||
|
Map<String, Object> getOilAndGoodsAndVipAndPoints(@Param("obj") Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,38 +5,53 @@
|
|||||||
<mapper namespace="com.fuint.business.petrolStationManagement.mapper.OilNumberMapper">
|
<mapper namespace="com.fuint.business.petrolStationManagement.mapper.OilNumberMapper">
|
||||||
|
|
||||||
<resultMap type="com.fuint.business.petrolStationManagement.entity.OilNumber" id="OilNumberResult">
|
<resultMap type="com.fuint.business.petrolStationManagement.entity.OilNumber" id="OilNumberResult">
|
||||||
<id property="numberId" column="number_id" />
|
<id property="numberId" column="number_id"/>
|
||||||
<result property="oilType" column="oil_type" />
|
<result property="oilType" column="oil_type"/>
|
||||||
<result property="oilName" column="oil_name" />
|
<result property="oilName" column="oil_name"/>
|
||||||
<result property="oilPrice" column="oil_price" />
|
<result property="oilPrice" column="oil_price"/>
|
||||||
<result property="gbPrice" column="gb_price" />
|
<result property="gbPrice" column="gb_price"/>
|
||||||
<result property="receivingUnits" column="receiving_units" />
|
<result property="receivingUnits" column="receiving_units"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="state" column="state" />
|
<result property="state" column="state"/>
|
||||||
<result property="sort" column="sort" />
|
<result property="sort" column="sort"/>
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark"/>
|
||||||
<result property="ifDelete" column="if_delete" />
|
<result property="ifDelete" column="if_delete"/>
|
||||||
<result property="unit" column="unit"/>
|
<result property="unit" column="unit"/>
|
||||||
<result property="storeId" column="store_id"/>
|
<result property="storeId" column="store_id"/>
|
||||||
<result property="upOrDown" column="up_or_down"/>
|
<result property="upOrDown" column="up_or_down"/>
|
||||||
<result property="amplitudeOfChange" column="amplitude_of_change"/>
|
<result property="amplitudeOfChange" column="amplitude_of_change"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOilNumber">
|
<sql id="selectOilNumber">
|
||||||
select `number_id`,`oil_type`,oil_name,oil_price,gb_price,receiving_units,create_time,update_time,`state`,sort,remark,if_delete,unit, store_id
|
select `number_id`,
|
||||||
|
`oil_type`,
|
||||||
|
oil_name,
|
||||||
|
oil_price,
|
||||||
|
gb_price,
|
||||||
|
receiving_units,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
`state`,
|
||||||
|
sort,
|
||||||
|
remark,
|
||||||
|
if_delete,
|
||||||
|
unit,
|
||||||
|
store_id
|
||||||
from oil_number
|
from oil_number
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectOilNumberList" resultMap="OilNumberResult">
|
<select id="selectOilNumberList" resultMap="OilNumberResult">
|
||||||
SELECT onu.*,ms.real_name FROM oil_number onu LEFT JOIN mt_staff ms ON onu.create_by = ms.id
|
SELECT onu.*, ms.real_name
|
||||||
|
FROM oil_number onu
|
||||||
|
LEFT JOIN mt_staff ms ON onu.create_by = ms.id
|
||||||
where onu.store_id = #{oilNumber.storeId}
|
where onu.store_id = #{oilNumber.storeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectOilNumberList2" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
<select id="selectOilNumberList2" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
||||||
select
|
select
|
||||||
omm.number_id ,
|
omm.number_id ,
|
||||||
onn.oil_type,
|
onn.oil_type,
|
||||||
onn.id oilId,
|
onn.id oilId,
|
||||||
onn.oil_name,
|
onn.oil_name,
|
||||||
@ -49,26 +64,26 @@
|
|||||||
left join oil_name onn on omm.oil_name = onn.id
|
left join oil_name onn on omm.oil_name = onn.id
|
||||||
<where>
|
<where>
|
||||||
omm.store_id = #{oilNumber.storeId}
|
omm.store_id = #{oilNumber.storeId}
|
||||||
<if test="oilNumber.oilType != null and oilNumber.oilType != ''">
|
<if test="oilNumber.oilType != null and oilNumber.oilType != ''">
|
||||||
and onn.oil_type = #{oilNumber.oilType}
|
and onn.oil_type = #{oilNumber.oilType}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- select-->
|
<!-- select-->
|
||||||
<!-- number_id numberId,-->
|
<!-- number_id numberId,-->
|
||||||
<!-- oil_type oilType,-->
|
<!-- oil_type oilType,-->
|
||||||
<!-- oil_name oilName,-->
|
<!-- oil_name oilName,-->
|
||||||
<!-- oil_price oilPrice,-->
|
<!-- oil_price oilPrice,-->
|
||||||
<!-- update_time updateTime-->
|
<!-- update_time updateTime-->
|
||||||
<!-- from oil_number-->
|
<!-- from oil_number-->
|
||||||
<select id="selectOilNumberById" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
<select id="selectOilNumberById" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
||||||
<include refid="selectOilNumber"></include>
|
<include refid="selectOilNumber"></include>
|
||||||
where number_id = #{id}
|
where number_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<insert id="insertOilNumber">
|
<insert id="insertOilNumber">
|
||||||
insert into oil_number
|
insert into oil_number
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="oilType != null">oil_type,</if>
|
<if test="oilType != null">oil_type,</if>
|
||||||
<if test="oilName != null">oil_name,</if>
|
<if test="oilName != null">oil_name,</if>
|
||||||
<if test="oilPrice != null">oil_price,</if>
|
<if test="oilPrice != null">oil_price,</if>
|
||||||
@ -84,7 +99,7 @@
|
|||||||
<if test="storeId != null">store_id,</if>
|
<if test="storeId != null">store_id,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test=" oilType != null">#{oilType },</if>
|
<if test=" oilType != null">#{oilType },</if>
|
||||||
<if test=" oilName != null">#{oilName },</if>
|
<if test=" oilName != null">#{oilName },</if>
|
||||||
<if test=" oilPrice != null">#{oilPrice },</if>
|
<if test=" oilPrice != null">#{oilPrice },</if>
|
||||||
@ -107,29 +122,34 @@
|
|||||||
<set>
|
<set>
|
||||||
<if test=" oilType != null and oilType != ''">oil_type= #{oilType},</if>
|
<if test=" oilType != null and oilType != ''">oil_type= #{oilType},</if>
|
||||||
<if test=" oilName != null and oilName != ''">oil_name= #{oilName},</if>
|
<if test=" oilName != null and oilName != ''">oil_name= #{oilName},</if>
|
||||||
<if test=" oilPrice != null and oilPrice != ''" >oil_price= #{oilPrice},</if>
|
<if test=" oilPrice != null and oilPrice != ''">oil_price= #{oilPrice},</if>
|
||||||
<if test=" gbPrice != null and gbPrice != ''">gb_price= #{gbPrice},</if>
|
<if test=" gbPrice != null and gbPrice != ''">gb_price= #{gbPrice},</if>
|
||||||
<if test=" receivingUnits != null and receivingUnits != ''">receiving_units= #{receivingUnits},</if>
|
<if test=" receivingUnits != null and receivingUnits != ''">receiving_units= #{receivingUnits},</if>
|
||||||
<if test=" state != null and state != ''"> state = #{state},</if>
|
<if test=" state != null and state != ''">state = #{state},</if>
|
||||||
<if test=" sort != null and sort != ''">sort= #{sort},</if>
|
<if test=" sort != null and sort != ''">sort= #{sort},</if>
|
||||||
<if test=" remark != null and remark != ''">remark= #{remark},</if>
|
<if test=" remark != null and remark != ''">remark= #{remark},</if>
|
||||||
<if test=" updateBy != null and updateBy != ''">update_by= #{updateBy},</if>
|
<if test=" updateBy != null and updateBy != ''">update_by= #{updateBy},</if>
|
||||||
<if test=" unit != null and unit != ''">unit= #{unit},</if>
|
<if test=" unit != null and unit != ''">unit= #{unit},</if>
|
||||||
<if test=" upOrDown != null and unit != ''">up_or_down= #{upOrDown},</if>
|
<if test=" upOrDown != null and unit != ''">up_or_down= #{upOrDown},</if>
|
||||||
<if test=" amplitudeOfChange != null and amplitudeOfChange != ''">amplitude_of_change= #{amplitudeOfChange },</if>
|
<if test=" amplitudeOfChange != null and amplitudeOfChange != ''">amplitude_of_change=
|
||||||
|
#{amplitudeOfChange },
|
||||||
|
</if>
|
||||||
update_time= NOW()
|
update_time= NOW()
|
||||||
</set>
|
</set>
|
||||||
where number_id = #{numberId}
|
where number_id = #{numberId}
|
||||||
</update>
|
</update>
|
||||||
<delete id="deleteOilNumberById">
|
<delete id="deleteOilNumberById">
|
||||||
delete from oil_number where number_id = #{numberId}
|
delete
|
||||||
|
from oil_number
|
||||||
|
where number_id = #{numberId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getOilName" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
<select id="getOilName" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
||||||
select name.id id, onm.number_id numberId,name.oil_name oilName, name.oil_type oilType,onm.oil_price oilPrice ,onm.gb_price gbPrice,
|
select name.id id, onm.number_id numberId,name.oil_name oilName, name.oil_type oilType,onm.oil_price oilPrice
|
||||||
name.oil_density oilDensity,onm.unit unit,name.id oilNameId
|
,onm.gb_price gbPrice,
|
||||||
|
name.oil_density oilDensity,onm.unit unit,name.id oilNameId
|
||||||
from oil_number onm
|
from oil_number onm
|
||||||
left join oil_name name on onm.oil_name = name.id
|
left join oil_name name on onm.oil_name = name.id
|
||||||
<where>
|
<where>
|
||||||
onm.store_id = #{storeId}
|
onm.store_id = #{storeId}
|
||||||
and onm.state = '启用'
|
and onm.state = '启用'
|
||||||
@ -140,28 +160,91 @@
|
|||||||
select count(*)
|
select count(*)
|
||||||
from oil_number
|
from oil_number
|
||||||
WHERE store_id = #{storeId}
|
WHERE store_id = #{storeId}
|
||||||
and
|
and oil_name = #{oilName} limit 1
|
||||||
oil_name = #{oilName}
|
|
||||||
limit 1
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectOilNumberNameByStoreId" resultType="com.fuint.business.petrolStationManagement.vo.OilNumberNameVo"
|
<select id="selectOilNumberNameByStoreId" resultType="com.fuint.business.petrolStationManagement.vo.OilNumberNameVo"
|
||||||
parameterType="java.lang.Integer">
|
parameterType="java.lang.Integer">
|
||||||
select onu.*,ona.oil_type,ona.oil_name oilNames,ona.id oilId,ot.id tankId,ot.tank_name from oil_tank ot
|
select onu.*,ona.oil_type,ona.oil_name oilNames,ona.id oilId,ot.id tankId,ot.tank_name from oil_tank ot
|
||||||
left join oil_number onu on ot.number_id = onu.number_id
|
left join oil_number onu on ot.number_id = onu.number_id
|
||||||
left join oil_name ona on onu.oil_name = ona.id
|
left join oil_name ona on onu.oil_name = ona.id
|
||||||
<where>
|
<where>
|
||||||
onu.store_id = #{storeId} and onu.state = '启用'
|
onu.store_id = #{storeId} and onu.state = '启用'
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOilPriceById" resultType="double">
|
<select id="getOilPriceById" resultType="double">
|
||||||
select oil_price from oil_number where oil_name = #{oilId} and store_id = #{storeId}
|
select oil_price
|
||||||
|
from oil_number
|
||||||
|
where oil_name = #{oilId}
|
||||||
|
and store_id = #{storeId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectAllOil" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber"
|
<select id="selectAllOil" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber"
|
||||||
parameterType="java.lang.Integer">
|
parameterType="java.lang.Integer">
|
||||||
select oin.*, ona.oil_name oilNames
|
select oin.*, ona.oil_name oilNames
|
||||||
from oil_number oin
|
from oil_number oin
|
||||||
left join oil_name ona on oin.oil_name = ona.id
|
left join oil_name ona on oin.oil_name = ona.id
|
||||||
where oin.store_id = #{storeId}
|
where oin.store_id = #{storeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getS1" resultType="java.util.Map">
|
||||||
|
SELECT CONCAT(oilna.oil_name, '', oilna.oil_type) AS name,
|
||||||
|
COALESCE(SUM(oilor.pay_amount), 0) AS value
|
||||||
|
FROM
|
||||||
|
oil_number oilnu
|
||||||
|
LEFT JOIN
|
||||||
|
oil_name oilna
|
||||||
|
ON oilnu.oil_name = oilna.id
|
||||||
|
LEFT JOIN
|
||||||
|
oil_order oilor ON oilna.id = oilor.oils
|
||||||
|
and oilor.create_time >= #{obj.startTime} and oilor.pay_time <= #{obj.endTime}
|
||||||
|
WHERE
|
||||||
|
oilnu.store_id = #{obj.storeId}
|
||||||
|
GROUP BY
|
||||||
|
oilna.oil_name, oilna.oil_type
|
||||||
|
</select>
|
||||||
|
<select id="getOilAndGoodsPercentage" resultType="java.util.Map">
|
||||||
|
SELECT o.sum_oil_order AS oil_order_total,
|
||||||
|
m.sum_mt_order AS mt_order_total
|
||||||
|
FROM (SELECT SUM(pay_amount) AS sum_oil_order
|
||||||
|
FROM oil_order
|
||||||
|
where store_id = #{obj.storeId}
|
||||||
|
and create_time >= #{obj.startTime}
|
||||||
|
and create_time <= #{obj.endTime}) o
|
||||||
|
CROSS JOIN
|
||||||
|
(SELECT SUM(pay_amount) AS sum_mt_order
|
||||||
|
FROM mt_order
|
||||||
|
where store_id = #{obj.storeId}
|
||||||
|
and create_time >= #{obj.startTime}
|
||||||
|
and create_time <= #{obj.endTime}) m;
|
||||||
|
</select>
|
||||||
|
<select id="getOilAndGoodsAndVipAndPoints" resultType="java.util.Map">
|
||||||
|
SELECT o.sum_oil_order AS oil_order_total,
|
||||||
|
m.sum_mt_order AS mt_order_total,
|
||||||
|
a.sum_all_order_type_3 AS all_order_type_3_total,
|
||||||
|
b.sum_all_order_type_4 AS all_order_type_4_total
|
||||||
|
FROM (SELECT SUM(pay_amount) AS sum_oil_order
|
||||||
|
FROM oil_order
|
||||||
|
WHERE store_id = #{obj.storeId}
|
||||||
|
AND create_time >= #{obj.startTime}
|
||||||
|
AND create_time <= #{obj.endTime}) o
|
||||||
|
CROSS JOIN
|
||||||
|
(SELECT SUM(pay_amount) AS sum_mt_order
|
||||||
|
FROM mt_order
|
||||||
|
WHERE store_id = #{obj.storeId}
|
||||||
|
AND create_time >= #{obj.startTime}
|
||||||
|
AND create_time <= #{obj.endTime}) m
|
||||||
|
CROSS JOIN
|
||||||
|
(SELECT SUM(pay_money) AS sum_all_order_type_3
|
||||||
|
FROM all_order_info
|
||||||
|
WHERE type = 3
|
||||||
|
AND store_id = #{obj.storeId}
|
||||||
|
AND create_time >= #{obj.startTime}
|
||||||
|
AND create_time <= #{obj.endTime}) a
|
||||||
|
CROSS JOIN
|
||||||
|
(SELECT SUM(pay_money) AS sum_all_order_type_4
|
||||||
|
FROM all_order_info
|
||||||
|
WHERE type = 4
|
||||||
|
AND store_id = #{obj.storeId}
|
||||||
|
AND create_time >= #{obj.startTime}
|
||||||
|
AND create_time <= #{obj.endTime}) b;
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user