From 11270b29e9933a5b2889a750a642d168095ddc9d Mon Sep 17 00:00:00 2001 From: qian Date: Wed, 20 Nov 2024 09:10:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99subsite=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AsnBackgroundWorker/AsnBackgroundWorker.cs | 4 ++-- .../src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json | 2 +- .../Asns/AsnMstrDTO.cs | 2 ++ WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Asns/X12Asn.cs | 4 +++- .../DbContext/WebApiDbContextModelCreatingExtensions.cs | 1 + .../src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json | 2 +- 6 files changed, 10 insertions(+), 5 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 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 }, {