Exemplo n.º 1
0
        public int SetOrderNum(ProductBasicInfo oParam)
        {
            string     sql = "update product set ordernum = " + oParam.OrderNum + " where sysno = " + oParam.SysNo;
            SqlCommand cmd = new SqlCommand(sql);

            return(SqlHelper.ExecuteNonQuery(cmd));
        }
Exemplo n.º 2
0
        public string CheckSOItem(RMASendAccessoryInfo oInfo)
        {
            //是否已存在该SO中该商品的RMA单

            string result = AppConst.StringNull;

            foreach (RMASendAccessoryItemInfo oSAItemInfo in oInfo.ItemHash.Values)
            {
                string sql = @"select RMA_SendAccessory_Item.*,RMA_SendAccessory.SendAccessoryID
                               from  RMA_SendAccessory_Item (NOLOCK) 
                               inner join RMA_SendAccessory(NOLOCK) on RMA_SendAccessory.sysno = RMA_SendAccessory_Item.SendAccessorySysNo
                               where RMA_SendAccessory_Item.sosysno = " + oInfo.SOSysNo + " and RMA_SendAccessory_Item.productsysno=" + oSAItemInfo.ProductSysNo
                             + " and (RMA_SendAccessory.status = " + (int)AppEnum.RMASendAccessoryStatus.WaitingAudit + " or RMA_SendAccessory.status = " + (int)AppEnum.RMASendAccessoryStatus.WaitingSend + ")";

                DataSet ds = SqlHelper.ExecuteDataSet(sql);
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    ProductBasicInfo oProduct = ProductManager.GetInstance().LoadBasic(oSAItemInfo.ProductSysNo);
                    if (result != AppConst.StringNull)
                    {
                        result += "<br>";
                    }
                    result += oProduct.ProductName + "(" + oProduct.ProductID + ")" + "&nbsp;&nbsp;<a href='../RMA/SendAccessoryOpt.aspx?sysno=" + dr["sendAccessorysysno"].ToString() + "&opt=view'>" + dr["SendAccessoryID"].ToString() + "</a>";
                }
            }
            return(result);
        }
Exemplo n.º 3
0
        private SalesInfoModel TransformSalesInfo(ProductBasicInfo basicInfo, ProductSalesInfo salesInfo)
        {
            SalesInfoModel priceModel = new SalesInfoModel();
            //预计到货时间(单位:天)
            int shippingDays = int.Parse(Nesoft.ECWeb.Facade.CommonFacade.GetSysConfigByKey("仓库处理时间"));

            shippingDays  += int.Parse(Nesoft.ECWeb.Facade.CommonFacade.GetSysConfigByKey("快递配送时间"));
            shippingDays  += basicInfo.ProductEntryInfo.LeadTimeDays;
            priceModel.ETA = shippingDays;

            priceModel.BasicPrice       = salesInfo.MarketPrice;
            priceModel.CurrentPrice     = salesInfo.CurrentPrice;
            priceModel.CashRebate       = salesInfo.CashRebate;
            priceModel.TariffPrice      = salesInfo.EntryTax ?? 0;
            priceModel.TotalPrice       = salesInfo.TotalPrice;
            priceModel.MinCountPerOrder = salesInfo.MinCountPerOrder;
            priceModel.MaxCountPerOrder = salesInfo.MaxCountPerOrder;
            priceModel.PresentPoint     = salesInfo.Point;
            //是否免关税
            priceModel.FreeEntryTax = salesInfo.FreeEntryTax;
            //是否免运费
            priceModel.FreeShipping = false;
            priceModel.OnlineQty    = salesInfo.OnlineQty;

            //计算库存状态
            string inventoryStatus = "";

            if (basicInfo.ProductStatus == ProductStatus.OnlyShow ||
                salesInfo.OnlineQty <= 0)
            {
                inventoryStatus = "已售罄";
            }
            else if (salesInfo.OnlineQty <= ConstValue.ProductWarnInventory)
            {
                inventoryStatus = "即将售完";
            }
            else
            {
                inventoryStatus = "有货";
            }
            priceModel.InventoryStatus = inventoryStatus;

            //计算是否已加入收藏夹
            bool      productIsWished = false;
            LoginUser currUser        = UserMgr.ReadUserInfo();

            if (currUser == null || currUser.UserSysNo <= 0)
            {
                productIsWished = false;
            }
            else
            {
                productIsWished = ProductFacade.IsProductWished(basicInfo.ID, currUser.UserSysNo);
            }
            priceModel.IsWished = productIsWished;

            return(priceModel);
        }
Exemplo n.º 4
0
        public string GetPMEmailByProduct(int productSysNo)
        {
            ProductBasicInfo oProductBasic = ProductManager.GetInstance().LoadBasic(productSysNo);

            if (oProductBasic != null)
            {
                string  sql = "select Email from Sys_User where SysNo = " + oProductBasic.PMUserSysNo;
                DataSet ds  = SqlHelper.ExecuteDataSet(sql);
                if (!Util.HasMoreRow(ds))
                {
                    return(AppConfig.ReviewBox);
                }
                DataRow dr = ds.Tables[0].Rows[0];
                return(dr["Email"].ToString().Trim());
            }
            else
            {
                return(AppConfig.ReviewBox);
            }
        }
