From 89d7c587dc1dc6a791af3c27652796c8b47e7217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E8=8D=A3=E5=9B=BD?= Date: Wed, 22 Jun 2022 09:26:43 +0800 Subject: [PATCH] =?UTF-8?q?[fix]Receiver=20=E6=94=BE=E5=88=B0Site=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AsnBackgroundWorker/AsnBackgroundWorker.cs | 2 +- WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json | 3 ++- .../src/Win_in.Sfs.Scp.WebApi.Domain.Shared/AsnOptions.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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"; } }