核销bug
This commit is contained in:
parent
3e51cf1e03
commit
a45fde5373
@ -982,7 +982,6 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (oilTypebyId.equals("天然气")) {
|
||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||
|
@ -139,13 +139,13 @@ public class CardExchangeRecordController extends BaseController {
|
||||
ljOrder.setPayUser(byId.getMobile());
|
||||
ljOrder.setStoreId(nowAccountInfo.getStoreId());
|
||||
ljOrder.setUserId(byId.getMtUserId());
|
||||
ljOrder.setGoodsNum(1);
|
||||
ljOrder.setGoodsNum(byId.getProductCount());
|
||||
ljOrder.setPayType("0");
|
||||
ljOrder.setStatus("paid");
|
||||
ljOrder.setPayTime(new Date());
|
||||
ljOrder.setStaffId(nowAccountInfo.getStaffId());
|
||||
ljOrderService.addGoodOrder(ljOrder,giftId);
|
||||
stockStatisticService.insertStockStatisticTrack(giftId,0.0,"核销兑换!",1);
|
||||
stockStatisticService.insertStockStatisticTrack(giftId,0.0,"核销兑换!",byId.getProductCount());
|
||||
return getSuccessResult(this.cardExchangeRecordService.updateById(cardExchangeRecord));
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ public class CardExchangeRecord extends Model<CardExchangeRecord> {
|
||||
private Integer chainStorId;
|
||||
//所属店铺id
|
||||
private Integer storeId;
|
||||
private Integer productCount;
|
||||
//员工id
|
||||
private Integer mtStaffId;
|
||||
//员工姓名
|
||||
|
@ -126,6 +126,7 @@ public class CardExchangeRecordServiceImpl extends ServiceImpl<CardExchangeRecor
|
||||
CardExchange cardExchange = cardExchangeService.getById(cardExchangeRecord.getCardExchangeId());
|
||||
if (ObjectUtils.isNotEmpty(cardExchange)){
|
||||
cardExchangeRecord.setExchangeName(cardExchange.getName());
|
||||
cardExchangeRecord.setProductCount(cardExchange.getProductCount());
|
||||
cardExchangeRecord.setGiftName(cardExchange.getGiftName());
|
||||
cardExchangeRecord.setDescription(cardExchange.getUseInstructions());
|
||||
cardExchangeRecord.setStartTime(new Date());
|
||||
|
@ -92,6 +92,8 @@ public class OilOrder extends BaseEntity implements Serializable {
|
||||
* 优惠金额
|
||||
*/
|
||||
private Double balanceAmount;
|
||||
private Double levelAmount;
|
||||
private Double activeAmount;
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
|
@ -233,7 +233,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
// 优惠券
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getCouponId())) {
|
||||
CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId());
|
||||
//CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId());
|
||||
LambdaQueryWrapper<CardFavorableRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CardFavorableRecord::getCardFavorableId, oilOrderVo.getCouponId());
|
||||
queryWrapper.eq(CardFavorableRecord::getMtUserId, oilOrderVo.getUserId());
|
||||
CardFavorableRecord cardFavorableVO = cardFavorableRecordService.getOne(queryWrapper);
|
||||
oilOrderVo.setCouponAmount(cardFavorableVO.getDiscountAmount());
|
||||
} else {
|
||||
oilOrderVo.setCouponAmount(0.0);
|
||||
@ -278,6 +282,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Double goodsActualPay = Double.valueOf(map.get("goodsActualPay"));
|
||||
// 找零金额
|
||||
Double seekZero = Double.valueOf(map.get("seekZero"));
|
||||
Double levelAmount = Double.valueOf(map.get("levelAmount"));
|
||||
Double activeAmount = Double.valueOf(map.get("activeAmount"));
|
||||
// 优惠券id
|
||||
Integer cardFavorableId = null;
|
||||
if (StringUtils.isNotEmpty(map.get("cardFavorableId"))){
|
||||
@ -442,6 +448,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
staffCommissionService.countStaffCommission(staffId,storeId,oilAmount,oilActualPay,"1",orderNo);
|
||||
}
|
||||
order.setCouponId(recordId);
|
||||
order.setActiveAmount(activeAmount);
|
||||
order.setLevelAmount(levelAmount);
|
||||
}else {
|
||||
order.setOrderType("子订单");
|
||||
order.setOrderAmount(amount);
|
||||
|
Loading…
Reference in New Issue
Block a user