bug
This commit is contained in:
parent
63ec546d5c
commit
179f49c58f
10
fuintAdmin/src/api/order/growthvaluerecord.js
Normal file
10
fuintAdmin/src/api/order/growthvaluerecord.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询成长值记录信息列表
|
||||
export function listGrowthValueRecord(query) {
|
||||
return request({
|
||||
url: '/business/growthValueChange/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -105,7 +105,6 @@ export default {
|
||||
},
|
||||
getOilName(){
|
||||
oilNumbers().then(res => {
|
||||
console.log(res)
|
||||
this.oilNameList = res.data
|
||||
})
|
||||
},
|
||||
@ -123,7 +122,6 @@ export default {
|
||||
})
|
||||
},
|
||||
changeStatus() {
|
||||
console.log("12312312312312312",this.cardList)
|
||||
if (this.cardList == 'notUse') {
|
||||
this.queryParams.status = 0
|
||||
} else if (this.cardList == 'used') {
|
||||
|
@ -1,12 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column label="所属油站" prop="id" align="center"/>
|
||||
<el-table-column label="变动时间" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="userNo"/>
|
||||
<el-table-column label="变动成长值" align="center" prop="name" />
|
||||
<el-table-column label="描述" align="center" prop="name" />
|
||||
<el-table-column label="类型" align="center" prop="balance"/>
|
||||
<el-table-column label="所属油站" prop="storeName" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.storeName ? scope.row.storeName : storeName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动时间" prop="createTime" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="changeType">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动成长值" align="center" prop="growthValue" />
|
||||
<el-table-column label="变动后成长值" align="center" prop="afterTheChange" />
|
||||
<el-table-column label="描述" align="center" prop="fromType" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -19,6 +30,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listGrowthValueRecord} from "@/api/order/growthvaluerecord";
|
||||
import {ljStoreInfo} from "@/api/staff/store";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -30,16 +44,30 @@ export default {
|
||||
queryParams:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
}
|
||||
},
|
||||
storeName:"",
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
this.getList()
|
||||
this.getStoreName()
|
||||
},
|
||||
methods:{
|
||||
getStoreName(){
|
||||
ljStoreInfo().then(res => {
|
||||
this.storeName = res.data.name
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
|
||||
this.loading = true
|
||||
this.queryParams.userId = this.userId
|
||||
listGrowthValueRecord(this.queryParams).then(res => {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,15 +40,15 @@
|
||||
<div style="margin-top: 15px">
|
||||
<span style="color: grey;">成长值计算方式</span>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<el-input v-model="gasGrowthValue" disabled placeholder="1" style="margin: 10px 10px">
|
||||
<el-input v-model="gasGrowthValue" disabled style="margin: 10px 10px">
|
||||
<template slot="prepend">汽油成长值比例,每消费1元积</template>
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
<el-input v-model="dieselGrowthValue" disabled placeholder="1" style="margin: 10px 10px">
|
||||
<el-input v-model="dieselGrowthValue" disabled style="margin: 10px 10px">
|
||||
<template slot="prepend">柴油成长值比例,每消费1元积</template>
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
<el-input v-model="naturalGrowthValue" disabled placeholder="1" style="margin: 10px 10px">
|
||||
<el-input v-model="naturalGrowthValue" disabled style="margin: 10px 10px">
|
||||
<template slot="prepend">天然气成长值比例,每消费1元积</template>
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
@ -491,11 +491,11 @@ export default {
|
||||
// 成长值计算规则
|
||||
growthValueRule:[],
|
||||
// 汽油成长值
|
||||
gasGrowthValue:'',
|
||||
gasGrowthValue:0,
|
||||
// 柴油成长值
|
||||
dieselGrowthValue:'',
|
||||
dieselGrowthValue:0,
|
||||
// 天然气成长值
|
||||
naturalGrowthValue:'',
|
||||
naturalGrowthValue:0,
|
||||
clear:'',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -584,9 +584,15 @@ export default {
|
||||
// console.log(response)
|
||||
this.isEnableLevel = response.data.isEnableLevel;
|
||||
this.clear = response.data.isMonthClear;
|
||||
this.gasGrowthValue = response.data.gasGrowthValue;
|
||||
this.dieselGrowthValue = response.data.dieselGrowthValue;
|
||||
this.naturalGrowthValue = response.data.naturalGrowthValue;
|
||||
if (response.data.gasGrowthValue){
|
||||
this.gasGrowthValue = response.data.gasGrowthValue;
|
||||
}
|
||||
if (response.data.dieselGrowthValue) {
|
||||
this.dieselGrowthValue = response.data.dieselGrowthValue;
|
||||
}
|
||||
if (response.data.naturalGrowthValue) {
|
||||
this.naturalGrowthValue = response.data.naturalGrowthValue;
|
||||
}
|
||||
if (response.data.isEnableLevel=="no"){
|
||||
this.level1 = true;
|
||||
this.level2 = false;
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.GrowthValueChange;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.service.GrowthValueChangeService;
|
||||
import com.fuint.business.order.vo.GrowthValueChangeVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -27,11 +28,11 @@ public class GrowthValueChangeController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject list(GrowthValueChange growthValueChange,
|
||||
public ResponseObject list(GrowthValueChangeVo growthValueChange,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<GrowthValueChange> list = growthValueChangeService.selectGrowthValueChangeList(page,growthValueChange);
|
||||
IPage<GrowthValueChangeVo> list = growthValueChangeService.selectGrowthValueChangeList(page,growthValueChange);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.GrowthValueChange;
|
||||
import com.fuint.business.order.vo.GrowthValueChangeVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface GrowthValueChangeMapper extends BaseMapper<GrowthValueChange> {
|
||||
@ -13,5 +14,5 @@ public interface GrowthValueChangeMapper extends BaseMapper<GrowthValueChange> {
|
||||
* @param growthValueChange
|
||||
* @return
|
||||
*/
|
||||
public IPage<GrowthValueChange> selectGrowthValueChangeList(@Param("page") Page page,@Param("growthValueChange") GrowthValueChange growthValueChange);
|
||||
public IPage<GrowthValueChangeVo> selectGrowthValueChangeList(@Param("page") Page page, @Param("growthValueChange") GrowthValueChangeVo growthValueChange);
|
||||
}
|
||||
|
@ -1,12 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.order.mapper.GrowthValueChangeMapper">
|
||||
<select id="selectGrowthValueChangeList" resultType="com.fuint.business.order.entity.GrowthValueChange">
|
||||
select * from growth_value_change
|
||||
<select id="selectGrowthValueChangeList" resultType="com.fuint.business.order.vo.GrowthValueChangeVo">
|
||||
select gvc.*,ms.name storeName from growth_value_change gvc
|
||||
left join mt_store ms on store_id = ms.id
|
||||
<where>
|
||||
<if test="growthValueChange.storeId != null and growthValueChange.storeId != ''">
|
||||
and store_id = #{growthValueChange.storeId}
|
||||
and gvc.store_id = #{growthValueChange.storeId}
|
||||
</if>
|
||||
<if test="growthValueChange.userId != null and growthValueChange.userId != ''">
|
||||
and gvc.user_id = #{growthValueChange.userId}
|
||||
</if>
|
||||
</where>
|
||||
order by gvc.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@ -3,6 +3,7 @@ package com.fuint.business.order.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.GrowthValueChange;
|
||||
import com.fuint.business.order.vo.GrowthValueChangeVo;
|
||||
|
||||
public interface GrowthValueChangeService {
|
||||
/**
|
||||
@ -11,7 +12,7 @@ public interface GrowthValueChangeService {
|
||||
* @param growthValueChange
|
||||
* @return
|
||||
*/
|
||||
public IPage<GrowthValueChange> selectGrowthValueChangeList(Page page, GrowthValueChange growthValueChange);
|
||||
public IPage<GrowthValueChangeVo> selectGrowthValueChangeList(Page page, GrowthValueChangeVo growthValueChange);
|
||||
|
||||
/**
|
||||
* 根据id查询成长值变化记录信息
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.GrowthValueChange;
|
||||
import com.fuint.business.order.mapper.GrowthValueChangeMapper;
|
||||
import com.fuint.business.order.service.GrowthValueChangeService;
|
||||
import com.fuint.business.order.vo.GrowthValueChangeVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -13,7 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class GrowthValueChangeServiceImpl extends ServiceImpl<GrowthValueChangeMapper, GrowthValueChange> implements GrowthValueChangeService {
|
||||
@Override
|
||||
public IPage<GrowthValueChange> selectGrowthValueChangeList(Page page, GrowthValueChange growthValueChange) {
|
||||
public IPage<GrowthValueChangeVo> selectGrowthValueChangeList(Page page, GrowthValueChangeVo growthValueChange) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
growthValueChange.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectGrowthValueChangeList(page,growthValueChange);
|
||||
|
@ -40,9 +40,11 @@ import com.fuint.business.petrolStationManagement.service.OilTankService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilTrackingService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.userManager.entity.ChainStoreConfig;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.service.ChainStoreConfigService;
|
||||
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||
import com.fuint.business.userManager.service.LJUserService;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
@ -94,6 +96,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
private StaffCommissionService staffCommissionService;
|
||||
@Autowired
|
||||
private GrowthValueChangeService growthValueChangeService;
|
||||
@Autowired
|
||||
private ChainStoreConfigService chainStoreConfigService;
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||
@ -556,7 +560,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
baseMapper.insert(order);
|
||||
|
||||
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||
this.updateGrowthValue1(0.0, userId, Integer.valueOf(oilOrder.getOils()), refuelMoneyLiters - Double.valueOf(oilOrders.get(i).get("liters").toString()), storeId,orderNo);
|
||||
this.updateGrowthValue1(oilAmount,0.0, userId, Integer.valueOf(oilOrder.getOils()), refuelMoneyLiters - Double.valueOf(oilOrders.get(i).get("liters").toString()), storeId,orderNo);
|
||||
this.insertOilBalance(userId,storeId,oilName.getId().toString(),oilName.getOilType(),Double.valueOf(oilOrders.get(i).get("liters").toString()),refuelMoneyLiters - Double.valueOf(oilOrders.get(i).get("liters").toString()),orderNo);
|
||||
}else if (refuelMoneyLiters>0 && (Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice<=cardBalance){
|
||||
flag = true;
|
||||
@ -593,7 +597,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
baseMapper.insert(order);
|
||||
|
||||
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||
this.updateGrowthValue1((Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice, userId, Integer.valueOf(oilOrder.getOils()), 0.0, storeId,orderNo);
|
||||
this.updateGrowthValue1(oilAmount,(Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice, userId, Integer.valueOf(oilOrder.getOils()), 0.0, storeId,orderNo);
|
||||
this.insertOilBalance(userId,storeId,oilName.getId().toString(),oilName.getOilType(),refuelMoneyLiters,0.0,orderNo);
|
||||
} else if (cardBalance >= oilAmount){
|
||||
flag = true;
|
||||
@ -630,7 +634,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
baseMapper.insert(order);
|
||||
|
||||
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||
this.updateGrowthValue1(oilAmount,oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||
// this.insertCardBalance((Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice,userId,storeId);
|
||||
}else {
|
||||
res.put("error","囤油卡或储值卡余额不足!");
|
||||
@ -672,7 +676,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
baseMapper.insert(order);
|
||||
|
||||
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||
this.updateGrowthValue1(oilAmount,oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -757,7 +761,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setSeekZero(0.0);
|
||||
cashierOrder.setPayType(map.get("payType"));
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||
this.updateGrowthValue1(oilAmount,oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"PC","1","paid");
|
||||
staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,oilLiters,"1",orderNo);
|
||||
// this.insertCardBalance(oilAmount,userId,storeId);
|
||||
@ -808,7 +812,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
* @param oilId 油号id
|
||||
* @param refuelMoney 扣除的囤油卡升数
|
||||
*/
|
||||
private void updateGrowthValue1(Double oilActualPay,Integer userid,Integer oilId,Double refuelMoney,Integer storeId,String orderNo){
|
||||
private void updateGrowthValue1(Double oilAmount,Double oilActualPay,Integer userid,Integer oilId,Double refuelMoney,Integer storeId,String orderNo){
|
||||
OilName oilName = oilNameService.selectOilNameById(oilId);
|
||||
// 获取成长值增长数值
|
||||
Integer gasGrowthValue = null;
|
||||
@ -842,9 +846,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Page page = new Page(1,20);
|
||||
LJUserGrade ljUserGrade1 = new LJUserGrade();
|
||||
List<LJUserGrade> records = userGradeService.selectUserGradeAll(storeId);
|
||||
if (oilName.getOilType().equals("汽油")){
|
||||
gasGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("gas_growth_value"));
|
||||
Integer addVal = (int) (gasGrowthValue * oilActualPay);
|
||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreByStoreId(storeId);
|
||||
if (oilName.getOilType().equals("汽油") && ObjectUtil.isNotEmpty(chainStoreConfig)){
|
||||
gasGrowthValue = Integer.valueOf(chainStoreConfig.getGasGrowthValue());
|
||||
Integer addVal = (int) (gasGrowthValue * oilAmount);
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
@ -857,9 +862,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
balance.setGrowthValue(growthAfter);
|
||||
}else if(oilName.getOilType().equals("柴油")){
|
||||
dieselGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("diesel_growth_value"));
|
||||
Integer addVal = (int) (dieselGrowthValue * oilActualPay);
|
||||
}else if(oilName.getOilType().equals("柴油") && ObjectUtil.isNotEmpty(chainStoreConfig)){
|
||||
dieselGrowthValue = Integer.valueOf(chainStoreConfig.getDieselGrowthValue());
|
||||
Integer addVal = (int) (dieselGrowthValue * oilAmount);
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
@ -872,9 +877,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
balance.setGrowthValue(growthAfter);
|
||||
}else{
|
||||
naturalGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("natural_growth_value"));
|
||||
Integer addVal = (int) (naturalGrowthValue * oilActualPay);
|
||||
}else if (oilName.getOilType().equals("天然气") && ObjectUtil.isNotEmpty(chainStoreConfig)){
|
||||
naturalGrowthValue = Integer.valueOf(chainStoreConfig.getNaturalGrowthValue());
|
||||
Integer addVal = (int) (naturalGrowthValue * oilAmount);
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
@ -887,7 +892,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
balance.setGrowthValue(growthAfter);
|
||||
}
|
||||
}else {}
|
||||
// balance.setCardBalance(balance.getCardBalance()-oilActualPay);
|
||||
userBalanceService.updateUserBalance(balance);
|
||||
|
||||
@ -1291,9 +1296,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Page page = new Page(1,20);
|
||||
LJUserGrade ljUserGrade1 = new LJUserGrade();
|
||||
List<LJUserGrade> records = userGradeService.selectUserGradeAll(storeId);
|
||||
if (oilName.getOilType().equals("汽油")){
|
||||
gasGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("gas_growth_value"));
|
||||
Integer addVal = (int) (gasGrowthValue * oilActualPay);
|
||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreByStoreId(storeId);
|
||||
if (oilName.getOilType().equals("汽油") && ObjectUtil.isNotEmpty(chainStoreConfig)){
|
||||
gasGrowthValue = Integer.valueOf(chainStoreConfig.getGasGrowthValue());
|
||||
Integer addVal = (int) (gasGrowthValue * oilAmount);
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
@ -1306,9 +1312,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
balance.setGrowthValue(growthAfter);
|
||||
}else if(oilName.getOilType().equals("柴油")){
|
||||
dieselGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("diesel_growth_value"));
|
||||
Integer addVal = (int) (dieselGrowthValue * oilActualPay);
|
||||
}else if(oilName.getOilType().equals("柴油") && ObjectUtil.isNotEmpty(chainStoreConfig)){
|
||||
dieselGrowthValue = Integer.valueOf(chainStoreConfig.getDieselGrowthValue());
|
||||
Integer addVal = (int) (dieselGrowthValue * oilAmount);
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
@ -1321,9 +1327,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
balance.setGrowthValue(growthAfter);
|
||||
}else{
|
||||
naturalGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("natural_growth_value"));
|
||||
Integer addVal = (int) (naturalGrowthValue * oilActualPay);
|
||||
}else if (oilName.getOilType().equals("天然气") && ObjectUtil.isNotEmpty(chainStoreConfig)){
|
||||
naturalGrowthValue = Integer.valueOf(chainStoreConfig.getNaturalGrowthValue());
|
||||
Integer addVal = (int) (naturalGrowthValue * oilAmount);
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
@ -1336,7 +1342,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
balance.setGrowthValue(growthAfter);
|
||||
}
|
||||
}else {}
|
||||
// 修改用户成长值
|
||||
Integer consumeNum = balance.getConsumeNum();
|
||||
balance.setConsumeNum(consumeNum+1);
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.fuint.business.order.vo;
|
||||
|
||||
import com.fuint.business.order.entity.GrowthValueChange;
|
||||
|
||||
public class GrowthValueChangeVo extends GrowthValueChange {
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String storeName;
|
||||
}
|
@ -29,7 +29,9 @@ public class ChainStoreConfigServiceImpl extends ServiceImpl<ChainStoreConfigMap
|
||||
public ChainStoreConfig selectChainStoreConfigById() {
|
||||
LJStore store = storeService.selectStoreById();
|
||||
Integer id = store.getChainStoreId();
|
||||
return baseMapper.selectById(id);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("chain_store_id",id);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
10
fuintCashierWeb/src/api/cashier/growthvaluerecord.js
Normal file
10
fuintCashierWeb/src/api/cashier/growthvaluerecord.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询成长值记录信息列表
|
||||
export function listGrowthValueRecord(query) {
|
||||
return request({
|
||||
url: '/business/growthValueChange/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -209,6 +209,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getUser()
|
||||
|
@ -76,9 +76,9 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.$route.query.id;
|
||||
console.log( "111111",this.userId)
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
|
||||
this.getList()
|
||||
this.getOilName()
|
||||
},
|
||||
@ -109,7 +109,6 @@ export default {
|
||||
},
|
||||
getOilName(){
|
||||
oilNumbers().then(res => {
|
||||
console.log(res)
|
||||
this.oilNameList = res.data
|
||||
})
|
||||
},
|
||||
@ -129,7 +128,6 @@ export default {
|
||||
})
|
||||
},
|
||||
changeStatus() {
|
||||
console.log("12312312312312312",this.cardList)
|
||||
if (this.cardList == 'notUse') {
|
||||
this.queryParams.status = 0
|
||||
} else if (this.cardList == 'used') {
|
||||
|
@ -1,12 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="tables" v-loading="loading" :data="list">
|
||||
<el-table-column label="所属油站" prop="id" align="center"/>
|
||||
<el-table-column label="变动时间" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="userNo"/>
|
||||
<el-table-column label="变动成长值" align="center" prop="name" />
|
||||
<el-table-column label="描述" align="center" prop="name" />
|
||||
<el-table-column label="类型" align="center" prop="balance"/>
|
||||
<el-table-column label="所属油站" prop="storeName" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.storeName ? scope.row.storeName : storeName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动时间" prop="createTime" align="center"/>
|
||||
<el-table-column label="类型" align="center" prop="changeType">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动成长值" align="center" prop="growthValue" />
|
||||
<el-table-column label="变动后成长值" align="center" prop="afterTheChange" />
|
||||
<el-table-column label="描述" align="center" prop="fromType" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -19,6 +30,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {ljStoreInfo} from "@/api/staff/store";
|
||||
import {listGrowthValueRecord} from "@/api/cashier/growthvaluerecord";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
data(){
|
||||
@ -30,15 +44,31 @@ export default {
|
||||
queryParams:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
}
|
||||
},
|
||||
storeName:""
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
this.getList()
|
||||
this.getStoreName()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
||||
getStoreName(){
|
||||
ljStoreInfo().then(res => {
|
||||
this.storeName = res.data.name
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
this.loading = true
|
||||
this.queryParams.userId = this.userId
|
||||
listGrowthValueRecord(this.queryParams).then(res => {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ export default {
|
||||
getPayType(){
|
||||
getDicts("payment_type").then(res => {
|
||||
this.payTypeList = res.data
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
// 获取油枪信息
|
||||
|
@ -45,7 +45,6 @@ export default {
|
||||
created() {
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
console.log('1212',this.userId)
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
|
@ -35,7 +35,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.userId = this.pUserId;
|
||||
// this.userId = this.pUserId;
|
||||
this.userId = this.$route.query.id;
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
Loading…
Reference in New Issue
Block a user