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