Beispiel #1
0
        public List<PaymentInsertPolicyMultiResultT> SetPaymentInsertPolicyMulti(PaymentInsertPolicyMultiParamT entity)
        {
            List<PaymentInsertPolicyMultiResultT> list = new DacHelper(DbHelper, "tiger_write").SelectMultipleEntities<PaymentInsertPolicyMultiResultT>(
                typeof(PaymentInsertPolicyMultiResultT),
                GEPMappingCache.GetDataMappings("PaymentInsertPolicyMultiResultT"),
                CommandType.StoredProcedure,
                "dbo.up_gmkt_front_gep_payment_insert_order_goods_policy_multi",
                SqlParameterHelper.CreateParameter("@order_way_kind", entity.OrderWayKind, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@pid", entity.PaymentBasketPID, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@delivery_group_no_s", entity.PaymentDeliveryGroupNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@order_cnt_s", entity.PaymentAmount, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@order_zip_code", entity.ReceiverZipCode, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@gbank", entity.Gbank, SqlDbType.Int),
                SqlParameterHelper.CreateParameter("@vaccount", entity.Vaccount, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@installmonth", entity.Installmonth, SqlDbType.Int),
                SqlParameterHelper.CreateParameter("@seller_cust_no", entity.SellerCustNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@policy_order_src ", entity.PaymentOrderType, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@card_cash", entity.CardCash, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@acnt_type", entity.AcntType, SqlDbType.VarChar),
                //SqlParameterHelper.CreateParameter("@pack_no", entity.PackNo, SqlDbType.Int)
                SqlParameterHelper.CreateParameter("@GD_NOS", entity.ItemNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_SEL_NOS", entity.PaymentGdSelNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@ORDER_IDXS", entity.PaymentOrderIdx, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_NMS", entity.GdNm, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_ENG_NMS", entity.GdEngNm, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_KINDS", entity.GdKind, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_ORIGINS", entity.GdOrigin, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GDLC_CDS", entity.GdlcCd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GDMC_CDS", entity.GdmcCd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GDSC_CDS", entity.GdscCd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@MAKER_NMS", entity.MakerNm, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@BRAND_NMS", entity.BrandNm, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DEAL_PRICE_KINDS", entity.DealPriceKind, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DEAL_PRICES", entity.DealPrice, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@OP_GDS", entity.OpGd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@AS_YNS", entity.AsYn, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@SELL_CUST_NOS", entity.SellCustNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_SHOPKINDS", entity.GdShopkind, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_SHOPKIND2S", entity.GdShopkind2, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_SHOPKIND3S", entity.GdShopkind3, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@TRAD_WAYS", entity.TradWay, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@TEMPLATE_TYPES", entity.TemplateType, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@ADULT_YNS", entity.AdultYn, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@HASADDEDFILES", entity.Hasaddedfile, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@INVENTORY_NOS", entity.InventoryNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@INVENTORYTYPES", entity.Inventorytype, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@OPT_INVENTORYNOS", entity.OptInventoryno, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@OPT_INVENTORYTYPES", entity.OptInventorytype, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_MADE_SDTS", entity.GdMadeSdt, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@ATTRIB_END_DTS", entity.AttribEndDt, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_BUYER_ML_RATES", entity.GdBuyerMlRate, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@GD_BUDDY_ML_RATES", entity.GdBuddyMlRate, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@USE_GUBUNS", entity.UseGubun, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@BUNDLE_TYPES", entity.BundleType, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@MIN_BUY_CNTS", entity.MinBuyCnt, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@BUY_UNIT_CNTS", entity.BuyUnitCnt, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DANGOL_CHANCE_AMTS", entity.DangolChanceAmt, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DANGOL_CHANCE_KINDS", entity.DangolChanceKind, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@JEHU_RSV_SERVICE_TYPES", entity.JehuRsvServiceType, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@JEHU_EST_TYPES", entity.JehuEstType, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DNT_NOS", entity.DntNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DNT_WHO_FEES", entity.DntWhoFee, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DNT_SAVE_MONEYS", entity.DntSaveMoney, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@FREEC_SELLERCHARGEYNS", entity.FreecSellerchargeyn, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@ORDER_PRICES", entity.PaymentPrice, SqlDbType.VarChar),
                //SqlParameterHelper.CreateParameter("@SEL_ITEM_PRICES", entity.PaymentSelItemPrice, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@ORDER_CNTS", entity.PaymentAmount, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DEL_FEES", entity.PaymentDeliveryFee, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@COST_PRICES", entity.PaymentCostPrice, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@DELIVERY_GROUP_NOS", entity.PaymentDeliveryGroupNo, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@SHOP_GROUP_CDS", entity.ShopGroupCd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@SHOP_GDLC_CDS", entity.ShopGdlcCd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@SHOP_GDMC_CDS", entity.ShopGdmcCd, SqlDbType.VarChar),
                SqlParameterHelper.CreateParameter("@SHOP_GDSC_CDS", entity.ShopGdscCd, SqlDbType.VarChar)
                );

            return list;
        }
Beispiel #2
0
        public PaymentOrderItemT SetPaymentOrderItem(PaymentRequestInfoT orgPaymentRequestInfo, PaymentRequestInfoT paymentRequestInfo)
        {
            PaymentBiz paymentBiz = new PaymentBiz();
            PaymentOrderItemT paymentOrderItem = new PaymentOrderItemT();

            string paymentGoodsCode, paymentAmount, paymentPrice;
            string paymentGdSelNo, paymentBasketPID, paymentOrderIdx;
            string paymentSelItemPrice, paymentDeliveryFee, paymentCostPrice;
            string paymentDeliveryGroupNo;

            string plGdNo = string.Empty, plOrderCnt = string.Empty, plOrderPrice = string.Empty, plGdNm = string.Empty, plGdEngNm = string.Empty, plGdKind = string.Empty, plGdOrigin = string.Empty, plGdOrigin2 = string.Empty, plGdlcCd = string.Empty, plGdmcCd = string.Empty, plGdscCd = string.Empty, plMakerNm = string.Empty;
            string plBrandNm = string.Empty, plDealPriceKind = string.Empty, plDealPrice = string.Empty, plOpGd = string.Empty, plAsYn = string.Empty, plSellCustNo = string.Empty, plGdShopkind = string.Empty, plGdShopkind2 = string.Empty, plGdShopkind3 = string.Empty, plTradWay = string.Empty;
            string plTemplateType = string.Empty, plAdultYn = string.Empty, plHasaddedfile = string.Empty, plInventoryNo = string.Empty, plInventorytype = string.Empty, plOptInventoryno = string.Empty, plOptInventorytype = string.Empty, plGdMadeSdt = string.Empty;
            string plAttribEndDt = string.Empty, plGdBuyerMlRate = string.Empty, plGdBuddyMlRate = string.Empty, plUseGubun = string.Empty, plBundleType = string.Empty, plDangolChanceAmt = string.Empty, plDangolChanceKind = string.Empty;
            string plDntNo = string.Empty, plDntWhoFee = string.Empty, plDntSaveMoney = string.Empty, plMaxLimit = string.Empty, plTotalSaveMoney = string.Empty, plFreecSellerchargeyn = string.Empty, plJehuRsvServiceType = string.Empty;
            string plJehuEstType = string.Empty, plGoodsRegDt = string.Empty, plDeliveryGroupNo = string.Empty, plDeliveryFee = string.Empty, plBuyUnitCnt = string.Empty, plMinBuyCnt = string.Empty, plTemplateUrl = string.Empty;
            string plShopGroupCd = string.Empty, plShopGdlcCd = string.Empty, plShopGdmcCd = string.Empty, plShopGdscCd = string.Empty;

            string paramXml = string.Empty;
            //string xmlParams, xmlValues;

            //string paymentOrderType;

            paymentBasketPID = orgPaymentRequestInfo.BasketPid;

            paymentOrderIdx = orgPaymentRequestInfo.SelectedOrderIdxs.Replace(" ", string.Empty).Replace("|",",");
            paymentGdSelNo = PaymentUtil.AddComma(orgPaymentRequestInfo.GdSelNo).Replace(" ", string.Empty);
            paymentGoodsCode = PaymentUtil.AddComma(orgPaymentRequestInfo.ItemNo).Replace(" ", string.Empty);
            paymentAmount = PaymentUtil.AddComma(orgPaymentRequestInfo.OrderCounts).Replace(" ", string.Empty);
            paymentPrice = PaymentUtil.AddComma(orgPaymentRequestInfo.OrderPrice).Replace(" ", string.Empty);
            paymentSelItemPrice = PaymentUtil.AddComma(orgPaymentRequestInfo.SelItemPrice).Replace(" ", string.Empty);
            paymentDeliveryFee = PaymentUtil.AddComma(orgPaymentRequestInfo.DeliveryFee).Replace(" ", string.Empty);
            paymentCostPrice = PaymentUtil.AddComma(orgPaymentRequestInfo.RealCostPrice).Replace(" ", string.Empty);
            paymentDeliveryGroupNo = PaymentUtil.AddComma(orgPaymentRequestInfo.DeliveryGroupNo).Replace(" ", string.Empty);

            if (string.IsNullOrEmpty(paymentBasketPID))
                paymentBasketPID = Guid.NewGuid().ToString();

            if (string.IsNullOrEmpty(paymentGdSelNo))
            {
                paymentGdSelNo = orgPaymentRequestInfo.RemoteAddress.Replace(".", string.Empty) + DateTime.Now.Day.ToString().PadRight(2, '0') + DateTime.Now.Hour.ToString().PadRight(2, '0') + DateTime.Now.Minute.ToString().PadRight(2, '0') + DateTime.Now.Second.ToString().PadRight(2, '0');
            }

            if (string.IsNullOrEmpty(paymentOrderIdx))
            {
                string[] icntArr = paymentGoodsCode.Split(PaymentConstant.CommaSeperator);

                for (int iloopCnt = 0, icntArrLength = icntArr.Length; iloopCnt < icntArrLength; iloopCnt++)
                {
                    PaymentOrderIndexT paymentOrderIndex = paymentBiz.GetPaymentOrderIndex();
                    if (paymentOrderIndex != null)
                    {
                        paymentOrderIdx = PaymentUtil.AddComma(paymentOrderIdx + paymentOrderIndex.OrderIdx.ToString());
                    }
                }
            }

            if (!paymentOrderIdx.Trim().EndsWith(PaymentConstant.Comma)) { paymentOrderIdx = PaymentUtil.AddComma(paymentOrderIdx); }
            if (!paymentGdSelNo.Trim().EndsWith(PaymentConstant.Comma)) { paymentGdSelNo = PaymentUtil.AddComma(paymentGdSelNo); }
            if (!paymentGoodsCode.Trim().EndsWith(PaymentConstant.Comma)) { paymentGoodsCode = PaymentUtil.AddComma(paymentGoodsCode); }
            if (!paymentAmount.Trim().EndsWith(PaymentConstant.Comma)) { paymentAmount = PaymentUtil.AddComma(paymentAmount); }
            if (!paymentPrice.Trim().EndsWith(PaymentConstant.Comma)) { paymentPrice = PaymentUtil.AddComma(paymentPrice); }
            if (!paymentSelItemPrice.Trim().EndsWith(PaymentConstant.Comma)) { paymentSelItemPrice = PaymentUtil.AddComma(paymentSelItemPrice); }
            if (!paymentDeliveryFee.Trim().EndsWith(PaymentConstant.Comma)) { paymentDeliveryFee = PaymentUtil.AddComma(paymentDeliveryFee); }
            if (!paymentCostPrice.Trim().EndsWith(PaymentConstant.Comma)) { paymentCostPrice = PaymentUtil.AddComma(paymentCostPrice); }
            if (!paymentDeliveryGroupNo.Trim().EndsWith(PaymentConstant.Comma)) { paymentDeliveryGroupNo = PaymentUtil.AddComma(paymentDeliveryGroupNo); }

            //paymentOrderType = "DM";

            //XQueryUtil xQueryUtil = new XQueryUtil();

            //xmlParams = "gd_no,order_cnt,order_price,";
            //xmlValues = xQueryUtil.ParamCheckComma(strPaymentGoodsCode) + PaymentConstant.MainDelimiter +
            //    xQueryUtil.ParamCheckComma(strPaymentAmount) + PaymentConstant.MainDelimiter +
            //    xQueryUtil.ParamCheckComma(strPaymentPrice);

            //isRtnValue = xQueryUtil.BuildXQueryXml(xmlParams, xmlValues, 0);

            //if (isRtnValue)
            //{
            //    paramXml = xQueryUtil.GetParamXml();
            //}

            paramXml = MakeXQuery(new List<string> { "gd_no", "order_cnt", "order_price" },
                new List<string> { paymentGoodsCode, paymentAmount, paymentPrice }
                );

            //string[] arrPaymentDeliveryGroupNo = strPaymentDeliveryGroupNo.Split(PaymentConstant.CommaSeperator);
            //string[] arrPaymentDeliveryFee = strPaymentDeliveryFee.Split(PaymentConstant.CommaSeperator);

            //int packNo = 0;
            //List<PaymentInsertPolicyItemInfoT> policyItemInfoList = new List<PaymentInsertPolicyItemInfoT>();
            List<PaymentItemInfoPolicyT> paymentItemInfoPolicy = paymentBiz.GetPaymentItemInfoPolicy(paymentBasketPID, paramXml);

            if (paymentItemInfoPolicy != null)
            {
                if (paymentItemInfoPolicy.Count > 0)
                {
                    //packNo = paymentBiz.GetNewPackNo();

                    Dictionary<string, KeyValuePair<int, string[]>> dicPolicyItemInfoParam = GetPolicyItemInfoParam(paymentItemInfoPolicy.Count
                        , paymentGdSelNo, paymentOrderIdx, paymentPrice, paymentDeliveryFee, paymentCostPrice, paymentDeliveryGroupNo);

                    for (int i = 0, paymentItemInfoPolicyLength = paymentItemInfoPolicy.Count; i < paymentItemInfoPolicyLength; i++)
                    {
                        /*
                        policyItemInfoList.Add(new PaymentInsertPolicyItemInfoT()
                        {
                            PackNo = packNo,
                            Pid = paymentBasketPID,
                            ItemNo = paymentItemInfoPolicy[i].ItemNo.Trim(),
                            GdSelNo = dicPolicyItemInfoParam["GdSelNo"].Value[i],
                            OrderIdx = Util.GetSafeLong(dicPolicyItemInfoParam["OrderIdx"].Value[i]),
                            ItemName = Util.StripHtmlTags(paymentItemInfoPolicy[i].ItemName).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            GdEngNm = Util.StripHtmlTags(paymentItemInfoPolicy[i].GdEngNm).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            GdKind = paymentItemInfoPolicy[i].GdKind,
                            GdOrigin = Util.StripHtmlTags(paymentItemInfoPolicy[i].GdOrigin).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            GdlcCd = paymentItemInfoPolicy[i].GdlcCd.Trim(),
                            GdmcCd = paymentItemInfoPolicy[i].GdmcCd.Trim(),
                            GdscCd = paymentItemInfoPolicy[i].GdscCd.Trim(),
                            MakerName = Util.StripHtmlTags(paymentItemInfoPolicy[i].MakerName).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            BrandName = Util.StripHtmlTags(paymentItemInfoPolicy[i].BrandName).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            DealPriceKind = paymentItemInfoPolicy[i].DealPriceKind.Trim(),
                            DealPrice = paymentItemInfoPolicy[i].DealPrice,
                            OpGd = Util.StripHtmlTags(paymentItemInfoPolicy[i].OpGd).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            AsYn = paymentItemInfoPolicy[i].AsYn.Trim(),
                            SellCustNo = paymentItemInfoPolicy[i].SellCustNo.Trim(),
                            GdShopkind = paymentItemInfoPolicy[i].GdShopkind.Trim(),
                            GdShopkind2 = paymentItemInfoPolicy[i].GdShopkind2.Trim(),
                            GdShopkind3 = paymentItemInfoPolicy[i].GdShopkind3.Trim(),
                            TradWay = paymentItemInfoPolicy[i].TradWay.Trim(),
                            TemplateType = paymentItemInfoPolicy[i].TemplateType.Trim(),
                            AdultYn = paymentItemInfoPolicy[i].AdultYn.Trim(),
                            Hasaddedfile = paymentItemInfoPolicy[i].Hasaddedfile.Trim(),
                            InventoryNo = paymentItemInfoPolicy[i].InventoryNo.Trim(),
                            Inventorytype = paymentItemInfoPolicy[i].Inventorytype.Trim(),
                            OptInventoryno = paymentItemInfoPolicy[i].OptInventoryno.Trim(),
                            OptInventorytype = paymentItemInfoPolicy[i].OptInventorytype.Trim(),
                            GdMadeSdt = Convert.ToDateTime(paymentItemInfoPolicy[i].GdMadeSdt),
                            AttribEndDt = Convert.ToDateTime(paymentItemInfoPolicy[i].AttribEndDt),
                            GdBuyerMlRate = paymentItemInfoPolicy[i].GdBuyerMlRate,
                            GdBuddyMlRate = paymentItemInfoPolicy[i].GdBuddyMlRate,
                            UseGubun = paymentItemInfoPolicy[i].UseGubun.Trim(),
                            BundleType = paymentItemInfoPolicy[i].BundleType.Trim(),
                            MinBuyCnt = paymentItemInfoPolicy[i].BuyUnitCnt,
                            BuyUnitCnt = paymentItemInfoPolicy[i].MinBuyCnt,
                            DangolChanceAmt = paymentItemInfoPolicy[i].DangolChanceAmt,
                            DangolChanceKind = paymentItemInfoPolicy[i].DangolChanceKind.Trim(),
                            JehuRsvServiceType = paymentItemInfoPolicy[i].JehuRsvServiceType.Trim(),
                            JehuEstType = paymentItemInfoPolicy[i].JehuEstType.Trim(),
                            DntNo = paymentItemInfoPolicy[i].DntNo,
                            DntWhoFee = paymentItemInfoPolicy[i].DntWhoFee.Trim(),
                            DntSaveMoney = paymentItemInfoPolicy[i].DntSaveMoney,
                            FreecSellerchargeyn = paymentItemInfoPolicy[i].FreecSellerchargeyn.Trim(),
                            OrderPrice = paymentItemInfoPolicy[i].OrderPrice,
                            SelItemPrice = Util.GetSafeDecimal(dicPolicyItemInfoParam["SelItemPrice"].Value[i]),
                            OrderCnt = paymentItemInfoPolicy[i].OrderCnt,
                            DelFee = Util.GetSafeDecimal(dicPolicyItemInfoParam["DelFee"].Value[i]),
                            CostPrice = Util.GetSafeDecimal(dicPolicyItemInfoParam["CostPrice"].Value[i]),
                            DeliveryGroupNo = Util.GetSafeInt(dicPolicyItemInfoParam["DeliveryGroupNo"].Value[i]),
                            ShopGroupCd = paymentItemInfoPolicy[i].ShopGroupCd,
                            ShopGdlcCd = paymentItemInfoPolicy[i].ShopGdlcCd,
                            ShopGdmcCd = paymentItemInfoPolicy[i].ShopGdmcCd,
                            ShopGdscCd = paymentItemInfoPolicy[i].ShopGdscCd
                        });
                        */

                        plGdNo = plGdNo + PaymentUtil.AddComma(paymentItemInfoPolicy[i].ItemNo.Trim());
                        plOrderCnt = plOrderCnt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OrderCnt.ToString());
                        plOrderPrice = plOrderPrice + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OrderPrice.ToString());
                        plGdNm = plGdNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].ItemName).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdEngNm = plGdEngNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].GdEngNm).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdKind = plGdKind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdKind.ToString().Trim());
                        plGdOrigin = plGdOrigin + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].GdOrigin).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdOrigin2 = plGdOrigin2 + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].GdOrigin2).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdlcCd = plGdlcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdlcCd.Trim());
                        plGdmcCd = plGdmcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdmcCd.Trim());
                        plGdscCd = plGdscCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdscCd.Trim());
                        plMakerNm = plMakerNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].MakerName).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plBrandNm = plBrandNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].BrandName).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plDealPriceKind = plDealPriceKind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DealPriceKind.Trim());
                        plDealPrice = plDealPrice + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DealPrice.ToString());
                        plOpGd = plOpGd + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].OpGd).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plAsYn = plAsYn + PaymentUtil.AddComma( paymentItemInfoPolicy[i].AsYn.Trim());
                        plSellCustNo = plSellCustNo + PaymentUtil.AddComma( paymentItemInfoPolicy[i].SellCustNo.Trim());
                        plGdShopkind = plGdShopkind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdShopkind.Trim());
                        plGdShopkind2 = plGdShopkind2 + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdShopkind2.Trim());
                        plGdShopkind3 = plGdShopkind3 + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdShopkind3.Trim());
                        plTradWay = plTradWay + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TradWay.Trim());
                        plTemplateType = plTemplateType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TemplateType.Trim());
                        plAdultYn = plAdultYn + PaymentUtil.AddComma( paymentItemInfoPolicy[i].AdultYn.Trim());
                        plHasaddedfile = plHasaddedfile + PaymentUtil.AddComma( paymentItemInfoPolicy[i].Hasaddedfile.Trim());
                        plInventoryNo = plInventoryNo + PaymentUtil.AddComma( paymentItemInfoPolicy[i].InventoryNo.Trim());
                        plInventorytype = plInventorytype + PaymentUtil.AddComma( paymentItemInfoPolicy[i].Inventorytype.Trim());
                        plOptInventoryno = plOptInventoryno + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OptInventoryno.Trim());
                        plOptInventorytype = plOptInventorytype + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OptInventorytype.Trim());
                        plGdMadeSdt = plGdMadeSdt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdMadeSdt.Trim());
                        plAttribEndDt = plAttribEndDt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].AttribEndDt.Trim());
                        plGdBuyerMlRate = plGdBuyerMlRate + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdBuyerMlRate.ToString());
                        plGdBuddyMlRate = plGdBuddyMlRate + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdBuddyMlRate.ToString());
                        plUseGubun = plUseGubun + PaymentUtil.AddComma( paymentItemInfoPolicy[i].UseGubun.Trim());
                        plBundleType = plBundleType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].BundleType.Trim());
                        plDangolChanceAmt = plDangolChanceAmt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DangolChanceAmt.ToString());
                        plDangolChanceKind = plDangolChanceKind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DangolChanceKind.Trim());
                        plDntNo = plDntNo + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DntNo.ToString());
                        plDntWhoFee = plDntWhoFee + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DntWhoFee.Trim());
                        plDntSaveMoney = plDntSaveMoney + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DntSaveMoney.ToString());
                        plMaxLimit = plMaxLimit + PaymentUtil.AddComma( paymentItemInfoPolicy[i].MaxLimit.ToString());
                        plTotalSaveMoney = plTotalSaveMoney + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TotalSaveMoney.ToString());
                        plFreecSellerchargeyn = plFreecSellerchargeyn + PaymentUtil.AddComma( paymentItemInfoPolicy[i].FreecSellerchargeyn.Trim());
                        plJehuRsvServiceType = plJehuRsvServiceType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].JehuRsvServiceType.Trim());
                        plJehuEstType = plJehuEstType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].JehuEstType.Trim());
                        plGoodsRegDt = plGoodsRegDt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GoodsRegDt.Trim());
                        plBuyUnitCnt = plBuyUnitCnt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].BuyUnitCnt.ToString());
                        plMinBuyCnt = plMinBuyCnt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].MinBuyCnt.ToString());
                        plTemplateUrl = plTemplateUrl + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TemplateUrl.Trim());
                        plShopGroupCd = plShopGroupCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].ShopGroupCd.ToString());
                        plShopGdlcCd = plShopGdlcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].ShopGdlcCd.ToString());
                        plShopGdmcCd = plShopGdmcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].ShopGdmcCd.ToString());
                        plShopGdscCd = plShopGdscCd + PaymentUtil.AddComma(paymentItemInfoPolicy[i].ShopGdscCd.ToString());

                    }
                }
            }
            else
            {
                throw new PaymentProcessBizException(-638, "상품 정보에 문제가 있습니다. 확인후 다시 주문해 주시기 바랍니다.");
            }

            PaymentInsertPolicyMultiParamT param = new PaymentInsertPolicyMultiParamT();

            #region set param

            param.OrderWayKind = paymentRequestInfo.OrderWayKind ;
            param.PaymentBasketPID = paymentBasketPID;
            param.PaymentDeliveryGroupNo = paymentDeliveryGroupNo;
            param.PaymentAmount = paymentAmount;
            param.ReceiverZipCode = paymentRequestInfo.ReceiverZipCode;
            param.Gbank = paymentRequestInfo.Gbank;
            param.Vaccount = paymentRequestInfo.Vaccount;
            param.Installmonth = paymentRequestInfo.Installmonth;
            param.SellerCustNo = paymentRequestInfo.SellerCustNo;
            param.PaymentOrderType = paymentRequestInfo.PaymentOrderType;
            param.CardCash = paymentRequestInfo.CardCash;
            param.AcntType = paymentRequestInfo.AcntType;
            //param.PackNo = packNo;

            param.ItemNo = plGdNo;
            param.PaymentGdSelNo = paymentGdSelNo;
            param.PaymentOrderIdx = paymentOrderIdx;
            param.GdNm = plGdNm;
            param.GdEngNm = plGdEngNm;
            param.GdKind = plGdKind;
            param.GdOrigin = plGdOrigin;
            param.GdlcCd = plGdlcCd;
            param.GdmcCd = plGdmcCd;
            param.GdscCd = plGdscCd;
            param.MakerNm = plMakerNm;
            param.BrandNm = plBrandNm;
            param.DealPriceKind = plDealPriceKind;
            param.DealPrice = plDealPrice;
            param.OpGd = plOpGd;
            param.AsYn = plAsYn;
            param.SellCustNo = plSellCustNo;
            param.GdShopkind = plGdShopkind;
            param.GdShopkind2 = plGdShopkind2;
            param.GdShopkind3 = plGdShopkind3;
            param.TradWay = plTradWay;
            param.TemplateType = plTemplateType;
            param.AdultYn = plAdultYn;
            param.Hasaddedfile = plHasaddedfile;
            param.InventoryNo = plInventoryNo;
            param.Inventorytype = plInventorytype;
            param.OptInventoryno = plOptInventoryno;
            param.OptInventorytype = plOptInventorytype;
            param.GdMadeSdt = plGdMadeSdt;
            param.AttribEndDt = plAttribEndDt;
            param.GdBuyerMlRate = plGdBuyerMlRate;
            param.GdBuddyMlRate = plGdBuddyMlRate;
            param.UseGubun = plUseGubun;
            param.BundleType = plBundleType;
            param.MinBuyCnt = plMinBuyCnt;
            param.BuyUnitCnt = plBuyUnitCnt;
            param.DangolChanceAmt = plDangolChanceAmt;
            param.DangolChanceKind = plDangolChanceKind;
            param.JehuRsvServiceType = plJehuRsvServiceType;
            param.JehuEstType = plJehuEstType;
            param.DntNo = plDntNo;
            param.DntWhoFee = plDntWhoFee;
            param.DntSaveMoney = plDntSaveMoney;
            param.FreecSellerchargeyn = plFreecSellerchargeyn;
            param.PaymentPrice = paymentPrice;
            param.PaymentSelItemPrice = paymentSelItemPrice;
            param.PaymentAmount = paymentAmount;
            param.PaymentDeliveryFee = paymentDeliveryFee;
            param.PaymentCostPrice = paymentCostPrice;
            param.PaymentDeliveryGroupNo = paymentDeliveryGroupNo;
            param.ShopGroupCd = plShopGroupCd;
            param.ShopGdlcCd = plShopGdlcCd;
            param.ShopGdmcCd = plShopGdmcCd;
            param.ShopGdscCd = plShopGdscCd;

            #endregion

            //int policyCount = paymentBiz.InsertGEPPaymentPolicyItemInfo(policyItemInfoList);

            List<PaymentInsertPolicyMultiResultT> paymentInsertPolicyMultiResult = paymentBiz.SetPaymentInsertPolicyMulti(param);

            if (paymentInsertPolicyMultiResult != null)
            {
                if (paymentInsertPolicyMultiResult.Count > 0)
                {
                    int retCode = paymentInsertPolicyMultiResult[0].RetCode;

                    if (retCode < 0)
                    {
                        throw new PaymentProcessBizException(retCode, "상품 정보에 문제가 있습니다. 확인후 다시 주문해 주시기 바랍니다.");
                    }

                    paymentOrderItem.OrderNo = string.Empty;

                    foreach (PaymentInsertPolicyMultiResultT item in paymentInsertPolicyMultiResult)
                    {
                        paymentOrderItem.PolicyInfoList.Add(item);

                        paymentOrderItem.OrderNo = PaymentUtil.AddComma(paymentOrderItem.OrderNo + item.OrderNo.ToString());
                    }
                }
            }

            return paymentOrderItem;
        }
Beispiel #3
0
 public List<PaymentInsertPolicyMultiResultT> SetPaymentInsertPolicyMulti(PaymentInsertPolicyMultiParamT entity)
 {
     return new PaymentDac().SetPaymentInsertPolicyMulti(entity);
 }