Browse Source

[FIX]BUG 修复

master
贾荣国 2 years ago
parent
commit
1712675106
  1. 14
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Asns/AsnFactory.cs
  2. 6
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ISA.cs
  3. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj

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

@ -25,7 +25,7 @@ namespace Win_in.Sfs.Scp.WebApi
public ASN_X12_856_3060 CreateAsnX128563060(string receiver,TB_ASN scpAsn,List<TS_BARCODE> barcodes)
{
var asnCode = scpAsn.AsnBillNum;
var asnCode = scpAsn.Id.ToString("000000000");
var senderId = scpAsn.VendId;
var receiverId = receiver;
var shipTime = scpAsn.ShipTime ?? DateTime.Now;
@ -33,17 +33,19 @@ namespace Win_in.Sfs.Scp.WebApi
var envType = ISA.EnvType.P;
var authorization = Authorization;
var security = Security;
//初始化ASN单
var asn = CreateAsn(asnCode,senderId,receiverId,shipTime,envType,authorization,security);
var asn = CreateAsn(asnCode, senderId,receiverId,shipTime,envType,authorization,security);
var functionalGroupCode = scpAsn.AsnBillNum.Right(9);//TODO
var functionalGroupCode = scpAsn.Id.ToString();
//初始化功能组
var functionalGroup = CreateFunctionalGroup(senderId,receiverId,shipTime,functionalGroupCode);
var shipNoticeCode = ShipNoticeCode;
var datetimeType = DatetimeType;
var noticeNumber = scpAsn.AsnBillNum;//完整AsnBillNum
//初始化发货单
var shipNotice = CreateShipNotice(shipNoticeCode,functionalGroupCode,shipTime,datetimeType);
var shipNotice = CreateShipNotice(shipNoticeCode, noticeNumber, shipTime,datetimeType);
var gValue = 0;
var gUom = Uom;
@ -54,9 +56,11 @@ namespace Win_in.Sfs.Scp.WebApi
var mode = Mode;
var equipmentCode = EquipmentCode;
var equipmentNumber = TruckNumber;
var bmRefValue = noticeNumber;
var pkRefValue = noticeNumber;
//初始化发货明细
var shipment = CreateShipment(shipNotice,gValue,gUom,nValue,nUom,routeSequenceCode,identificationCode,mode,
equipmentCode,equipmentNumber,functionalGroupCode,functionalGroupCode,senderId,receiverId);
equipmentCode,equipmentNumber, bmRefValue, pkRefValue, senderId,receiverId);
//计算与添加托盘和尾箱

6
WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ISA.cs

@ -145,14 +145,14 @@ public class ISA
public ISA(string asnCode,string senderId, string receiverId, DateTime datetime, EnvType envType = EnvType.P,
string authorization = "", string security = "")
{
ISA02 = authorization.PadRight(10);
ISA04 = security.PadRight(10);
ISA06 = senderId.PadRight(15);
ISA08 = receiverId.PadRight(15);
ISA09 = datetime.ToString(X12Const.DateFormat);
ISA10 = datetime.ToString(X12Const.TimeFormat);
ISA13 = asnCode.PadRight(9);
ISA13 = asnCode.Right(9).PadRight(9);
ISA15 = envType.ToString();
ISA02 = authorization.PadRight(10);
ISA04 = security.PadRight(10);
}
public override string ToString()

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>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>Win_in.Sfs.Scp.WebApi-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
<AssemblyVersion>1.22.0601.1</AssemblyVersion>
<FileVersion>1.22.0601.1</FileVersion>
<AssemblyVersion>1.22.0602.1</AssemblyVersion>
<FileVersion>1.22.0602.1</FileVersion>
</PropertyGroup>
<ItemGroup>

Loading…
Cancel
Save