Browse Source

职业病

bjmzak
wxd 1 year ago
parent
commit
1077a2a78e
  1. 8
      src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs
  2. 17
      src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

8
src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs

@ -147,6 +147,14 @@ namespace Shentun.Peis.OccupationalDiseases
List<PatientPoison> patientPoisonList = new List<PatientPoison>();
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,

17
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<IdentityOptions>(opt =>
//context.Services.Configure<IISServerOptions>(opt =>
//{
// opt.MaxRequestBodySize = 52428800;
//});
//context.Services.Configure<KestrelServerOptions>(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 临时去掉日志

Loading…
Cancel
Save