From 410f97bda9bc3e9ae39908102ee7b735290c8b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E8=8D=A3=E5=9B=BD?= Date: Tue, 14 Jun 2022 14:21:37 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20Part=E5=A2=9E=E5=8A=A0QLevel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Parts/PartCreateDto.cs | 8 ++++++++ .../Parts/PartCreateDtoValidator.cs | 1 + .../Parts/PartDTO.cs | 8 ++++++++ .../ScpV1AutoMapperProfile.cs | 2 +- .../src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs | 8 +++++++- .../DbContext/WebApiDbContextModelCreatingExtensions.cs | 1 + .../Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj | 4 ++-- .../Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json | 2 +- 8 files changed, 29 insertions(+), 5 deletions(-) diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs index 73b897b..fbf723f 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs +++ b/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; } + /// + /// 质量等级(Quality level) + /// + [XmlElement("qlevel")] + [Display(Name = "质量等级")] + public string QLevel { get; set; } + + /// /// 地点(Site) /// diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs index 58c2219..ff2001b 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs @@ -21,6 +21,7 @@ public class PartCreateDtoValidator : AbstractValidator 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(); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs index 96e0a16..7843be7 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs +++ b/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; } + /// + /// 质量等级(Quality level) + /// + [XmlElement("qlevel")] + [Display(Name = "质量等级")] + public string QLevel { get; set; } + + /// /// 地点(Site) /// diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs index b294bf9..4f40f61 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs +++ b/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))//默认值 ; } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs index 7f5936e..6d4bbee 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs @@ -96,7 +96,13 @@ namespace Win_in.Sfs.Scp.WebApi /// [Display(Name = "版本")] public string Version {get;set;} - + + /// + /// 质量等级(Quality level) + /// + [Display(Name = "质量等级")] + public string QLevel { get; set; } + /* /// /// 颜色(Color) diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs index 9f45e40..1520316 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/DbContext/WebApiDbContextModelCreatingExtensions.cs +++ b/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); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj index 104bc5e..5f60644 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj @@ -7,8 +7,8 @@ Win_in.Sfs.Scp.WebApi true Win_in.Sfs.Scp.WebApi-4681b4fd-151f-4221-84a4-929d86723e4c - 1.22.0602.1 - 1.22.0602.1 + 1.22.0614.1 + 1.22.0614.1 diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json index 38c6d70..e17d891 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json +++ b/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 } \ No newline at end of file