예제 #1
0
        /// <summary>
        /// GetSrmDeliveryNoteDetailInfo
        /// </summary>
        /// <param name="noteDetailInfo"></param>
        /// <returns></returns>
        public SrmDeliveryNoteDetailInfo GetSrmDeliveryNoteDetailInfo(BFDASrmPartDetailInfo noteDetailInfo)
        {
            SrmDeliveryNoteDetailInfo detailInfo = new SrmDeliveryNoteDetailInfo();

            ///原始单据号
            detailInfo.Sourceordercode = noteDetailInfo.SourceOrderCode;
            ///物料编号
            detailInfo.Partno = noteDetailInfo.PartNo;
            ///物料描述
            detailInfo.Partcname = noteDetailInfo.PartCName;
            ///数量
            decimal.TryParse(noteDetailInfo.PartQty, out decimal partQty);
            detailInfo.Partqty = partQty;
            ///目标库位
            detailInfo.Targetslcode = noteDetailInfo.TargetSLCode;
            ///包装型号
            detailInfo.Packagecode = noteDetailInfo.PackageCode;
            ///收容数
            decimal.TryParse(noteDetailInfo.SNP, out decimal snp);
            detailInfo.Snp = snp;
            ///备注
            detailInfo.Remark = noteDetailInfo.Remark;
            ///
            return(detailInfo);
        }
예제 #2
0
        /// <summary>
        /// 将中间表转换成临时表
        /// </summary>
        /// <param name="noteInfo"></param>
        /// <returns></returns>
        public SrmDeliveryNoteInfo ConversionToCentreInfo(BFDASrmVmiDeliveryNoteInfo noteInfo)
        {
            ///
            SrmDeliveryNoteInfo info = new SrmDeliveryNoteInfo();

            ///送货单号
            info.Ordercode = noteInfo.OrderCode;
            ///原始单据类型
            int.TryParse(noteInfo.SourceOrderType, out int orderType);
            info.Sourceordertype = orderType;
            ///道口
            info.Dock = noteInfo.Dock;
            ///发单时间
            info.Publishtime = CommonBLL.TryParseDatetime(noteInfo.PublishTime, lesDateTime);
            ///供应商代码
            info.Suppliercode = noteInfo.SupplierCode;
            ///供应商名称
            info.Suppliername = noteInfo.SupplierName;
            ///来源存储区代码
            info.Sourcezoneno = noteInfo.SourceZoneNo;
            ///目标存储区代码
            info.Targetzoneno = noteInfo.TargetZoneNo;
            ///保管员
            info.Keeper = noteInfo.Keeper;
            ///预计发货时间
            if (info.Planshippingtime != null)
            {
                info.Planshippingtime = CommonBLL.TryParseDatetime(noteInfo.PlanShippingTime, lesDateTime);
            }
            if (info.Plandeliverytime != null)
            {
                ///预计到货时间
                info.Plandeliverytime = CommonBLL.TryParseDatetime(noteInfo.PlanDeliveryTime, lesDateTime);
            }

            ///备注
            info.Remark = noteInfo.Remark;
            ///是否紧急
            info.Emergencyflag = noteInfo.EmergencyFlag == "1" ? true : false;
            ///删除标记
            info.Deleteflag = noteInfo.DeleteFlag == "1" ? true : false;
            ///工厂
            info.Plant = noteInfo.Plant;

            info.DetailInfos = new List <SrmDeliveryNoteDetailInfo>();


            foreach (BFDASrmPartDetailInfo noteDetailInfo in noteInfo.DetailInfo)
            {
                SrmDeliveryNoteDetailInfo srmDeliveryNoteDetailInfo = GetSrmDeliveryNoteDetailInfo(noteDetailInfo);
                info.DetailInfos.Add(srmDeliveryNoteDetailInfo);
            }
            ///
            return(info);
        }
예제 #3
0
 /// <summary>
 /// UpdateInfo
 /// </summary>
 /// <param name="info">对象</param>
 /// <returns></returns>
 public bool UpdateInfo(SrmDeliveryNoteDetailInfo info)
 {
     return(dal.Update(info) > 0 ? true : false);
 }
예제 #4
0
 /// <summary>
 /// InsertInfo
 /// </summary>
 /// <param name="info">对象</param>
 /// <returns></returns>
 public long InsertInfo(SrmDeliveryNoteDetailInfo info)
 {
     return(dal.Add(info));
 }