This commit is contained in:
cun-nan 2024-10-14 18:00:48 +08:00
parent 07ae17f154
commit 681cfddf20
5 changed files with 51 additions and 31 deletions

View File

@ -663,7 +663,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setAfterDiscountAmount(oilAmount + goodsAmount - oilDiscount - goodsDiscount);
// 如果金额不等于0调用第三方支付接口
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") && !payType.equals("after_pay")) {
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") && !payType.equals("after_pay") && !payType.equals("card_value") && !payType.equals("fule_card")) {
Integer allAmount = (int) (Double.valueOf(map.get("allAmount")) * 100);
// 处理支付需要的数据
@ -1160,10 +1160,25 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// 判断油品消费升数是否可使用
Double fuelAmount = userFuelService.selectByUserIdAndOilId(userId, Integer.valueOf(oilOrders.get("oils").toString()), storeId);
List<String> oilIds = cardValueRuleService.getOilIds(storeId);
boolean flag = false;
for (String oilId : oilIds) {
if (oilId.equals(oilOrders.get("oils").toString())) {
flag = true;
}
}
if (fuelAmount < oilCardAmount && cardBalance < oilActualPay) {
res.put("error", "余额不足,请分开支付");
return res;
}
if (fuelAmount < oilCardAmount && cardBalance >= oilActualPay){
if (!flag) {
res.put("error", "此油品不支持储值卡支付");
return res;
}
}
OilOrder order = new OilOrder();
@ -1197,10 +1212,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
}
// 计算成长值
this.updateGrowthValue1(oilAmount, 0.0, userId, Integer.valueOf(order.getOils()), 0.0, storeId, orderNo);
// 修改囤油卡升数信息
// userFuelService.
// 修改储值卡余额信息
this.updateGrowthValue1(oilAmount, oilActualPay, userId, Integer.valueOf(order.getOils()), 0.0, storeId, orderNo);
cashierOrder.setStaffId(order.getStaffId());
cashierOrder.setStoreId(accountInfo.getStoreId());

View File

@ -1,6 +1,7 @@
package com.fuint.pay.service.impl;
import cn.hutool.core.date.DateField;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
@ -595,7 +596,7 @@ public class PayCenterServiceImpl implements PayCenterService {
m2.put("storeId", userBalance.getStoreId());
MtInvitation invitation = mtInvitationService.getOneByMap(m2);
// 当推荐人 不为null时 再去判断推荐人是否有资格参与活动
if (invitation != null) {
if (invitation != null && ObjectUtil.isNotEmpty(invitation.getInviterId())) {
// 根据店铺id 邀请人id 查询出 邀请人会员信息
UserBalance invitationBalance = userBalanceService.selectUserBalanceByStorId(invitation.getInviterId(), Integer.parseInt(map.get("storeId")));

View File

@ -129,6 +129,13 @@ export const constantRoutes = [
name: 'Handover',
component: () => import('@/views/cashier/NewComponents/Handover'),
},
{
path: '/handover/info',
component: () => import('@/views/cashier/NewComponents/handover/list'),
name: 'handover-info',
props: true, // 启用路由参数作为组件的props
meta: { title: '交易明细', icon: 'user' }
},
{
path: '/details',
name: 'details',
@ -142,28 +149,28 @@ export const constantRoutes = [
]
},
{
path: '/handover',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: '/handover/info',
component: () => import('@/views/cashier/NewComponents/handover/list'),
name: 'handover-info',
props: true, // 启用路由参数作为组件的props
meta: { title: '交易明细', icon: 'user' }
},
// {
// path: '/handover/details',
// component: () => import('@/views/handover/info/rec/details'),
// name: 'handover-details',
// props: true, // 启用路由参数作为组件的props
// meta: { title: '交易明细', icon: 'user' }
// },
]
}
// {
// path: '/handover',
// component: Layout,
// hidden: true,
// redirect: 'noredirect',
// children: [
// {
// path: '/handover/info',
// component: () => import('@/views/cashier/NewComponents/handover/list'),
// name: 'handover-info',
// props: true, // 启用路由参数作为组件的props
// meta: { title: '交易明细', icon: 'user' }
// },
// // {
// // path: '/handover/details',
// // component: () => import('@/views/handover/info/rec/details'),
// // name: 'handover-details',
// // props: true, // 启用路由参数作为组件的props
// // meta: { title: '交易明细', icon: 'user' }
// // },
// ]
// }
]
}

View File

@ -119,7 +119,7 @@ export default {
transactionDetailMethod(data) {
console.log("transactionDetailMethod",data)
this.$router.push({
name: 'handover-info',
path: '/handover/info',
params: {
staffId : data.staffId,
btime : data.startTime,

View File

@ -1238,7 +1238,7 @@ export default {
setTimeout(function () {
_this.loading = false;
_this.isPaySuccess = true;
_this.isPay = true;
_this.isPay = false;
// _this.printLocally()
_this.oilOrderReport()
_this.resetting1();
@ -1247,7 +1247,7 @@ export default {
setTimeout(function () {
_this.loading = false;
_this.isPaySuccess = false;
_this.isPay = true;
_this.isPay = false;
_this.resetting1();
this.$modal.msgError(resp.data.error)
}, 3000)