Ejemplo n.º 1
0
        /// <summary>
        /// 把报文表转换成 中间表数据
        /// </summary>
        /// <param name="noteInfo"></param>
        /// <returns></returns>
        public SrmVmiShippingNoteInfo ConversionToCentreInfo(BFDASrmShippingNoteInfo noteInfo)
        {
            ///
            SrmVmiShippingNoteInfo info = new SrmVmiShippingNoteInfo();

            ///工厂代码
            info.Plant = noteInfo.Plant;
            ///发货单号
            info.ShippingCode = noteInfo.ShippingCode;
            ///供应商代码
            info.SupplierCode = noteInfo.SupplierCode;
            ///到货时间
            info.DeliveryTime = CommonBLL.TryParseDatetime(noteInfo.DeliveryTime, lesDateTimeFormat);
            ///VMI仓库代码
            info.VmiWmNo = noteInfo.VmiWarehouseCode;
            ///物料明细
            info.listNoteDetails = new List <SrmVmiShippingNoteDetailInfo>();
            foreach (BFDASrmVmiShippingNotePartInfo srmVmiShippingNotePartInfo in noteInfo.listNotepartInfos)
            {
                SrmVmiShippingNoteDetailInfo noteDetailInfo = new SrmVmiShippingNoteDetailInfo();
                ///物料编号
                noteDetailInfo.Partno = srmVmiShippingNotePartInfo.PartNo;
                ///数量
                decimal.TryParse(srmVmiShippingNotePartInfo.PartQty, out decimal decQty);
                noteDetailInfo.Partqty = decQty;
                ///备注
                noteDetailInfo.Remark = srmVmiShippingNotePartInfo.Remark;
                ///
                info.listNoteDetails.Add(noteDetailInfo);
            }
            ///
            return(info);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// SrmVmiShippingNoteDetailInfo -> WmsVmiInboundOrderDetailInfo
 /// </summary>
 /// <param name="srmVmiShippingNoteDetailInfo"></param>
 /// <param name="wmsVmiInboundOrderDetailInfo"></param>
 public static void GetWmsVmiInboundOrderDetailInfo(SrmVmiShippingNoteDetailInfo srmVmiShippingNoteDetailInfo, ref WmsVmiInboundOrderDetailInfo wmsVmiInboundOrderDetailInfo)
 {
     if (srmVmiShippingNoteDetailInfo == null)
     {
         return;
     }
     ///PARTNO
     wmsVmiInboundOrderDetailInfo.Partno = srmVmiShippingNoteDetailInfo.Partno;
     ///PARTQTY
     wmsVmiInboundOrderDetailInfo.Partqty = srmVmiShippingNoteDetailInfo.Partqty;
 }
 /// <summary>
 /// SrmVmiShippingNoteDetailInfo -> VmiReceiveDetailInfo
 /// </summary>
 /// <param name="vmiShippingNoteDetailInfo"></param>
 /// <param name="vmiReceiveDetailInfo"></param>
 public static void GetVmiReceiveDetailInfo(SrmVmiShippingNoteDetailInfo vmiShippingNoteDetailInfo, ref VmiReceiveDetailInfo vmiReceiveDetailInfo)
 {
     if (vmiShippingNoteDetailInfo == null)
     {
         return;
     }
     ///PART_NO
     vmiReceiveDetailInfo.PartNo = vmiShippingNoteDetailInfo.Partno;
     ///REQUIRED_QTY
     vmiReceiveDetailInfo.RequiredQty = vmiShippingNoteDetailInfo.Partqty;
     ///REQUIRED_BOX_NUM
     if (vmiReceiveDetailInfo.Package.GetValueOrDefault() > 0)
     {
         vmiReceiveDetailInfo.RequiredBoxNum = Convert.ToInt32(Math.Ceiling(vmiShippingNoteDetailInfo.Partqty.GetValueOrDefault() / vmiReceiveDetailInfo.Package.GetValueOrDefault()));
     }
     ///COMMENTS
     vmiReceiveDetailInfo.Comments = vmiShippingNoteDetailInfo.Remark;
 }
 /// <summary>
 /// InsertInfo
 /// </summary>
 /// <param name="info">对象</param>
 /// <returns></returns>
 public long InsertInfo(SrmVmiShippingNoteDetailInfo info)
 {
     return(dal.Add(info));
 }