diff --git a/src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs b/src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs index c54a1d9..3784af6 100644 --- a/src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs +++ b/src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs @@ -147,6 +147,14 @@ namespace Shentun.Peis.OccupationalDiseases List patientPoisonList = new List(); foreach (var item in patientPoisonsInput) { + if (patientPoisonList.Select(s => s.PoisonId).Contains(item.PoisonId)) + { + string errPoisonName = ""; + var errPoison = await _poisonRepository.FirstOrDefaultAsync(f => f.Id == item.PoisonId); + if (errPoison != null) + errPoisonName = errPoison.DisplayName; + throw new UserFriendlyException($"接害因素{errPoisonName}不能重复选择"); + } patientPoisonList.Add(new PatientPoison { PatientRegisterId = input.PatientRegisterId, diff --git a/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs b/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs index a928ca1..da5e4b0 100644 --- a/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs +++ b/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs @@ -64,6 +64,7 @@ using Volo.Abp.BackgroundWorkers; using Shentun.Peis.Schedulers; using System.Threading.Tasks; using Shentun.Peis.ThirdInterfaces; +using Microsoft.AspNetCore.Server.Kestrel.Core; namespace Shentun.Peis; [DependsOn( @@ -135,14 +136,16 @@ public class PeisHttpApiHostModule : AbpModule opt.Password.RequiredLength = 1; }); - ////密码策略配置 - //context.Services.Configure(opt => + + + //context.Services.Configure(opt => + //{ + // opt.MaxRequestBodySize = 52428800; + //}); + + //context.Services.Configure(opt => //{ - // opt.Password.RequireDigit = false; - // opt.Password.RequireLowercase = false; - // opt.Password.RequireUppercase = false; - // opt.Password.RequireNonAlphanumeric = false; - // opt.Password.RequiredLength = 1; + // opt.Limits.MaxRequestBodySize = 52428800; //}); #region 临时去掉日志