diff --git a/fuintAdmin/src/api/allOrder.js b/fuintAdmin/src/api/allOrder.js index 9a958d116..9a077b99e 100644 --- a/fuintAdmin/src/api/allOrder.js +++ b/fuintAdmin/src/api/allOrder.js @@ -201,6 +201,35 @@ export function getDataAnalysis(query) { params:query }); } + +// 油站首页 数据分析 第一个饼状图 +export function getOilPercentage(query) { + return request({ + url: 'business/allOrderInfo/getOilPercentage', + method: 'get', + params:query + }); +} + +// 油站首页 数据分析 第二个饼状图 +export function getOilAndGoodsPercentage(query) { + return request({ + url: 'business/allOrderInfo/getOilAndGoodsPercentage', + method: 'get', + params:query + }); +} + + +// 油站首页 数据分析 第三个饼状图 +export function getOilAndGoodsAndVipAndPoints(query) { + return request({ + url: 'business/allOrderInfo/getOilAndGoodsAndVipAndPoints', + method: 'get', + params:query + }); +} + // 油站首页数据展示 export function getDataShow(query) { return request({ diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue index 7249af062..43c5bc6cb 100644 --- a/fuintAdmin/src/views/shopowner.vue +++ b/fuintAdmin/src/views/shopowner.vue @@ -38,7 +38,7 @@
- 【{{item.notificationType}}】{{ item.templateContent }} + 【{{ item.notificationType }}】{{ item.templateContent }}
暂无通知
@@ -48,10 +48,12 @@
数据看板
-
{{sjkbTitle}} + {{ sjkbTitle }}
- - {{item}} + + {{ item }} +
自定义 @@ -104,9 +106,7 @@
数据分析
-
-
@@ -141,14 +141,16 @@
油品交易分析
-
{{ypjyTitle}} + {{ ypjyTitle }}
- - - - - {{item}} + + + + + {{ item }} +
自定义 @@ -164,17 +166,18 @@ @blur="getDataShow">
-
+
员工排行 -
{{ygphTitle}} {{ ygphTitle }}
- {{item}} + {{ item }} +
@@ -213,14 +216,16 @@
数据统计
-
{{sjtjTitle}} + {{ sjtjTitle }}
- - - - - {{item}} + + + + + {{ item }} +
@@ -256,19 +261,28 @@ import {parseTime} from "@/utils/fuint"; import {getBannerListApi} from "@/api/sys/banner"; import {getNotificationlogList} from "@/api/sys/sysNotificationlog"; import {employeeSalesApi} from "@/api/indexStatistics"; -import {getDataAnalysis, getDataBoard, getDataCount, getDataShow, getTotalAmount} from "@/api/allOrder"; +import { + getDataAnalysis, + getDataBoard, + getDataCount, + getDataShow, + getTotalAmount, + getOilPercentage, + getOilAndGoodsPercentage, + getOilAndGoodsAndVipAndPoints +} from "@/api/allOrder"; export default { props: ["accountId"], data() { return { - amountList:[ + amountList: [ // "今日" , // "昨日" , - "近一周" , - "本月" , - "本季度" , + "近一周", + "本月", + "本季度", "本年" ], @@ -278,7 +292,7 @@ export default { sjtjTitle: "近一周", xShow: false, timeShow: false, - dataTimeShow : false, + dataTimeShow: false, showTimeShow: false, countTimeShow: false, form: {}, @@ -307,8 +321,8 @@ export default { }], value: '', value1: [], - showValue:[], - countValue:[], + showValue: [], + countValue: [], value2: [], imagePath: process.env.VUE_APP_SERVER_URL, queryParams: {}, @@ -362,35 +376,35 @@ export default { }, methods: { - sjkbStoreAmount(e){ + sjkbStoreAmount(e) { console.log(e) this.sjkbTitle = e let command = e - if (command=='今日'){ + if (command == '今日') { let start = new Date(); start.setHours(0) start.setMinutes(0) start.setSeconds(0) start.setMilliseconds(0) - this.value1 = [parseTime(new Date()),parseTime(new Date())] - }else if (command=='昨日'){ + this.value1 = [parseTime(new Date()), parseTime(new Date())] + } else if (command == '昨日') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000) - this.value1 = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)] - } else if (command=='近一周'){ + this.value1 = [parseTime(oneWeekAgo), parseTime(oneWeekAgo)] + } else if (command == '近一周') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) - this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] - } else if (command=='本月'){ + this.value1 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (command == '本月') { const [startTime, endTime] = this.getMonthStartAndToday(); - this.value1 = [parseTime(startTime),parseTime(endTime)] - }else if (command=='本季度'){ + this.value1 = [parseTime(startTime), parseTime(endTime)] + } else if (command == '本季度') { const [startTime, endTime] = this.getQuarterStartAndEnd(); this.value1 = [parseTime(startTime), parseTime(endTime)]; - } else if (command=='本年'){ + } else if (command == '本年') { const [startTime, endTime] = this.getYearStartAndEnd(); - this.value1 = [parseTime(startTime),parseTime(endTime)] - }else if (command=='自定义'){ + this.value1 = [parseTime(startTime), parseTime(endTime)] + } else if (command == '自定义') { this.disabled = false } this.getStoreAmount() @@ -399,108 +413,108 @@ export default { goList() { this.$router.push('/notificationList/index') }, - editShow(e){ + editShow(e) { this.disabled = true console.log(e) this.ypjyTitle = e let command = e - if (command=='今日'){ + if (command == '今日') { let start = new Date(); start.setHours(0) start.setMinutes(0) start.setSeconds(0) start.setMilliseconds(0) - this.showValue = [parseTime(new Date()),parseTime(new Date())] - }else if (command=='昨日'){ + this.showValue = [parseTime(new Date()), parseTime(new Date())] + } else if (command == '昨日') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000) - this.showValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)] - } else if (command=='近一周'){ + this.showValue = [parseTime(oneWeekAgo), parseTime(oneWeekAgo)] + } else if (command == '近一周') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) - this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - } else if (command=='本月'){ + this.showValue = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (command == '本月') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) const [startTime, endTime] = this.getMonthStartAndToday(); - this.showValue = [parseTime(startTime),parseTime(endTime)] - }else if (command=='本季度'){ + this.showValue = [parseTime(startTime), parseTime(endTime)] + } else if (command == '本季度') { const [startTime, endTime] = this.getQuarterStartAndEnd(); this.showValue = [parseTime(startTime), parseTime(endTime)]; - } else if (command=='本年'){ + } else if (command == '本年') { const [startTime, endTime] = this.getYearStartAndEnd(); - this.showValue = [parseTime(startTime),parseTime(endTime)] - }else if (command=='自定义'){ + this.showValue = [parseTime(startTime), parseTime(endTime)] + } else if (command == '自定义') { this.disabled = false } - this.getDataShow() + this.getDataShow() }, - editCount(e){ + editCount(e) { this.disabled = true this.sjtjTitle = e - console.log("e",e) + console.log("e", e) let command = e - if (command=='今日'){ + if (command == '今日') { let start = new Date(); start.setHours(0) start.setMinutes(0) start.setSeconds(0) start.setMilliseconds(0) // this.countValue = [start,new Date()] - this.countValue = [parseTime(new Date()),parseTime(new Date())] - }else if (command=='昨日'){ + this.countValue = [parseTime(new Date()), parseTime(new Date())] + } else if (command == '昨日') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000) - this.countValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)] - } else if (command=='近一周'){ + this.countValue = [parseTime(oneWeekAgo), parseTime(oneWeekAgo)] + } else if (command == '近一周') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) - this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - } else if (command=='本月'){ + this.countValue = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (command == '本月') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) const [startTime, endTime] = this.getMonthStartAndToday(); - this.countValue = [parseTime(startTime),parseTime(endTime)] - }else if (command=='本季度'){ + this.countValue = [parseTime(startTime), parseTime(endTime)] + } else if (command == '本季度') { const [startTime, endTime] = this.getQuarterStartAndEnd(); this.countValue = [parseTime(startTime), parseTime(endTime)]; - } else if (command=='本年'){ + } else if (command == '本年') { const [startTime, endTime] = this.getYearStartAndEnd(); - this.countValue = [parseTime(startTime),parseTime(endTime)] - }else if (command=='自定义'){ + this.countValue = [parseTime(startTime), parseTime(endTime)] + } else if (command == '自定义') { this.disabled = false } - this.getDataCount() + this.getDataCount() }, - editColor(command){ + editColor(command) { this.disabled = true this.ygphTitle = command - if (command=='今日'){ + if (command == '今日') { let start = new Date(); start.setHours(0) start.setMinutes(0) start.setSeconds(0) start.setMilliseconds(0) - this.value2 = [start,new Date()] - } else if (command=='近一周'){ + this.value2 = [start, new Date()] + } else if (command == '近一周') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) - this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] - } else if (command=='本月'){ + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (command == '本月') { let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) const [startTime, endTime] = this.getMonthStartAndToday(); - this.value2 = [parseTime(startTime),parseTime(endTime)] - }else if (command=='本季度'){ + this.value2 = [parseTime(startTime), parseTime(endTime)] + } else if (command == '本季度') { const [startTime, endTime] = this.getQuarterStartAndEnd(); this.value2 = [parseTime(startTime), parseTime(endTime)]; - } else if (command=='本年'){ + } else if (command == '本年') { const [startTime, endTime] = this.getYearStartAndEnd(); - this.value2 = [parseTime(startTime),parseTime(endTime)] - }else if (command=='自定义'){ + this.value2 = [parseTime(startTime), parseTime(endTime)] + } else if (command == '自定义') { this.disabled = false } - this.getEmployeList() + this.getEmployeList() }, getMonthStartAndToday() { const now = new Date(); @@ -600,26 +614,20 @@ export default { startTime: this.value1[0], endTime: this.value1[1] } - getDataAnalysis(data).then(res => { - // console.log('数据分析的数据', res) - this.dataAnalysisAllList = [] - this.dataAnalysisOilNumberList = [] - this.dataAnalysisIfOilList = [] - if (res.code == 200) { - for (let i = 0; i < res.data.length; i++) { - if (res.data[i].type == 1) { - this.dataAnalysisOilNumberList.push(res.data[i]) - } else if (res.data[i].type == 2) { - this.dataAnalysisIfOilList.push(res.data[i]) - } else if (res.data[i].type == 3) { - this.dataAnalysisAllList.push(res.data[i]) - } - } - // console.log('dataAnalysisOilNumberList', this.dataAnalysisOilNumberList) - // console.log('dataAnalysisIfOilList', this.dataAnalysisIfOilList) - // console.log('dataAnalysisAllList', this.dataAnalysisAllList) - this.initChart() - } + //获取第一个饼状图数据 + getOilPercentage(data).then(res => { + this.dataAnalysisOilNumberList = res.data + console.log("饼状图一数据",this.dataAnalysisOilNumberList ) + }) + //获取第二个饼状图数据 + getOilAndGoodsPercentage(data).then(res => { + this.dataAnalysisIfOilList = res.data + console.log("饼状图二数据",this.dataAnalysisIfOilList) + }) + //获取第三个饼状图数据 + getOilAndGoodsAndVipAndPoints(data).then(res => { + this.dataAnalysisAllList = res.data + console.log("饼状图三数据",this.dataAnalysisAllList ) }) }, //油站首页数据展示 @@ -629,7 +637,7 @@ export default { "endTime": this.showValue[1].split(' ')[0] } getDataShow(data).then(res => { - // console.log('首页数据展示', res.data) + console.log('首页数据展示', res.data) this.dataShows = res.data this.initChart() }) @@ -758,13 +766,13 @@ export default { let countType = [] count.push(c) this.dataCount.oilNames.forEach(item => { - let type={ + let type = { type: 'bar' } countType.push(type) }) this.dataCount.oilData.forEach(item => { - let a =[item.time, ...item.money] + let a = [item.time, ...item.money] count.push(a) }) @@ -776,19 +784,19 @@ export default { let showCountType = [] console.log("看看执行") this.dataShows.oilNames.forEach(item => { - let type={ + let type = { type: 'bar' } showCountType.push(type) }) console.log(this.dataShows.oilData) this.dataShows.oilData.forEach(item => { - let a =[item.day, ...item.oilPrices] + let a = [item.day, ...item.oilPrices] showCount.push(a) - console.log("showCount",a) + console.log("showCount", a) }) - console.log("showCount",showCount) - console.log("showCountType",showCountType) + console.log("showCount", showCount) + console.log("showCountType", showCountType) const option = { color: [ @@ -802,32 +810,31 @@ export default { trigger: 'item' }, legend: { - type:'scroll', + type: 'scroll', orient: 'vertical', right: '0%', bottom: '0%', - left:'right', - size:8 + left: 'right', + size: 8 }, series: [ { name: '', type: 'pie', itemStyle: { - borderRadius:8, - borderColor:'#fff', - borderWidth:4 + borderRadius: 8, + borderColor: '#fff', + borderWidth: 4 }, radius: ['40%', '80%'], data: this.dataAnalysisOilNumberList, label: { show: true, position: "inside", - color:'#fff', + color: '#fff', formatter: `{d}%`, }, }, - ] }; const option1 = { @@ -839,12 +846,12 @@ export default { trigger: 'item' }, legend: { - type:'scroll', + type: 'scroll', orient: 'vertical', right: '0%', bottom: '0%', - left:'right', - size:8 + left: 'right', + size: 8 }, series: [ { @@ -863,7 +870,7 @@ export default { label: { show: true, position: "inside", - color:'#fff', + color: '#fff', formatter: `{d}%`, }, }, @@ -882,12 +889,12 @@ export default { trigger: 'item' }, legend: { - type:'scroll', + type: 'scroll', orient: 'vertical', right: '0%', bottom: '0%', - left:'right', - size:8 + left: 'right', + size: 8 }, series: [ { @@ -906,7 +913,7 @@ export default { label: { show: true, position: "inside", - color:'#fff', + color: '#fff', formatter: `{d}%`, }, } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java index db581caee..f44e03024 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java @@ -354,7 +354,7 @@ public class AllOrderInfoController extends BaseController { } /** - * 油站首页 数据展示 + * 油站首页 数据看板 * @return */ @GetMapping("getDataBoard") @@ -375,6 +375,48 @@ public class AllOrderInfoController extends BaseController { return getSuccessResult(allOrderInfoService.getDataAnalysis(map)); } + /** + * 油站首页 数据分析 第一个饼状图 + * @param map + * @return + */ + @GetMapping("/getOilPercentage") + public ResponseObject getOilPercentage(String startTime, String endTime){ + Map map = new HashMap<>(); + map.put("startTime", startTime); + map.put("endTime", endTime); + return getSuccessResult(allOrderInfoService.getOilPercentage(map)); + } + + + + /** + * 油站首页 数据分析 第二个饼状图 + * @param map + * @return + */ + @GetMapping("/getOilAndGoodsPercentage") + public ResponseObject getOilAndGoodsPercentage(String startTime, String endTime){ + Map map = new HashMap<>(); + map.put("startTime", startTime); + map.put("endTime", endTime); + return getSuccessResult(allOrderInfoService.getOilAndGoodsPercentage(map)); + } + + + /** + * 油站首页 数据分析 第三个饼状图 + * @param map + * @return + */ + @GetMapping("/getOilAndGoodsAndVipAndPoints") + public ResponseObject getOilAndGoodsAndVipAndPoints(String startTime, String endTime){ + Map map = new HashMap<>(); + map.put("startTime", startTime); + map.put("endTime", endTime); + return getSuccessResult(allOrderInfoService.getOilAndGoodsAndVipAndPoints(map)); + } + /** * 油站首页数据展示 * @param map diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java index 6077a7235..f3f65abfc 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java @@ -165,6 +165,10 @@ public interface AllOrderInfoService { */ List getDataAnalysis(Map map); + + Object getOilPercentage(Map map); + Object getOilAndGoodsPercentage(Map map); + Object getOilAndGoodsAndVipAndPoints(Map map); /** * 油站首页数据展示 * @param map diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java index 20ed96e2d..ba28893ef 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java @@ -79,6 +79,7 @@ import com.fuint.system.dept.entity.SysDept; import com.fuint.system.dept.mapper.SysDeptMapper; import com.fuint.system.dept.service.ISysDeptService; import com.fuint.system.dept.vo.SysDeptVo; +import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -140,10 +141,11 @@ public class AllOrderInfoServiceImpl extends ServiceImpl orderStatistics(AllOrderInfoRes allOrderInfoRes) { - return allOrderInfoMapper.orderStatistics(allOrderInfoRes, allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0], - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]); + return allOrderInfoMapper.orderStatistics(allOrderInfoRes, allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0], + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]); } @Override @@ -852,7 +854,6 @@ public class AllOrderInfoServiceImpl extends ServiceImpl pageList = allOrderInfoMapper.gettradingListPage(page, allOrderInfo, - allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0], - allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]); + allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0], + allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]); return pageList; } - @Override public IPage transactionList(Page page, AllOrderInfoRes allOrderInfoRes) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId()); IPage allOrderInfoVoIPage = super.baseMapper.transactionList(page, allOrderInfoRes, - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0], - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]); + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0], + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]); return allOrderInfoVoIPage; } @@ -1916,6 +1916,78 @@ public class AllOrderInfoServiceImpl extends ServiceImpl map) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + map.put("storeId", nowAccountInfo.getStoreId()); + List> s1 = oilNumberMapper.getS1(map); + + return s1; + } + + /** + * 油站首页 数据分析 第二个饼状图 + */ + public Object getOilAndGoodsPercentage(Map map) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + map.put("storeId", nowAccountInfo.getStoreId()); + Map m1 = oilNumberMapper.getOilAndGoodsPercentage(map); + + List> list = new ArrayList<>(); + for (int i = 1; i <= 2; i++) { + HashMap m2 = new HashMap<>(); + if (i == 1) { + + m2.put("name", "油品交易占比"); + m2.put("value", m1.get("oil_order_total")); + } + if (i == 2) { + + m2.put("name", "非油品交易占比"); + m2.put("value", m1.get("mt_order_total")); + } + list.add(m2); + } + + return list; + } + + + /** + * 油站首页 数据分析 第三个饼状图 + */ + public Object getOilAndGoodsAndVipAndPoints(Map map) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + map.put("storeId", nowAccountInfo.getStoreId()); + Map oilAndGoodsAndVipAndPoints = oilNumberMapper.getOilAndGoodsAndVipAndPoints(map); + List> list = new ArrayList<>(); + for (int i = 1; i <=4 ; i++) { + HashMap m2 = new HashMap<>(); + if (i==1){ + m2.put("name","会员充值交易占比"); + m2.put("value",oilAndGoodsAndVipAndPoints.get("all_order_type_3_total")); + } + if (i==2){ + m2.put("name","积分商城交易占比"); + m2.put("value",oilAndGoodsAndVipAndPoints.get("all_order_type_4_total")); + } + if (i==3){ + m2.put("name","油品交易占比"); + m2.put("value",oilAndGoodsAndVipAndPoints.get("oil_order_total")); + } + if (i==4){ + m2.put("name","非油品交易占比"); + m2.put("value",oilAndGoodsAndVipAndPoints.get("mt_order_total")); + } + + list.add(m2); + } + + return list; + } + /** * 油站首页数据分析 * @@ -2522,15 +2594,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl mtStaffs= mtStaffMapper.getStaffByStorId(nowAccountInfo.getStoreId()); + List mtStaffs = mtStaffMapper.getStaffByStorId(nowAccountInfo.getStoreId()); return mtStaffs; } - @Override public void exportExcelOrderMsgApi(HttpServletResponse response, AllOrderInfoRes allOrderInfoRes) { - List list= transactionAllList(allOrderInfoRes); + List list = transactionAllList(allOrderInfoRes); List tradingExcel = new ArrayList<>(); for (TradingOrderExcel record : list) { TradingOrderExcel excel = new TradingOrderExcel(); @@ -2553,6 +2624,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl list= transactionBackAllList(allOrderInfoRes); + List list = transactionBackAllList(allOrderInfoRes); List tradingExcel = new ArrayList<>(); for (TradingBackOrderExcel record : list) { TradingBackOrderExcel excel1 = new TradingBackOrderExcel(); @@ -2590,9 +2663,9 @@ public class AllOrderInfoServiceImpl extends ServiceImpl tradingNewList(Page page, AllOrderInfoDto allOrderInfo) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); allOrderInfo.setStoreId(nowAccountInfo.getStoreId()); - return baseMapper.tradingNewList(page,allOrderInfo, - allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0], - allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]); + return baseMapper.tradingNewList(page, allOrderInfo, + allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0], + allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]); } + @Override public AllOrderInfoVo getTradingNewData(AllOrderInfoDto allOrderInfo) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); allOrderInfo.setStoreId(nowAccountInfo.getStoreId()); return allOrderInfoMapper.getTradingNewData(allOrderInfo, - allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[0], - allOrderInfo.getDataRange()==null?"":allOrderInfo.getDataRange()[1]); + allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[0], + allOrderInfo.getDataRange() == null ? "" : allOrderInfo.getDataRange()[1]); } @Override @@ -2635,31 +2711,34 @@ public class AllOrderInfoServiceImpl extends ServiceImpl getInstituionListApi7(Page page,AllOrderInfoRes allOrderInfoRes) { + public IPage getInstituionListApi7(Page page, AllOrderInfoRes allOrderInfoRes) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId()); - return allOrderInfoMapper.getInstituionListApi7(page,allOrderInfoRes, - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0], - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]); + return allOrderInfoMapper.getInstituionListApi7(page, allOrderInfoRes, + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0], + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]); } + @Override public StatisticsOneDayOrderAllDto getInstituionListApi9(AllOrderInfoRes allOrderInfoRes) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); allOrderInfoRes.setStoreId(nowAccountInfo.getStoreId()); return allOrderInfoMapper.getInstituionListApi9(allOrderInfoRes, - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[0], - allOrderInfoRes.getDataRange()==null?"":allOrderInfoRes.getDataRange()[1]); + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[0], + allOrderInfoRes.getDataRange() == null ? "" : allOrderInfoRes.getDataRange()[1]); } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java index 90ef014da..98bd76e34 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java @@ -9,6 +9,7 @@ import io.swagger.models.auth.In; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * (ChainStoreInfo)表数据库访问层 @@ -65,5 +66,9 @@ public interface OilNumberMapper extends BaseMapper { double getOilPriceById(@Param("oilId") Integer oilId,@Param("storeId") Integer storeId); List selectAllOil(Integer storeId); + + List> getS1(@Param("obj") Map map); + Map getOilAndGoodsPercentage(@Param("obj") Map map); + Map getOilAndGoodsAndVipAndPoints(@Param("obj") Map map); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml index 7aad0d538..45eb786d5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml @@ -5,38 +5,53 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - select `number_id`,`oil_type`,oil_name,oil_price,gb_price,receiving_units,create_time,update_time,`state`,sort,remark,if_delete,unit, store_id + select `number_id`, + `oil_type`, + oil_name, + oil_price, + gb_price, + receiving_units, + create_time, + update_time, + `state`, + sort, + remark, + if_delete, + unit, + store_id from oil_number - - - - - - - + + + + + + + insert into oil_number - + oil_type, oil_name, oil_price, @@ -84,7 +99,7 @@ store_id, create_by, - + #{oilType }, #{oilName }, #{oilPrice }, @@ -107,29 +122,34 @@ oil_type= #{oilType}, oil_name= #{oilName}, - oil_price= #{oilPrice}, + oil_price= #{oilPrice}, gb_price= #{gbPrice}, receiving_units= #{receivingUnits}, - state = #{state}, + state = #{state}, sort= #{sort}, remark= #{remark}, update_by= #{updateBy}, unit= #{unit}, up_or_down= #{upOrDown}, - amplitude_of_change= #{amplitudeOfChange }, + amplitude_of_change= + #{amplitudeOfChange }, + update_time= NOW() where number_id = #{numberId} - delete from oil_number where number_id = #{numberId} + delete + from oil_number + where number_id = #{numberId} + + +