コード例 #1
0
        /// <summary>
        /// 生成支付账单
        /// </summary>
        /// <param name="postponeApplyform">改期申请</param>
        public static Distribution.Domain.Bill.Pay.PostponePayBill ProducePayBill(Order.Domain.Applyform.PostponeApplyform postponeApplyform)
        {
            if (postponeApplyform == null)
            {
                throw new ArgumentNullException("postponeApplyform");
            }
            if (!postponeApplyform.Passengers.Any())
            {
                throw new CustomException("缺少乘机人信息");
            }
            if (!postponeApplyform.Flights.Any())
            {
                throw new CustomException("缺少航段信息");
            }
            if (DistributionQueryService.QueryPostponePayBill(postponeApplyform.Id) != null)
            {
                throw new RepeatedItemException("改期支付账单已存在");
            }

            var payBill = new Distribution.Domain.Bill.Pay.PostponePayBill(postponeApplyform.OrderId, postponeApplyform.Id)
            {
                Remark = "改期收费"
            };
            // 申请方
            var applier = new Distribution.Domain.Role.Purchaser(postponeApplyform.PurchaserId);

            payBill.Applier = applier.MakePayBill(postponeApplyform.Flights, postponeApplyform.Passengers);
            // 受理方
            var accepter = new Distribution.Domain.Role.Platform();

            payBill.Accepter = accepter.MakePayBill(postponeApplyform.Flights, postponeApplyform.Passengers, new[] { payBill.Applier });
            return(payBill);
        }
コード例 #2
0
ファイル: RemindHelper.cs プロジェクト: 842549829/Pool
 public static void RemindApplyform(Domain.Applyform.PostponeApplyform applyform) {
     if(applyform.RequireSeparatePNR) return;
     try {
         switch(applyform.Status) {
             case DataTransferObject.Order.PostponeApplyformStatus.Agreed:
                 Remind.OrderRemindService.Save(applyform.Id, Remind.Model.RemindStatus.AgreedForPostponeFee, getCarrier(applyform), applyform.PurchaserId);
                 break;
             case DataTransferObject.Order.PostponeApplyformStatus.Cancelled:
             case DataTransferObject.Order.PostponeApplyformStatus.Paid:
                 Remind.OrderRemindService.Delete(applyform.Id);
                 break;
         }
     } catch(System.Exception ex) {
         LogService.SaveExceptionLog(ex, "处理改期申请提醒信息");
     }
 }
コード例 #3
0
ファイル: RemindHelper.cs プロジェクト: 842549829/Pool
 static string getCarrier(Domain.Applyform.PostponeApplyform applyform) {
     return applyform.Flights.First().OriginalFlight.Carrier.Code;
 }