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 6635301..a87223e 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 @@ -92,7 +92,7 @@ namespace Win_in.Sfs.Scp.WebApi var barcodes = await scpAsnManager.GetBarcodesAsync(siteCode, asn.AsnBillNum); var asnFactory = new AsnFactory(); var asnX128563060 = - asnFactory.CreateAsnX128563060(_options.Value.Receiver, asn, barcodes); + asnFactory.CreateAsnX128563060(site.Receiver, asn, barcodes); var jsonString = JsonSerializer.Serialize(asnX128563060); var ediString = asnX128563060.ToString(); var asnX12 = new X12Asn(asn.Id, asn.Site, asn.AsnBillNum, jsonString, ediString, 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 836a144..af00dd2 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json @@ -52,14 +52,15 @@ "RetryTimes": 3, "BatchSize": 10, "MaxCount": 100, - "Receiver": "IACNA_ID", "Sites": [ { "Code": "T8", + "Receiver": "00T8USUPPU", "MinUid": 200 }, { "Code": "T5", + "Receiver": "00T5USUPPU", "MinUid": 100 } ] diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/AsnOptions.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/AsnOptions.cs index 758da1d..8e7b683 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/AsnOptions.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/AsnOptions.cs @@ -10,12 +10,12 @@ public class AsnOptions public int BatchSize { get; set; } = 10; public int MaxCount { get; set; } = 100; public List Sites { get; set; } =new() ; - public string Receiver { get; set; } = "IACNA_ID"; public class Site { public string Code { get; set; } public long MinUid { get; set; } + public string Receiver { get; set; } = "IACNA_ID"; } }