Browse Source

[fix] Part增加QLevel

master
贾荣国 2 years ago
parent
commit
410f97bda9
  1. 8
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs
  2. 1
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs
  3. 8
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs
  4. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs
  5. 6
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs
  6. 1
      WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs
  7. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj
  8. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json

8
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs

@ -108,6 +108,14 @@ public class PartCreateDto : EntityDto,ICanTrace
[Display(Name = "版本")]
public string Version { get; set; }
/// <summary>
/// 质量等级(Quality level)
/// </summary>
[XmlElement("qlevel")]
[Display(Name = "质量等级")]
public string QLevel { get; set; }
/// <summary>
/// 地点(Site)
/// </summary>

1
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs

@ -21,6 +21,7 @@ public class PartCreateDtoValidator : AbstractValidator<PartCreateDto>
RuleFor(x => x.Catalog).MaximumLength(64);
RuleFor(x => x.Group).MaximumLength(64);
RuleFor(x => x.Version).MaximumLength(64);
RuleFor(x => x.QLevel).MaximumLength(64);
RuleFor(x => x.Site).MaximumLength(64).NotEmpty();
RuleFor(x => x.Company).MaximumLength(64).NotEmpty();
RuleFor(x => x.TraceId).MaximumLength(64).NotEmpty();

8
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs

@ -113,6 +113,14 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "版本")]
public string Version { get; set; }
/// <summary>
/// 质量等级(Quality level)
/// </summary>
[XmlElement("qlevel")]
[Display(Name = "质量等级")]
public string QLevel { get; set; }
/// <summary>
/// 地点(Site)
/// </summary>

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

@ -40,9 +40,9 @@ namespace Win_in.Sfs.Scp.WebApi
.ForMember(p => p.Configuration, p => p.MapFrom(q => q.Type))//TODO
.ForMember(p => p.ValidityDays, p => p.MapFrom(q => 0))//默认值
.ForMember(p => p.ReceivePort, p => p.MapFrom(q => q.Desc2))//默认值
.ForMember(p=>p.Qlevel,p=>p.MapFrom(q=>q.QLevel))
// .ForMember(p => p.PalletSize, p => p.MapFrom(q => ""))//默认值
.ForMember(p => p.Remark, p => p.MapFrom(q => q.Version))
// .ForMember(p => p.Qlevel, p => p.MapFrom(q => ""))//默认值
// .ForMember(p => p.Ischeck, p => p.MapFrom(q => false))//默认值
;
}

6
WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs

@ -97,6 +97,12 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "版本")]
public string Version {get;set;}
/// <summary>
/// 质量等级(Quality level)
/// </summary>
[Display(Name = "质量等级")]
public string QLevel { get; set; }
/*
/// <summary>
/// 颜色(Color)

1
WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs

@ -79,6 +79,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.Property(x => x.Catalog).HasMaxLength(64);
b.Property(x => x.Group).HasMaxLength(64);
b.Property(x => x.Version).HasMaxLength(64);
b.Property(x => x.QLevel).HasMaxLength(64);
b.Property(x => x.Site).IsRequired().HasMaxLength(64);
b.Property(x => x.Company).IsRequired().HasMaxLength(64);
b.Property(x => x.TraceId).IsRequired().HasMaxLength(64);

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.0602.1</AssemblyVersion>
<FileVersion>1.22.0602.1</FileVersion>
<AssemblyVersion>1.22.0614.1</AssemblyVersion>
<FileVersion>1.22.0614.1</FileVersion>
</PropertyGroup>
<ItemGroup>

2
WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json

@ -87,5 +87,5 @@
"Receiver": "IACNA_ID",
"Sites": [ "T8", "T5" ]
},
"AlwaysAllowAuthorization": true
"AlwaysAllowAuthorization": false
}
Loading…
Cancel
Save