优惠统计
This commit is contained in:
parent
9e2a581288
commit
226cab681e
@ -9,13 +9,13 @@ import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRec
|
||||
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠记录表(FavorableRecords)表服务实现类
|
||||
@ -55,17 +55,18 @@ public class FavorableRecordsServiceImpl extends ServiceImpl<FavorableRecordsMap
|
||||
Long deptId = nowAccountInfo.getDeptId();
|
||||
LambdaQueryWrapper<FavorableRecords> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(FavorableRecords::getStoreId, nowAccountInfo.getStoreId());
|
||||
queryWrapper.eq(FavorableRecords::getChainStoreId, nowAccountInfo.getChainStoreId());
|
||||
if (ObjectUtils.isNotEmpty(favorableRecords.getFavFrom())){
|
||||
queryWrapper.eq(FavorableRecords::getFavFrom, favorableRecords.getFavFrom());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(favorableRecords.getFavType())){
|
||||
queryWrapper.eq(FavorableRecords::getFavType, favorableRecords.getFavType());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(favorableRecords.getFavConsumptionType())){
|
||||
queryWrapper.eq(FavorableRecords::getFavConsumptionType, favorableRecords.getFavConsumptionType());
|
||||
List<FavorableRecords> list = list(queryWrapper);
|
||||
//优惠次数
|
||||
objectObjectHashMap.put("count", list.size());
|
||||
|
||||
double allTotalCount = 0.0;
|
||||
|
||||
for (FavorableRecords records : list) {
|
||||
allTotalCount += records.getFavMoney();
|
||||
}
|
||||
objectObjectHashMap.put("allMoney",allTotalCount);
|
||||
return objectObjectHashMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
</view>
|
||||
<!-- 储值充值 -->
|
||||
<view class="boxback" v-if="actinput == 0">
|
||||
<swiper class="swiper" style="width: 100%;height: 70px;" circular
|
||||
:autoplay="autoplay" :interval="interval" :vertical="true" :duration="duration">
|
||||
<swiper class="swiper" style="width: 100%;height: 70px;" circular :autoplay="autoplay"
|
||||
:interval="interval" :vertical="true" :duration="duration">
|
||||
<swiper-item class="conttainer-box" v-for="(item,index) in actList" :key="index">
|
||||
<view class="box_s">
|
||||
{{item.discountActiveDescribe || ''}}
|
||||
@ -89,8 +89,8 @@
|
||||
</view>
|
||||
<!-- 囤油充值 -->
|
||||
<view class="boxback" v-if="actinput == 1">
|
||||
<swiper class="swiper" style="width: 100%;height: 70px;" circular
|
||||
:autoplay="autoplay" :interval="interval" :vertical="true" :duration="duration">
|
||||
<swiper class="swiper" style="width: 100%;height: 70px;" circular :autoplay="autoplay"
|
||||
:interval="interval" :vertical="true" :duration="duration">
|
||||
<swiper-item class="conttainer-box" v-for="(item,index) in cardList" :key="index">
|
||||
<view class="box_s">
|
||||
{{item.discountActiveDescribe || ''}}
|
||||
@ -98,17 +98,33 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="box-cz" style="margin-top: 20px;">
|
||||
<view :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardFuleList"
|
||||
style="display: flex;justify-content: space-around;width: 98%;border-radius: 8px;border: 1px solid #e2e2e2;
|
||||
box-sizing: border-box;padding: 10px;margin: 5px;height: 60px;line-height: 18px;"
|
||||
:key="index" @click="fuleindex(index,item.rechargeBalance,item.points,item.id)">
|
||||
<view style="font-size: 16px;font-weight: bold;line-height: 40px;" :class="{ 'actsize' : actindex == index }">{{item.oilType}}</view>
|
||||
<view :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardFuleList" style="display: flex;justify-content: space-around;width: 98%;border-radius: 8px;border: 1px solid #e2e2e2;
|
||||
box-sizing: border-box;padding: 10px;margin: 5px;height: 60px;line-height: 18px;" :key="index"
|
||||
@click="fuleindex(index,item.rechargeBalance,item.points,item.id)">
|
||||
<view style="font-size: 16px;font-weight: bold;line-height: 40px;"
|
||||
:class="{ 'actsize' : actindex == index }">{{item.oilType}}</view>
|
||||
<!-- <view style="font-size: 12px;font-weight: bold;margin: 0 5px;" :class="{ 'actsize' : actindex == index }">:</view> -->
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }"><view>国标油价</view><view>{{item.gbPrice}}¥/L</view></view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }"><view>本站油价</view><view>{{item.oilPrice}}¥/L</view></view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }"><view>锁价</view><view>{{item.lockupPrice}}¥/L</view></view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }"><view>总升数</view><view>{{item.incomeLitres || 0}}L</view></view>
|
||||
<view class="min-size1" style="color: red;" :class="{ 'actsize' : actindex == index }"><view>总价</view><view>¥{{item.rechargeBalance}}</view></view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }">
|
||||
<view>国标油价</view>
|
||||
<view>{{item.gbPrice}}¥/L</view>
|
||||
</view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }">
|
||||
<view>本站油价</view>
|
||||
<view>{{item.oilPrice}}¥/L</view>
|
||||
</view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }">
|
||||
<view>锁价活动价</view>
|
||||
<view>{{item.lockPrice}}¥/L</view>
|
||||
</view>
|
||||
<view class="min-size1" :class="{ 'actsize' : actindex == index }">
|
||||
<view>锁价满足金额</view>
|
||||
<view>{{item.rechargeBalance}}¥</view>
|
||||
</view>
|
||||
<!-- <view class="min-size1" :class="{ 'actsize' : actindex == index }"><view>总升数</view><view>{{item.incomeLitres || 0}}L</view></view> -->
|
||||
<!-- <view class="min-size1" style="color: red;" :class="{ 'actsize' : actindex == index }">
|
||||
<view>总价</view>
|
||||
<view>¥{{item.rechargeBalance}}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-hui">
|
||||
@ -282,15 +298,16 @@
|
||||
this.getStaffList()
|
||||
},
|
||||
methods: {
|
||||
changeBalance(){
|
||||
if (this.cardValueList.length>0) {
|
||||
this.cardValueList.forEach((item,index) => {
|
||||
console.log(this.balance>=item.rechargeBalance,111);
|
||||
if (this.balance>=item.rechargeBalance){
|
||||
this.xzindex(index,this.balance,item.fringeBenefit,item.giftBalance,item.points,item.growthValue,item.count,item.id);
|
||||
changeBalance() {
|
||||
if (this.cardValueList.length > 0) {
|
||||
this.cardValueList.forEach((item, index) => {
|
||||
console.log(this.balance >= item.rechargeBalance, 111);
|
||||
if (this.balance >= item.rechargeBalance) {
|
||||
this.xzindex(index, this.balance, item.fringeBenefit, item.giftBalance, item.points,
|
||||
item.growthValue, item.count, item.id);
|
||||
}
|
||||
})
|
||||
if (this.balance<this.cardValueList[0].rechargeBalance){
|
||||
if (this.balance < this.cardValueList[0].rechargeBalance) {
|
||||
this.text = ""
|
||||
this.shuomingList = []
|
||||
}
|
||||
@ -298,12 +315,13 @@
|
||||
},
|
||||
activen() {
|
||||
request({
|
||||
url: 'business/marketingActivity/cardValue/appletList?storeId='+uni.getStorageSync("storeId")+"&&activeStatus=1",
|
||||
url: 'business/marketingActivity/cardValue/appletList?storeId=' + uni.getStorageSync(
|
||||
"storeId") + "&&activeStatus=1",
|
||||
method: 'get',
|
||||
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res,111);
|
||||
console.log(res, 111);
|
||||
this.actList = res.data
|
||||
}
|
||||
})
|
||||
@ -349,10 +367,10 @@
|
||||
if (res.code == 200) {
|
||||
console.log(res, _this.appltType)
|
||||
if (_this.appltType == "WECHAT") {
|
||||
if(!res.data.reservedPayInfo){
|
||||
if (!res.data.reservedPayInfo) {
|
||||
uni.showToast({
|
||||
title:'支付失败,请联系商家',
|
||||
icon:"none"
|
||||
title: '支付失败,请联系商家',
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
@ -393,10 +411,10 @@
|
||||
}
|
||||
|
||||
if (_this.appltType == "ALIPAY") {
|
||||
if(!res.data.reservedTransactionId){
|
||||
if (!res.data.reservedTransactionId) {
|
||||
uni.showToast({
|
||||
title:'支付失败,请联系商家',
|
||||
icon:"none"
|
||||
title: '支付失败,请联系商家',
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
@ -433,7 +451,7 @@
|
||||
},
|
||||
//储值卡充值
|
||||
addValueCarRecords() {
|
||||
if (this.types==0){
|
||||
if (this.types == 0) {
|
||||
if (this.carValueId == '') {
|
||||
uni.showToast({
|
||||
title: "当前店铺暂未设置电子囤油卡储值优惠,请先联系商家",
|
||||
@ -441,8 +459,8 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
}else{
|
||||
if (!this.balance || this.balance<=0) {
|
||||
} else {
|
||||
if (!this.balance || this.balance <= 0) {
|
||||
uni.showToast({
|
||||
title: "请填写充值金额,并确保充值金额大于0",
|
||||
icon: "error"
|
||||
@ -473,10 +491,10 @@
|
||||
if (res.code === 200) {
|
||||
|
||||
if (_this.appltType == "WECHAT") {
|
||||
if(!res.data.reservedPayInfo){
|
||||
if (!res.data.reservedPayInfo) {
|
||||
uni.showToast({
|
||||
title:'支付失败,请联系商家',
|
||||
icon:"none"
|
||||
title: '支付失败,请联系商家',
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
@ -515,10 +533,10 @@
|
||||
}
|
||||
}
|
||||
if (_this.appltType == "ALIPAY") {
|
||||
if(!res.data.reservedTransactionId){
|
||||
if (!res.data.reservedTransactionId) {
|
||||
uni.showToast({
|
||||
title:'支付失败,请联系商家',
|
||||
icon:"none"
|
||||
title: '支付失败,请联系商家',
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
@ -605,8 +623,10 @@
|
||||
this.types = index
|
||||
if (index == 0) {
|
||||
// this.getValueCars();
|
||||
if (this.cardValueList.length>0)
|
||||
this.xzindex(0,this.cardValueList[0].rechargeBalance,this.cardValueList[0].fringeBenefit,this.cardValueList[0].giftBalance,this.cardValueList[0].points,this.cardValueList[0].growthValue,this.cardValueList[0].count,this.cardValueList[0].id)
|
||||
if (this.cardValueList.length > 0)
|
||||
this.xzindex(0, this.cardValueList[0].rechargeBalance, this.cardValueList[0].fringeBenefit, this
|
||||
.cardValueList[0].giftBalance, this.cardValueList[0].points, this.cardValueList[0].growthValue,
|
||||
this.cardValueList[0].count, this.cardValueList[0].id)
|
||||
}
|
||||
if (index == 1) {
|
||||
// this.getFuelCars();
|
||||
@ -637,7 +657,7 @@
|
||||
// .growthValue, res.data.records[0]
|
||||
// .count, res.data.records[0].id)
|
||||
this.cardValueList = res.data
|
||||
console.log(res.data,22);
|
||||
console.log(res.data, 22);
|
||||
this.xzindex(0, res.data[0].rechargeBalance, res.data[0].fringeBenefit,
|
||||
res.data[0].giftBalance, res.data[0].points, res.data[0]
|
||||
.growthValue, res.data[0]
|
||||
@ -666,11 +686,12 @@
|
||||
//囤油卡
|
||||
getFuelCarList() {
|
||||
request({
|
||||
url: 'business/marketingActivity/cardFuelDiesel/appletList?storeId='+uni.getStorageSync("storeId"),
|
||||
url: 'business/marketingActivity/cardFuelDiesel/appletList?storeId=' + uni.getStorageSync(
|
||||
"storeId"),
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res,111);
|
||||
console.log(res, 111);
|
||||
this.cardList = res.data
|
||||
}
|
||||
})
|
||||
@ -706,7 +727,7 @@
|
||||
},
|
||||
goRechargeRecords(val) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/Recharge/Recharge?index='+val
|
||||
url: '/pagesMy/Recharge/Recharge?index=' + val
|
||||
})
|
||||
},
|
||||
//获取本店员工列表
|
||||
@ -872,6 +893,7 @@
|
||||
//color: #e2e2e2;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.min-size1 {
|
||||
font-size: 12px;
|
||||
//color: #e2e2e2;
|
||||
|
Loading…
Reference in New Issue
Block a user