Inheritance: LeanEngine.Entity.EntityBase
Beispiel #1
0
        public void AddOrderTracer(OrderTracer entity)
        {
            if (entity != null)
            {
                if (this.OrderTracers == null)
                {
                    this.OrderTracers = new List <OrderTracer>();
                }

                this.OrderTracers.Add(entity);
            }
        }
Beispiel #2
0
        public void AddOrderTracer(OrderTracer entity)
        {
            if (entity != null)
            {
                if (this.OrderTracers == null)
                    this.OrderTracers = new List<OrderTracer>();

                this.OrderTracers.Add(entity);
            }
        }
Beispiel #3
0
        protected virtual OrderTracer GetInspectInv_OrderTracer(string loc, Item item)
        {
            OrderTracer orderTracer = new OrderTracer();
            orderTracer.TracerType = Enumerators.TracerType.InspectInv;
            orderTracer.Code = loc;
            orderTracer.ReqTime = DateTime.Now;
            orderTracer.Item = item;
            orderTracer.Qty = this.GetInvBalance(loc, item, Enumerators.InvType.Inspect);
            orderTracer.Location = loc;

            return orderTracer;
        }
Beispiel #4
0
        protected virtual OrderTracer GetDemand_OrderTracer(ItemFlow itemFlow)
        {
            OrderTracer orderTracer = new OrderTracer();
            orderTracer.TracerType = Enumerators.TracerType.Demand;
            orderTracer.Code = itemFlow.Flow.Code;
            orderTracer.ReqTime = DateTime.Now;
            orderTracer.Item = itemFlow.Item;
            orderTracer.Qty = itemFlow.SafeInv;
            orderTracer.Location = itemFlow.LocTo;  //安全库存设置是目的库位的

            return orderTracer;
        }
Beispiel #5
0
        protected virtual List<OrderTracer> GetOrderIss(string loc, Item item, DateTime? startTime, DateTime? endTime, Enumerators.TracerType tracerType)
        {
            if (Plans == null || Plans.Count == 0)
                return null;

            List<OrderTracer> orderTracerList = new List<OrderTracer>();
            foreach (var p in Plans)
            {
                if (Utilities.StringEq(p.Loc, loc) &&
                        (item != null && item.Equals(p.Item)) &&
                        (!startTime.HasValue || p.ReqTime >= startTime.Value) &&//greater equal
                        (!endTime.HasValue || p.ReqTime < endTime.Value) &&//less than
                        p.IRType == Enumerators.IRType.ISS &&
                        p.PlanType == Enumerators.PlanType.Orders &&
                        p.Status > 0)
                {
                    OrderTracer orderTracer = new OrderTracer();

                    orderTracer.TracerType = tracerType;
                    orderTracer.Code = p.OrderNo;
                    orderTracer.ReqTime = p.ReqTime;
                    orderTracer.Item = p.Item;
                    orderTracer.OrderedQty = p.OrderedQty;
                    orderTracer.FinishedQty = p.FinishedQty;
                    orderTracer.Qty = p.Qty;
                    orderTracer.RefOrderLocTransId = p.ID;
                    orderTracer.Location = p.Loc;
                    orderTracer.str1 = p.str1;
                    orderTracer.str2 = p.str2;
                    orderTracer.str3 = p.str3;
                    orderTracer.str4 = p.str4;
                    orderTracer.str5 = p.str5;
                    orderTracer.str6 = p.str6;
                    orderTracer.str7 = p.str7;
                    orderTracer.str8 = p.str8;
                    orderTracer.str9 = p.str9;
                    orderTracer.int1 = p.int1;
                    orderTracer.int2 = p.int2;
                    orderTracer.int3 = p.int3;
                    orderTracer.int4 = p.int4;
                    orderTracer.int5 = p.int5;
                    orderTracer.dec1 = p.dec1;
                    orderTracer.dec2 = p.dec2;
                    orderTracer.dec3 = p.dec3;
                    orderTracer.dec4 = p.dec4;
                    orderTracer.dec5 = p.dec5;
                    orderTracerList.Add(orderTracer);
                }
            }
            return orderTracerList;
        }
Beispiel #6
0
        protected virtual OrderTracer GetOnhandInv_OrderTracer(string loc, string item)
        {
            OrderTracer orderTracer = new OrderTracer();
            orderTracer.TracerType = Enumerators.TracerType.OnhandInv;
            orderTracer.Code = loc;
            orderTracer.ReqTime = DateTime.Now;
            orderTracer.Item = item;
            orderTracer.Qty = this.GetInvBalance(loc, item, Enumerators.InvType.Normal);

            return orderTracer;
        }