From 8a4e5d2ac33f794ff8a984bb7be7b7b081b63b77 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Tue, 23 Jul 2024 14:52:12 +0800 Subject: [PATCH] bug --- fuintAdmin_zt/src/api/indexBanner/index.js | 29 +++ .../src/api/sys/sysNotificationlog.js | 20 ++ .../src/views/homeComponents/agent.vue | 217 ++++++++++++++---- .../src/views/homeComponents/manage.vue | 38 ++- .../src/views/homeComponents/shopowner.vue | 69 +++++- fuintAdmin_zt/src/views/index.vue | 24 +- .../fuyou/service/MerchantConfigService.java | 8 + .../impl/MerchantConfigServiceImpl.java | 17 ++ .../controller/AllOrderInfoController.java | 5 + .../order/service/AllOrderInfoService.java | 8 +- .../service/impl/AllOrderInfoServiceImpl.java | 101 ++++++++ .../controller/BackendStoreController.java | 11 + .../business/store/mapper/MtStoreMapper.java | 3 + .../store/mapper/xml/MtStoreMapper.xml | 23 ++ .../business/store/service/StoreService.java | 9 +- .../store/service/impl/StoreServiceImpl.java | 19 ++ .../fuint/business/store/vo/StoreNumVo.java | 26 +++ .../SysNotificationlogController.java | 3 +- .../sys/mapper/SysNotificationlogMapper.java | 3 +- .../business/sys/mapper/SysNotifyMapper.java | 2 +- .../mapper/xml/SysNotificationlogMapper.xml | 31 +-- .../sys/mapper/xml/SysNotifyMapper.xml | 24 +- .../service/SysNotificationlogService.java | 3 +- .../impl/SysNotificationlogServiceImpl.java | 3 +- .../business/sys/vo/SysNotificationlogVo.java | 11 + .../dept/controller/SysDeptController.java | 10 + .../com/fuint/system/dept/entity/SysDept.java | 2 + 27 files changed, 621 insertions(+), 98 deletions(-) create mode 100644 fuintAdmin_zt/src/api/sys/sysNotificationlog.js create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/store/vo/StoreNumVo.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/vo/SysNotificationlogVo.java diff --git a/fuintAdmin_zt/src/api/indexBanner/index.js b/fuintAdmin_zt/src/api/indexBanner/index.js index 1b21a9460..feaef0691 100644 --- a/fuintAdmin_zt/src/api/indexBanner/index.js +++ b/fuintAdmin_zt/src/api/indexBanner/index.js @@ -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 + }) +} diff --git a/fuintAdmin_zt/src/api/sys/sysNotificationlog.js b/fuintAdmin_zt/src/api/sys/sysNotificationlog.js new file mode 100644 index 000000000..3ebdce5eb --- /dev/null +++ b/fuintAdmin_zt/src/api/sys/sysNotificationlog.js @@ -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 + + }) +} diff --git a/fuintAdmin_zt/src/views/homeComponents/agent.vue b/fuintAdmin_zt/src/views/homeComponents/agent.vue index a2055f0af..3fbc7c185 100644 --- a/fuintAdmin_zt/src/views/homeComponents/agent.vue +++ b/fuintAdmin_zt/src/views/homeComponents/agent.vue @@ -44,7 +44,9 @@
通知中心
更多
-
【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...
+ +
【{{ item.notificationType }}】{{ item.templateContent }}
+
暂无通知
@@ -64,7 +66,7 @@
- +
-
+
+
活跃油站
+
+
-
硬件设备
-
+
+ + + +
- +
-
容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口
+
{{ item.name }}
数据统计
-
+
{{item}}
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: '拉卡拉占比' } ] } ] diff --git a/fuintAdmin_zt/src/views/homeComponents/manage.vue b/fuintAdmin_zt/src/views/homeComponents/manage.vue index f24b4af01..4f5ee7fa6 100644 --- a/fuintAdmin_zt/src/views/homeComponents/manage.vue +++ b/fuintAdmin_zt/src/views/homeComponents/manage.vue @@ -45,7 +45,9 @@
通知中心
更多
-
【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...
+ +
【{{ item.notificationType }}】{{ item.templateContent }}
+
暂无通知
@@ -130,11 +132,15 @@
硬件设备
-
+
+ + + +
- +
-
容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口
+
{{ item.name }}
@@ -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]=='今日'){ diff --git a/fuintAdmin_zt/src/views/homeComponents/shopowner.vue b/fuintAdmin_zt/src/views/homeComponents/shopowner.vue index beb6ea717..f95e93c69 100644 --- a/fuintAdmin_zt/src/views/homeComponents/shopowner.vue +++ b/fuintAdmin_zt/src/views/homeComponents/shopowner.vue @@ -44,7 +44,9 @@
通知中心
更多
-
【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...
+ +
【{{ item.notificationType }}】{{ item.templateContent }}
+
暂无通知
@@ -129,11 +131,15 @@
硬件设备
-
+
+ + + +
- +
-
容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口
+
{{ item.name }}
@@ -161,12 +167,15 @@