Browse Source

[fix]Receiver 放到Site中

master
贾荣国 2 years ago
parent
commit
89d7c587dc
  1. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs
  2. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json
  3. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/AsnOptions.cs

2
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,

3
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
}
]

2
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<Site> 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";
}
}

Loading…
Cancel
Save