@@ -182,6 +182,7 @@ import {parseTime} from "@/utils/fuint";
import {getBannerListApi} from "@/api/sys/banner";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
import {employeeSalesApi} from "@/api/indexStatistics";
+import {getTotalAmount} from "@/api/allOrder";
export default {
props:["accountId"],
@@ -233,7 +234,7 @@ export default {
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
this.getStoreTotal()
- this.selectChildByDeptIdApi()
+ // this.selectChildByDeptIdApi()
this.getStoreAmount()
this.selectBannerList()
let start = new Date();
@@ -268,7 +269,7 @@ export default {
})
},
getNoticeList(){
- getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => {
+ getNotificationlogList({pageNo: 1, pageSize: 4}).then(res => {
this.noticeList = res.data.records
})
},
@@ -297,11 +298,12 @@ export default {
})
this.getStoreAmount()
},
+ // banner图
selectBannerList(){
let queryParams = {
pageNo:1,
pageSize:10,
- system_position:"系统首页",
+ systemPosition:"首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
@@ -314,8 +316,9 @@ export default {
this.options = res.data
})
},
+ // 核心数据
getStoreTotal(){
- storeTotalIndex().then(res => {
+ getTotalAmount().then(res => {
this.storeTotal = res.data
})
},
diff --git a/fuintAdmin_zt/src/views/homeComponents/agent.vue b/fuintAdmin_zt/src/views/homeComponents/agent.vue
index ae2cdb9ad..afb5cd62a 100644
--- a/fuintAdmin_zt/src/views/homeComponents/agent.vue
+++ b/fuintAdmin_zt/src/views/homeComponents/agent.vue
@@ -255,7 +255,7 @@ export default {
},
methods:{
goRoute(){
- this.$router.push("system/notify/page/getNotify")
+ this.$router.push("system/notify/index")
},
getNoticeList(){
getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => {
@@ -309,7 +309,7 @@ export default {
let queryParams = {
pageNo:1,
pageSize:10,
- system_position:"系统首页",
+ systemPosition:"系统首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
diff --git a/fuintAdmin_zt/src/views/homeComponents/manage.vue b/fuintAdmin_zt/src/views/homeComponents/manage.vue
index 706650050..2688bd0ba 100644
--- a/fuintAdmin_zt/src/views/homeComponents/manage.vue
+++ b/fuintAdmin_zt/src/views/homeComponents/manage.vue
@@ -43,7 +43,7 @@
【{{ item.notificationType }}】{{ item.templateContent }}
@@ -263,6 +263,9 @@ export default {
// this.initChart()
},
methods:{
+ goRoute(){
+ this.$router.push("system/notify/index")
+ },
getNoticeList(){
getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => {
this.noticeList = res.data.records
@@ -324,7 +327,7 @@ export default {
let queryParams = {
pageNo:1,
pageSize:10,
- system_position:"系统首页",
+ systemPosition:"系统首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
diff --git a/fuintAdmin_zt/src/views/homeComponents/shopowner.vue b/fuintAdmin_zt/src/views/homeComponents/shopowner.vue
index d4b5b8b4e..3eec88059 100644
--- a/fuintAdmin_zt/src/views/homeComponents/shopowner.vue
+++ b/fuintAdmin_zt/src/views/homeComponents/shopowner.vue
@@ -274,7 +274,7 @@ export default {
let queryParams = {
pageNo:1,
pageSize:10,
- system_position:"系统首页",
+ systemPosition:"系统首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java
index ff05e4433..932e2bb2c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java
@@ -181,6 +181,7 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl
{
AllOrderInfoVo getPaymentChannelData(Integer storeId);
IPage runningWaterByInstituion2(Page page,@Param("order") AllOrderInfoDto allOrderInfo);
+
}
\ No newline at end of file
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml
index 409f0d851..cc8608c8b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml
@@ -726,7 +726,7 @@
group by content
-
+
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 e568f1fde..388f287fc 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
@@ -131,4 +131,23 @@ public interface AllOrderInfoService {
Map getAmount1(AllOrderInfoVo allOrderInfoVo);
Double selectAmount(Map map, Integer storeId,List types);
+
+ /**
+ * 根据条件查询订单总金额和订单数量
+ * @param allOrderInfo
+ * @return
+ */
+ Map getSumAndNum(AllOrderInfo allOrderInfo,Map map1);
+
+ /**
+ * 油站首页核心数据
+ * @return
+ */
+ Map getTotalAmount();
+
+ /**
+ * 油站首页数据看板
+ * @return
+ */
+ Map getDataBoard(Map 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 786cc9f9b..7ec15ea5a 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
@@ -1566,6 +1566,73 @@ public class AllOrderInfoServiceImpl extends ServiceImpl getSumAndNum(AllOrderInfo allOrderInfo,Map map1) {
+ String startTime = map1.get("startTime");
+ String endTime = map1.get("endTime");
+ Map map = new HashMap<>();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("status","paid");
+ queryWrapper.eq("store_id",TokenUtil.getNowAccountInfo().getStoreId());
+ if (ObjectUtil.isNotEmpty(allOrderInfo.getType())){
+ queryWrapper.eq("type",allOrderInfo.getType());
+ }
+ if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
+ queryWrapper.apply(true,"create_time BETWEEN '" + startTime + "' and '" + endTime + "'");
+ }
+ Integer allNum = baseMapper.selectCount(queryWrapper);
+ queryWrapper.select("SUM(pay_money) as payMoney");
+ AllOrderInfo allOrderInfo1 = baseMapper.selectOne(queryWrapper);
+ Double payMoney = 0.0;
+ if (ObjectUtil.isNotEmpty(allOrderInfo1) && ObjectUtil.isNotEmpty(allOrderInfo1.getPayMoney())){
+ payMoney = allOrderInfo1.getPayMoney();
+ }
+ map.put("payMoney",payMoney);
+ map.put("allNum",allNum);
+ return map;
+ }
+
+ @Override
+ public Map getTotalAmount() {
+ Map map = new HashMap<>();
+// 总交易金额
+ Double allAmount = 0.0;
+// 总交易笔数
+ Integer allNum = 0;
+// 笔均单价
+ Double unitPrice = 0.0;
+// 累计会员余额
+ Double userBalance = 0.0;
+
+ Map sumAndNum = getSumAndNum(new AllOrderInfo(),new HashMap<>());
+ allAmount = Double.valueOf(sumAndNum.get("payMoney").toString());
+ allNum = Integer.valueOf(sumAndNum.get("allNum").toString());
+ BigDecimal bd = BigDecimal.valueOf(allAmount/allNum).setScale(2, RoundingMode.HALF_UP);
+ unitPrice = bd.doubleValue();
+ userBalance = userBalanceService.selectAllBalance(TokenUtil.getNowAccountInfo().getStoreId());
+
+ map.put("allAmount",allAmount);
+ map.put("allNum",allNum);
+ map.put("unitPrice",unitPrice);
+ map.put("userBalance",userBalance);
+ return map;
+ }
+
+ @Override
+ public Map getDataBoard(Map map) {
+ Map map1 = new HashMap<>();
+// 油品销售金额
+// 油品交易笔数
+// 会员充值金额
+// 会员充值笔数
+// 便利店销售金额
+// 交易笔数
+// 积分商城销售金额
+// 兑换笔数
+// 非油品交易占比
+ return map1;
+ }
+
private long dayCount(String beginTimeStr, String endTimeStr ) {
// 将字符串表示的时间转换成 LocalDate 对象