Example #1
0
        /// <summary>
        ///     根据订单ID获取订公共订单信息。
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        public OrderCommonFull GetOrderCommon(string orderid)
        {
            OrderCommonFull ordercommon = null;
            var             common      = Get_PUB_ORDERS_COMMON(orderid);

            ordercommon = GetOrderCommon(common);
            return(ordercommon);
        }
Example #2
0
        /// <summary>
        ///     根据公共订单实体转换公共订单信息。
        /// </summary>
        /// <param name="orderCommonentity">公共订单实体</param>
        /// <returns>公共订单信息</returns>
        protected OrderCommonFull GetOrderCommon(PUB_ORDERS_COMMON orderCommonentity)
        {
            dynamic         commonentitydynamic = orderCommonentity;
            OrderCommonFull common = null;

            if (orderCommonentity != null)
            {
                common         = new OrderCommonFull();
                common.OrderId = commonentitydynamic.ORDER_ID;
                if (commonentitydynamic.IS_DELETE != null)
                {
                    common.IsDelete = commonentitydynamic.IS_DELETE;
                }
                if (commonentitydynamic.IS_CREDIT != null)
                {
                    common.IsCredit = commonentitydynamic.IS_CREDIT;
                }
                if (commonentitydynamic.ORDER_STATUS != null)
                {
                    common.OrderStatus = commonentitydynamic.ORDER_STATUS;
                }
                if (commonentitydynamic.SHIPPING_STATUS != null)
                {
                    common.ShippingStatus = commonentitydynamic.SHIPPING_STATUS;
                }

                // commonorder.REFUND_MONEY_STATUS = "";//仅退款状态:退款协议等待商家确认=0,商家不同意协议=1, 商家同意退款=2,商家同意部分退款=3,客服介入=6,退款关闭=7,退款成功=8,商家准备退款=9, 买家同意取消退款申请=10
                // commonorder.REFUND_GOODSMONEY_STATUS = "";//退货退款状态:退货退款协议等待商家确认=0、商家不同意协议=1、等待买家退货=2、买家已发货等待商家确认=3、商家确认收货拒绝退款=4、商家确认收货准备退款=5、客服介入=6、退货退款关闭=7、退款成功=8、商家准备退款=9、等待买家发货=10、买家同意取消退款退货=11
                // commonorder.REFUND_CHANGGOODS_STATUS = "";//换货状态:换货协议等待商家确认=0、商家不同意协议=1、换货处理中=2、客服介入=6、换货关闭=7、换货成功=8、买家同意取消换货=9、等待买家发货=10、换货处理中=11
                // commonorder.REFUND_REPAIR_STATUS = "";//维修状态:维修协议等待商家确认=0、商家不同意协议=1、维修处理中=2、客服介入=6、维修关闭=7、维修成功=8、买家同意取消返修=9、等待买家发货=10
                // commonorder.TRANSFOR_STATUS = "";//分配状态:待转发=0;已转发=1;驳回=2;回收=3
                if (commonentitydynamic.ORDER_FROM != null)
                {
                    common.OrderFrom = commonentitydynamic.ORDER_FROM;
                }

                //订单类型:商城订单=0,彩票订单=1,机票订单=2,报刊订单=3,充值订单=4,火车票订单=5,交通违章订单=6,景点门票订单=7,旅游酒店订单=8,汽车票订单=9,就医助手订单=10,幸运大转盘=11,酒店预订=12,东莞通=13,信用卡=14,银行转账=15,水费订单=16 ,电费订单=17,煤气费订单=18,流量充值=19,电影票订单=20
                if (commonentitydynamic.ORDER_TYPE != null)
                {
                    common.OrderType = commonentitydynamic.ORDER_TYPE;
                }
                if (commonentitydynamic.ORDER_CLASSIFY != null)
                {
                    common.OrderClassify = commonentitydynamic.ORDER_CLASSIFY;
                }

                #region 设置产品信息

                var     product_Name  = "";
                var     item_Type     = 0;
                decimal product_Price = 0;

                if (!string.IsNullOrEmpty(commonentitydynamic.PRODUCT_NAME))
                {
                    product_Name = commonentitydynamic.PRODUCT_NAME;
                }
                if (commonentitydynamic.ITEM_TYPE != null)
                {
                    item_Type = commonentitydynamic.ITEM_TYPE;
                }
                if (commonentitydynamic.PRODUCT_PRICE != null)
                {
                    product_Price = commonentitydynamic.PRODUCT_PRICE;
                }
                common.ProductInfo                    = new OrderProductInfo(product_Name, item_Type, product_Price);
                common.ProductInfo.ProductID          = commonentitydynamic.PRODUCT_ID;
                common.ProductInfo.GoodsID            = commonentitydynamic.GOODS_ID;
                common.ProductInfo.GoodsName          = commonentitydynamic.GOODS_NAME;
                common.ProductInfo.GoodsCategroySetID = commonentitydynamic.GOODSCATEGORYSET_ID;
                common.ProductInfo.BrandName          = commonentitydynamic.BRAND_NAME;
                common.ProductInfo.ImgUrl             = commonentitydynamic.IMGURL;
                common.ProductInfo.ProductDescription = commonentitydynamic.PRODUCT_DESCRIPTION;

                #endregion

                if (commonentitydynamic.PRODUCT_QUANTITY != null)
                {
                    common.Quantity = commonentitydynamic.PRODUCT_QUANTITY;
                }
                if (commonentitydynamic.TOTAL_AMOUNT != null)
                {
                    common.TotalAmount = commonentitydynamic.TOTAL_AMOUNT;
                }
                if (commonentitydynamic.PAYMENT_STATUS != null)
                {
                    common.PaymentStatus = commonentitydynamic.PAYMENT_STATUS;
                }
                common.PaymentTime = commonentitydynamic.PAYMENT_DATE; //支付时间
                common.OrderETMID  = commonentitydynamic.ORDER_ETM;
                common.PayETM      = commonentitydynamic.PAY_ETM;      //订单支付时ETM机编号
                common.MemberId    = commonentitydynamic.MEMBER_ID;
                common.MemberName  = commonentitydynamic.CREATOR;
                common.CreateIP    = commonentitydynamic.CREATOR_IP;
                if (commonentitydynamic.CREATE_DATE != null)
                {
                    common.OrderDate = commonentitydynamic.CREATE_DATE;
                }

                //commonentitydynamic.MODIFY_DATE = groupDB.ORDER_DATE;//修改时间
                common.StoreInfo           = new OrderStoreInfo();
                common.StoreInfo.StoreId   = commonentitydynamic.STORE_ID;
                common.StoreInfo.StoreName = commonentitydynamic.STORE_NAME;

                common.DeliverySn   = commonentitydynamic.DELIVERY_SN;
                common.DeliveryName = commonentitydynamic.DELIVERY_NAME;


                common.DeliveryInfo.ShipProvince = commonentitydynamic.SHIP_PROVINCES;       //收货省
                common.DeliveryInfo.ShipCity     = commonentitydynamic.SHIP_CITY;            //收货市
                common.DeliveryInfo.ShipRegion   = commonentitydynamic.SHIP_REGION;          //收货区
                common.DeliveryInfo.ShipAddress  = commonentitydynamic.SHIP_ADDR;            //收货详细地址
                //commonorder.VERIFY_DELIVERY_DATE = "";//订单确认完成时间
                common.DeliveryInfo.DeliveryTypeId   = commonentitydynamic.DELIVERYTYPE_ID;  //配送方式ID
                common.DeliveryInfo.DeliveryTypeName = commonentitydynamic.DELIVERYTYPENAME; //配送方式名称
                //commonorder.ISCOMMENTED = "";//该订单是否已评价(-1:订单交易完成但没评价 0:买家已评价 1:双方已评价  -8:无)
                common.TotalCost        = commonentitydynamic.TOTAL_COST = 0;                //订单总成本,默认值为0
                common.AllocationStatus = commonentitydynamic.ALLOCATION_STATUS = 0;         //分润标志,0:未分,1:待分,2:已分
            }
            return(common);
        }