Beispiel #1
0
        public ResResultModel GetOrderPickProductList(PdaOrderPickProductModel model)
        {
            try
            {
                if (model.PageIndex < 1)
                {
                    model.PageIndex = 1;
                }
                if (model.PageSize < 1)
                {
                    model.PageSize = 10;
                }
                var bll = new OrderPickProduct();

                var sqlWhere = "and op.Id = @Id ";
                var parm     = new SqlParameter("@Id", SqlDbType.UniqueIdentifier);
                parm.Value = Guid.Parse(model.Id.ToString());
                var list = bll.GetListByJoin(model.PageIndex, model.PageSize, sqlWhere, parm);

                return(ResResult.Response(true, "", JsonConvert.SerializeObject(list)));
            }
            catch (Exception ex)
            {
                return(ResResult.Response(false, ex.Message, ""));
            }
        }
Beispiel #2
0
        public PrintOrderInfo GetPrintOrderPick(Guid Id)
        {
            var data = new PrintOrderInfo();

            data.Title      = "拣货单";
            data.SPrintDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm");

            var bll   = new OrderPicked();
            var oInfo = bll.GetModel(Id);

            data.OrderCode         = oInfo.OrderCode;
            data.PurchaseOrderCode = "";
            data.SupplierName      = "";
            data.SPlanArrivalTime  = "";
            data.SPlanArrivalTime  = "";

            var t1 = Task.Factory.StartNew(() =>
            {
                BarcodeHelper bh     = new BarcodeHelper();
                data.BarcodeImageUri = bh.CreateBarcode(data.OrderCode);
            });

            var oppBll   = new OrderPickProduct();
            var sqlWhere = "and opp.OrderPickId = @OrderId ";
            var parm     = new SqlParameter("@OrderId", oInfo.Id);
            var pList    = oppBll.GetListByJoin(sqlWhere, parm);

            if (pList != null && pList.Count > 0)
            {
                var cargoList = new List <PrintOrderCargoInfo>();
                foreach (var item in pList)
                {
                    cargoList.Add(new PrintOrderCargoInfo("", item.ProductCode, item.ProductName, item.CustomerCode, item.CustomerName, "", "", "", item.StayQty, item.Qty, ""));
                }
                data.CargoList = cargoList;
                //data.CargoList = JsonConvert.SerializeObject(cargoList);
            }

            t1.Wait();

            return(data);
        }