|
|
@ -31,8 +31,8 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.Site, p => p.MapFrom(q => q.Site)) |
|
|
|
.ForMember(p => p.PartCode, p => p.MapFrom(q => q.Code)) |
|
|
|
.ForMember(p => p.ErpPartCode, p => p.MapFrom(q => q.Code)) |
|
|
|
.ForMember(p => p.PartDesc1, p => p.MapFrom(q =>string.IsNullOrEmpty(q.Desc2)?"":q.Desc2)) |
|
|
|
.ForMember(p => p.PartDesc2, p => p.MapFrom(q =>string.IsNullOrEmpty(q.Desc1)?"":q.Desc1)) |
|
|
|
// .ForMember(p => p.PartDesc1, p => p.MapFrom(q => ""))//中文描述不要覆盖
|
|
|
|
.ForMember(p => p.PartDesc2, p => p.MapFrom(q => string.IsNullOrEmpty(q.Desc1) ? "" : q.Desc1)) |
|
|
|
.ForMember(p => p.ProjectId, p => p.MapFrom(q => q.ProductLine)) |
|
|
|
.ForMember(p => p.Unit, p => p.MapFrom(q => q.Uom)) |
|
|
|
.ForMember(p => p.PartGroup, p => p.MapFrom(q => q.Group)) |
|
|
@ -40,7 +40,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.Configuration, p => p.MapFrom(q => q.Type))//TODO
|
|
|
|
.ForMember(p => p.ValidityDays, p => p.MapFrom(q => 0))//默认值
|
|
|
|
.ForMember(p => p.ReceivePort, p => p.MapFrom(q => q.Desc2))//默认值
|
|
|
|
.ForMember(p=>p.Qlevel,p=>p.MapFrom(q=>q.QLevel)) |
|
|
|
.ForMember(p => p.Qlevel, p => p.MapFrom(q => q.QLevel)) |
|
|
|
// .ForMember(p => p.PalletSize, p => p.MapFrom(q => ""))//默认值
|
|
|
|
.ForMember(p => p.Remark, p => p.MapFrom(q => q.Version)) |
|
|
|
// .ForMember(p => p.Ischeck, p => p.MapFrom(q => false))//默认值
|
|
|
@ -55,16 +55,15 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
{ |
|
|
|
CreateMap<Supplier, TA_VENDER>() |
|
|
|
.Ignore(p => p.Id) |
|
|
|
.ForMember(p => p.Site, p => p.MapFrom(q => q.Company))//TODO 接口没有传入Site
|
|
|
|
.ForMember(p => p.Site, p => p.MapFrom(q => q.Company))//接口没有传入Site
|
|
|
|
.ForMember(p => p.VendId, p => p.MapFrom(q => q.Code)) |
|
|
|
.ForMember(p => p.VendName, p => p.MapFrom(q => q.Desc)) |
|
|
|
.ForMember(p => p.VendAbbCode, p => p.MapFrom(q=>"0"))//未使用
|
|
|
|
.ForMember(p => p.ZipCode, p => p.MapFrom(q => q.Desc)) //英文描述放到ZipCode中
|
|
|
|
.ForMember(p => p.VendAbbCode, p => p.MapFrom(q => "0"))//未使用
|
|
|
|
.ForMember(p => p.VendType, p => p.MapFrom(q => ""))//默认值未空
|
|
|
|
.ForMember(p => p.Country, p => p.MapFrom(q => q.Country)) |
|
|
|
.ForMember(p => p.City, p => p.MapFrom(q => q.City)) |
|
|
|
.ForMember(p => p.Currency, p => p.MapFrom(q => q.Currency)) |
|
|
|
.ForMember(p => p.Address, p => p.MapFrom(q => q.Address)) |
|
|
|
.ForMember(p => p.ZipCode, p => p.MapFrom(q => q.PostId)) |
|
|
|
.ForMember(p => p.Contacter, p => p.MapFrom(q => q.ContactName)) |
|
|
|
.ForMember(p => p.Phone, p => p.MapFrom(q => q.Phone)) |
|
|
|
.ForMember(p => p.Fax, p => p.MapFrom(q => q.Fax)) |
|
|
@ -72,8 +71,8 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.State, p => p.MapFrom(q => q.IsActive ? 1 : 0))//1:有效,2:无效
|
|
|
|
.ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) |
|
|
|
.ForMember(p => p.Tax, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.ReceiveTimeScope, p => p.MapFrom(q =>0))//默认值
|
|
|
|
// .ForMember(p => p.Quota, p => p.MapFrom(q =>0))//默认值
|
|
|
|
// .ForMember(p => p.ReceiveTimeScope, p => p.MapFrom(q =>0))//默认值
|
|
|
|
// .ForMember(p => p.Quota, p => p.MapFrom(q =>0))//默认值
|
|
|
|
; |
|
|
|
} |
|
|
|
|
|
|
@ -90,7 +89,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.ErpRecvBillNum, p => p.MapFrom(q => q.RcNumber)) |
|
|
|
.ForMember(p => p.RecvBillNum, p => p.MapFrom(q => q.RcNumber)) |
|
|
|
.ForMember(p => p.PoBillNum, p => p.MapFrom(q => q.PoNumber)) |
|
|
|
.ForMember(p => p.AsnBillNum, p => p.MapFrom(q => string.IsNullOrEmpty(q.AsnNumber)?"":q.AsnNumber)) |
|
|
|
.ForMember(p => p.AsnBillNum, p => p.MapFrom(q => string.IsNullOrEmpty(q.AsnNumber) ? "" : q.AsnNumber)) |
|
|
|
.ForMember(p => p.VendId, p => p.MapFrom(q => q.SupplierCode)) |
|
|
|
// .ForMember(p => p.ShipTime, p => p.MapFrom(q => DateTime.MinValue))//默认值
|
|
|
|
.ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理
|
|
|
@ -117,7 +116,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.PoBillNum, p => p.MapFrom(q => q.PoNumber)) |
|
|
|
.ForMember(p => p.PoLine, p => p.MapFrom(q => int.TryParse(q.PoLine, out poLine) ? poLine : 0)) |
|
|
|
.ForMember(p => p.PartCode, p => p.MapFrom(q => q.PartCode)) |
|
|
|
.ForMember(p => p.Batch, p => p.MapFrom(q => string.IsNullOrEmpty(q.Lot)?"":q.Lot)) |
|
|
|
.ForMember(p => p.Batch, p => p.MapFrom(q => string.IsNullOrEmpty(q.Lot) ? "" : q.Lot)) |
|
|
|
.ForMember(p => p.Qty, p => p.MapFrom(q => q.ReceiveQty)) |
|
|
|
.ForMember(p => p.DockCode, p => p.MapFrom(q => q.Dock)) |
|
|
|
.ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理
|
|
|
@ -128,7 +127,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
// .ForMember(p => p.IsDeleted, p => p.MapFrom(q => false))//默认值
|
|
|
|
.ForMember(p => p.GUID, p => p.MapFrom(q => Guid.NewGuid()))//默认值
|
|
|
|
.ForMember(p => p.BillType, p => p.MapFrom(q => string.IsNullOrWhiteSpace(q.RcType) ? 0 : 1))//0:收货 1:退货
|
|
|
|
.ForMember(p => p.VendBatch, p => p.MapFrom(q => string.IsNullOrEmpty(q.SupplierLot)?"":q.SupplierLot)) |
|
|
|
.ForMember(p => p.VendBatch, p => p.MapFrom(q => string.IsNullOrEmpty(q.SupplierLot) ? "" : q.SupplierLot)) |
|
|
|
.ForMember(p => p.PoUnit, p => p.MapFrom(q => q.Uom)) |
|
|
|
.ForMember(p => p.LocUnit, p => p.MapFrom(q => q.Uom)) |
|
|
|
.ForMember(p => p.PurCost, p => p.MapFrom(q => 0))//默认值
|
|
|
@ -136,10 +135,10 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.Rate, p => p.MapFrom(q => q.SupplierPackConvertRate)) |
|
|
|
.ForMember(p => p.CurAmt, p => p.MapFrom(q => 0))//默认值
|
|
|
|
.ForMember(p => p.Tax, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.Extend1, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend2, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend3, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.SubSite, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend1, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend2, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend3, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.SubSite, p => p.MapFrom(q => ""))//默认值
|
|
|
|
; |
|
|
|
} |
|
|
|
|
|
|
@ -164,8 +163,8 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.BuyerPhone, p => p.MapFrom(q => q.ContactPhone)) |
|
|
|
.ForMember(p => p.State, p => p.MapFrom(q => q.Status)) |
|
|
|
.ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) |
|
|
|
.ForMember(p => p.BeginTime, p => p.MapFrom(q =>q.OrderDate)) |
|
|
|
.ForMember(p => p.EndTime, p => p.MapFrom(q =>q.DueDate)) |
|
|
|
.ForMember(p => p.BeginTime, p => p.MapFrom(q => q.OrderDate)) |
|
|
|
.ForMember(p => p.EndTime, p => p.MapFrom(q => q.DueDate)) |
|
|
|
// .ForMember(p => p.Extend1, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend2, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend3, p => p.MapFrom(q => ""))//默认值
|
|
|
@ -231,7 +230,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
.ForMember(p => p.PoBillNum, p => p.MapFrom(q => "")) |
|
|
|
.ForMember(p => p.AsnBillNum, p => p.MapFrom(q => q.Order)) |
|
|
|
.ForMember(p => p.VendId, p => p.MapFrom(q => q.Address))//默认值
|
|
|
|
// .ForMember(p => p.ShipTime, p => p.MapFrom(q => DateTime.MinValue))//默认值
|
|
|
|
// .ForMember(p => p.ShipTime, p => p.MapFrom(q => DateTime.MinValue))//默认值
|
|
|
|
.ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理
|
|
|
|
.ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) |
|
|
|
.ForMember(p => p.CreateTime, p => p.MapFrom(q => q.EffectiveDate)) |
|
|
@ -243,7 +242,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
// .ForMember(p => p.OperName, p => p.MapFrom(q => ""))//默认值
|
|
|
|
|
|
|
|
//.ForMember(p => p.BillType, p => p.MapFrom(q => string.IsNullOrWhiteSpace(q.TrType) ? 0 : 1))//0:收货 1:退货
|
|
|
|
.ForMember(p => p.BillType, p => p.MapFrom(q=>0)) |
|
|
|
.ForMember(p => p.BillType, p => p.MapFrom(q => 0)) |
|
|
|
// .ForMember(p => p.Tax, p => p.MapFrom(q => 0))//默认值
|
|
|
|
; |
|
|
|
|
|
|
@ -265,7 +264,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
// .ForMember(p => p.IsDeleted, p => p.MapFrom(q => false))//默认值
|
|
|
|
.ForMember(p => p.GUID, p => p.MapFrom(q => Guid.NewGuid()))//默认值
|
|
|
|
|
|
|
|
|
|
|
|
//.ForMember(p => p.BillType, p => p.MapFrom(q => string.IsNullOrWhiteSpace(q.TrType) ? 0 : 1))//0:收货 1:退货
|
|
|
|
.ForMember(p => p.BillType, p => p.MapFrom(q => 0)) |
|
|
|
|
|
|
@ -275,13 +274,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
.ForMember(p => p.PurCost, p => p.MapFrom(q => 0))//默认值
|
|
|
|
.ForMember(p => p.StdCost, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.Rate, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.Rate, p => p.MapFrom(q => 0))//默认值
|
|
|
|
.ForMember(p => p.CurAmt, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.Tax, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.Extend1, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend2, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend3, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.SubSite, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Tax, p => p.MapFrom(q => 0))//默认值
|
|
|
|
// .ForMember(p => p.Extend1, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend2, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.Extend3, p => p.MapFrom(q => ""))//默认值
|
|
|
|
// .ForMember(p => p.SubSite, p => p.MapFrom(q => ""))//默认值
|
|
|
|
; |
|
|
|
} |
|
|
|
} |
|
|
|