Browse Source

[fix]edi bug修复

master
贾荣国 2 years ago
parent
commit
ae7d30d48d
  1. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/Win_in.Sfs.Scp.WebApi.Agent.csproj
  2. 16
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Asns/AsnFactory.cs
  3. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs
  4. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/ASN_X12/ISA.cs
  5. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj
  6. 3
      WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaVenderRepository.cs
  7. 1
      WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbReceiptDetailRepository.cs

4
WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/Win_in.Sfs.Scp.WebApi.Agent.csproj

@ -3,8 +3,8 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyVersion>1.22.0706.1</AssemblyVersion> <AssemblyVersion>1.22.0810.1</AssemblyVersion>
<FileVersion>1.22.0706.1</FileVersion> <FileVersion>1.22.0810.1</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

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

@ -27,6 +27,7 @@ namespace Win_in.Sfs.Scp.WebApi
var asnCode = scpAsn.Id.ToString("000000000"); var asnCode = scpAsn.Id.ToString("000000000");
var senderId = scpAsn.VendId; var senderId = scpAsn.VendId;
var chsup = "CHSUP";
var receiverId = receiver; var receiverId = receiver;
var shipTime = scpAsn.ShipTime ?? DateTime.Now; var shipTime = scpAsn.ShipTime ?? DateTime.Now;
@ -35,11 +36,11 @@ namespace Win_in.Sfs.Scp.WebApi
var security = Security; var security = Security;
//初始化ASN单 //初始化ASN单
var asn = CreateAsn(asnCode, senderId,receiverId,shipTime,envType,authorization,security); var asn = CreateAsn(asnCode, chsup, receiverId,shipTime,envType,authorization,security);
var functionalGroupCode = scpAsn.Id.ToString(); var functionalGroupCode = scpAsn.Id.ToString();
//初始化功能组 //初始化功能组
var functionalGroup = CreateFunctionalGroup(senderId,receiverId,shipTime,functionalGroupCode); var functionalGroup = CreateFunctionalGroup(chsup, receiverId,shipTime,functionalGroupCode);
var shipNoticeCode = ShipNoticeCode; var shipNoticeCode = ShipNoticeCode;
var datetimeType = DatetimeType; var datetimeType = DatetimeType;
@ -80,7 +81,7 @@ namespace Win_in.Sfs.Scp.WebApi
p.Key.PoUnit, p.Key.PoUnit,
p.Key.PoBillNum, p.Key.PoBillNum,
p.Key.PackQty, p.Key.PackQty,
BarcodeAndBatchs = p.Select(p =>new BarcodeAndBatch ( p.BarCode, p.Batch)).ToList(), BarcodeAndBatchs = p.Select(p =>new BarcodeAndBatch ( p.Extend2, p.Batch)).ToList(),
}) })
.ToList(); .ToList();
@ -105,12 +106,14 @@ namespace Win_in.Sfs.Scp.WebApi
//添加托盘 //添加托盘
else else
{ {
var tare = CreateTare(palletCode); var tare = CreateTare();
shipment.AddTare(shipNotice,tare); shipment.AddTare(shipNotice,tare);
foreach (var item in items) foreach (var item in items)
{ {
tare.AddItem(shipNotice, item); tare.AddItem(shipNotice, item);
} }
var tareLs = items.Count == 1 ? "4S" + palletCode : "5S" + palletCode;
tare.SetREF_LS(tareLs);
} }
} }
@ -186,11 +189,10 @@ namespace Win_in.Sfs.Scp.WebApi
return shipment; return shipment;
} }
private Tare CreateTare(string tareLabelCode) private Tare CreateTare()
{ {
var tare = new Tare(); var tare = new Tare();
tare.SetHL() tare.SetHL();
.SetREF_LS(tareLabelCode);
return tare; return tare;
} }

4
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs

