This commit is contained in:
DESKTOP-369JRHT\12997 2024-07-23 15:13:16 +08:00
commit 2179365671
27 changed files with 621 additions and 98 deletions

View File

@ -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) { export function selectStoreAmount(query) {
return request({ return request({
@ -26,3 +35,23 @@ export function selectStoreAmount(query) {
params: 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
})
}

View 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
})
}

View File

@ -44,7 +44,9 @@
<div>通知中心</div> <div>通知中心</div>
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div> <div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
</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> </div>
<div class="b-bs"> <div class="b-bs">
@ -64,7 +66,7 @@
</el-date-picker> </el-date-picker>
</div> </div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-select v-model="value" clearable placeholder="请选择"> <el-select v-model="value" clearable placeholder="请选择" @change="chooseDept()">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.deptId" :key="item.deptId"
@ -113,28 +115,34 @@
</div> </div>
<div class="hui-hang"></div> <div class="hui-hang"></div>
<div class="d-s" > <div class="d-s" >
<div>
<div class="h-tt" >活跃油站</div>
<div id="ccc" style="width: 300px;height: 200px; "></div> <div id="ccc" style="width: 300px;height: 200px; "></div>
</div>
<div id="cccc" style="width: 300px;height: 200px;"></div> <div id="cccc" style="width: 300px;height: 200px;"></div>
<div id="ccct" 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 id="cttt" style="width: 340px;height: 200px;"></div>
</div> </div>
</div> </div>
<div class="right-box-t"> <div class="right-box-t">
<div class="h-tt" >硬件设备</div> <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"> <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>
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div> <div>{{ item.name }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="bottom_"> <div class="bottom_">
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div> <div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
<div class="d-s"> <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}} {{item}}
</div> </div>
<el-date-picker <el-date-picker
@ -155,12 +163,15 @@
<script> <script>
import echarts from "echarts"; 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 {selectChildByDeptId} from "@/api/system/Site/site";
import {parseTime} from "@/utils/fuint"; import {parseTime} from "@/utils/fuint";
import {getBannerListApi} from "@/api/sys/banner"; import {getBannerListApi} from "@/api/sys/banner";
import {getListApi} from "@/api/setting/hardware";
import {getNotificationlogList, getSysNotifyList} from "@/api/sys/sysNotificationlog";
export default { export default {
props:["accountId"],
data(){ data(){
return{ return{
form: {}, form: {},
@ -170,7 +181,7 @@ export default {
"近一月", "近一月",
"近一年", "近一年",
], ],
timeIndex:0,
options: [{ options: [{
value: '选项1', value: '选项1',
label: '黄金糕' label: '黄金糕'
@ -198,6 +209,9 @@ export default {
storeAmount:{}, storeAmount:{},
// banner // banner
bannerList:{}, bannerList:{},
storeList:[],
hardwareList:[],
noticeList:[]
} }
}, },
created() { created() {
@ -208,11 +222,65 @@ export default {
this.selectChildByDeptIdApi() this.selectChildByDeptIdApi()
this.getStoreAmount() this.getStoreAmount()
this.selectBannerList() 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() { mounted() {
this.initChart() // this.initChart()
}, },
methods:{ 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(){ selectBannerList(){
let queryParams = { let queryParams = {
pageNo:1, pageNo:1,
@ -234,10 +302,25 @@ export default {
this.storeTotal = res.data this.storeTotal = res.data
}) })
}, },
getStoreAmount(){ //
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => { chooseDept(){
this.storeAmount = res.data 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() { initChart() {
const chart = echarts.init(document.getElementById('ccc')) const chart = echarts.init(document.getElementById('ccc'))
@ -246,6 +329,35 @@ export default {
const chart4= echarts.init(document.getElementById('cttt')) const chart4= echarts.init(document.getElementById('cttt'))
const chart3= echarts.init(document.getElementById('ctct')) 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 = { const option = {
color: [ color: [
@ -262,8 +374,13 @@ export default {
type: 'pie', type: 'pie',
radius: '80%', radius: '80%',
data: [ data: [
{ value: 28, name: '28%' }, // { value: 28, name: '28%' },
{ value: 72, name: '72%' }, // { 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: { emphasis: {
@ -291,8 +408,13 @@ export default {
type: 'pie', type: 'pie',
radius: '80%', radius: '80%',
data: [ data: [
{ value: 28, name: '28%' }, // { value: 28, name: '28%' },
{ value: 72, name: '72%' }, // { 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: { emphasis: {
@ -320,8 +442,12 @@ export default {
type: 'pie', type: 'pie',
radius: '80%', radius: '80%',
data: [ data: [
{ value: 28, name: '28%' }, // { value: 28, name: '28%' },
{ value: 72, name: '72%' }, // { 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: { emphasis: {
@ -352,20 +478,8 @@ export default {
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: [ // 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'],
'00:00', data: hourList,
'02:00',
'04:00',
'06:00',
'08:00',
'10:00',
'12:00',
'14:00',
'16:00',
'18:00',
'20:00',
'22:00'
],
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
} }
@ -374,21 +488,21 @@ export default {
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: '金额(元)', name: '活跃油站数',
min: 0, // min: 0,
max: 250, // max: 250,
interval: 50, // interval: 50,
axisLabel: { axisLabel: {
formatter: '{value} ' formatter: '{value} '
} }
}, },
{ {
type: 'value', type: 'value',
name: '笔数', name: '金额(元)',
min: 0, // min: 0,
max: 25, // max: 25,
interval: 5, // interval: 5,
axisLabel: { axisLabel: {
formatter: '{value}' formatter: '{value}'
} }
@ -410,9 +524,10 @@ export default {
barBorderRadius: [50, 50, 0, 0] barBorderRadius: [50, 50, 0, 0]
} }
}, },
data: [ // 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 // 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'; 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: '交易笔数', name: '交易笔数',
@ -435,7 +551,8 @@ export default {
return value + ' °C'; 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: { grid: {
@ -473,8 +590,10 @@ export default {
}, },
data: [ data: [
{ value: 225, name: '富友占比' }, // { value: 225, name: '' },
{ value: 735, 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: '拉卡拉占比' }
] ]
} }
] ]

View File

@ -45,7 +45,9 @@
<div>通知中心</div> <div>通知中心</div>
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div> <div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
</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> </div>
<div class="b-bs"> <div class="b-bs">
@ -130,11 +132,15 @@
</div> </div>
<div class="right-box-t"> <div class="right-box-t">
<div class="h-tt" >硬件设备</div> <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"> <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>
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div> <div>{{ item.name }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -167,8 +173,11 @@ import {selectStoreAmount, storeAmountIndex, storeTotalIndex} from "@/api/indexB
import {selectChildByDeptId} from "@/api/system/Site/site"; import {selectChildByDeptId} from "@/api/system/Site/site";
import {parseTime} from "@/utils/fuint"; import {parseTime} from "@/utils/fuint";
import {getBannerListApi} from "@/api/sys/banner"; import {getBannerListApi} from "@/api/sys/banner";
import {getListApi} from "@/api/setting/hardware";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
export default { export default {
props:["accountId"],
data(){ data(){
return{ return{
form: {}, form: {},
@ -206,7 +215,9 @@ export default {
storeAmount:{}, storeAmount:{},
// banner // banner
bannerList:{}, bannerList:{},
storeList:[] storeList:[],
hardwareList:[],
noticeList:[]
} }
}, },
created() { created() {
@ -224,11 +235,28 @@ export default {
start.setMilliseconds(0) start.setMilliseconds(0)
this.value2 = [start,new Date()]; this.value2 = [start,new Date()];
this.getStoreList() this.getStoreList()
this.getHardwareList()
this.getNoticeList()
}, },
mounted() { mounted() {
// this.initChart() // this.initChart()
}, },
methods:{ 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){ editColor(index){
this.timeIndex = index this.timeIndex = index
if (this.timeList[index]=='今日'){ if (this.timeList[index]=='今日'){

View File

@ -44,7 +44,9 @@
<div>通知中心</div> <div>通知中心</div>
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div> <div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
</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> </div>
<div class="b-bs"> <div class="b-bs">
@ -129,11 +131,15 @@
</div> </div>
<div class="right-box-t"> <div class="right-box-t">
<div class="h-tt" >硬件设备</div> <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"> <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>
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div> <div>{{ item.name }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -161,12 +167,15 @@
<script> <script>
import echarts from "echarts"; 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 {selectChildByDeptId} from "@/api/system/Site/site";
import {parseTime} from "@/utils/fuint"; import {parseTime} from "@/utils/fuint";
import {getBannerListApi} from "@/api/sys/banner"; import {getBannerListApi} from "@/api/sys/banner";
import {getListApi} from "@/api/setting/hardware";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
export default { export default {
props:["accountId"],
data(){ data(){
return{ return{
form: {}, form: {},
@ -204,6 +213,9 @@ export default {
storeAmount:{}, storeAmount:{},
// banner // banner
bannerList:{}, bannerList:{},
storeList:[],
hardwareList:[],
noticeList:[]
} }
}, },
created() { created() {
@ -214,11 +226,41 @@ export default {
this.selectChildByDeptIdApi() this.selectChildByDeptIdApi()
this.getStoreAmount() this.getStoreAmount()
this.selectBannerList() 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() { mounted() {
// this.initChart() // this.initChart()
}, },
methods:{ 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(){ chooseDept(){
this.options.forEach(item => { 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 = { const option = {
color: [ color: [
'#b7f1e2', '#b7f1e2',

View File

@ -1,11 +1,11 @@
<template> <template>
<div class=""> <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> </div>
</template> </template>
@ -13,14 +13,16 @@
import agent from "@/views/homeComponents/agent.vue"; import agent from "@/views/homeComponents/agent.vue";
import manage from "@/views/homeComponents/manage.vue" import manage from "@/views/homeComponents/manage.vue"
import shopowner from "@/views/homeComponents/shopowner.vue" import shopowner from "@/views/homeComponents/shopowner.vue"
import {getAccountInfo} from "@/api/indexBanner";
export default { export default {
data(){ data(){
return{ return{
power:1 power:1,
accountId:"",
} }
}, },
created() { created() {
this.getInfo()
}, },
mounted() { mounted() {
}, },
@ -28,6 +30,18 @@ export default {
agent,manage,shopowner agent,manage,shopowner
}, },
methods:{ 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
})
}
} }
} }

View File

@ -118,4 +118,12 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
public int deleteMerch(Integer id); public int deleteMerch(Integer id);
boolean subtractAmount(Integer id, String changeTheAmount, String mchntCd); boolean subtractAmount(Integer id, String changeTheAmount, String mchntCd);
/**
* 根据条件查询商户总金额
* @param merchantName
* @param storeIds
* @return
*/
Double selectAllAmount(String merchantName,List<Integer> storeIds);
} }

View File

@ -258,6 +258,23 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
return true; 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;
}
} }

View File

@ -235,4 +235,9 @@ public class AllOrderInfoController extends BaseController {
public ResponseObject getAmount(AllOrderInfoVo allOrderInfo){ public ResponseObject getAmount(AllOrderInfoVo allOrderInfo){
return getSuccessResult(allOrderInfoService.getAmount(allOrderInfo)); return getSuccessResult(allOrderInfoService.getAmount(allOrderInfo));
} }
@GetMapping("/getAmount1")
public ResponseObject getAmount1(AllOrderInfoVo allOrderInfo){
return getSuccessResult(allOrderInfoService.getAmount1(allOrderInfo));
}
} }

View File

@ -113,10 +113,16 @@ public interface AllOrderInfoService {
Integer selectProportion(Map<String,String> map, List<Integer> storeIds,List<String> types); Integer selectProportion(Map<String,String> map, List<Integer> storeIds,List<String> types);
/** /**
* * 代理油站查询数据展示
* @return * @return
*/ */
Map<String,Object> getAmount(AllOrderInfoVo allOrderInfoVo); Map<String,Object> getAmount(AllOrderInfoVo allOrderInfoVo);
/**
*
* @return
*/
Map<String,Object> getAmount1(AllOrderInfoVo allOrderInfoVo);
Double selectAmount(Map<String,String> map, Integer storeId,List<String> types); Double selectAmount(Map<String,String> map, Integer storeId,List<String> types);
} }

View File

@ -1250,6 +1250,107 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
return map; 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 @Override
public Double selectAmount(Map<String, String> map, Integer storeId, List<String> types) { public Double selectAmount(Map<String, String> map, Integer storeId, List<String> types) {
String startTime = map.get("startTime"); String startTime = map.get("startTime");

View File

@ -364,4 +364,15 @@ public class BackendStoreController extends BaseController {
public ResponseObject selectStoreAmount(MtStore store){ public ResponseObject selectStoreAmount(MtStore store){
return getSuccessResult(storeService.selectStoreAmount(store)); return getSuccessResult(storeService.selectStoreAmount(store));
} }
/**
* 中台首页多个店铺信息查询
* @param store
* @return
*/
@GetMapping("/getStoreAmountByTime")
public ResponseObject getStoreAmountByTime(MtStore store){
return getSuccessResult(storeService.getStoreAmountByTime(store));
}
} }

View File

@ -1,5 +1,6 @@
package com.fuint.business.store.mapper; package com.fuint.business.store.mapper;
import com.fuint.business.store.vo.StoreNumVo;
import com.fuint.repository.bean.StoreDistanceBean; import com.fuint.repository.bean.StoreDistanceBean;
import com.fuint.business.store.entity.MtStore; import com.fuint.business.store.entity.MtStore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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<Long> queryStoresByDeptIdsR(@Param("list") List<Long> deptIds);
List<MtStore> selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr); List<MtStore> selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr);
List<StoreNumVo> selectStoreNum(@Param("storeVo") MtStore store,@Param("storeIds") List<Integer> storeIds);
} }

View File

@ -77,4 +77,27 @@
</if> </if>
</where> </where>
</select> </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') &gt;= 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') &lt;= 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> </mapper>

View File

@ -2,6 +2,7 @@ package com.fuint.business.store.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.store.vo.StoreAmount; 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.storeInformation.entity.LJStore;
import com.fuint.common.dto.StoreDto; import com.fuint.common.dto.StoreDto;
import com.fuint.framework.exception.BusinessCheckException; import com.fuint.framework.exception.BusinessCheckException;
@ -126,8 +127,14 @@ public interface StoreService extends IService<MtStore> {
Map<String,Object> getStoreTotal(MtStore store); Map<String,Object> getStoreTotal(MtStore store);
/** /**
* 查询店铺信息 * 连锁店端查询店铺信息
* @return * @return
*/ */
List<StoreAmount> selectStoreAmount(MtStore store); List<StoreAmount> selectStoreAmount(MtStore store);
/**
* 代理端 查询店铺信息
* @return
*/
List<StoreNumVo> getStoreAmountByTime(MtStore store);
} }

View File

@ -14,6 +14,7 @@ import com.fuint.business.store.entity.MtStore;
import com.fuint.business.store.mapper.MtStoreMapper; import com.fuint.business.store.mapper.MtStoreMapper;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
import com.fuint.business.store.vo.StoreAmount; 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.storeInformation.entity.LJStore;
import com.fuint.business.userManager.service.UserBalanceService; import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
@ -735,6 +736,24 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
return list; 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() { public void beachDelStore() {
LambdaQueryWrapper<SysDept> lambdaQueryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<SysDept> lambdaQueryWrapper = new LambdaQueryWrapper();

View File

@ -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;
}

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.sys.entity.SysNotificationlog; import com.fuint.business.sys.entity.SysNotificationlog;
import com.fuint.business.sys.service.SysNotificationlogService; 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.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -39,7 +40,7 @@ public class SysNotificationlogController extends BaseController {
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("sysNotificationlog") SysNotificationlog sysNotificationlog) { @Param("sysNotificationlog") SysNotificationlog sysNotificationlog) {
Page page = new Page(pageNo, pageSize); 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); return getSuccessResult(iPageList);
} }

View File

@ -3,6 +3,7 @@ package com.fuint.business.sys.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.sys.entity.SysNotificationlog; import com.fuint.business.sys.entity.SysNotificationlog;
import com.fuint.business.sys.vo.SysNotificationlogVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;
@ -30,7 +31,7 @@ public interface SysNotificationlogMapper {
* @param page 分页对象 * @param page 分页对象
* @return 对象列表 * @return 对象列表
*/ */
IPage<SysNotificationlog> queryAllByLimit(@Param("page") Page page, SysNotificationlog sysNotificationlog); IPage<SysNotificationlogVo> queryAllByLimit(@Param("page") Page page, @Param("entity") SysNotificationlog sysNotificationlog);
/** /**
* 统计总行数 * 统计总行数

View File

@ -30,7 +30,7 @@ public interface SysNotifyMapper {
* @param page 分页对象 * @param page 分页对象
* @return 对象列表 * @return 对象列表
*/ */
IPage<SysNotify> queryAllByLimit(@Param("page") Page page, SysNotify sysNotify); IPage<SysNotify> queryAllByLimit(@Param("page") Page page, @Param("entity") SysNotify sysNotify);
/** /**
* 统计总行数 * 统计总行数

View File

@ -20,30 +20,31 @@ id,notify_id,sent_to,sent_at,status,error_message
</select> </select>
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="SysNotificationlogMap"> <select id="queryAllByLimit" resultType="com.fuint.business.sys.vo.SysNotificationlogVo">
select select
id,notify_id,sent_to,sent_at,status,error_message snl.*,sn.notification_name,sn.notification_type,sn.template_content
from sys_notificationlog from sys_notificationlog snl LEFT JOIN sys_notify sn on snl.notify_id = sn.id
<where> <where>
<if test="id != null"> <if test="entity.id != null">
and id = #{id} and snl.id = #{entity.id}
</if> </if>
<if test="notifyId != null"> <if test="entity.notifyId != null">
and notify_id = #{notifyId} and snl.notify_id = #{entity.notifyId}
</if> </if>
<if test="sentTo != null and sentTo != ''"> <if test="entity.sentTo != null and entity.sentTo != ''">
and sent_to = #{sentTo} and snl.sent_to = #{entity.sentTo}
</if> </if>
<if test="sentAt != null"> <if test="entity.sentAt != null">
and sent_at = #{sentAt} and snl.sent_at = #{entity.sentAt}
</if> </if>
<if test="status != null"> <if test="entity.status != null">
and status = #{status} and snl.status = #{entity.status}
</if> </if>
<if test="errorMessage != null and errorMessage != ''"> <if test="entity.errorMessage != null and entity.errorMessage != ''">
and error_message = #{errorMessage} and snl.error_message = #{entity.errorMessage}
</if> </if>
</where> </where>
ORDER BY snl.create_time DESC
</select> </select>
<!--统计总行数--> <!--统计总行数-->

View File

@ -26,23 +26,23 @@ id,notification_name,notification_type,template_content,recipient_roles,template
from sys_notify from sys_notify
<where> <where>
<if test="id != null"> <if test="entity.id != null">
and id = #{id} and id = #{entity.id}
</if> </if>
<if test="notificationName != null and notificationName != ''"> <if test="entity.notificationName != null and entity.notificationName != ''">
and notification_name = #{notificationName} and notification_name = #{entity.notificationName}
</if> </if>
<if test="notificationType != null and notificationType != ''"> <if test="entity.notificationType != null and entity.notificationType != ''">
and notification_type = #{notificationType} and notification_type = #{entity.notificationType}
</if> </if>
<if test="templateContent != null and templateContent != ''"> <if test="entity.templateContent != null and entity.templateContent != ''">
and template_content = #{templateContent} and template_content = #{entity.templateContent}
</if> </if>
<if test="recipientRoles != null and recipientRoles != ''"> <if test="entity.recipientRoles != null and entity.recipientRoles != ''">
and recipient_roles = #{recipientRoles} and recipient_roles = #{entity.recipientRoles}
</if> </if>
<if test="templateStatus != null"> <if test="entity.templateStatus != null">
and template_status = #{templateStatus} and template_status = #{entity.templateStatus}
</if> </if>
</where> </where>
</select> </select>

View File

@ -3,6 +3,7 @@ package com.fuint.business.sys.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.sys.entity.SysNotificationlog; import com.fuint.business.sys.entity.SysNotificationlog;
import com.fuint.business.sys.vo.SysNotificationlogVo;
import io.lettuce.core.dynamic.annotation.Param; import io.lettuce.core.dynamic.annotation.Param;
@ -29,7 +30,7 @@ public interface SysNotificationlogService {
* @param page 分页对象 * @param page 分页对象
* @return 查询结果 * @return 查询结果
*/ */
IPage<SysNotificationlog> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog); IPage<SysNotificationlogVo> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog);
/** /**
* 新增数据 * 新增数据

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.sys.entity.SysNotificationlog; import com.fuint.business.sys.entity.SysNotificationlog;
import com.fuint.business.sys.mapper.SysNotificationlogMapper; import com.fuint.business.sys.mapper.SysNotificationlogMapper;
import com.fuint.business.sys.service.SysNotificationlogService; import com.fuint.business.sys.service.SysNotificationlogService;
import com.fuint.business.sys.vo.SysNotificationlogVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import io.lettuce.core.dynamic.annotation.Param; import io.lettuce.core.dynamic.annotation.Param;
@ -44,7 +45,7 @@ public class SysNotificationlogServiceImpl implements SysNotificationlogService
* @return 查询结果 * @return 查询结果
*/ */
@Override @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(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// sysNotificationlog.setStoreId(nowAccountInfo.getStoreId()); // sysNotificationlog.setStoreId(nowAccountInfo.getStoreId());
return this.sysNotificationlogMapper.queryAllByLimit(page, sysNotificationlog); return this.sysNotificationlogMapper.queryAllByLimit(page, sysNotificationlog);

View File

@ -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;
}

View File

@ -204,4 +204,14 @@ public class SysDeptController extends BaseController
return getSuccessResult(deptService.selectDeptLists(nowAccountInfo.getDeptId())); 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);
}
} }

View File

@ -80,5 +80,7 @@ public class SysDept extends BaseEntity
private BigDecimal prepaidAmount; private BigDecimal prepaidAmount;
@TableField(exist = false) @TableField(exist = false)
private Integer storeNums; private Integer storeNums;
@TableField(exist = false)
private Integer accountId;
} }