diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs index 5382ad6..74b4861 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs @@ -229,7 +229,7 @@ namespace Win_in.Sfs.Scp.WebApi var jsonString = JsonSerializer.Serialize(asnMstr); var ediString = jsonString; var asnX12 = new X12Asn(asn.Id, asn.Site, asn.AsnBillNum, ScpWebApiConsts.NO_PO_ASN, jsonString, ediString, - asn.ShipTime ?? DateTime.Today); + asn.ShipTime ?? DateTime.Today,asn.WebSubSite); return asnX12; } private static X12Asn CreateX12Asn(AsnOptions.Site site, TB_ASN asn, List barcodes) @@ -240,7 +240,7 @@ namespace Win_in.Sfs.Scp.WebApi var jsonString = JsonSerializer.Serialize(asnX128563060); var ediString = asnX128563060.ToString(); var asnX12 = new X12Asn(asn.Id, asn.Site, asn.AsnBillNum, ScpWebApiConsts.ASN, jsonString, ediString, - asn.ShipTime ?? DateTime.Today); + asn.ShipTime ?? DateTime.Today, asn.WebSubSite); return asnX12; } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json index 3d4b8df..7ab6257 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json @@ -59,7 +59,7 @@ "Password": "f0475092-c891-4d36-b2c1-dfd39fa0e436", "Sites": [ { - "Code": "T8", + "Code": "3015", "Receiver": "00T8USUPPU", "MinUid": 1024 } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Asns/AsnMstrDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Asns/AsnMstrDTO.cs index f940aae..e9daa08 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Asns/AsnMstrDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Asns/AsnMstrDTO.cs @@ -106,6 +106,8 @@ namespace Win_in.Sfs.Scp.WebApi /// public virtual string Remark { get; set; } + public virtual string Subsite { get; set; } + public virtual List Details { get; set; } = new List(); } } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Asns/X12Asn.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Asns/X12Asn.cs index 48c9351..dba1248 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Asns/X12Asn.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Asns/X12Asn.cs @@ -84,13 +84,14 @@ public class X12Asn: EntityBase public int RetryTimes { get; protected internal set; } = 0; + public string SubSite { get; set; } public X12Asn() { } - public X12Asn(long uid,string site,string billNum,string dataType,string jsonString,string ediString,DateTime effectiveDate) + public X12Asn(long uid,string site,string billNum,string dataType,string jsonString,string ediString,DateTime effectiveDate,string subsite) { UID = uid; Site = site; @@ -102,6 +103,7 @@ public class X12Asn: EntityBase DestinationSystem = "QAD"; SourceSystem = "SCP"; Writer = "SCP"; + SubSite = subsite; } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs index 0035e5a..6d3c923 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs @@ -304,6 +304,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore b.Property(q => q.ReadTime); b.Property(q => q.Reader).HasMaxLength(16); b.Property(q => q.Remark); + b.Property(q => q.SubSite); b.HasIndex(q => new { q.Site, q.UID }).IsUnique(); }); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json index 46c229d..a4fa68c 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json @@ -88,7 +88,7 @@ "Receiver": "IACNA_ID", "Sites": [ { - "Code": "T8", + "Code": "3015", "MinUid": 200 }, {