@ -33,7 +33,7 @@ namespace Win_in.Sfs.Scp.WebApi
.ForMember(p => p.ErpPartCode, p => p.MapFrom(q => q.Code)) .ForMember(p => p.ErpPartCode, p => p.MapFrom(q => q.Code))
.ForMember(p => p.PartDesc1, p => p.MapFrom(q => ""))//中文描述不要覆盖 .ForMember(p => p.PartDesc1, p => p.MapFrom(q => ""))//中文描述不要覆盖
.ForMember(p => p.PartDesc2, p => p.MapFrom(q => string.IsNullOrEmpty(q.Desc1) ? "" : q.Desc1)) .ForMember(p => p.PartDesc2, p => p.MapFrom(q => string.IsNullOrEmpty(q.Desc1) ? "" : q.Desc1))
.ForMember(p => p.ProjectId, p => p.MapFrom(q => q.ProductLine)) .ForMember(p => p.ProjectId, p => p.MapFrom(q => q.Catalog))
.ForMember(p => p.Unit, p => p.MapFrom(q => q.Uom)) .ForMember(p => p.Unit, p => p.MapFrom(q => q.Uom))
.ForMember(p => p.PartGroup, p => p.MapFrom(q => q.Group)) .ForMember(p => p.PartGroup, p => p.MapFrom(q => q.Group))
.ForMember(p => p.State, p => p.MapFrom(q => q.Status)) .ForMember(p => p.State, p => p.MapFrom(q => q.Status))
@ -124,7 +124,7 @@ namespace Win_in.Sfs.Scp.WebApi
.ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) .ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark))
.ForMember(p => p.CreateTime, p => p.MapFrom(q => q.ReceiveTime)) .ForMember(p => p.CreateTime, p => p.MapFrom(q => q.ReceiveTime))
.ForMember(p => p.CreateUser, p => p.MapFrom(q => "WebApi")) .ForMember(p => p.CreateUser, p => p.MapFrom(q => "WebApi"))
.ForMember(p => p.Extend3,p=>p.MapFrom(q=>q.AsnNumber))
// .ForMember(p => p.IsDeleted, p => p.MapFrom(q => false))//默认值 // .ForMember(p => p.IsDeleted, p => p.MapFrom(q => false))//默认值
.ForMember(p => p.GUID, p => p.MapFrom(q => Guid.NewGuid()))//默认值 .ForMember(p => p.GUID, p => p.MapFrom(q => Guid.NewGuid()))//默认值
.ForMember(p => p.BillType, p => p.MapFrom(q => string.IsNullOrWhiteSpace(q.RcType) ? 0 : 1))//0:收货 1:退货 .ForMember(p => p.BillType, p => p.MapFrom(q => string.IsNullOrWhiteSpace(q.RcType) ? 0 : 1))//0:收货 1:退货

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

@ -47,7 +47,7 @@ public class ISA
/// 发送者ID限定符 /// 发送者ID限定符
/// </summary> /// </summary>
[StringLength(2, MinimumLength = 2)] [StringLength(2, MinimumLength = 2)]
public string ISA05 { get; } = "01"; public string ISA05 { get; } = "ZZ";
/// <summary> /// <summary>
/// Interchange Sender ID /// Interchange Sender ID

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.0719.1</AssemblyVersion> <AssemblyVersion>1.22.0803.1</AssemblyVersion>
<FileVersion>1.22.0719.1</FileVersion> <FileVersion>1.22.0803.1</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

3
WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaVenderRepository.cs

@ -23,6 +23,9 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore
if (current == null) if (current == null)
{ {
//新增供应商默认状态为不启用
taVender.State = 0;
ret = await InsertAsync(taVender); ret = await InsertAsync(taVender);
} }
else else

1
WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbReceiptDetailRepository.cs

@ -41,6 +41,7 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore
current.PoUnit = tbReceiptDetail.PoUnit; current.PoUnit = tbReceiptDetail.PoUnit;
current.LocUnit = tbReceiptDetail.LocUnit; current.LocUnit = tbReceiptDetail.LocUnit;
current.Rate = tbReceiptDetail.Rate; current.Rate = tbReceiptDetail.Rate;
current.Extend3 = tbReceiptDetail.Extend3;
ret = await UpdateAsync(current); ret = await UpdateAsync(current);
} }

Loading…
Cancel
Save