diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/Win_in.Sfs.Scp.WebApi.Agent.csproj b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/Win_in.Sfs.Scp.WebApi.Agent.csproj index 6697059..9ffbcdc 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/Win_in.Sfs.Scp.WebApi.Agent.csproj +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/Win_in.Sfs.Scp.WebApi.Agent.csproj @@ -1,9 +1,11 @@ - + - - Exe - net5.0 - + + Exe + net5.0 + 1.22.0621.1 + 1.22.0621.1 + @@ -29,11 +31,11 @@ - - - - - + + + + + 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 fbf723f..c6bef2f 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 @@ -71,7 +71,7 @@ public class PartCreateDto : EntityDto,ICanTrace /// [XmlElement("abcClass")] [Display(Name = "ABC类")] - public string AbcClass { get; set; } + public string AbcClass { get; set; } = "Z"; /// /// 产品类(Product Line) 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 ff2001b..b6377d9 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 @@ -15,7 +15,7 @@ public class PartCreateDtoValidator : AbstractValidator RuleFor(x => x.IsMakePart).NotNull(); RuleFor(x => x.IsBuyPart).NotNull(); RuleFor(x => x.Uom).MaximumLength(64).NotNull(); - RuleFor(x => x.AbcClass).MaximumLength(64).NotNull(); + RuleFor(x => x.AbcClass).MaximumLength(64); RuleFor(x => x.ProductLine).MaximumLength(64); RuleFor(x => x.Type).MaximumLength(64); RuleFor(x => x.Catalog).MaximumLength(64); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs index 9bffd73..690dba1 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs @@ -90,7 +90,6 @@ namespace Win_in.Sfs.Scp.WebApi [Route("")] public virtual async Task> CreateAsync(PartCreateDto partCreateDTO) { - var entity = ObjectMapper.Map(partCreateDTO); try 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 91fce87..af1e840 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs @@ -41,7 +41,7 @@ namespace Win_in.Sfs.Scp.WebApi .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.PalletSize, p => p.MapFrom(q => q.AbcClass))//默认值 .ForMember(p => p.Remark, p => p.MapFrom(q => q.Version)) // .ForMember(p => p.Ischeck, p => p.MapFrom(q => false))//默认值 ; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs index d1c0139..84f6c49 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs @@ -36,7 +36,8 @@ namespace Win_in.Sfs.Scp.WebApi CreateMap() .Ignore(p => p.Id) .Ignore(p => p.CreatorId) - .Ignore(p => p.CreationTime); + .Ignore(p => p.CreationTime) + .ForMember(p=>p.AbcClass, p => p.MapFrom(q => string.IsNullOrEmpty(q.AbcClass) ? "Z" : q.AbcClass)); } /// diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/WebApiHttpApiHostModule.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/WebApiHttpApiHostModule.cs index 90bb8d7..9d3c90e 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/WebApiHttpApiHostModule.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/WebApiHttpApiHostModule.cs @@ -44,20 +44,20 @@ using Volo.Abp.Data; namespace Win_in.Sfs.Scp.WebApi { [DependsOn( - typeof(AbpAutofacModule), - typeof(AbpAspNetCoreMultiTenancyModule), - typeof(AbpAspNetCoreMvcUiBasicThemeModule), - typeof(AbpAspNetCoreAuthenticationJwtBearerModule), - typeof(AbpAccountWebIdentityServerModule), - typeof(AbpAspNetCoreSerilogModule), - typeof(AbpSwashbuckleModule), - typeof(AbpMultiTenancyModule), - typeof(AbpBackgroundWorkersModule) + typeof(AbpAutofacModule) + , typeof(AbpAspNetCoreMultiTenancyModule) + , typeof(AbpAspNetCoreMvcUiBasicThemeModule) + , typeof(AbpAspNetCoreAuthenticationJwtBearerModule) + , typeof(AbpAccountWebIdentityServerModule) + , typeof(AbpAspNetCoreSerilogModule) + , typeof(AbpSwashbuckleModule) + , typeof(AbpMultiTenancyModule) + // , typeof(AbpBackgroundWorkersModule) )] [DependsOn( - typeof(WebApiHttpApiModule), - typeof(WebApiApplicationModule), - typeof(WebApiEntityFrameworkCoreModule) + typeof(WebApiHttpApiModule) + , typeof(WebApiApplicationModule) + , typeof(WebApiEntityFrameworkCoreModule) )] [DependsOn( typeof(V1ScpEntityFrameworkCoreModule) @@ -292,7 +292,7 @@ namespace Win_in.Sfs.Scp.WebApi public override void OnApplicationInitialization(ApplicationInitializationContext context) { - context.AddBackgroundWorker(); + // context.AddBackgroundWorker(); var app = context.GetApplicationBuilder(); var env = context.GetEnvironment(); 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 39484fe..9a06bd8 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.0620.1 - 1.22.0620.1 + 1.22.0621.1 + 1.22.0621.1 @@ -31,9 +31,13 @@ + + + + diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaPartRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaPartRepository.cs index b574ceb..ae8ea1d 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaPartRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TaPartRepository.cs @@ -36,6 +36,7 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore current.State = taPart.State; current.Configuration = taPart.Configuration; current.Qlevel = taPart.Qlevel; + current.PalletSize = taPart.PalletSize; current.Remark = taPart.Remark; ret = await UpdateAsync(current);