From 8b312683d5232743a1e4a9899f0c9a6b990ef147 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 28 Apr 2022 13:33:37 +0800 Subject: [PATCH] xx --- .../Controllers/InspectionController.cs | 1 + .../Service/QC/DTO/QCListViewModel.cs | 2 ++ .../Service/QC/_MapConfig.cs | 5 +++-- .../Service/Visit/SubjectService.cs | 2 -- IRaCIS.Core.Application/TestService.cs | 4 +++- IRaCIS.Core.Domain.Share/AuthUser/IUserInfo.cs | 2 ++ IRaCIS.Core.Domain.Share/AuthUser/UserInfo.cs | 17 ++++++++++++++--- IRaCIS.Core.Domain/QC/QCChallengeDialog.cs | 2 +- 8 files changed, 26 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index b7e4df48a..b2c0a9e43 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -100,6 +100,7 @@ namespace IRaCIS.Core.API.Controllers [UnitOfWork] public async Task AbandonTrial(DataInspectionDto opt) { + var cc = _userInfo.RequestUrl; var fun = await _trialConfigService.AbandonTrial(opt.OptCommand.trialId,opt.OptCommand.isAbandon); return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun); } diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 3680d34fd..840057b60 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -176,6 +176,8 @@ namespace IRaCIS.Core.Application.Contracts public class QCCRCChallengeViewModel { public Guid? PreliminaryAuditUserId { get; set; } + public Guid? CurrentActionUserId { get; set; } + public bool IsBaseLine { get; set; } public bool IsUrgent { get; set; } public Guid? ClinicalDataSignUserId { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 4020954e4..bb323af28 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -198,8 +198,9 @@ namespace IRaCIS.Core.Application.Service //CRC 质疑列表 CreateMap() - .ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUser.UserName)) - .ForMember(d => d.PreliminaryAuditUserId, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUserId)) + .ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUser.UserName)) + .ForMember(d => d.PreliminaryAuditUserId, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUserId)) + .ForMember(d => d.CurrentActionUserId, u => u.MapFrom(s => s.SubjectVisit.CurrentActionUserId)) .ForMember(d => d.SiteId, u => u.MapFrom(s => s.SubjectVisit.SiteId)) .ForMember(d => d.AuditState, u => u.MapFrom(s => s.SubjectVisit.AuditState)) .ForMember(d => d.IsUrgent, u => u.MapFrom(s => s.SubjectVisit.IsUrgent)) diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs index 9f1a26a52..fbbd3db9d 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs @@ -1,11 +1,9 @@ using IRaCIS.Application.Interfaces; using IRaCIS.Application.Contracts; -using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Domain.Share; using Microsoft.AspNetCore.Mvc; using IRaCIS.Core.Application.Service.Inspection.Interface; -using IRaCIS.Core.Infrastructure; using Newtonsoft.Json; using IRaCIS.Core.Domain.Common; diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index d4a22f9cd..5bc29cbc4 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -49,7 +49,9 @@ namespace IRaCIS.Application.Services var a = 123; var b = _localizer["test{0}", "测试"]; - return _localizer["test{0}", "测试"]; + //return _localizer["test{0}", "测试"]; + + return _userInfo.RequestUrl; } } diff --git a/IRaCIS.Core.Domain.Share/AuthUser/IUserInfo.cs b/IRaCIS.Core.Domain.Share/AuthUser/IUserInfo.cs index a9ac31094..244346e44 100644 --- a/IRaCIS.Core.Domain.Share/AuthUser/IUserInfo.cs +++ b/IRaCIS.Core.Domain.Share/AuthUser/IUserInfo.cs @@ -40,5 +40,7 @@ namespace IRaCIS.Core.Domain.Share string IP { get; } bool IsEn_Us { get; } + + string RequestUrl { get; } } } diff --git a/IRaCIS.Core.Domain.Share/AuthUser/UserInfo.cs b/IRaCIS.Core.Domain.Share/AuthUser/UserInfo.cs index a8c8e5d60..68f0f6fee 100644 --- a/IRaCIS.Core.Domain.Share/AuthUser/UserInfo.cs +++ b/IRaCIS.Core.Domain.Share/AuthUser/UserInfo.cs @@ -45,7 +45,7 @@ namespace IRaCIS.Core.Domain.Share } } - + /// /// 用户名 /// @@ -147,7 +147,7 @@ namespace IRaCIS.Core.Domain.Share if (userType != null && !string.IsNullOrEmpty(userType.Value)) { - return int.Parse(userType.Value)==(int)UserTypeEnum.SuperAdmin; + return int.Parse(userType.Value) == (int)UserTypeEnum.SuperAdmin; } return false; } @@ -190,7 +190,7 @@ namespace IRaCIS.Core.Domain.Share { var lan = _accessor?.HttpContext?.Request?.Headers["Accept-Language"]; - if ( lan is not null && !string.IsNullOrEmpty(lan.Value)) + if (lan is not null && !string.IsNullOrEmpty(lan.Value)) { return lan.Value == "en-US,en;q=0.5".ToString(); } @@ -198,6 +198,17 @@ namespace IRaCIS.Core.Domain.Share } } + + public string RequestUrl + { + + get + { + return _accessor?.HttpContext?.Request?.Path; + + } + } + } public static class ClaimAttributes diff --git a/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs b/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs index 3eeb10a5d..ebce89325 100644 --- a/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs +++ b/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs @@ -14,7 +14,7 @@ namespace IRaCIS.Core.Domain.Models - + [foren] public User CreateUser { get; set; }