Esempio n. 1
0
 public void CreateOrderDAT(CreateOrderDAT CreateOrderDAT)
 {
     this.genericMgr.Create(CreateOrderDAT);
 }
Esempio n. 2
0
 private void CreateOrderDAT(OrderMaster orderMaster)
 {
     if (orderMaster.OrderDetails == null || orderMaster.OrderDetails.Count == 0)
     {
         throw new BusinessException("明细为空不能创建。");
     }
     //string FileName = "SEQ1LE" + DateTime.Now.ToString("yyMMddHHmmss");
     foreach (OrderDetail det in orderMaster.OrderDetails.OrderBy(od => od.Sequence).ToList())
     {
         CreateOrderDAT createOrderDAT = new CreateOrderDAT();
         createOrderDAT.OrderNo = det.OrderNo;
         createOrderDAT.MATNR = det.Item;
         createOrderDAT.LIFNR = det.ManufactureParty;
         createOrderDAT.ENMNG = det.OrderedQty.ToString("0.000");
         createOrderDAT.CHARG = orderMaster.TraceCode;
         createOrderDAT.COLOR = string.Empty;
         createOrderDAT.TIME_STAMP = orderMaster.CreateDate.ToString("yyyyMMddHHmmss");
         createOrderDAT.CY_SEQNR = string.Empty;
         createOrderDAT.TIME_STAMP1 = null;
         createOrderDAT.AUFNR = string.Empty;
         //2013-9-30 现在不管新老接口库位都采用les代码,由安吉翻译为sap代码
         createOrderDAT.LGORT = det.LocationFrom;
         createOrderDAT.UMLGO = det.LocationTo;
         //createOrderDAT.LGORT = this.genericMgr.FindById<Location>(det.LocationFrom).SAPLocation;
         //createOrderDAT.UMLGO = this.genericMgr.FindById<Location>(det.LocationTo).SAPLocation;
         //2013-10-08传入工位信息
         createOrderDAT.LGPBE = det.BinTo;
         createOrderDAT.REQ_TIME_STAMP = orderMaster.WindowTime.ToString("yyyyMMddHHmmss");
         createOrderDAT.FLG_SORT = "N";
         createOrderDAT.PLNBEZ = string.Empty;
         createOrderDAT.KTEXT = string.Empty;
         createOrderDAT.ZPLISTNO = det.Id.ToString();
         createOrderDAT.ErrorCount = 0;
         createOrderDAT.IsCreateDat = false;
         createOrderDAT.CreateUserName = det.CreateUserName;
         //createOrderDAT.FileName = FileName;
         this.genericMgr.Create(createOrderDAT);
     }
 }