|
@ -66,13 +66,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
/// 仓库(Warehouse code)
|
|
|
/// 仓库(Warehouse code)
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Display(Name = "仓库(Warehouse)")] |
|
|
[Display(Name = "仓库(Warehouse)")] |
|
|
public decimal Warehouse { set; get; } |
|
|
public string Warehouse { set; get; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 收货口(Warehouse Dock)
|
|
|
/// 收货口(Warehouse Dock)
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Display(Name = "收货口(WarehouseDock)")] |
|
|
[Display(Name = "收货口(Dock)")] |
|
|
public string WarehouseDock { set; get; } |
|
|
public string Dock { set; get; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 时间窗口开始(Time Window Begin)
|
|
|
/// 时间窗口开始(Time Window Begin)
|
|
@ -111,9 +111,33 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
public bool IsRead { set; get; } |
|
|
public bool IsRead { set; get; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual List<ASNDetail> ASNDetails { get; set; } |
|
|
public virtual List<ASNDetail> Details { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
protected ASN() { } |
|
|
|
|
|
|
|
|
|
|
|
public ASN(string asnNumber,string rpNumber,string poNumber,string supplierCode, string site, |
|
|
|
|
|
string company, string warehouse, string dock,DateTime timeWindowBegin,DateTime timeWindowEnd, |
|
|
|
|
|
string contactName, string contactPhone, string carNumber, string remark) |
|
|
|
|
|
{ |
|
|
|
|
|
AsnNumber = asnNumber; |
|
|
|
|
|
RpNumber = rpNumber; |
|
|
|
|
|
PoNumber = poNumber; |
|
|
|
|
|
SupplierCode = supplierCode; |
|
|
|
|
|
Site = site; |
|
|
|
|
|
Company = company; |
|
|
|
|
|
Warehouse = warehouse; |
|
|
|
|
|
Dock = dock; |
|
|
|
|
|
TimeWindowBegin = timeWindowBegin; |
|
|
|
|
|
TimeWindowEnd = timeWindowEnd; |
|
|
|
|
|
ContactName = contactName; |
|
|
|
|
|
ContactPhone = contactPhone; |
|
|
|
|
|
CarNumber = carNumber; |
|
|
|
|
|
Remark = remark; |
|
|
|
|
|
Status = 0;//TODO 改成枚举
|
|
|
|
|
|
IsRead = false; |
|
|
|
|
|
Details = new List<ASNDetail>(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#region details handler
|
|
|
#region details handler
|
|
|
public virtual void AddDetail(IGuidGenerator guidGenerator, ASNDetail detail) |
|
|
public virtual void AddDetail(IGuidGenerator guidGenerator, ASNDetail detail) |
|
@ -125,7 +149,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
throw new Exception(detail.PoNumber + detail.PoLine + "已经在明细中存在!"); |
|
|
throw new Exception(detail.PoNumber + detail.PoLine + "已经在明细中存在!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ASNDetails.Add(new ASNDetail(guidGenerator.Create(), detail.AsnNumber, detail.PoNumber, detail.PoLine, detail.PartCode, detail.Lot, detail.SupplierLot, detail.ProductionDate, |
|
|
Details.Add(new ASNDetail(guidGenerator.Create(), detail.AsnNumber, detail.PoNumber, detail.PoLine, detail.PartCode, detail.Lot, detail.SupplierLot, detail.ProductionDate, |
|
|
detail.Uom, detail.DeliverQty, detail.StdPackUom, detail.StdPackQty, detail.SupplierPackUom,detail.SupplierPackQty,detail.SupplierPackConvertRate, detail.LabelCode,detail.BarCode,detail.PalletLabelCode)); |
|
|
detail.Uom, detail.DeliverQty, detail.StdPackUom, detail.StdPackQty, detail.SupplierPackUom,detail.SupplierPackQty,detail.SupplierPackConvertRate, detail.LabelCode,detail.BarCode,detail.PalletLabelCode)); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -143,12 +167,12 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
|
public virtual bool IsInDetails(string ponumber, string poline) |
|
|
public virtual bool IsInDetails(string ponumber, string poline) |
|
|
{ |
|
|
{ |
|
|
return ASNDetails.Any(di => di.PoNumber == ponumber && di.PoLine == poline); |
|
|
return Details.Any(di => di.PoNumber == ponumber && di.PoLine == poline); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual bool IsInDetails(Guid itemId) |
|
|
public virtual bool IsInDetails(Guid itemId) |
|
|
{ |
|
|
{ |
|
|
return ASNDetails.Any(di => di.Id == itemId); |
|
|
return Details.Any(di => di.Id == itemId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual bool UpdateDetail(IGuidGenerator guidGenerator, ASNDetail detail) |
|
|
public virtual bool UpdateDetail(IGuidGenerator guidGenerator, ASNDetail detail) |
|
@ -173,7 +197,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
|
public virtual ASNDetail FindDetail(Guid itemId) |
|
|
public virtual ASNDetail FindDetail(Guid itemId) |
|
|
{ |
|
|
{ |
|
|
var item = ASNDetails.FirstOrDefault(p => p.Id == itemId); |
|
|
var item = Details.FirstOrDefault(p => p.Id == itemId); |
|
|
return item; |
|
|
return item; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|