예제 #1
0
        private PrintResult Print(PrintConfigData printConfigData, Tbl_Scenic tbl_Scenic, Tbl_OrderDetail tbl_OrderDetail)
        {
            tbl_OrderDetail.UsedQuantity = tbl_OrderDetail.Quantity;
            tbl_OrderDetail.PrintCount++;
            if (tbl_OrderDetail.OrderStatus == (int)OrderDetailsDataStatus.Activate)
            {
                tbl_OrderDetail.OrderStatus = (int)OrderDetailsDataStatus.IsTaken;
            }

            _orderDetailService.Update(tbl_OrderDetail);
            var userInfo       = _enterpriseUserService.LoginForSession();
            var printOrderData = new PrintOrderData
            {
                OrderNo       = tbl_OrderDetail.OrderNo,
                TicketName    = tbl_OrderDetail.TicketName,
                Qunatity      = tbl_OrderDetail.Quantity,
                Price         = tbl_OrderDetail.Price,
                TotalAmount   = tbl_OrderDetail.Quantity * tbl_OrderDetail.Price,
                CertificateNo = tbl_OrderDetail.CertificateNO,
                QRcode        = SecurityExtension.DesEncrypt(tbl_OrderDetail.QRcode, DesKey.QrCodeKey),
                CreateTime    = tbl_OrderDetail.ValidityDateStart.ToString("yyyy-MM-dd"),
                PrintCount    = tbl_OrderDetail.PrintCount,
                RealName      = userInfo.RealName,
                UserName      = userInfo.UserName
            };

            if (tbl_Scenic != null)
            {
                printOrderData.ScenicName  = tbl_Scenic.ScenicName;
                printOrderData.ScenicPhone = tbl_Scenic.Tel;
            }
            return(_printGateway.Send(printOrderData, printConfigData));
        }
예제 #2
0
        /// <summary>
        /// 获取退票短信发送内容
        /// </summary>
        /// <param name="orderDetail"></param>
        /// <param name="scenics"></param>
        /// <param name="templateUrl"></param>
        /// <returns></returns>
        private string GetRefundSendContent(Tbl_OrderDetail orderDetail, Tbl_Scenic scenics)
        {
            string showScName = scenics.SignName;

            if (string.IsNullOrEmpty(showScName))
            {
                showScName = scenics.ScenicName;
            }
            if (showScName.Length > 7)
            {
                showScName = showScName.Substring(0, 7);
            }
            return(string.Format(AppSettingsConfig.RefundOrderInfoPath, showScName, orderDetail.TicketName, orderDetail.OrderNo, orderDetail.Quantity));
        }