Exemplo n.º 5
0
        private BasicInfoModel TransformBasicInfo(ProductBasicInfo basicInfo)
        {
            BasicInfoModel result = new BasicInfoModel();

            result.ID                = basicInfo.ID;
            result.Code              = basicInfo.Code;
            result.C3SysNo           = basicInfo.CategoryID;
            result.ProductTitle      = basicInfo.ProductTitle;
            result.PromotionTitle    = basicInfo.PromotionTitle;
            result.ProductMode       = basicInfo.ProductMode;
            result.ProducePlace      = basicInfo.ProductEntryInfo.OriginCountryName;
            result.ProductGroupSysNo = basicInfo.ProductGroupSysNo;
            result.ProductStatus     = (int)basicInfo.ProductStatus;
            result.ProductType       = (int)basicInfo.ProductType;

            //构造商品图片
            ImageSize imageSizeMiddle = ImageUrlHelper.GetImageSize(ImageType.Middle);

            result.DefaultImageUrl = ProductFacade.BuildProductImage(imageSizeMiddle, basicInfo.DefaultImage);

            return(result);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 更新商品基本信息(商品状态另外单独更新)
        /// </summary>
        /// <param name="oParam"></param>
        /// <returns></returns>
        public int Update(ProductBasicInfo oParam)
        {
            string     sql = @"UPDATE product SET 
                            ProductID=@ProductID, 
                            ProductMode=@ProductMode, ProductName=@ProductName, ProductType=@ProductType,
                            ProductDesc=@ProductDesc, ProductDescLong=@ProductDescLong, 
                            Performance=@Performance, Warranty=@Warranty, 
                            PackageList=@PackageList, Weight=@Weight,C1SysNo=@C1SysNO, 
                            C2SysNo=@C2SysNo, C3SysNo=@C3SysNo, ManufacturerSysNo=@ManufacturerSysNo, 
                            ProductLink=@ProductLink, MultiPicNum=@MultiPicNum, 
                            PMUserSysNo=@PMUserSysNo, PPMUserSysNo=@PPMUserSysNo, 
                            Attention=@Attention, Note=@Note, BarCode=@BarCode, IsLarge=@IsLarge,
							LastVendorSysNo = @LastVendorSysNo, Status=@Status, 
                            PromotionWord=@PromotionWord,BriefName=@BriefName,AssessmentTitle=@AssessmentTitle,
                            AssessmentLink=@AssessmentLink,VirtualArriveTime=@VirtualArriveTime,
                            InventoryCycleTime=@InventoryCycleTime, DMSWeight=@DMSWeight, 
                            DMS=@DMS, OPL=@OPL ,OrderNum=@OrderNum,APMUserSysNo=@APMUserSysNo, 
                            DefaultVendorSysNo=@DefaultVendorSysNo, DefaultPurchasePrice=@DefaultPurchasePrice, 
                            Product2ndType=@Product2ndType, MasterProductSysNo=@MasterProductSysNo, 
                            ProductColor=@ProductColor, ProductSize=@ProductSize,
                            ProducingArea=@ProducingArea, PackQuantity=@PackQuantity,
                            MinOrderQuantity=@MinOrderQuantity, IsStoreFrontSale=@IsStoreFrontSale,
                            SaleUnit=@SaleUnit, StorageDay=@StorageDay, IsCanPurchase=@IsCanPurchase
                            WHERE SysNo = @SysNo";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo           = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramProductID       = new SqlParameter("@ProductID", SqlDbType.NVarChar, 20);
            SqlParameter paramProductMode     = new SqlParameter("@ProductMode", SqlDbType.NVarChar, 100);
            SqlParameter paramProductName     = new SqlParameter("@ProductName", SqlDbType.NVarChar, 300);
            SqlParameter paramProductType     = new SqlParameter("@ProductType", SqlDbType.Int, 4);
            SqlParameter paramProductDesc     = new SqlParameter("@ProductDesc", SqlDbType.NVarChar, 2000);
            SqlParameter paramProductDescLong = new SqlParameter("@ProductDescLong", SqlDbType.NText);
            SqlParameter paramPerformance     = new SqlParameter("@Performance", SqlDbType.NText);
            SqlParameter paramWarranty        = new SqlParameter("@Warranty", SqlDbType.NVarChar, 200);
            SqlParameter paramPackageList     = new SqlParameter("@PackageList", SqlDbType.NVarChar, 500);
            SqlParameter paramWeight          = new SqlParameter("@Weight", SqlDbType.Int, 4);

            SqlParameter paramC1SysNo = new SqlParameter("@C1SysNo", SqlDbType.Int, 4);
            SqlParameter paramC2SysNo = new SqlParameter("@C2SysNo", SqlDbType.Int, 4);
            SqlParameter paramC3SysNo = new SqlParameter("@C3SysNo", SqlDbType.Int, 4);

            SqlParameter paramManufacturerSysNo = new SqlParameter("@ManufacturerSysNo", SqlDbType.Int, 4);
            SqlParameter paramProductLink       = new SqlParameter("@ProductLink", SqlDbType.NVarChar, 200);
            SqlParameter paramMultiPicNum       = new SqlParameter("@MultiPicNum", SqlDbType.Int, 4);
            SqlParameter paramPMUserSysNo       = new SqlParameter("@PMUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramPPMUserSysNo      = new SqlParameter("@PPMUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramAttention         = new SqlParameter("@Attention", SqlDbType.NVarChar, 500);
            SqlParameter paramNote            = new SqlParameter("@Note", SqlDbType.NVarChar, 500);
            SqlParameter paramBarCode         = new SqlParameter("@BarCode", SqlDbType.NVarChar, 30);
            SqlParameter paramIsLarge         = new SqlParameter("@IsLarge", SqlDbType.Int, 4);
            SqlParameter paramLastVendorSysNo = new SqlParameter("@LastVendorSysNo", SqlDbType.Int, 4);
            SqlParameter paramStatus          = new SqlParameter("@Status", SqlDbType.Int, 4);

            SqlParameter paramPromotionWord     = new SqlParameter("@PromotionWord", SqlDbType.NVarChar, 30);
            SqlParameter paramBriefName         = new SqlParameter("@BriefName", SqlDbType.NVarChar, 300);
            SqlParameter paramAssessmentTitle   = new SqlParameter("@AssessmentTitle", SqlDbType.NVarChar, 200);
            SqlParameter paramAssessmentLink    = new SqlParameter("@AssessmentLink", SqlDbType.NVarChar, 200);
            SqlParameter paramVirtualArriveTime = new SqlParameter("@VirtualArriveTime", SqlDbType.Int, 4);

            SqlParameter paramInventoryCycleTime = new SqlParameter("@InventoryCycleTime", SqlDbType.Int, 4);
            SqlParameter paramDMSWeight          = new SqlParameter("@DMSWeight", SqlDbType.Decimal, 2);
            SqlParameter paramDMS = new SqlParameter("@DMS", SqlDbType.Decimal, 2);
            SqlParameter paramOPL = new SqlParameter("@OPL", SqlDbType.Int, 4);

            SqlParameter paramOrderNum     = new SqlParameter("@OrderNum", SqlDbType.Int, 4);
            SqlParameter paramAPMUserSysNo = new SqlParameter("@APMUserSysNo", SqlDbType.Int, 4);

            SqlParameter paramDefaultVendorSysNo   = new SqlParameter("@DefaultVendorSysNo", SqlDbType.Int, 4);
            SqlParameter paramDefaultPurchasePrice = new SqlParameter("@DefaultPurchasePrice", SqlDbType.Decimal, 9);
            SqlParameter paramProduct2ndType       = new SqlParameter("@Product2ndType", SqlDbType.Int, 4);
            SqlParameter paramMasterProductSysNo   = new SqlParameter("@MasterProductSysNo", SqlDbType.Int, 4);
            SqlParameter paramProductColor         = new SqlParameter("@ProductColor", SqlDbType.Int, 4);
            SqlParameter paramProductSize          = new SqlParameter("@ProductSize", SqlDbType.Int, 4);
            SqlParameter paramProducingArea        = new SqlParameter("@ProducingArea", SqlDbType.NVarChar, 50);
            SqlParameter paramPackQuantity         = new SqlParameter("@PackQuantity", SqlDbType.Int, 4);
            SqlParameter paramMinOrderQuantity     = new SqlParameter("@MinOrderQuantity", SqlDbType.Int, 4);
            SqlParameter paramIsStoreFrontSale     = new SqlParameter("@IsStoreFrontSale", SqlDbType.Int, 4);
            SqlParameter paramSaleUnit             = new SqlParameter("@SaleUnit", SqlDbType.NVarChar, 50);
            SqlParameter paramStorageDay           = new SqlParameter("@StorageDay", SqlDbType.Int, 4);
            SqlParameter paramIsCanPurchase        = new SqlParameter("@IsCanPurchase", SqlDbType.Int, 4);

            if (oParam.SysNo != AppConst.IntNull)
            {
                paramSysNo.Value = oParam.SysNo;
            }
            else
            {
                paramSysNo.Value = System.DBNull.Value;
            }
            if (oParam.ProductID != AppConst.StringNull)
            {
                paramProductID.Value = oParam.ProductID;
            }
            else
            {
                paramProductID.Value = System.DBNull.Value;
            }
            if (oParam.ProductMode != AppConst.StringNull)
            {
                paramProductMode.Value = oParam.ProductMode;
            }
            else
            {
                paramProductMode.Value = System.DBNull.Value;
            }
            if (oParam.ProductName != AppConst.StringNull)
            {
                paramProductName.Value = oParam.ProductName;
            }
            else
            {
                paramProductName.Value = System.DBNull.Value;
            }
            if (oParam.ProductType != AppConst.IntNull)
            {
                paramProductType.Value = oParam.ProductType;
            }
            else
            {
                paramProductType.Value = System.DBNull.Value;
            }
            if (oParam.ProductDesc != AppConst.StringNull)
            {
                paramProductDesc.Value = oParam.ProductDesc;
            }
            else
            {
                paramProductDesc.Value = System.DBNull.Value;
            }
            if (oParam.ProductDescLong != AppConst.StringNull)
            {
                paramProductDescLong.Value = oParam.ProductDescLong;
            }
            else
            {
                paramProductDescLong.Value = System.DBNull.Value;
            }
            if (oParam.Performance != AppConst.StringNull)
            {
                paramPerformance.Value = oParam.Performance;
            }
            else
            {
                paramPerformance.Value = System.DBNull.Value;
            }
            if (oParam.Warranty != AppConst.StringNull)
            {
                paramWarranty.Value = oParam.Warranty;
            }
            else
            {
                paramWarranty.Value = System.DBNull.Value;
            }
            if (oParam.PackageList != AppConst.StringNull)
            {
                paramPackageList.Value = oParam.PackageList;
            }
            else
            {
                paramPackageList.Value = System.DBNull.Value;
            }
            if (oParam.Weight != AppConst.IntNull)
            {
                paramWeight.Value = oParam.Weight;
            }
            else
            {
                paramWeight.Value = System.DBNull.Value;
            }
            if (oParam.C1SysNo != AppConst.IntNull)
            {
                paramC1SysNo.Value = oParam.C1SysNo;
            }
            else
            {
                paramC1SysNo.Value = System.DBNull.Value;
            }
            if (oParam.C2SysNo != AppConst.IntNull)
            {
                paramC2SysNo.Value = oParam.C2SysNo;
            }
            else
            {
                paramC2SysNo.Value = System.DBNull.Value;
            }
            if (oParam.C3SysNo != AppConst.IntNull)
            {
                paramC3SysNo.Value = oParam.C3SysNo;
            }
            else
            {
                paramC3SysNo.Value = System.DBNull.Value;
            }
            if (oParam.ManufacturerSysNo != AppConst.IntNull)
            {
                paramManufacturerSysNo.Value = oParam.ManufacturerSysNo;
            }
            else
            {
                paramManufacturerSysNo.Value = System.DBNull.Value;
            }
            if (oParam.ProductLink != AppConst.StringNull)
            {
                paramProductLink.Value = oParam.ProductLink;
            }
            else
            {
                paramProductLink.Value = System.DBNull.Value;
            }
            if (oParam.MultiPicNum != AppConst.IntNull)
            {
                paramMultiPicNum.Value = oParam.MultiPicNum;
            }
            else
            {
                paramMultiPicNum.Value = System.DBNull.Value;
            }
            if (oParam.PMUserSysNo != AppConst.IntNull)
            {
                paramPMUserSysNo.Value = oParam.PMUserSysNo;
            }
            else
            {
                paramPMUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.PPMUserSysNo != AppConst.IntNull)
            {
                paramPPMUserSysNo.Value = oParam.PPMUserSysNo;
            }
            else
            {
                paramPPMUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.Attention != AppConst.StringNull)
            {
                paramAttention.Value = oParam.Attention;
            }
            else
            {
                paramAttention.Value = System.DBNull.Value;
            }
            if (oParam.Note != AppConst.StringNull)
            {
                paramNote.Value = oParam.Note;
            }
            else
            {
                paramNote.Value = System.DBNull.Value;
            }
            if (oParam.BarCode != AppConst.StringNull)
            {
                paramBarCode.Value = oParam.BarCode;
            }
            else
            {
                paramBarCode.Value = System.DBNull.Value;
            }
            if (oParam.IsLarge != AppConst.IntNull)
            {
                paramIsLarge.Value = oParam.IsLarge;
            }
            else
            {
                paramIsLarge.Value = System.DBNull.Value;
            }
            if (oParam.LastVendorSysNo != AppConst.IntNull)
            {
                paramLastVendorSysNo.Value = oParam.LastVendorSysNo;
            }
            else
            {
                paramLastVendorSysNo.Value = System.DBNull.Value;
            }
            if (oParam.Status != AppConst.IntNull)
            {
                paramStatus.Value = oParam.Status;
            }
            else
            {
                paramStatus.Value = System.DBNull.Value;
            }

            if (oParam.PromotionWord != AppConst.StringNull)
            {
                paramPromotionWord.Value = oParam.PromotionWord;
            }
            else
            {
                paramPromotionWord.Value = System.DBNull.Value;
            }
            if (oParam.BriefName != AppConst.StringNull)
            {
                paramBriefName.Value = oParam.BriefName;
            }
            else
            {
                paramBriefName.Value = System.DBNull.Value;
            }
            if (oParam.AssessmentTitle != AppConst.StringNull)
            {
                paramAssessmentTitle.Value = oParam.AssessmentTitle;
            }
            else
            {
                paramAssessmentTitle.Value = System.DBNull.Value;
            }
            if (oParam.AssessmentLink != AppConst.StringNull)
            {
                paramAssessmentLink.Value = oParam.AssessmentLink;
            }
            else
            {
                paramAssessmentLink.Value = System.DBNull.Value;
            }
            if (oParam.VirtualArriveTime != AppConst.IntNull)
            {
                paramVirtualArriveTime.Value = oParam.VirtualArriveTime;
            }
            else
            {
                paramVirtualArriveTime.Value = System.DBNull.Value;
            }

            if (oParam.InventoryCycleTime != AppConst.IntNull)
            {
                paramInventoryCycleTime.Value = oParam.InventoryCycleTime;
            }
            else
            {
                paramInventoryCycleTime.Value = System.DBNull.Value;
            }
            if (oParam.DMSWeight != AppConst.DecimalNull)
            {
                paramDMSWeight.Value = oParam.DMSWeight;
            }
            else
            {
                paramDMSWeight.Value = System.DBNull.Value;
            }
            if (oParam.DMS != AppConst.DecimalNull)
            {
                paramDMS.Value = oParam.DMS;
            }
            else
            {
                paramDMS.Value = System.DBNull.Value;
            }
            if (oParam.OPL != AppConst.IntNull)
            {
                paramOPL.Value = oParam.OPL;
            }
            else
            {
                paramOPL.Value = System.DBNull.Value;
            }
            if (oParam.OrderNum != AppConst.IntNull)
            {
                paramOrderNum.Value = oParam.OrderNum;
            }
            else
            {
                paramOrderNum.Value = System.DBNull.Value;
            }
            if (oParam.APMUserSysNo != AppConst.IntNull)
            {
                paramAPMUserSysNo.Value = oParam.APMUserSysNo;
            }
            else
            {
                paramAPMUserSysNo.Value = System.DBNull.Value;
            }

            if (oParam.DefaultVendorSysNo != AppConst.IntNull)
            {
                paramDefaultVendorSysNo.Value = oParam.DefaultVendorSysNo;
            }
            else
            {
                paramDefaultVendorSysNo.Value = System.DBNull.Value;
            }
            if (oParam.DefaultPurchasePrice != AppConst.DecimalNull)
            {
                paramDefaultPurchasePrice.Value = oParam.DefaultPurchasePrice;
            }
            else
            {
                paramDefaultPurchasePrice.Value = System.DBNull.Value;
            }
            if (oParam.Product2ndType != AppConst.IntNull)
            {
                paramProduct2ndType.Value = oParam.Product2ndType;
            }
            else
            {
                paramProduct2ndType.Value = System.DBNull.Value;
            }
            if (oParam.MasterProductSysNo != AppConst.IntNull)
            {
                paramMasterProductSysNo.Value = oParam.MasterProductSysNo;
            }
            else
            {
                paramMasterProductSysNo.Value = System.DBNull.Value;
            }
            if (oParam.ProductColor != AppConst.IntNull)
            {
                paramProductColor.Value = oParam.ProductColor;
            }
            else
            {
                paramProductColor.Value = System.DBNull.Value;
            }
            if (oParam.ProductSize != AppConst.IntNull)
            {
                paramProductSize.Value = oParam.ProductSize;
            }
            else
            {
                paramProductSize.Value = System.DBNull.Value;
            }
            if (oParam.ProducingArea != AppConst.StringNull)
            {
                paramProducingArea.Value = oParam.ProducingArea;
            }
            else
            {
                paramProducingArea.Value = System.DBNull.Value;
            }
            if (oParam.PackQuantity != AppConst.IntNull)
            {
                paramPackQuantity.Value = oParam.PackQuantity;
            }
            else
            {
                paramPackQuantity.Value = System.DBNull.Value;
            }
            if (oParam.MinOrderQuantity != AppConst.IntNull)
            {
                paramMinOrderQuantity.Value = oParam.MinOrderQuantity;
            }
            else
            {
                paramMinOrderQuantity.Value = System.DBNull.Value;
            }
            if (oParam.IsStoreFrontSale != AppConst.IntNull)
            {
                paramIsStoreFrontSale.Value = oParam.IsStoreFrontSale;
            }
            else
            {
                paramIsStoreFrontSale.Value = System.DBNull.Value;
            }
            if (oParam.SaleUnit != AppConst.StringNull)
            {
                paramSaleUnit.Value = oParam.SaleUnit;
            }
            else
            {
                paramSaleUnit.Value = System.DBNull.Value;
            }
            if (oParam.StorageDay != AppConst.IntNull)
            {
                paramStorageDay.Value = oParam.StorageDay;
            }
            else
            {
                paramStorageDay.Value = System.DBNull.Value;
            }
            if (oParam.IsCanPurchase != AppConst.IntNull)
            {
                paramIsCanPurchase.Value = oParam.IsCanPurchase;
            }
            else
            {
                paramIsCanPurchase.Value = System.DBNull.Value;
            }

            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramProductID);
            cmd.Parameters.Add(paramProductMode);
            cmd.Parameters.Add(paramProductName);
            cmd.Parameters.Add(paramProductType);
            cmd.Parameters.Add(paramProductDesc);
            cmd.Parameters.Add(paramProductDescLong);
            cmd.Parameters.Add(paramPerformance);
            cmd.Parameters.Add(paramWarranty);
            cmd.Parameters.Add(paramPackageList);
            cmd.Parameters.Add(paramWeight);
            cmd.Parameters.Add(paramC1SysNo);
            cmd.Parameters.Add(paramC2SysNo);
            cmd.Parameters.Add(paramC3SysNo);
            cmd.Parameters.Add(paramManufacturerSysNo);
            cmd.Parameters.Add(paramProductLink);
            cmd.Parameters.Add(paramMultiPicNum);
            cmd.Parameters.Add(paramPMUserSysNo);
            cmd.Parameters.Add(paramPPMUserSysNo);
            cmd.Parameters.Add(paramAttention);
            cmd.Parameters.Add(paramNote);
            cmd.Parameters.Add(paramBarCode);
            cmd.Parameters.Add(paramIsLarge);
            cmd.Parameters.Add(paramLastVendorSysNo);
            cmd.Parameters.Add(paramStatus);
            cmd.Parameters.Add(paramPromotionWord);
            cmd.Parameters.Add(paramBriefName);
            cmd.Parameters.Add(paramAssessmentTitle);
            cmd.Parameters.Add(paramAssessmentLink);
            cmd.Parameters.Add(paramVirtualArriveTime);

            cmd.Parameters.Add(paramInventoryCycleTime);
            cmd.Parameters.Add(paramDMSWeight);
            cmd.Parameters.Add(paramDMS);
            cmd.Parameters.Add(paramOPL);

            cmd.Parameters.Add(paramOrderNum);
            cmd.Parameters.Add(paramAPMUserSysNo);

            cmd.Parameters.Add(paramDefaultVendorSysNo);
            cmd.Parameters.Add(paramDefaultPurchasePrice);
            cmd.Parameters.Add(paramProduct2ndType);
            cmd.Parameters.Add(paramMasterProductSysNo);
            cmd.Parameters.Add(paramProductColor);
            cmd.Parameters.Add(paramProductSize);
            cmd.Parameters.Add(paramProducingArea);
            cmd.Parameters.Add(paramPackQuantity);
            cmd.Parameters.Add(paramMinOrderQuantity);
            cmd.Parameters.Add(paramIsStoreFrontSale);
            cmd.Parameters.Add(paramSaleUnit);
            cmd.Parameters.Add(paramStorageDay);

            cmd.Parameters.Add(paramIsCanPurchase);

            return(SqlHelper.ExecuteNonQuery(cmd));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 加够商品转换为主商品
        /// </summary>
        /// <param name="productSysNo">商品编号</param>
        /// <param name="customerSysNo">用户编号</param>
        /// <returns></returns>
        private OrderItemGroup PlusPriceConvertToProduct(OrderGiftItem plusPrice, int customerSysNo)
        {
            OrderItemGroup   result      = new OrderItemGroup();
            OrderProductItem productItem = new OrderProductItem();

            productItem.ProductSysNo = plusPrice.ProductSysNo;

            //商品基础信息
            ProductBasicInfo basicInfo = PipelineDA.GetProductBasicInfoBySysNo(productItem.ProductSysNo);
            //商品备案信息
            ProductEntryInfo entryInfo = PipelineDA.GetProductEntryInfoBySysNo(productItem.ProductSysNo);

            basicInfo.ProductEntryInfo      = entryInfo;
            productItem["ProductStoreType"] = (int)entryInfo.ProductStoreType;
            //商品备货时间
            productItem["LeadTimeDays"] = basicInfo.ProductEntryInfo.LeadTimeDays;

            //商品销售信息
            ProductSalesInfo salesInfo = PipelineDA.GetProductSalesInfoBySysNo(productItem.ProductSysNo);

            productItem.ProductID         = basicInfo.Code;
            productItem.ProductName       = basicInfo.ProductName;
            productItem.Weight            = basicInfo.Weight;
            productItem["ProductTitle"]   = basicInfo.ProductTitle;
            productItem.DefaultImage      = basicInfo.DefaultImage;
            productItem.UnitMarketPrice   = salesInfo.MarketPrice;
            productItem.UnitCostPrice     = salesInfo.UnitCostPrice;
            productItem.UnitSalePrice     = plusPrice.UnitSalePrice;
            productItem.UnitRewardedPoint = 0;
            //productItem["TariffRate"] = basicInfo.ProductEntryInfo.TariffRate;
            productItem.TotalInventory       = salesInfo.OnlineQty;
            productItem.MerchantSysNo        = basicInfo.VendorSysno;
            productItem.MerchantName         = basicInfo.VendorInfo.VendorName;
            result.MerchantSysNo             = basicInfo.VendorSysno;
            result.MerchantName              = basicInfo.VendorInfo.VendorName;
            productItem["ProductStatus"]     = (int)basicInfo.ProductStatus;
            productItem["Warranty"]          = basicInfo.Warranty;
            productItem.WarehouseNumber      = plusPrice.WarehouseNumber;
            productItem.WarehouseName        = plusPrice.WarehouseName;
            productItem.WarehouseCountryCode = plusPrice.WarehouseCountryCode;

            salesInfo.MinCountPerOrder = salesInfo.OnlineQty < productItem.UnitQuantity ? salesInfo.OnlineQty : productItem.UnitQuantity;
            salesInfo.MaxCountPerOrder = salesInfo.OnlineQty < productItem.UnitQuantity ? salesInfo.OnlineQty : productItem.UnitQuantity;

            productItem["MinCountPerOrder"] = productItem.UnitQuantity;
            productItem["MaxCountPerOrder"] = productItem.UnitQuantity;

            result.MinCountPerSO = productItem.UnitQuantity;
            result.MaxCountPerSO = productItem.UnitQuantity;
            result.MerchantSysNo = productItem.MerchantSysNo;
            result.MerchantName  = productItem.MerchantName;
            result.PackageNo     = 0;
            result.PackageType   = 0;
            result.Quantity      = 1;

            //商品分组属性
            List <ProductSplitGroupProperty> splitGroupProperty = PipelineDA.GetProductSplitGroupPropertyList(productItem.ProductSysNo);

            if (splitGroupProperty != null && splitGroupProperty.Count > 0)
            {
                productItem.SplitGroupPropertyDescList = new List <KeyValuePair <string, string> >();
                foreach (ProductSplitGroupProperty property in splitGroupProperty)
                {
                    productItem.SplitGroupPropertyDescList.Add(new KeyValuePair <string, string>(property.PropertyDescription, property.ValueDescription));
                }
            }
            result.ProductItemList = new List <OrderProductItem>();
            result.ProductItemList.Add(productItem);

            return(result);
        }
Exemplo n.º 8
0
        public string GetCountdownMold(DataRow dr, int index)
        {
            StringBuilder sb = new StringBuilder(2000);

            sb.Append("<table width='100%' border='0' cellpadding='0' cellspacing='0' align=center>");
            sb.Append("	<tr class='m-1'> ");
            sb.Append("		<td width=100 valign='top'>");
            //sb.Append("			<a href=\"javascript:openDialog('../Items/DisplayPhoto.aspx?ItemID=" + dr["ProductSysNo"].ToString() + "')\"><img src='").Append(ProductBasicInfo.GetSmallPic(AppConfig.PicturePath, Util.TrimNull(dr["ProductID"]))).Append("' alt=\"" + System.Web.HttpUtility.HtmlEncode(Util.RemoveHtmlTag(dr["ProductName"].ToString())) + "\" width='80' height='60' border='0'></a>").Append("<br><font color='#999999'>").Append(dr["productid"].ToString()).Append("</font>").Append("</td>");
            sb.Append("			<a href=\"javascript:openDialog('../Items/DisplayPhoto.aspx?ItemID="+ dr["ProductSysNo"].ToString() + "')\"><img src='").Append(ProductBasicInfo.GetSmallPic(AppConfig.PicturePath, Util.TrimNull(dr["ProductID"]))).Append("' alt=\"查看大图\" width='80' height='60' border='0'></a>").Append("</td>");
            sb.Append("		<td width=40% align=left valign=middle>");
            sb.Append("			<span class='m-1'><a href='../Items/ItemDetail.aspx?ItemID=").Append(dr["ProductSysNo"].ToString()).Append("' target='_blank'>").Append(dr["productname"].ToString()).Append("</a></span>");
            sb.Append("		</td>");
            sb.Append("		<td width=150>");
            //-----snap shot price
            sb.Append(getPrice(dr, false));
            sb.Append("		</td>");
            sb.Append("		<td width=150>");
            //-----countdown price
            sb.Append(getPrice(dr, true));
            sb.Append("		</td>");
            //sb.Append("		<td>");
            //sb.Append(getStatus(dr, index));
            //-----status including time & qty
            //sb.Append("		</td>");

            sb.Append("	</tr>");
            sb.Append("</table>");

            return(sb.ToString());
        }
Exemplo n.º 9
0
        public static CheckOutResult GetPayAndShipTypeList(CheckOutContext context, int customerSysNo, ShoppingCart shoppingCart)
        {
            CheckOutResult result = new CheckOutResult();

            CheckOutContext newCheckoutContenxt = new CheckOutContext();

            if (context != null)
            {
                newCheckoutContenxt = context.Clone();
            }

            MemberInfo memberInfo = CustomerDA.GetCustomerInfo(customerSysNo);

            //取得用户选择的收货地址信息
            var custShippingAddrResult = GetCustomerShippingAddressList(newCheckoutContenxt, customerSysNo);

            result.SelShippingAddress = custShippingAddrResult.SelShippingAddress;

            #region 支付类别选择
            result.PaymentCategoryList = GetAllPaymentCategoryList();
            //优先取context指定的支付类型
            //其次取配送地址指定的支付类型
            if (!result.PaymentCategoryList.Exists(x =>
            {
                if (x.Key.ToString() == newCheckoutContenxt.PaymentCategoryID ||
                    x.Key == result.SelShippingAddress.PaymentCategoryID)
                {
                    result.SelPaymentCategoryID = x.Key;
                    return(true);
                }
                return(false);
            }))
            {
                //都没有就取第一条支付类型
                result.SelPaymentCategoryID = result.PaymentCategoryList.First().Key;
            }
            #endregion



            #region 配送方式选择
            //step1 取得配送地址支持的所有配送方式
            List <ShipTypeInfo> ShipTypeInfoList = new List <ShipTypeInfo>();
            List <ShipTypeInfo> shipTypeList     = new List <ShipTypeInfo>();
            foreach (ShoppingItemGroup ShoppingItemGroup in shoppingCart.ShoppingItemGroupList)
            {
                foreach (ShoppingItem ShoppingItem in ShoppingItemGroup.ShoppingItemList)
                {
                    ProductBasicInfo    basicInfo   = ProductFacade.GetProductBasicInfoBySysNo(ShoppingItem.ProductSysNo);
                    List <ShipTypeInfo> ShipTypeNew = ShipTypeFacade.Checkout_GetStockShippingType(basicInfo.VendorSysno);
                    if (ShipTypeNew.Count > 0)
                    {
                        if (ShipTypeInfoList.Count <= 0)
                        {
                            ShipTypeInfoList.AddRange(ShipTypeNew);
                            shipTypeList.AddRange(ShipTypeNew);
                        }
                        else
                        {
                            shipTypeList = new List <ShipTypeInfo>();
                            for (int i = 0; i < ShipTypeInfoList.Count; i++)
                            {
                                for (int j = 0; j < ShipTypeNew.Count; j++)
                                {
                                    if (ShipTypeInfoList[i].ShipTypeName == ShipTypeNew[j].ShipTypeName)
                                    {
                                        shipTypeList.Add(ShipTypeInfoList[i]);
                                    }
                                }
                            }
                            if (shipTypeList.Count <= 0)
                            {
                                result.ErrorMessages.Add("不同商家的商品,没有相同的配送方式,请分开下单!");
                                break;
                            }
                            else
                            {
                                ShipTypeInfoList = shipTypeList;
                            }
                        }
                    }
                    else
                    {
                        string error = string.Format("商品【{0}】没有对应配送方式,暂时无法为您配送!", basicInfo.ProductName);
                        result.ErrorMessages.Add(error);
                        result.ShipTypeList = null;
                        break;
                    }
                }
                if (result.ErrorMessages.Count > 0)
                {
                    break;
                }
            }
            //var shipTypeList = ShipTypeFacade.GetSupportedShipTypeList(result.SelShippingAddress.ReceiveAreaSysNo, null);
            //step2 如果不存在支持货到付款的配送方式, 则移除掉货到付款支付类别
            if (shipTypeList.Count(x => x.IsPayWhenRecv) <= 0)
            {
                result.PaymentCategoryList  = result.PaymentCategoryList.FindAll(x => x.Key == (int)PaymentCategory.OnlinePay);
                result.SelPaymentCategoryID = (int)PaymentCategory.OnlinePay;
            }
            //step3 如果选择的是货到付款,则移除掉不支持货到付款的配送方式
            if (result.SelPaymentCategoryID == (int)PaymentCategory.PayWhenRecv)
            {
                result.ShipTypeList = shipTypeList.Where(x => x.IsPayWhenRecv).ToList();
                //step4 移除掉不支持货到付款的配送方式后没有可用的配送方式时,系统自动选择在线支付
                if (result.ShipTypeList.Count <= 0)
                {
                    result.ShipTypeList         = shipTypeList;
                    result.PaymentCategoryList  = result.PaymentCategoryList.FindAll(x => x.Key == (int)PaymentCategory.OnlinePay);
                    result.SelPaymentCategoryID = (int)PaymentCategory.OnlinePay;
                }
            }
            else
            {
                result.ShipTypeList = shipTypeList;
            }

            //优先取context指定的配送方式
            result.SelShipType = result.ShipTypeList.Find(x => x.ShipTypeSysNo.ToString() == newCheckoutContenxt.ShipTypeID);
            //其次取配送地址指定的配送方式
            if (result.SelShipType == null && result.SelShippingAddress != null)
            {
                result.SelShipType = result.ShipTypeList.Find(x => x.ShipTypeSysNo == result.SelShippingAddress.ShipTypeSysNo);
            }
            //都没有就取第一条配送方式
            if (result.SelShipType == null && result.ShipTypeList.Count > 0)
            {
                result.SelShipType = result.ShipTypeList.First();
            }
            result.ShipTypeList = EnsureNotNullObject(result.ShipTypeList);
            result.SelShipType  = EnsureNotNullObject(result.SelShipType);
            #endregion

            #region 支付方式选择
            result.PayTypeList = GetAllPayTypeList();
            if (result.SelPaymentCategoryID == (int)PaymentCategory.PayWhenRecv)
            {
                result.PayTypeList = result.PayTypeList.FindAll(x => x.IsPayWhenRecv == 1);
            }
            //优先取用户上次下单使用的支付方式
            result.SelPayType = result.PayTypeList.Find(x => x.PayTypeID == memberInfo.ExtendInfo.LastPayTypeSysNo);
            if (result.SelPayType == null && result.PayTypeList.Count > 0)
            {
                result.SelPayType = result.PayTypeList.First();
            }
            if (result.SelPayType != null && result.PayTypeList.Count > 0)
            {
                var cateId             = result.SelPayType.IsPayWhenRecv == 1 ? (int)PaymentCategory.PayWhenRecv : (int)PaymentCategory.OnlinePay;
                var isPayWhenRecvValue = result.SelPaymentCategoryID == (int)PaymentCategory.PayWhenRecv ? 1 : 0;
                //如果上次下单用户使用的支付方式类型跟本次下单选择的支付类型不一致
                //则选择符合当前选择的支付类型的第一个支付方式
                if (cateId != result.SelPaymentCategoryID)
                {
                    result.SelPayType = result.PayTypeList.Where(x => x.IsPayWhenRecv == isPayWhenRecvValue).First();
                }

                if (context != null && context.PayTypeID.HasValue)
                {
                    result.SelPayType = result.PayTypeList.Where(x => x.PayTypeID == context.PayTypeID.Value).First();
                }
            }
            result.PayTypeList = EnsureNotNullObject(result.PayTypeList);
            result.SelPayType  = EnsureNotNullObject(result.SelPayType);
            #endregion

            return(result);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 获取商品详情
        /// </summary>
        /// <param name="id">系统编号</param>
        /// <param name="isGroupBuy">0--标识id为商品系统编号,1--标识id为团购活动系统编号</param>
        /// <returns></returns>
        public ProductDetailModel GetProductDetails(int id, int isGroupBuy)
        {
            int             productSysNo = 0;
            GroupBuyingInfo groupBuyInfo = null;

            if (isGroupBuy == 1)
            {
                groupBuyInfo = GroupBuyingFacade.GetGroupBuyingInfoBySysNo(id);
                if (groupBuyInfo == null)
                {
                    //提示团购活动找不到
                    throw new BusinessException("团购活动找不到啦,请选购其它商品,谢谢。");
                }
                productSysNo = groupBuyInfo.ProductSysNo;
            }
            else
            {
                productSysNo = id;
            }


            //商品基本信息
            ProductBasicInfo basicInfo = ProductFacade.GetProductBasicInfoBySysNo(productSysNo);

            //商品销售信息
            ProductSalesInfo salesInfo = ProductFacade.GetProductSalesInfoBySysNo(productSysNo);

            if (basicInfo == null || salesInfo == null)
            {
                //提示商品找不到
                throw new BusinessException("商品找不到啦,请选购其它商品,谢谢。");
            }
            //如果是不展示或下架
            if (basicInfo.ProductStatus == ProductStatus.NotShow || basicInfo.ProductStatus == ProductStatus.Abandon)
            {
                //提示商品状态已下架或已作废
                throw new BusinessException("商品已下架或已作废,请选购其它商品,谢谢。");
            }
            //商品组信息
            List <ProductPropertyView> propertyView = ProductFacade.GetProductPropetyView(productSysNo, basicInfo.ProductCommonInfoSysNo);

            //商品附件
            List <ProductItemInfo> attachmentList = ProductFacade.GetProductAttachmentList(productSysNo);

            //商品配件
            List <ProductAccessories> accessoriesList = ProductFacade.GetProductAccessoriesList(productSysNo);

            //商家信息
            StoreBasicInfo storeinfo = StoreFacade.QueryStoreBasicInfo(basicInfo.VendorSysno);

            //商品促销信息
            ProductPromotionInfo promotionInfo = Nesoft.ECWeb.Facade.Product.ProductFacade.GetProductPromotionInfo(productSysNo);

            //商品组图片信息
            List <ProductImage> productImages = ProductFacade.GetProductImages(basicInfo.ProductCommonInfoSysNo);

            //商品内容(商品详情,规格参数,售后服务,购买须知等)
            List <ProductContent> contentList = ProductFacade.GetProductContentList(basicInfo);

            ProductDetailModel result = new ProductDetailModel();

            //基本信息
            result.BasicInfo = TransformBasicInfo(basicInfo);
            //商品销售(价格,库存等)信息
            result.SalesInfo = TransformSalesInfo(basicInfo, salesInfo);

            //商品图片列表
            result.ImageList = TransformImageList(productImages);
            //商品描述信息
            result.DescInfo = TransformDescInfo(contentList);
            //if (result.DescInfo != null && basicInfo != null)
            //    result.DescInfo.Performance = basicInfo.Performance;


            //分组属性
            result.GroupPropertyInfo = TransformGroupProperty(propertyView);
            //附件信息
            result.AttachmentInfo = TransformAttachmentInfo(attachmentList);
            //配件信息
            result.AccessoryList = TransformAccessoryInfo(accessoriesList);

            //商家信息
            result.StoreBasicInfo = Transformstoreinfo(storeinfo);


            //限时抢购,赠品,套餐等促销信息
            result.PromoInfo = TransformPromoInfo(promotionInfo);

            //如果是团购商品进一步加载团购详情
            if (promotionInfo != null && promotionInfo.GroupBuySysNo > 0)
            {
                if (groupBuyInfo == null)
                {
                    groupBuyInfo = GroupBuyingFacade.GetGroupBuyingInfoBySysNo(promotionInfo.GroupBuySysNo);
                }
                if (groupBuyInfo == null)
                {
                    result.PromoInfo.GroupBuyingSysNo = 0;
                }
                else
                {
                    //团购图片特殊处理,用活动设置的图片
                    result.BasicInfo.DefaultImageUrl = groupBuyInfo.GroupBuyingPicUrl;
                    result.ImageList.Clear();
                    ProductImageModel groupBuyImage = new ProductImageModel();
                    groupBuyImage.ImageUrlBig  = groupBuyInfo.GroupBuyingPicUrl;
                    groupBuyImage.ImageUrlHuge = groupBuyInfo.GroupBuyingPicUrl;
                    result.ImageList.Add(groupBuyImage);
                    //海外团购商品,算税
                    if (groupBuyInfo.GroupBuyingTypeSysNo == 0)
                    {
                        result.SalesInfo.TariffPrice = salesInfo.CurrentPrice * salesInfo.TariffRate;

                        if (result.SalesInfo.TariffPrice <= ConstValue.TariffFreeLimit)
                        {
                            result.SalesInfo.FreeEntryTax = true;
                            result.SalesInfo.TotalPrice   = salesInfo.CurrentPrice;
                        }
                        else
                        {
                            result.SalesInfo.FreeEntryTax = false;
                            result.SalesInfo.TotalPrice   = salesInfo.CurrentPrice + result.SalesInfo.TariffPrice;
                        }
                        decimal snapShotTariffPrice = groupBuyInfo.SnapShotCurrentPrice * salesInfo.TariffRate;
                        if (snapShotTariffPrice <= ConstValue.TariffFreeLimit)
                        {
                            snapShotTariffPrice = 0;
                        }
                        result.SalesInfo.BasicPrice = groupBuyInfo.SnapShotCurrentPrice + groupBuyInfo.SnapShotCashRebate + snapShotTariffPrice;
                    }
                    else
                    {
                        result.SalesInfo.BasicPrice   = groupBuyInfo.SnapShotCurrentPrice + groupBuyInfo.SnapShotCashRebate;
                        result.SalesInfo.TotalPrice   = salesInfo.CurrentPrice;
                        result.SalesInfo.TariffPrice  = 0;
                        result.SalesInfo.FreeEntryTax = false;
                    }
                    groupBuyInfo.MarketPrice = result.SalesInfo.BasicPrice;

                    result.GroupBuyInfo = MapGroupBuyInfo(groupBuyInfo);
                }
            }
            if (promotionInfo != null && promotionInfo.Countdown != null)
            {
                //限时抢购重算市场价
                decimal snapShotTariffPrice = promotionInfo.Countdown.SnapShotCurrentPrice * salesInfo.TariffRate;
                if (snapShotTariffPrice <= ConstValue.TariffFreeLimit)
                {
                    snapShotTariffPrice = 0;
                }
                result.SalesInfo.BasicPrice = promotionInfo.Countdown.SnapShotCurrentPrice + promotionInfo.Countdown.SnapShotCashRebate + snapShotTariffPrice;
            }

            result.ActionInfo = MapActionInfo(result);

            return(result);
        }
Exemplo n.º 11
0
        public void Initialize(ref OrderInfo order)
        {
            int currencySysno;

            int.TryParse(ConstValue.CurrencySysNo, out currencySysno);
            decimal exchangeRate = PipelineDA.GetCurrencyExchangeRate(currencySysno);

            order["CurrencySysNo"] = currencySysno;
            order["ExchangeRate"]  = exchangeRate;

            foreach (OrderItemGroup itemGroup in order.OrderItemGroupList)
            {
                int minCountPerOrder = 0;
                int maxCountPerOrder = 0;
                foreach (OrderProductItem item in itemGroup.ProductItemList)
                {
                    //商品基础信息
                    ProductBasicInfo basicInfo = PipelineDA.GetProductBasicInfoBySysNo(item.ProductSysNo);
                    //商品备案信息
                    //ProductEntryInfo entryInfo = PipelineDA.GetProductEntryInfoBySysNo(item.ProductSysNo);
                    //basicInfo.ProductEntryInfo = entryInfo;
                    //item["ProductStoreType"] = (int)entryInfo.ProductStoreType;
                    //商品备货时间
                    //item["LeadTimeDays"] = basicInfo.ProductEntryInfo.LeadTimeDays;

                    //会员价格信息
                    ProductCustomerRankPrice rankPrice = null;
                    if (order.Customer != null && order.Customer.SysNo > 0)
                    {
                        rankPrice = ECommerce.DataAccess.Product.ProductDA.GetProductCustomerRankPrice(order.Customer.SysNo, item.ProductSysNo);
                    }
                    //商品销售信息
                    ProductSalesInfo salesInfo = PipelineDA.GetProductSalesInfoBySysNo(item.ProductSysNo);
                    item.ProductID       = basicInfo.Code;
                    item.ProductName     = basicInfo.ProductName;
                    item.Weight          = basicInfo.Weight;
                    item["ProductTitle"] = basicInfo.ProductTitle;
                    item.DefaultImage    = basicInfo.DefaultImage;
                    item.UnitMarketPrice = salesInfo.MarketPrice;
                    item.UnitCostPrice   = salesInfo.UnitCostPrice;
                    //套餐不享受会员价格
                    if (itemGroup.PackageNo > 0 && itemGroup.PackageType == 1)
                    {
                        item.UnitSalePrice = salesInfo.CurrentPrice;
                    }
                    else
                    {
                        item.UnitSalePrice = rankPrice != null && rankPrice.RankPrice < salesInfo.CurrentPrice ? rankPrice.RankPrice : salesInfo.CurrentPrice;
                    }
                    item.UnitRewardedPoint = salesInfo.Point;
                    //由calculators计算
                    //item.UnitTaxFee = salesInfo.EntryTax.HasValue ? salesInfo.EntryTax.Value : 0m;
                    //item["TariffRate"] = basicInfo.ProductEntryInfo.TariffRate;
                    item.TotalInventory     = salesInfo.OnlineQty;
                    item.MerchantSysNo      = basicInfo.VendorSysno;
                    item.MerchantName       = basicInfo.VendorInfo.VendorName;
                    itemGroup.MerchantSysNo = basicInfo.VendorSysno;
                    itemGroup.MerchantName  = basicInfo.VendorInfo.VendorName;
                    item["ProductStatus"]   = (int)basicInfo.ProductStatus;
                    item["Warranty"]        = basicInfo.Warranty;

                    salesInfo.MinCountPerOrder = salesInfo.OnlineQty < salesInfo.MinCountPerOrder ? salesInfo.OnlineQty : salesInfo.MinCountPerOrder;
                    salesInfo.MaxCountPerOrder = salesInfo.OnlineQty < salesInfo.MaxCountPerOrder ? salesInfo.OnlineQty : salesInfo.MaxCountPerOrder;

                    item["MinCountPerOrder"] = salesInfo.MinCountPerOrder;
                    item["MaxCountPerOrder"] = salesInfo.MaxCountPerOrder;

                    //每单限购计算,套餐则以套餐内商品最小限购数量为准
                    if (minCountPerOrder < salesInfo.MinCountPerOrder / item.UnitQuantity)
                    {
                        minCountPerOrder = salesInfo.MinCountPerOrder / item.UnitQuantity;
                    }
                    if (maxCountPerOrder.Equals(0) || maxCountPerOrder > salesInfo.MaxCountPerOrder / item.UnitQuantity)
                    {
                        maxCountPerOrder = salesInfo.MaxCountPerOrder / item.UnitQuantity;
                    }


                    decimal price = GetProductStepPrice(item.UnitSalePrice, item.ProductSysNo, itemGroup.Quantity);
                    item.UnitSalePrice = price;

                    //商品分组属性
                    List <ProductSplitGroupProperty> splitGroupProperty = PipelineDA.GetProductSplitGroupPropertyList(item.ProductSysNo);
                    if (splitGroupProperty != null && splitGroupProperty.Count > 0)
                    {
                        item.SplitGroupPropertyDescList = new List <KeyValuePair <string, string> >();
                        foreach (ProductSplitGroupProperty property in splitGroupProperty)
                        {
                            item.SplitGroupPropertyDescList.Add(new KeyValuePair <string, string>(property.PropertyDescription, property.ValueDescription));
                        }
                    }
                }
                itemGroup.MinCountPerSO = minCountPerOrder;
                itemGroup.MaxCountPerSO = maxCountPerOrder;
                //套餐名称
                if (itemGroup.PackageType.Equals(1))
                {
                    var combo = PromotionDA.GetComboByComboSysNo(itemGroup.PackageNo);
                    if (combo != null)
                    {
                        itemGroup["PackageName"] = combo.SaleRuleName;
                    }
                }
            }
        }