bug
This commit is contained in:
parent
01a0e28ba5
commit
8a4e5d2ac3
@ -18,6 +18,15 @@ export function storeAmountIndex(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function storeAmountIndex1(query) {
|
||||
return request({
|
||||
url: '/business/allOrderInfo/getAmount1',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function selectStoreAmount(query) {
|
||||
return request({
|
||||
@ -26,3 +35,23 @@ export function selectStoreAmount(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function getStoreAmountByTime(query) {
|
||||
return request({
|
||||
url: '/backendApi/store/getStoreAmountByTime',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function getAccountInfo(query) {
|
||||
return request({
|
||||
url: '/system/dept/getInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
20
fuintAdmin_zt/src/api/sys/sysNotificationlog.js
Normal file
20
fuintAdmin_zt/src/api/sys/sysNotificationlog.js
Normal file
@ -0,0 +1,20 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getNotificationlogList(query) {
|
||||
return request({
|
||||
url: 'sysNotificationlog/queryByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
// 分页查询所有的订单信息
|
||||
export function getSysNotifyList(query) {
|
||||
return request({
|
||||
url: 'sysNotify/queryByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
@ -44,7 +44,9 @@
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </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" >【{{ item.notificationType }}】{{ item.templateContent }}</div>
|
||||
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
@ -64,7 +66,7 @@
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-select v-model="value" clearable placeholder="请选择" @change="chooseDept()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
@ -113,28 +115,34 @@
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div id="cccc" style="width: 300px;height: 200px;"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
<div id="cttt" style="width: 340px;height: 200px;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
||||
<!-- <div class="r-img">-->
|
||||
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>-->
|
||||
<div class="r-img">
|
||||
<img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
<img :src="imagePath + item.image" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == timeIndex }" v-for="(item,index) in timeList" :key="index" @click="editColor(index)">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
@ -155,12 +163,15 @@
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {getStoreAmountByTime, storeAmountIndex1, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
import {getListApi} from "@/api/setting/hardware";
|
||||
import {getNotificationlogList, getSysNotifyList} from "@/api/sys/sysNotificationlog";
|
||||
export default {
|
||||
|
||||
props:["accountId"],
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
@ -170,7 +181,7 @@ export default {
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
timeIndex:0,
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
@ -198,6 +209,9 @@ export default {
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
storeList:[],
|
||||
hardwareList:[],
|
||||
noticeList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -208,11 +222,65 @@ export default {
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
this.selectBannerList()
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [parseTime(start),parseTime(new Date())];
|
||||
this.getStoreList()
|
||||
this.getHardwareList()
|
||||
this.getNoticeList()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
// this.initChart()
|
||||
},
|
||||
methods:{
|
||||
getNoticeList(){
|
||||
getNotificationlogList({pageNo: 1, pageSize: 3,sentTo:this.accountId}).then(res => {
|
||||
this.noticeList = res.data.records
|
||||
})
|
||||
},
|
||||
getHardwareList(){
|
||||
getListApi({page: 1, pageSize: 3,}).then(res=>{
|
||||
this.hardwareList = res.data.records;
|
||||
this.hardwareList.forEach(item => {
|
||||
if (item.image.includes(",")){
|
||||
item.image = item.image.split(",")[0]
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
editColor(index){
|
||||
this.timeIndex = index
|
||||
if (this.timeList[index]=='今日'){
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
} else if (this.timeList[index]=='近一周'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
} else if (this.timeList[index]=='近一月'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
} else if (this.timeList[index]=='近一年'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
}
|
||||
this.getStoreList()
|
||||
},
|
||||
getStoreList(){
|
||||
getStoreAmountByTime(this.addDateRange({},this.value2)).then(res => {
|
||||
this.storeList = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
selectBannerList(){
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
@ -234,10 +302,25 @@ export default {
|
||||
this.storeTotal = res.data
|
||||
})
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
// 选择机构信息
|
||||
chooseDept(){
|
||||
this.options.forEach(item => {
|
||||
if (item.deptId == this.value){
|
||||
this.queryParams.ancestors = item.ancestors
|
||||
}
|
||||
})
|
||||
this.getStoreAmount()
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex1(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
countPercentage(upNum,downNum){
|
||||
let percentage = 0;
|
||||
percentage = (upNum / downNum)*100
|
||||
return percentage.toFixed(2)
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
@ -246,6 +329,35 @@ export default {
|
||||
const chart4= echarts.init(document.getElementById('cttt'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
let hourList = []
|
||||
let storeNumList = []
|
||||
let tradeAmountList = []
|
||||
let tradeNumList = []
|
||||
if (this.storeList.length>0) {
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let flag = false;
|
||||
let hour = i.toString().padStart(2, '0') + ":00"; // 转换为两位数格式
|
||||
this.storeList.forEach(item => {
|
||||
if (item.tradeTime == hour){
|
||||
flag = true
|
||||
storeNumList.push(item.storeNum)
|
||||
tradeAmountList.push(item.tradeAmount)
|
||||
tradeNumList.push(item.tradeNum)
|
||||
}
|
||||
})
|
||||
hourList.push(hour);
|
||||
if (!flag) {
|
||||
storeNumList.push(0)
|
||||
tradeAmountList.push(0)
|
||||
tradeNumList.push(0)
|
||||
}
|
||||
}
|
||||
}else {
|
||||
hourList = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
|
||||
storeNumList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
tradeAmountList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
tradeNumList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
}
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
@ -262,8 +374,13 @@ export default {
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
// { value: 28, name: '28%' },
|
||||
// { value: 72, name: '72%' },
|
||||
// { value: this.countPercentage(Number(this.storeAmount.noStoreTotal),Number(this.storeAmount.noStoreTotal) + Number(this.storeAmount.storeTotal)), name: '非7日活跃油站' },
|
||||
// { value: this.countPercentage(Number(this.storeAmount.storeTotal),Number(this.storeAmount.noStoreTotal) + Number(this.storeAmount.storeTotal)), name: '7日活跃油站' },
|
||||
|
||||
{ value: Number(this.storeAmount.noStoreTotal), name: '非7日活跃油站' },
|
||||
{ value: Number(this.storeAmount.storeTotal), name: '7日活跃油站' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -291,8 +408,13 @@ export default {
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
// { value: 28, name: '28%' },
|
||||
// { value: 72, name: '72%' },
|
||||
// { value: this.countPercentage(Number(this.storeAmount.addStoreTotal),Number(this.storeAmount.addStoreTotal) + Number(this.storeAmount.noAddStoreTotal)), name: '本月新增油站' },
|
||||
// { value: this.countPercentage(Number(this.storeAmount.noAddStoreTotal),Number(this.storeAmount.addStoreTotal) + Number(this.storeAmount.noAddStoreTotal)), name: '非本月新增油站' },
|
||||
|
||||
{ value: Number(this.storeAmount.addStoreTotal), name: '本月新增油站' },
|
||||
{ value: Number(this.storeAmount.noAddStoreTotal), name: '非本月新增油站' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -320,8 +442,12 @@ export default {
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
// { value: 28, name: '28%' },
|
||||
// { value: 72, name: '72%' },
|
||||
// { value: this.countPercentage(Number(this.storeAmount.weekStoreTotal),Number(this.storeAmount.weekStoreTotal) + Number(this.storeAmount.noWeekStoreTotal)), name: '本月新增7日活跃油站' },
|
||||
// { value: this.countPercentage(Number(this.storeAmount.noWeekStoreTotal),Number(this.storeAmount.weekStoreTotal) + Number(this.storeAmount.noWeekStoreTotal)), name: '本月新增非7日活跃油站' },
|
||||
{ value: Number(this.storeAmount.weekStoreTotal), name: '本月新增7日活跃油站' },
|
||||
{ value: Number(this.storeAmount.noWeekStoreTotal), name: '本月新增非7日活跃油站' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -352,20 +478,8 @@ export default {
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
// data: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'],
|
||||
data: hourList,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
@ -374,21 +488,21 @@ export default {
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
name: '活跃油站数',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
// min: 0,
|
||||
// max: 250,
|
||||
// interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
name: '金额(元)',
|
||||
// min: 0,
|
||||
// max: 25,
|
||||
// interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
@ -410,9 +524,10 @@ export default {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
// data: [
|
||||
// 30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6,0,1,4,5,7,2
|
||||
// ]
|
||||
data: storeNumList
|
||||
},
|
||||
|
||||
{
|
||||
@ -424,7 +539,8 @@ export default {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
// data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6,0,4,5,7,5]
|
||||
data: tradeAmountList
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
@ -435,7 +551,8 @@ export default {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
// data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
data: tradeNumList
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
@ -473,8 +590,10 @@ export default {
|
||||
},
|
||||
|
||||
data: [
|
||||
{ value: 225, name: '富友占比' },
|
||||
{ value: 735, name: '拉卡拉占比' }
|
||||
// { value: 225, name: '富友占比' },
|
||||
// { value: 735, name: '拉卡拉占比' }
|
||||
{ value: this.countPercentage(Number(this.storeAmount.fuYouAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '富友占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '拉卡拉占比' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -45,7 +45,9 @@
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </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" >【{{ item.notificationType }}】{{ item.templateContent }}</div>
|
||||
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
@ -130,11 +132,15 @@
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
||||
<!-- <div class="r-img">-->
|
||||
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>-->
|
||||
<div class="r-img">
|
||||
<img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
<img :src="imagePath + item.image" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -167,8 +173,11 @@ import {selectStoreAmount, storeAmountIndex, storeTotalIndex} from "@/api/indexB
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
import {getListApi} from "@/api/setting/hardware";
|
||||
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
|
||||
export default {
|
||||
|
||||
props:["accountId"],
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
@ -206,7 +215,9 @@ export default {
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
storeList:[]
|
||||
storeList:[],
|
||||
hardwareList:[],
|
||||
noticeList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -224,11 +235,28 @@ export default {
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.getStoreList()
|
||||
this.getHardwareList()
|
||||
this.getNoticeList()
|
||||
},
|
||||
mounted() {
|
||||
// this.initChart()
|
||||
},
|
||||
methods:{
|
||||
getNoticeList(){
|
||||
getNotificationlogList({pageNo: 1, pageSize: 3,sentTo:this.accountId}).then(res => {
|
||||
this.noticeList = res.data.records
|
||||
})
|
||||
},
|
||||
getHardwareList(){
|
||||
getListApi({page: 1, pageSize: 3,}).then(res=>{
|
||||
this.hardwareList = res.data.records;
|
||||
this.hardwareList.forEach(item => {
|
||||
if (item.image.includes(",")){
|
||||
item.image = item.image.split(",")[0]
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
editColor(index){
|
||||
this.timeIndex = index
|
||||
if (this.timeList[index]=='今日'){
|
||||
|
@ -44,7 +44,9 @@
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </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" >【{{ item.notificationType }}】{{ item.templateContent }}</div>
|
||||
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
@ -129,11 +131,15 @@
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
||||
<!-- <div class="r-img">-->
|
||||
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>-->
|
||||
<div class="r-img">
|
||||
<img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
<img :src="imagePath + item.image" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -161,12 +167,15 @@
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectStoreAmount, storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
import {getListApi} from "@/api/setting/hardware";
|
||||
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
|
||||
export default {
|
||||
|
||||
props:["accountId"],
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
@ -204,6 +213,9 @@ export default {
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
storeList:[],
|
||||
hardwareList:[],
|
||||
noticeList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -214,11 +226,41 @@ export default {
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
this.selectBannerList()
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.getStoreList()
|
||||
this.getHardwareList()
|
||||
this.getNoticeList()
|
||||
},
|
||||
mounted() {
|
||||
// this.initChart()
|
||||
},
|
||||
methods:{
|
||||
getNoticeList(){
|
||||
getNotificationlogList({pageNo: 1, pageSize: 3,sentTo:this.accountId}).then(res => {
|
||||
this.noticeList = res.data.records
|
||||
})
|
||||
},
|
||||
getHardwareList(){
|
||||
getListApi({page: 1, pageSize: 3,}).then(res=>{
|
||||
this.hardwareList = res.data.records;
|
||||
this.hardwareList.forEach(item => {
|
||||
if (item.image.includes(",")){
|
||||
item.image = item.image.split(",")[0]
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getStoreList(){
|
||||
selectStoreAmount(this.addDateRange({},this.value2)).then(res => {
|
||||
this.storeList = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
// 选择机构信息
|
||||
chooseDept(){
|
||||
this.options.forEach(item => {
|
||||
@ -280,6 +322,23 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
let storeNameList = []
|
||||
let oilAmountList = []
|
||||
let noOilAmountList = []
|
||||
let rechargeBalanceList = []
|
||||
let consumeBalanceList = []
|
||||
let userBalanceList = []
|
||||
if (this.storeList.length>0) {
|
||||
this.storeList.forEach(item => {
|
||||
storeNameList.push(item.storeName)
|
||||
oilAmountList.push(item.oilAmount)
|
||||
noOilAmountList.push(item.noOilAmount)
|
||||
rechargeBalanceList.push(item.userRechargeBalance)
|
||||
consumeBalanceList.push(item.userConsumeBalance)
|
||||
userBalanceList.push(item.userBalance)
|
||||
})
|
||||
}
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#b7f1e2',
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<!-- 代理-->
|
||||
<agent v-if="power == 1"></agent>
|
||||
<agent v-if="power == 1" :accountId="accountId"></agent>
|
||||
<!-- 连锁-->
|
||||
<manage v-if="power == 2"></manage>
|
||||
<manage v-if="power == 2" :accountId="accountId"></manage>
|
||||
<!-- 油站-->
|
||||
<shopowner v-if="power == 3"></shopowner>
|
||||
<shopowner v-if="power == 3" :accountId="accountId"></shopowner>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -13,14 +13,16 @@
|
||||
import agent from "@/views/homeComponents/agent.vue";
|
||||
import manage from "@/views/homeComponents/manage.vue"
|
||||
import shopowner from "@/views/homeComponents/shopowner.vue"
|
||||
import {getAccountInfo} from "@/api/indexBanner";
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
power:1
|
||||
|
||||
power:1,
|
||||
accountId:"",
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
@ -28,6 +30,18 @@ export default {
|
||||
agent,manage,shopowner
|
||||
},
|
||||
methods:{
|
||||
getInfo(){
|
||||
getAccountInfo().then(res => {
|
||||
if (res.data.deptType == 1 || res.data.deptType == 4){
|
||||
this.power = 1
|
||||
}else if (res.data.deptType == 2){
|
||||
this.power = 2
|
||||
}else if (res.data.deptType == 3){
|
||||
this.power = 3
|
||||
}
|
||||
this.accountId = res.data.accountId
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -118,4 +118,12 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
public int deleteMerch(Integer id);
|
||||
|
||||
boolean subtractAmount(Integer id, String changeTheAmount, String mchntCd);
|
||||
|
||||
/**
|
||||
* 根据条件查询商户总金额
|
||||
* @param merchantName
|
||||
* @param storeIds
|
||||
* @return
|
||||
*/
|
||||
Double selectAllAmount(String merchantName,List<Integer> storeIds);
|
||||
}
|
||||
|
@ -258,6 +258,23 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectAllAmount(String merchantName, List<Integer> storeIds) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(merchantName)){
|
||||
queryWrapper.eq("merchant_name",merchantName);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(storeIds)){
|
||||
queryWrapper.in("store_id",storeIds);
|
||||
}
|
||||
queryWrapper.select("sum(amount) as amount");
|
||||
MerchantConfig merchantConfig = baseMapper.selectOne(queryWrapper);
|
||||
Double amount = 0.0;
|
||||
if (ObjectUtil.isNotEmpty(merchantConfig) && ObjectUtil.isNotEmpty(merchantConfig.getAmount())){
|
||||
amount = merchantConfig.getAmount();
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -235,4 +235,9 @@ public class AllOrderInfoController extends BaseController {
|
||||
public ResponseObject getAmount(AllOrderInfoVo allOrderInfo){
|
||||
return getSuccessResult(allOrderInfoService.getAmount(allOrderInfo));
|
||||
}
|
||||
|
||||
@GetMapping("/getAmount1")
|
||||
public ResponseObject getAmount1(AllOrderInfoVo allOrderInfo){
|
||||
return getSuccessResult(allOrderInfoService.getAmount1(allOrderInfo));
|
||||
}
|
||||
}
|
||||
|
@ -113,10 +113,16 @@ public interface AllOrderInfoService {
|
||||
Integer selectProportion(Map<String,String> map, List<Integer> storeIds,List<String> types);
|
||||
|
||||
/**
|
||||
*
|
||||
* 代理、油站查询数据展示
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getAmount(AllOrderInfoVo allOrderInfoVo);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getAmount1(AllOrderInfoVo allOrderInfoVo);
|
||||
|
||||
Double selectAmount(Map<String,String> map, Integer storeId,List<String> types);
|
||||
}
|
||||
|
@ -1250,6 +1250,107 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getAmount1(AllOrderInfoVo allOrderInfoVo) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getAncestors())){
|
||||
ancestors = allOrderInfoVo.getAncestors();
|
||||
}
|
||||
MtStore store = new MtStore();
|
||||
List<MtStore> mtStores = mtStoreMapper.selectStoreList(store, ancestors);
|
||||
List<Integer> storeIds = new ArrayList<>();
|
||||
for (MtStore mtStore : mtStores) {
|
||||
storeIds.add(mtStore.getId());
|
||||
}
|
||||
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(storeIds)){
|
||||
queryWrapper.in("store_id",storeIds);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getParams())
|
||||
&& ObjectUtil.isNotEmpty(allOrderInfoVo.getParams().get("beginTime"))
|
||||
&& ObjectUtil.isNotEmpty(allOrderInfoVo.getParams().get("endTime"))){
|
||||
queryWrapper.apply(true,"create_time BETWEEN '" + allOrderInfoVo.getParams().get("beginTime") + "' and '" + allOrderInfoVo.getParams().get("endTime") + "'");
|
||||
}
|
||||
|
||||
Integer tradeTotal = ObjectUtil.isNotEmpty(baseMapper.selectCount(queryWrapper)) ? baseMapper.selectCount(queryWrapper) : 0;
|
||||
List list = this.listObjs(queryWrapper.select("pay_money"));
|
||||
Double tradeAmount = 0.0;
|
||||
if (!list.isEmpty()) {
|
||||
for (Object payMoney: list) {
|
||||
tradeAmount += Double.valueOf(payMoney.toString());
|
||||
}
|
||||
}
|
||||
allOrderInfoVo.setStatus("refund");
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getStatus())){
|
||||
queryWrapper.eq("status",allOrderInfoVo.getStatus());
|
||||
}
|
||||
Integer refundTotal = ObjectUtil.isNotEmpty(baseMapper.selectCount(queryWrapper)) ? baseMapper.selectCount(queryWrapper) : 0;
|
||||
List list1 = this.listObjs(queryWrapper.select("pay_money"));
|
||||
Double refundAmount = 0.0;
|
||||
if (!list1.isEmpty()) {
|
||||
for (Object payMoney: list1) {
|
||||
refundAmount += Double.valueOf(payMoney.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Double averagePrice = tradeAmount/tradeTotal;
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
Double dayTradeAmount = 0.0;
|
||||
Integer dayTradeTotal = 0;
|
||||
Map<String, String> map1 = new HashMap<>();
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getParams())) {
|
||||
LocalDate date1 = LocalDate.parse(allOrderInfoVo.getParams().get("beginTime").toString(), formatter);
|
||||
LocalDate date2 = LocalDate.parse(allOrderInfoVo.getParams().get("endTime").toString(), formatter);
|
||||
|
||||
Integer daysBetween = Math.toIntExact(ChronoUnit.DAYS.between(date1, date2));
|
||||
if (daysBetween!=0) {
|
||||
dayTradeAmount = tradeAmount / daysBetween;
|
||||
dayTradeTotal = tradeTotal / daysBetween;
|
||||
}
|
||||
map1.put("startTime", allOrderInfoVo.getParams().get("beginTime").toString());
|
||||
map1.put("endTime", allOrderInfoVo.getParams().get("endTime").toString());
|
||||
}
|
||||
Integer storeTotal = selectStoreTotal(map1,storeIds);
|
||||
DecimalFormat df = new DecimalFormat("#.00"); // 格式化字符串,表示两位小数
|
||||
|
||||
// 设置格式化器
|
||||
df.setRoundingMode(RoundingMode.HALF_UP); // 可选,设置四舍五入模式
|
||||
|
||||
Map<String, Object> storeTotal1 = storeService.getStoreTotal(new MtStore());
|
||||
Integer allTotal = ObjectUtil.isNotEmpty(storeTotal1.get("allTotal")) ? Integer.valueOf(storeTotal1.get("allTotal").toString()) : 0;
|
||||
Integer weekTotal = ObjectUtil.isNotEmpty(storeTotal1.get("weekTotal")) ? Integer.valueOf(storeTotal1.get("weekTotal").toString()) : 0;
|
||||
Integer monthTotal = ObjectUtil.isNotEmpty(storeTotal1.get("monthTotal")) ? Integer.valueOf(storeTotal1.get("monthTotal").toString()) : 0;
|
||||
|
||||
Double fuYouAmount = merchantConfigService.selectAllAmount("富友", storeIds);
|
||||
Double laKaLaAmount = merchantConfigService.selectAllAmount("拉卡拉", storeIds);
|
||||
|
||||
map.put("tradeTotal",tradeTotal);
|
||||
map.put("tradeAmount",tradeAmount > 0 ? df.format(tradeAmount) : 0);
|
||||
map.put("refundTotal",refundTotal);
|
||||
map.put("refundAmount",refundAmount > 0 ? df.format(refundAmount) : 0);
|
||||
map.put("averagePrice",averagePrice > 0 ? df.format(averagePrice) : 0);
|
||||
map.put("dayTradeAmount",dayTradeAmount > 0 ? df.format(dayTradeAmount) : 0);
|
||||
map.put("dayTradeTotal",dayTradeTotal);
|
||||
map.put("storeTotal",storeTotal);
|
||||
map.put("noStoreTotal",allTotal - storeTotal);
|
||||
map.put("addStoreTotal",monthTotal);
|
||||
map.put("noAddStoreTotal",allTotal - monthTotal);
|
||||
map.put("weekStoreTotal",weekTotal);
|
||||
map.put("noWeekStoreTotal",allTotal - weekTotal);
|
||||
map.put("fuYouAmount",fuYouAmount);
|
||||
map.put("laKaLaAmount",laKaLaAmount);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectAmount(Map<String, String> map, Integer storeId, List<String> types) {
|
||||
String startTime = map.get("startTime");
|
||||
|
@ -364,4 +364,15 @@ public class BackendStoreController extends BaseController {
|
||||
public ResponseObject selectStoreAmount(MtStore store){
|
||||
return getSuccessResult(storeService.selectStoreAmount(store));
|
||||
}
|
||||
|
||||
/**
|
||||
* 中台首页多个店铺信息查询
|
||||
* @param store
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getStoreAmountByTime")
|
||||
public ResponseObject getStoreAmountByTime(MtStore store){
|
||||
return getSuccessResult(storeService.getStoreAmountByTime(store));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.store.mapper;
|
||||
|
||||
import com.fuint.business.store.vo.StoreNumVo;
|
||||
import com.fuint.repository.bean.StoreDistanceBean;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@ -51,4 +52,6 @@ public interface MtStoreMapper extends BaseMapper<MtStore> {
|
||||
List<Long> queryStoresByDeptIdsR(@Param("list") List<Long> deptIds);
|
||||
|
||||
List<MtStore> selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr);
|
||||
|
||||
List<StoreNumVo> selectStoreNum(@Param("storeVo") MtStore store,@Param("storeIds") List<Integer> storeIds);
|
||||
}
|
||||
|
@ -77,4 +77,27 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStoreNum" resultType="com.fuint.business.store.vo.StoreNumVo">
|
||||
SELECT t.tradeTime,count(t.store_id) storeNum,sum(t.tradeNum) tradeNum,sum(t.tradeAmount) tradeAmount
|
||||
FROM (SELECT DATE_FORMAT(create_time, '%H:00') AS tradeTime,count(id) tradeNum,SUM(pay_money) AS tradeAmount,store_id
|
||||
FROM all_order_info
|
||||
<where>
|
||||
store_id in
|
||||
<foreach collection="storeIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="storeVo.params.beginTime != null and storeVo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{storeVo.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="storeVo.params.endTime != null and storeVo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{storeVo.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
tradeTime,store_id
|
||||
ORDER BY
|
||||
tradeTime) t
|
||||
GROUP BY t.tradeTime
|
||||
</select>
|
||||
</mapper>
|
@ -2,6 +2,7 @@ package com.fuint.business.store.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.store.vo.StoreAmount;
|
||||
import com.fuint.business.store.vo.StoreNumVo;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.common.dto.StoreDto;
|
||||
import com.fuint.framework.exception.BusinessCheckException;
|
||||
@ -126,8 +127,14 @@ public interface StoreService extends IService<MtStore> {
|
||||
Map<String,Object> getStoreTotal(MtStore store);
|
||||
|
||||
/**
|
||||
* 查询店铺信息
|
||||
* 连锁店端查询店铺信息
|
||||
* @return
|
||||
*/
|
||||
List<StoreAmount> selectStoreAmount(MtStore store);
|
||||
|
||||
/**
|
||||
* 代理端 查询店铺信息
|
||||
* @return
|
||||
*/
|
||||
List<StoreNumVo> getStoreAmountByTime(MtStore store);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.business.store.vo.StoreAmount;
|
||||
import com.fuint.business.store.vo.StoreNumVo;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
@ -735,6 +736,24 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StoreNumVo> getStoreAmountByTime(MtStore store) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
|
||||
}
|
||||
|
||||
List<MtStore> mtStores = baseMapper.selectStoreList(new MtStore(), ancestors);
|
||||
|
||||
List<Integer> storeIds = new ArrayList<>();
|
||||
for (MtStore mtStore : mtStores) {
|
||||
storeIds.add(mtStore.getId());
|
||||
}
|
||||
return baseMapper.selectStoreNum(store,storeIds);
|
||||
}
|
||||
|
||||
// 将在部门里面删除的在油站中删除
|
||||
public void beachDelStore() {
|
||||
LambdaQueryWrapper<SysDept> lambdaQueryWrapper = new LambdaQueryWrapper();
|
||||
|
@ -0,0 +1,26 @@
|
||||
package com.fuint.business.store.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 中台首页数据信息代理端
|
||||
*/
|
||||
@Data
|
||||
public class StoreNumVo {
|
||||
/**
|
||||
* 交易时段
|
||||
*/
|
||||
private String tradeTime;
|
||||
/**
|
||||
* 活跃油站数量
|
||||
*/
|
||||
private Integer storeNum;
|
||||
/**
|
||||
* 交易笔数
|
||||
*/
|
||||
private Integer tradeNum;
|
||||
/**
|
||||
* 交易金额
|
||||
*/
|
||||
private Double tradeAmount;
|
||||
}
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import com.fuint.business.sys.service.SysNotificationlogService;
|
||||
import com.fuint.business.sys.vo.SysNotificationlogVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -39,7 +40,7 @@ public class SysNotificationlogController extends BaseController {
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("sysNotificationlog") SysNotificationlog sysNotificationlog) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< SysNotificationlog> iPageList = this.sysNotificationlogService.queryByPage(page, sysNotificationlog);
|
||||
IPage<SysNotificationlogVo> iPageList = this.sysNotificationlogService.queryByPage(page, sysNotificationlog);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.sys.mapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import com.fuint.business.sys.vo.SysNotificationlogVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
@ -30,7 +31,7 @@ public interface SysNotificationlogMapper {
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<SysNotificationlog> queryAllByLimit(@Param("page") Page page, SysNotificationlog sysNotificationlog);
|
||||
IPage<SysNotificationlogVo> queryAllByLimit(@Param("page") Page page, @Param("entity") SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
|
@ -30,7 +30,7 @@ public interface SysNotifyMapper {
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<SysNotify> queryAllByLimit(@Param("page") Page page, SysNotify sysNotify);
|
||||
IPage<SysNotify> queryAllByLimit(@Param("page") Page page, @Param("entity") SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
|
@ -20,30 +20,31 @@ id,notify_id,sent_to,sent_at,status,error_message
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="SysNotificationlogMap">
|
||||
<select id="queryAllByLimit" resultType="com.fuint.business.sys.vo.SysNotificationlogVo">
|
||||
select
|
||||
id,notify_id,sent_to,sent_at,status,error_message
|
||||
from sys_notificationlog
|
||||
snl.*,sn.notification_name,sn.notification_type,sn.template_content
|
||||
from sys_notificationlog snl LEFT JOIN sys_notify sn on snl.notify_id = sn.id
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
<if test="entity.id != null">
|
||||
and snl.id = #{entity.id}
|
||||
</if>
|
||||
<if test="notifyId != null">
|
||||
and notify_id = #{notifyId}
|
||||
<if test="entity.notifyId != null">
|
||||
and snl.notify_id = #{entity.notifyId}
|
||||
</if>
|
||||
<if test="sentTo != null and sentTo != ''">
|
||||
and sent_to = #{sentTo}
|
||||
<if test="entity.sentTo != null and entity.sentTo != ''">
|
||||
and snl.sent_to = #{entity.sentTo}
|
||||
</if>
|
||||
<if test="sentAt != null">
|
||||
and sent_at = #{sentAt}
|
||||
<if test="entity.sentAt != null">
|
||||
and snl.sent_at = #{entity.sentAt}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
<if test="entity.status != null">
|
||||
and snl.status = #{entity.status}
|
||||
</if>
|
||||
<if test="errorMessage != null and errorMessage != ''">
|
||||
and error_message = #{errorMessage}
|
||||
<if test="entity.errorMessage != null and entity.errorMessage != ''">
|
||||
and snl.error_message = #{entity.errorMessage}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY snl.create_time DESC
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
|
@ -26,23 +26,23 @@ id,notification_name,notification_type,template_content,recipient_roles,template
|
||||
|
||||
from sys_notify
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
<if test="entity.id != null">
|
||||
and id = #{entity.id}
|
||||
</if>
|
||||
<if test="notificationName != null and notificationName != ''">
|
||||
and notification_name = #{notificationName}
|
||||
<if test="entity.notificationName != null and entity.notificationName != ''">
|
||||
and notification_name = #{entity.notificationName}
|
||||
</if>
|
||||
<if test="notificationType != null and notificationType != ''">
|
||||
and notification_type = #{notificationType}
|
||||
<if test="entity.notificationType != null and entity.notificationType != ''">
|
||||
and notification_type = #{entity.notificationType}
|
||||
</if>
|
||||
<if test="templateContent != null and templateContent != ''">
|
||||
and template_content = #{templateContent}
|
||||
<if test="entity.templateContent != null and entity.templateContent != ''">
|
||||
and template_content = #{entity.templateContent}
|
||||
</if>
|
||||
<if test="recipientRoles != null and recipientRoles != ''">
|
||||
and recipient_roles = #{recipientRoles}
|
||||
<if test="entity.recipientRoles != null and entity.recipientRoles != ''">
|
||||
and recipient_roles = #{entity.recipientRoles}
|
||||
</if>
|
||||
<if test="templateStatus != null">
|
||||
and template_status = #{templateStatus}
|
||||
<if test="entity.templateStatus != null">
|
||||
and template_status = #{entity.templateStatus}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.sys.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import com.fuint.business.sys.vo.SysNotificationlogVo;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
@ -29,7 +30,7 @@ public interface SysNotificationlogService {
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<SysNotificationlog> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog);
|
||||
IPage<SysNotificationlogVo> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import com.fuint.business.sys.mapper.SysNotificationlogMapper;
|
||||
import com.fuint.business.sys.service.SysNotificationlogService;
|
||||
import com.fuint.business.sys.vo.SysNotificationlogVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
@ -44,7 +45,7 @@ public class SysNotificationlogServiceImpl implements SysNotificationlogService
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<SysNotificationlog> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog) {
|
||||
public IPage<SysNotificationlogVo> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// sysNotificationlog.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.sysNotificationlogMapper.queryAllByLimit(page, sysNotificationlog);
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.sys.vo;
|
||||
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SysNotificationlogVo extends SysNotificationlog {
|
||||
private String notificationName;
|
||||
private String notificationType;
|
||||
private String templateContent;
|
||||
}
|
@ -204,4 +204,14 @@ public class SysDeptController extends BaseController
|
||||
return getSuccessResult(deptService.selectDeptLists(nowAccountInfo.getDeptId()));
|
||||
}
|
||||
|
||||
@GetMapping("/getInfo")
|
||||
public ResponseObject getInfo1() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// SysDept sysDept = deptService.selectDeptById(nowAccountInfo.getDeptId());
|
||||
|
||||
SysDept sysDept = deptService.selectDeptById(nowAccountInfo.getDeptId());
|
||||
sysDept.setAccountId(nowAccountInfo.getId());
|
||||
return getSuccessResult(sysDept);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -80,5 +80,7 @@ public class SysDept extends BaseEntity
|
||||
private BigDecimal prepaidAmount;
|
||||
@TableField(exist = false)
|
||||
private Integer storeNums;
|
||||
@TableField(exist = false)
|
||||
private Integer accountId;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user