|
|
|
@ -745,13 +745,14 @@ namespace Shentun.Peis.RegisterAsbitems |
|
|
|
List<RegisterCheckAsbitem> registerAsbitems = await _registerCheckAsbitemRepository.GetListAsync(m => chargeAsbitemList.Select(s => s.RegisterAsbitemId).Contains(m.Id)); |
|
|
|
registerAsbitems.ForEach(f => f.IsCharge = 'N'); |
|
|
|
#region 插入主表Charge
|
|
|
|
Guid chargeBackId = GuidGenerator.Create(); |
|
|
|
|
|
|
|
ChargeBack chargeBack = new ChargeBack |
|
|
|
ChargeBack chargeBack = new ChargeBack(chargeBackId) |
|
|
|
{ |
|
|
|
ChargeId = input.ChargeId |
|
|
|
}; |
|
|
|
|
|
|
|
var chargeBack_new = await _chargeBackRepository.InsertAsync(chargeBack); //退费主表
|
|
|
|
await _chargeBackRepository.InsertAsync(chargeBack); //退费主表
|
|
|
|
|
|
|
|
|
|
|
|
#region 退费方式
|
|
|
|
@ -761,8 +762,9 @@ namespace Shentun.Peis.RegisterAsbitems |
|
|
|
{ |
|
|
|
if (item.PayModeId == "05") |
|
|
|
{ |
|
|
|
Guid cardBillId = GuidGenerator.Create(); |
|
|
|
//会员卡
|
|
|
|
CardBill cardBill = new CardBill(GuidGenerator.Create()) |
|
|
|
CardBill cardBill = new CardBill(cardBillId) |
|
|
|
{ |
|
|
|
PayModeId = item.PayModeId, |
|
|
|
BillFlag = CardBillFlag.Refund, |
|
|
|
@ -770,9 +772,8 @@ namespace Shentun.Peis.RegisterAsbitems |
|
|
|
CardRegisterId = item.CardRegisterId.Value |
|
|
|
}; |
|
|
|
cardBill = _cardBillManager.CreateAsync(cardBill); |
|
|
|
var cardBill_new = await _cardBillRepository.InsertAsync(cardBill); |
|
|
|
if (cardBill_new != null) |
|
|
|
{ |
|
|
|
await _cardBillRepository.InsertAsync(cardBill); |
|
|
|
|
|
|
|
#region 回退会员卡余额
|
|
|
|
|
|
|
|
var cardRegisterEnt = await _cardRegisterRepository.FirstOrDefaultAsync(f => f.Id == item.CardRegisterId.Value); |
|
|
|
@ -787,10 +788,10 @@ namespace Shentun.Peis.RegisterAsbitems |
|
|
|
{ |
|
|
|
BackMoeny = item.BackMoeny, |
|
|
|
PayModeId = item.PayModeId, |
|
|
|
ChargeBackId = chargeBack_new.Id, |
|
|
|
CardBillId = cardBill_new.Id |
|
|
|
ChargeBackId = chargeBackId, |
|
|
|
CardBillId = cardBillId |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
@ -798,7 +799,7 @@ namespace Shentun.Peis.RegisterAsbitems |
|
|
|
{ |
|
|
|
BackMoeny = item.BackMoeny, |
|
|
|
PayModeId = item.PayModeId, |
|
|
|
ChargeBackId = chargeBack_new.Id |
|
|
|
ChargeBackId = chargeBackId |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|