Example #1
0
 public ActionResult Detail()
 {
     string orderNum = WebUtil.GetQueryStringValue<string>("OrderNum", string.Empty);
     Bill<CheckStockEntity, CheckStockInfoEntity> bill = new CheckOrder();
     CheckStockEntity entity = new CheckStockEntity();
     entity.OrderNum = orderNum;
     entity = bill.GetOrder(entity);
     if (entity.IsNull())
     {
         return Redirect("/Check/Product/List");
     }
     entity.CheckTypeLable = EnumHelper.GetEnumDesc<ECheckType>(entity.Type);
     entity.ProductTypeLable = EnumHelper.GetEnumDesc<EProductType>(entity.ProductType);
     entity.StatusLable = EnumHelper.GetEnumDesc<EAudite>(entity.Status);
     ViewBag.Entity = entity;
     return View();
 }
Example #2
0
        /// <summary>
        /// 根据唯一编号查询盘点单主体信息
        /// </summary>
        /// <returns></returns>
        public ActionResult GetOrder()
        {
            string SnNum                = WebUtil.GetFormValue <string>("SnNum");
            string CompanyID            = WebUtil.GetFormValue <string>("CompanyID", string.Empty);
            InventoryOrderEntity entity = new InventoryOrderEntity();

            entity.SnNum     = SnNum;
            entity.CompanyID = CompanyID;
            Bill <InventoryOrderEntity, InventoryDetailEntity> bill = new CheckOrder(CompanyID);
            InventoryOrderEntity result = bill.GetOrder(entity);

            DataResult <InventoryOrderEntity> dataResult = new DataResult <InventoryOrderEntity>();

            dataResult.Code    = (int)EResponseCode.Success;
            dataResult.Message = "响应成功";
            dataResult.Result  = result;
            return(Content(JsonHelper.SerializeObject(dataResult)));
        }
Example #3
0
        public ActionResult Upload()
        {
            string orderNum = WebUtil.GetQueryStringValue <string>("OrderNum", string.Empty);
            Bill <CheckStockEntity, CheckStockInfoEntity> bill = new CheckOrder();
            CheckStockEntity entity = new CheckStockEntity();

            entity.OrderNum = orderNum;
            entity          = bill.GetOrder(entity);
            if (entity.IsNull())
            {
                return(Redirect("/Check/Product/List"));
            }
            entity.CheckTypeLable   = EnumHelper.GetEnumDesc <ECheckType>(entity.Type);
            entity.ProductTypeLable = EnumHelper.GetEnumDesc <EProductType>(entity.ProductType);
            entity.StatusLable      = EnumHelper.GetEnumDesc <EAudite>(entity.Status);
            ViewBag.Entity          = entity;
            return(View());
        }
Example #4
0
        public ActionResult Edit()
        {
            string orderNum = WebUtil.GetQueryStringValue <string>("OrderNum", string.Empty);
            Bill <CheckStockEntity, CheckStockInfoEntity> bill = new CheckOrder();
            CheckStockEntity entity = new CheckStockEntity();

            entity.OrderNum = orderNum;
            entity          = bill.GetOrder(entity);
            if (entity.IsNull())
            {
                return(Redirect("/Check/Product/List"));
            }
            string checkType = EnumHelper.GetOptions <ECheckType>(entity.Type);

            ViewBag.CheckType   = checkType;
            ViewBag.ProductType = EnumHelper.GetOptions <EProductType>(entity.ProductType);
            ViewBag.Entity      = entity;
            CheckStockInfoEntity info = new CheckStockInfoEntity();

            info.OrderNum = orderNum;
            List <CheckStockInfoEntity> list = bill.GetOrderDetail(info);

            List <ProductEntity> ListProducts = new List <ProductEntity>();
            List <ProductEntity> ListSource   = new ProductProvider().GetListByCache();

            if (!list.IsNullOrEmpty())
            {
                Parallel.ForEach(list, item =>
                {
                    if (ListSource.Exists(a => a.SnNum == item.TargetNum))
                    {
                        ProductEntity target = ListSource.FirstOrDefault(a => a.SnNum == item.TargetNum);
                        ListProducts.Add(target);
                    }
                });
            }
            Session[CacheKey.JOOSHOW_CHECKDETAIL_CACHE] = ListProducts;
            return(View());
        }
Example #5
0
        public ActionResult Edit()
        {
            string orderNum = WebUtil.GetQueryStringValue<string>("OrderNum", string.Empty);
            Bill<CheckStockEntity, CheckStockInfoEntity> bill = new CheckOrder();
            CheckStockEntity entity = new CheckStockEntity();
            entity.OrderNum = orderNum;
            entity = bill.GetOrder(entity);
            if (entity.IsNull())
            {
                return Redirect("/Check/Product/List");
            }
            string checkType = EnumHelper.GetOptions<ECheckType>(entity.Type);
            ViewBag.CheckType = checkType;
            ViewBag.ProductType = EnumHelper.GetOptions<EProductType>(entity.ProductType);
            ViewBag.Entity = entity;
            CheckStockInfoEntity info = new CheckStockInfoEntity();
            info.OrderNum = orderNum;
            List<CheckStockInfoEntity> list = bill.GetOrderDetail(info);

            List<ProductEntity> ListProducts = new List<ProductEntity>();
            List<ProductEntity> ListSource = new ProductProvider().GetListByCache();
            if (!list.IsNullOrEmpty())
            {
                Parallel.ForEach(list, item =>
                {
                    if (ListSource.Exists(a => a.SnNum == item.TargetNum))
                    {
                        ProductEntity target = ListSource.FirstOrDefault(a => a.SnNum == item.TargetNum);
                        ListProducts.Add(target);
                    }
                });
            }
            Session[CacheKey.JOOSHOW_CHECKDETAIL_CACHE] = ListProducts;
            return View();
        }