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 -//{ -// /// <summary> -// /// 日志、项目审计日志 -// /// </summary> -// [ApiExplorerSettings(GroupName = "Common")] -// public class LogService : BaseService, ILogService -// { -// private readonly IRepository<SystemLog> _systemLogRepository; -// private readonly IHttpContextAccessor _context; -// private readonly IRepository<TrialAudit> _trialAuditRepository; -// private readonly IRepository<Subject> _subjectRepository; -// private readonly IRepository<Trial> _trialRepository; - -// public LogService(IRepository<SystemLog> systemLogRepository, IHttpContextAccessor context, IRepository<TrialAudit> trialAuditRepository, -// IRepository<Subject> subjectRepository, IRepository<Trial> trialRepository) -// { -// _systemLogRepository = systemLogRepository; -// _context = context; -// _trialAuditRepository = trialAuditRepository; -// _subjectRepository = subjectRepository; -// _trialRepository = trialRepository; -// } - -// [HttpPost] -// public PageOutput<AuditDTO> 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<AuditDTO>(_mapper.ConfigurationProvider); - - -// return query.ToPagedList(param.PageIndex, param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "OptTime" : param.SortField, param.Asc); - -// } - -// /// <summary> 查询系统日志信息 </summary> -// [HttpPost] -// public PageOutput<SystemLogDTO> 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<SystemLogDTO>(_mapper.ConfigurationProvider); - -// return logQueryable.ToPagedList(param.PageIndex, param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "RequestTime" : param.SortField, param.Asc); - -// } - -// [HttpGet("{trialId:guid}")] -// public List<OptUserDto> 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; -// } - -// /// <summary> -// /// 审计列表 受试者下拉框 从受试者那里进去看的时候,这里需要固定,如果不采用下拉框,请传递指定格式的受试者信息查询才行 -// /// </summary> -// /// <param name="trialId"></param> -// /// <returns></returns> -// [HttpGet("{trialId:guid}")] -// public List<AuditSubjectSelectDto> 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<SystemLog>(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<Doctor, EmploymentCommand>(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<StudyDTF> _studyDtfRepository; - -// private readonly IRepository<User> _userRepository; - - -// public StudyDTFService(IRepository<StudyDTF> studyDtfRepository, IRepository<User> userRepository) -// { -// _studyDtfRepository = studyDtfRepository; - -// _userRepository = userRepository; -// } - -// public IResponseOutput AddStudyDTF(StudyDTFAddOrUpdateCommand studyDtfAddOrUpdate) -// { -// var studyDtf = _mapper.Map<StudyDTF>(studyDtfAddOrUpdate); - -// _studyDtfRepository.Add(studyDtf); - -// var success = _studyDtfRepository.SaveChanges(); - -// return ResponseOutput.Result(success); -// } - -// //[NonDynamicMethod] -// //[AllowAnonymous] -// //public async Task<IResponseOutput> 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<StudyDTFDTO> 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<StudyDTFDTO> 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<QCChallenge> { private readonly IRepository _repository;