From ec7da5c7f85c9fe5a19e035e091f8a6523ee13db Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 23 May 2022 16:05:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BA=9F=E5=BC=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Common/LogService.cs | 114 ------------------
.../Service/Doctor/DoctorService.cs | 1 -
.../Doctor/ResearchPublicationService.cs | 7 +-
.../Service/Doctor/TrialExperienceService.cs | 4 -
.../ImageAndDoc/DicomArchiveService.cs | 4 +-
.../Service/ImageAndDoc/ImageShareService.cs | 6 +-
.../Service/ImageAndDoc/InstanceService.cs | 7 +-
.../Service/ImageAndDoc/SeriesService.cs | 7 +-
.../Service/ImageAndDoc/StudyDTFService.cs | 108 -----------------
.../Service/Management/UserService.cs | 2 +-
.../Triggers/ChallengeStateTrigger.cs | 1 +
11 files changed, 8 insertions(+), 253 deletions(-)
delete mode 100644 IRaCIS.Core.Application/Service/Common/LogService.cs
delete mode 100644 IRaCIS.Core.Application/Service/ImageAndDoc/StudyDTFService.cs
diff --git a/IRaCIS.Core.Application/Service/Common/LogService.cs b/IRaCIS.Core.Application/Service/Common/LogService.cs
deleted file mode 100644
index 8a483110f..000000000
--- a/IRaCIS.Core.Application/Service/Common/LogService.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//using IRaCIS.Application.Interfaces;
-//using IRaCIS.Application.Contracts;
-//using IRaCIS.Core.Infra.EFCore;
-//using IRaCIS.Core.Infrastructure;
-
-//using Microsoft.AspNetCore.Http;
-//using Microsoft.AspNetCore.Mvc;
-//using Panda.DynamicWebApi.Attributes;
-
-//namespace IRaCIS.Application.Services
-//{
-// ///
-// /// 日志、项目审计日志
-// ///
-// [ApiExplorerSettings(GroupName = "Common")]
-// public class LogService : BaseService, ILogService
-// {
-// private readonly IRepository _systemLogRepository;
-// private readonly IHttpContextAccessor _context;
-// private readonly IRepository _trialAuditRepository;
-// private readonly IRepository _subjectRepository;
-// private readonly IRepository _trialRepository;
-
-// public LogService(IRepository systemLogRepository, IHttpContextAccessor context, IRepository trialAuditRepository,
-// IRepository subjectRepository, IRepository trialRepository)
-// {
-// _systemLogRepository = systemLogRepository;
-// _context = context;
-// _trialAuditRepository = trialAuditRepository;
-// _subjectRepository = subjectRepository;
-// _trialRepository = trialRepository;
-// }
-
-// [HttpPost]
-// public PageOutput GetAuditList(AuditQueryDTO param)
-// {
-// var subjectInfo = param.SubjectInfo == null ? string.Empty : param.SubjectInfo.Trim();
-
-// var query = _trialAuditRepository.Where(x => x.TrialId == param.TrialId)
-// .WhereIf(param.AuditType != null, t => t.AuditType == param.AuditType)
-// .WhereIf(param.OptUserId != null, t => t.OptUserId == param.OptUserId)
-// .WhereIf(param.SubjectId != null, t => t.SubjectId == param.SubjectId)
-// .WhereIf(!string.IsNullOrEmpty(subjectInfo), t => t.Subject.Code.Contains(subjectInfo) || (t.Subject.LastName + " / " + t.Subject.FirstName).Contains(subjectInfo))
-// .WhereIf(param.StudyId != null, t => t.StudyId == param.StudyId)
-// .WhereIf(param.StartDate != null, t => t.OptTime >= param.StartDate)
-// .WhereIf(param.EndDate != null, t => t.OptTime <= param.EndDate)
-// .ProjectTo(_mapper.ConfigurationProvider);
-
-
-// return query.ToPagedList(param.PageIndex, param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "OptTime" : param.SortField, param.Asc);
-
-// }
-
-// /// 查询系统日志信息
-// [HttpPost]
-// public PageOutput GetLogList(QueryLogQueryDTO param)
-// {
-
-// var LogCategory = param.LogCategory == null ? string.Empty : param.LogCategory.Trim();
-// var keyword = param.Keyword == null ? string.Empty : param.Keyword.Trim();
-// var logQueryable = _systemLogRepository
-// .WhereIf(param.BeginTime!=null,t=>t.RequestTime>= param.BeginTime)
-// .WhereIf(param.EndTime != null, t => t.RequestTime <= param.EndTime)
-// .WhereIf(!string.IsNullOrEmpty(LogCategory), t => t.LogCategory == param.LogCategory)
-// .WhereIf(!string.IsNullOrEmpty(keyword), t => t.Params.Contains(keyword) || t.Result.Contains(keyword))
-// .ProjectTo(_mapper.ConfigurationProvider);
-
-// return logQueryable.ToPagedList(param.PageIndex, param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "RequestTime" : param.SortField, param.Asc);
-
-// }
-
-// [HttpGet("{trialId:guid}")]
-// public List GetOptUserList(Guid trialId)
-// {
-// var list = _trialAuditRepository.Where(t => t.TrialId == trialId).Select(u => new OptUserDto()
-// {
-// OptUserId = u.OptUserId,
-// OptUser = u.OptUser
-// }).Distinct().ToList();
-
-// return list;
-// }
-
-// ///
-// /// 审计列表 受试者下拉框 从受试者那里进去看的时候,这里需要固定,如果不采用下拉框,请传递指定格式的受试者信息查询才行
-// ///
-// ///
-// ///
-// [HttpGet("{trialId:guid}")]
-// public List GetSubjectList(Guid trialId)
-// {
-// var query = from trialAudit in _trialAuditRepository.Where(t => t.TrialId == trialId)
-// join subject in _subjectRepository.AsQueryable() on trialAudit.SubjectId equals subject.Id
-// select new AuditSubjectSelectDto()
-// {
-// SubjectCode = subject.Code,
-// SubjectId = trialAudit.SubjectId,
-// SubjectName = subject.LastName + " / " + subject.FirstName
-// };
-
-// return query.Distinct().ToList();
-// }
-
-// [NonDynamicMethod]
-// public IResponseOutput SaveLog2Db(SystemLogDTO input)
-// {
-// input.ClientIP = IPHelper.GetIP(_context?.HttpContext?.Request);
-
-// _systemLogRepository.Add(_mapper.Map(input));
-// var success = _systemLogRepository.SaveChanges();
-// return ResponseOutput.Result(success);
-// }
-// }
-//}
diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
index 039aa4477..3431cb4b1 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
@@ -315,7 +315,6 @@ namespace IRaCIS.Application.Services
var entity = await _repository.InsertOrUpdateAsync(doctorWorkInfoModel, true);
- //_doctorRepository.UseMapper(_mapper).InsertOrUpdate(doctorWorkInfoModel, autoSave: true);
return ResponseOutput.Ok();
}
diff --git a/IRaCIS.Core.Application/Service/Doctor/ResearchPublicationService.cs b/IRaCIS.Core.Application/Service/Doctor/ResearchPublicationService.cs
index 9d2bb6dfe..67925dce8 100644
--- a/IRaCIS.Core.Application/Service/Doctor/ResearchPublicationService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/ResearchPublicationService.cs
@@ -1,10 +1,5 @@
-using AutoMapper.QueryableExtensions;
-using IRaCIS.Application.Interfaces;
+using IRaCIS.Application.Interfaces;
using IRaCIS.Application.Contracts;
-using IRaCIS.Core.Infra.EFCore;
-using IRaCIS.Core.Domain.Models;
-using IRaCIS.Core.Application.Filter;
-using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Mvc;
namespace IRaCIS.Application.Services
diff --git a/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs b/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs
index 4a71aa2a8..9b078cc88 100644
--- a/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs
@@ -1,9 +1,5 @@
using IRaCIS.Application.Interfaces;
using IRaCIS.Application.Contracts;
-using IRaCIS.Core.Infra.EFCore;
-using IRaCIS.Core.Domain.Models;
-using IRaCIS.Core.Application.Filter;
-using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Mvc;
namespace IRaCIS.Application.Services
diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs
index 0dbb6cad2..842c51fe8 100644
--- a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs
+++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs
@@ -2,13 +2,11 @@
using Dicom.Imaging.Codec;
using EasyCaching.Core;
using IRaCIS.Core.Application.Contracts.Dicom;
-using IRaCIS.Core.Infra.EFCore;
using IRaCIS.Core.Domain.Share;
using Microsoft.Extensions.Hosting;
using System.Text;
using IRaCIS.Core.Application.Contracts;
-using Newtonsoft.Json;
-using MassTransit;
+
namespace IRaCIS.Core.Application.Services
{
diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs
index 13534c726..26f6fe35a 100644
--- a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs
+++ b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs
@@ -1,10 +1,6 @@
-using IRaCIS.Core.Application.Contracts.Dicom;
-using IRaCIS.Core.Application.Contracts.Dicom.DTO;
+using IRaCIS.Core.Application.Contracts.Dicom.DTO;
using IRaCIS.Application.Contracts;
-using IRaCIS.Core.Infra.EFCore;
-using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
-using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs
index 29177124b..1cf95d62c 100644
--- a/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs
+++ b/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs
@@ -1,12 +1,7 @@
-using IRaCIS.Core.Application.Contracts.Dicom;
-using IRaCIS.Core.Application.Contracts.Dicom.DTO;
-using IRaCIS.Core.Infra.EFCore;
-using IRaCIS.Core.Domain.Models;
-using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Dicom;
using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.Contracts;
-using IRaCIS.Core.Infrastructure.Extention;
namespace IRaCIS.Core.Application.Services
{
diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs
index d676635e4..7235b7c26 100644
--- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs
+++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs
@@ -1,10 +1,7 @@
-using IRaCIS.Core.Application.Contracts.Dicom;
-using IRaCIS.Core.Application.Contracts.Dicom.DTO;
-using IRaCIS.Core.Infra.EFCore;
-using IRaCIS.Core.Domain.Models;
+using IRaCIS.Core.Application.Contracts.Dicom.DTO;
+
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Dicom;
-using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Authorization;
namespace IRaCIS.Core.Application.Services
diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyDTFService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyDTFService.cs
deleted file mode 100644
index 6bfc0a9ce..000000000
--- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyDTFService.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-//using IRaCIS.Core.Application.Contracts.Dicom.DTO;
-//using IRaCIS.Core.Application.Contracts.Image;
-//using IRaCIS.Core.Infrastructure.Extention;
-//using IRaCIS.Core.Infra.EFCore;
-//using IRaCIS.Core.Domain.Models;
-//using Microsoft.AspNetCore.Authorization;
-//using Microsoft.AspNetCore.Mvc;
-
-//namespace IRaCIS.Core.Application.Services
-//{
-// [ ApiExplorerSettings(GroupName = "Image")]
-// public class StudyDTFService : BaseService, IStudyDTFService
-// {
-// private readonly IRepository _studyDtfRepository;
-
-// private readonly IRepository _userRepository;
-
-
-// public StudyDTFService(IRepository studyDtfRepository, IRepository userRepository)
-// {
-// _studyDtfRepository = studyDtfRepository;
-
-// _userRepository = userRepository;
-// }
-
-// public IResponseOutput AddStudyDTF(StudyDTFAddOrUpdateCommand studyDtfAddOrUpdate)
-// {
-// var studyDtf = _mapper.Map(studyDtfAddOrUpdate);
-
-// _studyDtfRepository.Add(studyDtf);
-
-// var success = _studyDtfRepository.SaveChanges();
-
-// return ResponseOutput.Result(success);
-// }
-
-// //[NonDynamicMethod]
-// //[AllowAnonymous]
-// //public async Task UpdateStudyDTF(StudyDTFAddOrUpdateCommand studyDtfAddOrUpdate)
-// //{
-// // studyDtfAddOrUpdate.Id.IfNullThrowException();
-// // var studyDTF = await _studyDtfRepository.FindAsync( studyDtfAddOrUpdate.Id.Value );
-
-// // studyDTF.Path = "9999";
-
-// // //var success= await _efStudyDtfRepository.UpdateAsync(studyDTF,true);
-
-// // var success = await _studyDtfRepository.SaveChangesAsync();
-
-// // //_efStudyDtfRepository.UpdateAsync();
-
-
-// // return ResponseOutput.Ok(success);
-// //}
-
-// [HttpDelete("{trialId:guid}/{studyDTFId:guid}")]
-// public IResponseOutput DeleteStudyDTF(Guid studyDTFId)
-// {
-// return ResponseOutput.Result(_studyDtfRepository.Delete(t => t.Id == studyDTFId));
-// }
-
-// [HttpGet("{trialId:guid}/{studyInstanceUid}")]
-// public List GetStudyDtfdtos(Guid trialId, string studyInstanceUid)
-// {
-// var studyId = IdentifierHelper.CreateGuid(studyInstanceUid, trialId.ToString());
-
-// var query = from studyDtf in _studyDtfRepository.Where(t => t.StudyId == studyId)
-// join user in _userRepository.AsQueryable() on studyDtf.CreateUserId equals user.Id
-// select new StudyDTFDTO()
-// {
-// CreateTime = studyDtf.CreateTime,
-// CreateUserId = studyDtf.CreateUserId,
-// FileName = studyDtf.FileName,
-// Id = studyDtf.Id,
-// FirstName = user.FirstName,
-// LastName = user.LastName,
-// UserName = user.UserName,
-// Path = studyDtf.Path
-// };
-
-// return query.ToList();
-// }
-
-
-// [HttpGet("{trialId:guid}/{studyId:guid}")]
-// public List GetStudyDtfList(Guid trialId, Guid studyId)
-// {
-// //var studyId = IdentifierHelper.CreateGuid(studyInstanceUid, trialId.ToString());
-
-// var query = from studyDtf in _studyDtfRepository.Where(t => t.StudyId == studyId)
-// join user in _userRepository.AsQueryable() on studyDtf.CreateUserId equals user.Id
-// select new StudyDTFDTO()
-// {
-// CreateTime = studyDtf.CreateTime,
-// CreateUserId = studyDtf.CreateUserId,
-// FileName = studyDtf.FileName,
-// Id = studyDtf.Id,
-// FirstName = user.FirstName,
-// LastName = user.LastName,
-// UserName = user.UserName,
-// Path = studyDtf.Path
-// };
-
-// return query.ToList();
-// }
-
-// }
-//}
\ No newline at end of file
diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index 0d9f0f1c1..f8d2dd7fc 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -96,7 +96,7 @@ namespace IRaCIS.Application.Services
//正则 至少8个字符,至少1个大写字母,1个小写字母,1个数字和1个特殊字符:
//^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}
- if (!Regex.IsMatch(newPwd, @"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{10,}"))
+ if (!Regex.IsMatch(newPwd, @"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[_.@])[A-Za-z0-9_.@$!%*?&]{10,}"))
{
throw new BusinessValidationFailedException("至少10个字符,其中至少1个大写字母,1个小写字母,1个数字和1个特殊字符");
diff --git a/IRaCIS.Core.Application/Triggers/ChallengeStateTrigger.cs b/IRaCIS.Core.Application/Triggers/ChallengeStateTrigger.cs
index 99b0342db..7d6fcc1f8 100644
--- a/IRaCIS.Core.Application/Triggers/ChallengeStateTrigger.cs
+++ b/IRaCIS.Core.Application/Triggers/ChallengeStateTrigger.cs
@@ -3,6 +3,7 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Application.Triggers
{
+ //访视 质疑状态 触发修改
public class ChallengeStateTrigger : IAfterSaveTrigger
{
private readonly IRepository _repository;