Browse Source

[fix]调整 Part 和 Supplier 的属性Mapper

master
贾荣国 2 years ago
parent
commit
66eec1143d
  1. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs
  2. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj
  3. 3
      WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaVenderRepository.cs

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

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

Loading…
Cancel
Save