Browse Source

[fix]修改SE01计数方式,包含ST,SE

master
贾荣国 2 years ago
parent
commit
61311d01b9
  1. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Asns/AsnFactory.cs
  2. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ShipNotices/SE.cs
  3. 28
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ShipNotices/ShipNoticeExtensions.cs
  4. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj

3
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Asns/AsnFactory.cs

@ -160,7 +160,8 @@ namespace Win_in.Sfs.Scp.WebApi
.SetST(shipNoticeCode) .SetST(shipNoticeCode)
.SetBSN(noticeNumber, datetime, purpose) .SetBSN(noticeNumber, datetime, purpose)
.SetDTM(datetime, datetimeType); .SetDTM(datetime, datetimeType);
shipNotice.AddSegment(4);
shipNotice.AddSegment(5);
return shipNotice; return shipNotice;
} }

4
WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ShipNotices/SE.cs

@ -13,7 +13,7 @@ public class SE
/// 段落数量 /// 段落数量
/// </summary> /// </summary>
[StringLength(9,MinimumLength = 1)] [StringLength(9,MinimumLength = 1)]
public string SE01 { get; set; } = "1"; public string SE01 { get; set; }
/// <summary> /// <summary>
/// Transaction Set Control Number /// Transaction Set Control Number
@ -27,7 +27,7 @@ public class SE
} }
public SE(string transactionCode ,int segmentCount = 1) public SE(string transactionCode ,int segmentCount)
{ {
SE01 = segmentCount.ToString(); SE01 = segmentCount.ToString();
SE02 = transactionCode; SE02 = transactionCode;

28
WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ShipNotices/ShipNoticeExtensions.cs

@ -4,36 +4,40 @@ namespace Win_in.Sfs.Scp.WebApi.Asns;
public static class ShipNoticeExtensions public static class ShipNoticeExtensions
{ {
public static ShipNotice SetST(this ShipNotice shipNotice,string shipNoticeCode) public static ShipNotice SetST(this ShipNotice shipNotice, string shipNoticeCode)
{ {
shipNotice.ST = new ST(shipNoticeCode); shipNotice.ST = new ST(shipNoticeCode);
return shipNotice; return shipNotice;
} }
public static ShipNotice SetBSN(this ShipNotice shipNotice,string noticeNumber, DateTime datetime, string purpose = "00") public static ShipNotice SetBSN(this ShipNotice shipNotice, string noticeNumber, DateTime datetime, string purpose = "00")
{ {
shipNotice.BSN = new BSN(noticeNumber, datetime, purpose); shipNotice.BSN = new BSN(noticeNumber, datetime, purpose);
return shipNotice; } return shipNotice;
}
public static ShipNotice SetDTM(this ShipNotice shipNotice, DateTime dateTime,string datetimeType="011") public static ShipNotice SetDTM(this ShipNotice shipNotice, DateTime dateTime, string datetimeType = "011")
{ {
shipNotice.DTM = new DTM(dateTime, datetimeType); shipNotice.DTM = new DTM(dateTime, datetimeType);
return shipNotice;} return shipNotice;
}
public static ShipNotice AddShipment(this ShipNotice shipNotice,Shipment shipment)
public static ShipNotice AddShipment(this ShipNotice shipNotice, Shipment shipment)
{ {
shipNotice.Shipment = shipment; shipNotice.Shipment = shipment;
return shipNotice;} return shipNotice;
}
public static ShipNotice SetCTT(this ShipNotice shipNotice) public static ShipNotice SetCTT(this ShipNotice shipNotice)
{ {
shipNotice.CTT = new CTT(shipNotice.HlCount,shipNotice.HashTotal); shipNotice.CTT = new CTT(shipNotice.HlCount, shipNotice.HashTotal);
return shipNotice; return shipNotice;
} }
public static ShipNotice SetSE(this ShipNotice shipNotice, string shipNoticeCode) public static ShipNotice SetSE(this ShipNotice shipNotice, string shipNoticeCode)
{ {
shipNotice.SE = new SE(shipNoticeCode,shipNotice.SegmentCount); shipNotice.SE = new SE(shipNoticeCode, shipNotice.SegmentCount);
return shipNotice; } return shipNotice;
}
} }

4
WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj

@ -7,8 +7,8 @@
<RootNamespace>Win_in.Sfs.Scp.WebApi</RootNamespace> <RootNamespace>Win_in.Sfs.Scp.WebApi</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences> <PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>Win_in.Sfs.Scp.WebApi-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId> <UserSecretsId>Win_in.Sfs.Scp.WebApi-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
<AssemblyVersion>1.22.0615.1</AssemblyVersion> <AssemblyVersion>1.22.0620.1</AssemblyVersion>
<FileVersion>1.22.0615.1</FileVersion> <FileVersion>1.22.0620.1</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

Loading…
Cancel
Save