Uat_Study
hang 2023-05-15 10:08:45 +08:00
commit f0be7d2e9e
35 changed files with 569 additions and 87 deletions

View File

@ -1,6 +1,7 @@
using IRaCIS.Core.Infrastructure.Extention; using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -12,9 +13,14 @@ namespace IRaCIS.Core.API
{ {
public class ApiResponseHandler : AuthenticationHandler<AuthenticationSchemeOptions> public class ApiResponseHandler : AuthenticationHandler<AuthenticationSchemeOptions>
{ {
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) public IStringLocalizer _localizer;
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options,
IStringLocalizer localizer,
ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
{ {
} _localizer = localizer;
}
protected override Task<AuthenticateResult> HandleAuthenticateAsync() protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{ {
@ -24,14 +30,16 @@ namespace IRaCIS.Core.API
{ {
Response.ContentType = "application/json"; Response.ContentType = "application/json";
Response.StatusCode = StatusCodes.Status401Unauthorized; Response.StatusCode = StatusCodes.Status401Unauthorized;
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("您无权访问该接口", ApiResponseCodeEnum.NoToken))); //---您无权访问该接口
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["ApiResponse_NoAccess"], ApiResponseCodeEnum.NoToken)));
} }
protected override async Task HandleForbiddenAsync(AuthenticationProperties properties) protected override async Task HandleForbiddenAsync(AuthenticationProperties properties)
{ {
Response.ContentType = "application/json"; Response.ContentType = "application/json";
Response.StatusCode = StatusCodes.Status403Forbidden; Response.StatusCode = StatusCodes.Status403Forbidden;
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("您的权限不允许进行该操作",ApiResponseCodeEnum.HaveTokenNotAccess))); //---您的权限不允许进行该操作
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["ApiResponse_Permission"],ApiResponseCodeEnum.HaveTokenNotAccess)));
} }
} }

View File

@ -11,6 +11,12 @@ namespace IRaCIS.Core.Application.Filter
public class ModelActionFilter : ActionFilterAttribute, IActionFilter public class ModelActionFilter : ActionFilterAttribute, IActionFilter
{ {
public IStringLocalizer _localizer;
public ModelActionFilter(IStringLocalizer localizer)
{
_localizer = localizer;
}
public override void OnActionExecuting(ActionExecutingContext context) public override void OnActionExecuting(ActionExecutingContext context)
{ {
if (!context.ModelState.IsValid) if (!context.ModelState.IsValid)
@ -23,7 +29,7 @@ namespace IRaCIS.Core.Application.Filter
.ToArray(); .ToArray();
//---提供给接口的参数无效。 //---提供给接口的参数无效。
context.Result = new JsonResult(ResponseOutput.NotOk("Invalid parameters provided for the API." + JsonConvert.SerializeObject( validationErrors))); context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ModelAction_InvalidAPIParameter"] + JsonConvert.SerializeObject( validationErrors)));
} }
} }
} }

View File

@ -2,6 +2,7 @@
using IRaCIS.Core.Infrastructure.Extention; using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace IRaCIS.Core.Application.Filter namespace IRaCIS.Core.Application.Filter
@ -10,10 +11,13 @@ namespace IRaCIS.Core.Application.Filter
{ {
private readonly ILogger<ProjectExceptionFilter> _logger; private readonly ILogger<ProjectExceptionFilter> _logger;
public ProjectExceptionFilter(ILogger<ProjectExceptionFilter> logger) public IStringLocalizer _localizer;
public ProjectExceptionFilter(IStringLocalizer localizer, ILogger<ProjectExceptionFilter> logger)
{ {
_logger = logger; _logger = logger;
} _localizer = localizer;
}
public void OnException(ExceptionContext context) public void OnException(ExceptionContext context)
{ {
//context.ExceptionHandled;//记录当前这个异常是否已经被处理过了 //context.ExceptionHandled;//记录当前这个异常是否已经被处理过了
@ -23,7 +27,7 @@ namespace IRaCIS.Core.Application.Filter
if (context.Exception.GetType().Name == "DbUpdateConcurrencyException") if (context.Exception.GetType().Name == "DbUpdateConcurrencyException")
{ {
//---并发更新,当前不允许该操作 //---并发更新,当前不允许该操作
context.Result = new JsonResult(ResponseOutput.NotOk("Concurrent update, operation not allowed at this time." + context.Exception.Message)); context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ProjectException_ConcurrentUpdateNotAllowed"] + context.Exception.Message));
} }
if (context.Exception.GetType() == typeof(BusinessValidationFailedException)) if (context.Exception.GetType() == typeof(BusinessValidationFailedException))
@ -36,7 +40,7 @@ namespace IRaCIS.Core.Application.Filter
} }
else else
{ {
context.Result = new JsonResult(ResponseOutput.NotOk("程序异常,请联系开发人员。" + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/) context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.ProgramException)); : (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.ProgramException));
} }

View File

@ -3369,6 +3369,16 @@
序号标记 序号标记
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetManualListOutDto.Name">
<summary>
Name
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetManualListOutDto.Path">
<summary>
Path
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.QuestionId"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.QuestionId">
<summary> <summary>
第一层的Question 第一层的Question
@ -3384,6 +3394,11 @@
VisitTaskId VisitTaskId
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.MarkTool">
<summary>
标记工具
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.TrialId"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.TrialId">
<summary> <summary>
TrialId TrialId
@ -3824,6 +3839,11 @@
任务Id 任务Id
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitTableQuestionInDto.MarkTool">
<summary>
标记工具
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitTableQuestionInDto.PicturePath"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitTableQuestionInDto.PicturePath">
<summary> <summary>
截图地址 截图地址
@ -6921,6 +6941,45 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:IRaCIS.Core.Application.Service.UserWLTemplateService">
<summary>
用户WL模板
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.GetUserWLTemplateList(IRaCIS.Core.Application.ViewModel.UserWLTemplateQuery)">
<summary>
获取模板
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.AddOrUpdateUserWLTemplate(IRaCIS.Core.Application.ViewModel.UserWLTemplateAddOrEdit)">
<summary>
新增修改模板
</summary>
<param name="addOrEditUserWLTemplate"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.DeleteUserWLTemplate(System.Guid)">
<summary>
删除模板
</summary>
<param name="userWLTemplateId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.GetAutoCutNextTask">
<summary>
获取自动切换任务配置
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.SetAutoCutNextTask(IRaCIS.Core.Application.ViewModel.SetAutoCutNextTaskInDto)">
<summary>
设置自动切换任务
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.TrialExternalUserService"> <member name="T:IRaCIS.Core.Application.Service.TrialExternalUserService">
<summary> <summary>
项目外部人员 录入流程相关 项目外部人员 录入流程相关
@ -8019,6 +8078,15 @@
任务类型 任务类型
</summary> </summary>
</member> </member>
<member name="T:IRaCIS.Core.Application.ViewModel.UserWLTemplateView">
<summary> UserWLTemplateView 列表视图模型 </summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.UserWLTemplateQuery">
<summary>UserWLTemplateQuery 列表查询参数模型</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.UserWLTemplateAddOrEdit">
<summary> UserWLTemplateAddOrEdit 列表查询参数模型</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.TrialExternalUserView"> <member name="T:IRaCIS.Core.Application.ViewModel.TrialExternalUserView">
<summary> TrialExternalUserView 列表视图模型 </summary> <summary> TrialExternalUserView 列表视图模型 </summary>
</member> </member>
@ -11020,6 +11088,13 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetManualList(IRaCIS.Core.Application.Service.Reading.Dto.GetManualListInDto)">
<summary>
获取手册
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetTaskAdditionalQuestion(IRaCIS.Core.Application.Service.Reading.Dto.GetTaskAdditionalQuestionInDto)"> <member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetTaskAdditionalQuestion(IRaCIS.Core.Application.Service.Reading.Dto.GetTaskAdditionalQuestionInDto)">
<summary> <summary>
获取任务附加问题 获取任务附加问题
@ -11156,7 +11231,7 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.FindChildQuestion(IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData,System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionTrial},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionAnswerInfo},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableAnsweRowInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.OrganInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},System.Boolean,System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer})"> <member name="M:IRaCIS.Application.Services.ReadingImageTaskService.FindChildQuestion(IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData,System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionTrial},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionAnswerInfo},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableAnsweRowInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.OrganInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},System.Boolean,System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},System.Nullable{System.Guid})">
<summary> <summary>
获取子元素 获取子元素
</summary> </summary>

View File

@ -2,6 +2,11 @@
"test{0}{1}": "英文本地化{0}{1}", "test{0}{1}": "英文本地化{0}{1}",
"RequiredAttribute": "{0} is required", "RequiredAttribute": "{0} is required",
// ------------------------------------------------------------_ServiceExtensions--------------------------------------------------------------------
//ApiResponseHandler
"ApiResponse_NoAccess": "You do not have access to this API",
"ApiResponse_Permission": "Your permission does not allow you to perform this operation",
// ------------------------------------------------------------Controllers-------------------------------------------------------------------- // ------------------------------------------------------------Controllers--------------------------------------------------------------------
//FinancialChangeController //FinancialChangeController
"Financial_ChargeSettled": "Expenses have been settled and workload can not be reset.", "Financial_ChargeSettled": "Expenses have been settled and workload can not be reset.",
@ -89,6 +94,8 @@
"ReadingQuestion_ExcludeWithDependency": "The displayed dependent parent problem and the required dependent problem are the same, but the answers are mutually exclusive, operation failed.", "ReadingQuestion_ExcludeWithDependency": "The displayed dependent parent problem and the required dependent problem are the same, but the answers are mutually exclusive, operation failed.",
"ReadingQuestion_CircularDependency": "Calculation dependency has looped!", "ReadingQuestion_CircularDependency": "Calculation dependency has looped!",
//ReadingPeriodSetService //ReadingPeriodSetService
"ReadingPeriodSet_NameDup": "Reading period name duplicate, operation failed",
"ReadingPeriodSet_Global": "Reading period name cannot be Global",
"ReadingPeriodSet_AlreadyAdded": "{0} has already added the review period, cannot set it effective.", "ReadingPeriodSet_AlreadyAdded": "{0} has already added the review period, cannot set it effective.",
"ReadingPeriodSet_TaskCompletedCannotRevoke": "The current standard review has generated tasks and the review is completed, revoke failed.", "ReadingPeriodSet_TaskCompletedCannotRevoke": "The current standard review has generated tasks and the review is completed, revoke failed.",
"ReadingPeriodSet_LastVisit": "Last visit.", "ReadingPeriodSet_LastVisit": "Last visit.",
@ -182,6 +189,8 @@
"Mail_AccountCreationReminder": "[from Extensive Imaging IRC] A reminder about creating an account", "Mail_AccountCreationReminder": "[from Extensive Imaging IRC] A reminder about creating an account",
"Mail_AccountPasswordResetReminder": "[from Film IRC] A reminder about resetting account passwords", "Mail_AccountPasswordResetReminder": "[from Film IRC] A reminder about resetting account passwords",
"Mail_InvitationEmail": "[from Extensive Imaging IRC][{0}]Invitation", "Mail_InvitationEmail": "[from Extensive Imaging IRC][{0}]Invitation",
//SystemMonitor
"SysMon_JsonConfig": "Parsing the Json file configuration failed",
// ------------------------------------------------------------Doctor-------------------------------------------------------------------- // ------------------------------------------------------------Doctor--------------------------------------------------------------------
//DoctorService //DoctorService
@ -421,6 +430,7 @@
//TrialConfigService //TrialConfigService
"TrialConfig_JudgeTaskFail": "There are judge questions that the conditions for generating judge reading task are not configured, and the operation has failed!", "TrialConfig_JudgeTaskFail": "There are judge questions that the conditions for generating judge reading task are not configured, and the operation has failed!",
"TrialConfig_StdConfigMissing": "Questions are not configured under the current standard.", "TrialConfig_StdConfigMissing": "Questions are not configured under the current standard.",
"TrialConfig_AddEvalReq": "Selected additional evaluation, must check additional evaluation type",
"TrialConfig_SignTemplateMissing": "This operation requires electronic signature confirmation, but the signature template for this scenario is not found in the system.", "TrialConfig_SignTemplateMissing": "This operation requires electronic signature confirmation, but the signature template for this scenario is not found in the system.",
"TrialConfig_ProjectEnded": "The trial project has ended or stopped, and configuration changes are not allowed.", "TrialConfig_ProjectEnded": "The trial project has ended or stopped, and configuration changes are not allowed.",
"TrialConfig_NoImageAuditQuestion": "No image quality control review question is currently added. Please add the image quality control review question first, and then confirm.", "TrialConfig_NoImageAuditQuestion": "No image quality control review question is currently added. Please add the image quality control review question first, and then confirm.",
@ -545,6 +555,12 @@
// ------------------------------------------------------------IRaCIS.Core.Domain-------------------------------------------------------------------- // ------------------------------------------------------------IRaCIS.Core.Domain--------------------------------------------------------------------
//Trial //Trial
"Trial_number": "The serial number consists of five digits. The first two digits are the center number and the last three digits are the serial number. The serial number must be the same as that recorded by the EDC" "Trial_number": "The serial number consists of five digits. The first two digits are the center number and the last three digits are the serial number. The serial number must be the same as that recorded by the EDC",
// ------------------------------------------------------------IRaCIS.Core.Infrastructure--------------------------------------------------------------------
//ResponseOutput
"RO_BizObjNotExistsOrParamIncorrect": "The business object{0} does not exist in the database, or was deleted by someone else, or an incorrect parameter query caused",
"RO_ExpectChangeButNoEffect": "Expect a change, but the database data has not changed",
"RO_SaveFailed": "Saved failed"
} }

View File

@ -2,6 +2,11 @@
"test{0}{1}": "中文本地化{0}{1}", "test{0}{1}": "中文本地化{0}{1}",
"RequiredAttribute": "{0} 字段是必须的", "RequiredAttribute": "{0} 字段是必须的",
// ------------------------------------------------------------_ServiceExtensions--------------------------------------------------------------------
//ApiResponseHandler
"ApiResponse_NoAccess": "您无权访问该接口",
"ApiResponse_Permission": "您的权限不允许进行该操作",
// ------------------------------------------------------------Controllers-------------------------------------------------------------------- // ------------------------------------------------------------Controllers--------------------------------------------------------------------
//FinancialChangeController //FinancialChangeController
"Financial_ChargeSettled": "费用已经结算,无法重置工作量", "Financial_ChargeSettled": "费用已经结算,无法重置工作量",
@ -89,6 +94,8 @@
"ReadingQuestion_ExcludeWithDependency": "显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败", "ReadingQuestion_ExcludeWithDependency": "显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败",
"ReadingQuestion_CircularDependency": "计算依赖循环了!", "ReadingQuestion_CircularDependency": "计算依赖循环了!",
//ReadingPeriodSetService //ReadingPeriodSetService
"ReadingPeriodSet_NameDup": "阅片期名称重复,操作失败",
"ReadingPeriodSet_Global": "阅片期名称不能为Global",
"ReadingPeriodSet_AlreadyAdded": "{0}已经添加过阅片期,无法设置生效", "ReadingPeriodSet_AlreadyAdded": "{0}已经添加过阅片期,无法设置生效",
"ReadingPeriodSet_TaskCompletedCannotRevoke": "当前标准阅片已生成任务并且阅片完成,撤销失败。", "ReadingPeriodSet_TaskCompletedCannotRevoke": "当前标准阅片已生成任务并且阅片完成,撤销失败。",
"ReadingPeriodSet_LastVisit": "末次访视", "ReadingPeriodSet_LastVisit": "末次访视",
@ -182,6 +189,8 @@
"Mail_AccountCreationReminder": "[来自展影IRC] 关于创建账户的提醒", "Mail_AccountCreationReminder": "[来自展影IRC] 关于创建账户的提醒",
"Mail_AccountPasswordResetReminder": "[来自展影IRC] 关于重置账户密码的提醒", "Mail_AccountPasswordResetReminder": "[来自展影IRC] 关于重置账户密码的提醒",
"Mail_InvitationEmail": "[来自展影IRC] [{0}]邀请信", "Mail_InvitationEmail": "[来自展影IRC] [{0}]邀请信",
//SystemMonitor
"SysMon_JsonConfig": "解析Json文件配置出现问题",
// ------------------------------------------------------------Doctor-------------------------------------------------------------------- // ------------------------------------------------------------Doctor--------------------------------------------------------------------
//DoctorService //DoctorService
@ -421,6 +430,7 @@
//TrialConfigService //TrialConfigService
"TrialConfig_JudgeTaskFail": "有裁判问题未配置产生裁判阅片任务的条件,操作失败!", "TrialConfig_JudgeTaskFail": "有裁判问题未配置产生裁判阅片任务的条件,操作失败!",
"TrialConfig_StdConfigMissing": "当前标准下未配置问题", "TrialConfig_StdConfigMissing": "当前标准下未配置问题",
"TrialConfig_AddEvalReq": "选择了附加评估,必须勾选附加评估类型",
"TrialConfig_SignTemplateMissing": "该操作需要电子签名确认,但未在系统中找到该场景的签名模板。", "TrialConfig_SignTemplateMissing": "该操作需要电子签名确认,但未在系统中找到该场景的签名模板。",
"TrialConfig_ProjectEnded": "该项目已结束或停止,不允许修改配置。", "TrialConfig_ProjectEnded": "该项目已结束或停止,不允许修改配置。",
"TrialConfig_NoImageAuditQuestion": "当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。", "TrialConfig_NoImageAuditQuestion": "当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。",
@ -545,6 +555,12 @@
// ------------------------------------------------------------IRaCIS.Core.Domain-------------------------------------------------------------------- // ------------------------------------------------------------IRaCIS.Core.Domain--------------------------------------------------------------------
//Trial //Trial
"Trial_number": "编号由5位数字组成前2位为中心编号后3位为顺序号请与EDC录入的编号保持一致" "Trial_number": "编号由5位数字组成前2位为中心编号后3位为顺序号请与EDC录入的编号保持一致",
// ------------------------------------------------------------IRaCIS.Core.Infrastructure--------------------------------------------------------------------
//ResponseOutput
"RO_BizObjNotExistsOrParamIncorrect": "业务对象{0}在数据库中不存在,或被他人删除,或参数查询不正确导致",
"RO_ExpectChangeButNoEffect": "期望发生更改,但数据库数据没有更改",
"RO_SaveFailed": "保存失败"
} }

View File

@ -64,7 +64,8 @@ namespace IRaCIS.Core.Application.Service.Common
catch (Exception e) catch (Exception e)
{ {
throw new BusinessValidationFailedException("解析Json文件配置出现问题:"+e.Message); //---解析Json文件配置出现问题
throw new BusinessValidationFailedException(_localizer["SysMon_JsonConfig"]+e.Message);
} }
//默认存储的路径 //默认存储的路径

View File

@ -954,7 +954,8 @@ namespace IRaCIS.Core.Application.Image.QA
} }
else else
{ {
return ResponseOutput.NotOk("项目配置为单审,不满足SubmmitState已提交 或者 AuditState待审核/审核中, 不允许领取,请刷新界面"); // ---项目配置为单审,不满足Submmit State已提交 或者 Audit State待审核/审核中, 不允许领取,请刷新界面
return ResponseOutput.NotOk(_localizer["QCOperation_NoSingleAudit"]);
} }
} }
else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit) else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit)
@ -2044,8 +2045,8 @@ namespace IRaCIS.Core.Application.Image.QA
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId, await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId,
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed }); u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
// --转发影像失败
return ResponseOutput.NotOk("转发影像失败: " + e.Message); return ResponseOutput.NotOk(_localizer["QCOperation_ForwardingFailed"] + e.Message);
} }

View File

@ -330,7 +330,30 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public List<AdditionalQuestionAnswer> AnswerList { get; set; } = new List<AdditionalQuestionAnswer>(); public List<AdditionalQuestionAnswer> AnswerList { get; set; } = new List<AdditionalQuestionAnswer>();
} }
public class GetTaskAdditionalQuestionInDto public class GetManualListInDto
{
public Guid TrialId { get; set; }
}
public class GetManualListOutDto
{
public Guid Id { get; set; }
/// <summary>
/// Name
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// Path
/// </summary>
public string Path { get; set; } = string.Empty;
}
public class GetTaskAdditionalQuestionInDto
{ {
//public Guid TrialReadingCriterionId { get; set; } //public Guid TrialReadingCriterionId { get; set; }
public Guid VisitTaskId { get; set; } public Guid VisitTaskId { get; set; }
@ -447,10 +470,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary> /// </summary>
public Guid VisitTaskId { get; set; } public Guid VisitTaskId { get; set; }
/// <summary> /// <summary>
/// TrialId /// 标记工具
/// </summary> /// </summary>
public Guid TrialId { get; set; } public string MarkTool { get; set; } = string.Empty;
/// <summary>
/// TrialId
/// </summary>
public Guid TrialId { get; set; }
/// <summary> /// <summary>
/// 首次添加任务ID /// 首次添加任务ID
@ -1181,7 +1209,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public List<GlobalQuestionInfo> AgreeOrNot { get; set; } public List<GlobalQuestionInfo> AgreeOrNot { get; set; }
public List<GlobalQuestionInfo> AfterQuestionList { get; set; } public List<GlobalQuestionInfo> AfterQuestionList { get; set; }
}
public List<LesionDto> LesionCountList { get; set; } = new List<LesionDto>();
}
public class GetGlobalQuestionType public class GetGlobalQuestionType
{ {
@ -1357,7 +1387,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string SubjectCode { get; set; }=String.Empty; public string SubjectCode { get; set; }=String.Empty;
public ReadingCategory ReadingCategory { get; set; } public bool ExistsManual { get; set; }
public ReadingCategory ReadingCategory { get; set; }
public decimal VisitNum { get; set; } public decimal VisitNum { get; set; }
@ -1694,7 +1726,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string FromMark { get; set; } = string.Empty; public string FromMark { get; set; } = string.Empty;
public decimal RowIndex { get; set; } /// <summary>
/// 标记工具
/// </summary>
public string MarkTool { get; set; } = string.Empty;
public decimal RowIndex { get; set; }
/// <summary> /// <summary>
/// 截图地址 /// 截图地址

View File

@ -0,0 +1,55 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-05-08 15:20:44
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.ViewModel
{
/// <summary> UserWLTemplateView 列表视图模型 </summary>
public class UserWLTemplateView
{
public Guid Id { get; set; }
public string TemplateName { get; set; }
public Guid UserId { get; set; }
public DateTime CreateTime { get; set; }
public Guid CreateUserId { get; set; }
public int WW { get; set; }
public int WL { get; set; }
public int ShowOrder { get; set; } = 0;
public bool IsPitchOn { get; set; }
}
///<summary>UserWLTemplateQuery 列表查询参数模型</summary>
public class UserWLTemplateQuery
{
///<summary> TemplateName</summary>
}
public class SetAutoCutNextTaskInDto
{
public bool AutoCutNextTask { get; set; }
}
///<summary> UserWLTemplateAddOrEdit 列表查询参数模型</summary>
public class UserWLTemplateAddOrEdit
{
public Guid? Id { get; set; }
public string TemplateName { get; set; }
public Guid UserId { get; set; }
public DateTime CreateTime { get; set; }
public Guid CreateUserId { get; set; }
public int WW { get; set; }
public int WL { get; set; }
//public int ShowOrder { get; set; }
//public bool IsPitchOn { get; set; }
}
}

View File

@ -230,8 +230,13 @@ namespace IRaCIS.Application.Services
VisitNum = x.SourceSubjectVisit.VisitNum, VisitNum = x.SourceSubjectVisit.VisitNum,
IsBaseLine = x.SourceSubjectVisit.IsBaseLine, IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
VisitId = x.SourceSubjectVisitId.Value, VisitId = x.SourceSubjectVisitId.Value,
//CrterionDictionaryGroup= x.CrterionDictionaryGroup, LesionCountList=x.LesionList.GroupBy(y=>y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType!=GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder) {
LesionType = x.Key.Value,
Count = x.ToList().Count()
}).ToList(),
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType!=GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
.Select(y => new GlobalQuestionInfo() .Select(y => new GlobalQuestionInfo()
{ {
@ -345,7 +350,7 @@ namespace IRaCIS.Application.Services
result.TaskList.ForEach(x => result.TaskList.ForEach(x =>
{ {
x.AfterQuestionList = x.BeforeQuestionList.Where(x => x.IsJudgeQuestion) x.AfterQuestionList = x.BeforeQuestionList
.GroupJoin( .GroupJoin(
globalReadingQuestion globalReadingQuestion
, l => new { a = l.QuestionId, b = x.VisitTaskId } , l => new { a = l.QuestionId, b = x.VisitTaskId }

View File

@ -42,7 +42,9 @@ namespace IRaCIS.Application.Services
private readonly IRepository<ReadModule> _readModuleRepository; private readonly IRepository<ReadModule> _readModuleRepository;
private readonly IRepository<DicomInstance> _dicomInstanceRepository; private readonly IRepository<DicomInstance> _dicomInstanceRepository;
private readonly IRepository<OrganInfo> _organInfoRepository; private readonly IRepository<OrganInfo> _organInfoRepository;
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository; private readonly IRepository<TrialDocument> _trialDocumentRepository;
private readonly IRepository<User> _userRepository;
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository; private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository; private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository; private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
@ -79,7 +81,9 @@ namespace IRaCIS.Application.Services
IRepository<ReadModule> readModuleRepository, IRepository<ReadModule> readModuleRepository,
IRepository<DicomInstance> dicomInstanceRepository, IRepository<DicomInstance> dicomInstanceRepository,
IRepository<OrganInfo> organInfoRepository, IRepository<OrganInfo> organInfoRepository,
IMemoryCache cache, IRepository<TrialDocument> trialDocumentRepository,
IRepository<User> userRepository,
IMemoryCache cache,
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository, IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository, IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository, IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
@ -114,7 +118,9 @@ namespace IRaCIS.Application.Services
this._readModuleRepository = readModuleRepository; this._readModuleRepository = readModuleRepository;
this._dicomInstanceRepository = dicomInstanceRepository; this._dicomInstanceRepository = dicomInstanceRepository;
this._organInfoRepository = organInfoRepository; this._organInfoRepository = organInfoRepository;
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository; this._trialDocumentRepository = trialDocumentRepository;
this._userRepository = userRepository;
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
this._tumorAssessmentRepository = tumorAssessmentRepository; this._tumorAssessmentRepository = tumorAssessmentRepository;
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository; this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository; this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository;
@ -132,11 +138,33 @@ namespace IRaCIS.Application.Services
} }
/// <summary> /// <summary>
/// 获取任务附加问题 /// 获取手册
/// </summary> /// </summary>
/// <param name="inDto"></param> /// <param name="inDto"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto)
{
UserTypeEnum userType = (UserTypeEnum)_userInfo.UserTypeEnumInt;
//_userInfo.UserTypeId
return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId
&&x.TrialDocConfirmedUserList.Any(y=>y.ConfirmUserId== _userInfo.Id)
&& x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId))
.Select(x => new GetManualListOutDto()
{
Id=x.Id,
Name = x.Name,
Path = x.Path
}).ToListAsync();
}
/// <summary>
/// 获取任务附加问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<(List<TrialAdditionaQuestion>, bool)> GetTaskAdditionalQuestion(GetTaskAdditionalQuestionInDto inDto) public async Task<(List<TrialAdditionaQuestion>, bool)> GetTaskAdditionalQuestion(GetTaskAdditionalQuestionInDto inDto)
{ {
@ -1027,7 +1055,7 @@ namespace IRaCIS.Application.Services
var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList(); var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
pageGroupList.ForEach(x => pageGroupList.ForEach(x =>
{ {
this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer); this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId);
}); });
page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList(); page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList();
@ -1044,7 +1072,7 @@ namespace IRaCIS.Application.Services
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList(); groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
groupList.ForEach(x => groupList.ForEach(x =>
{ {
this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer); this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId);
}); });
groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList(); groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList();
@ -1064,7 +1092,7 @@ namespace IRaCIS.Application.Services
/// <param name="item"></param> /// <param name="item"></param>
/// <param name="questionlists"></param> /// <param name="questionlists"></param>
/// <param name="tableQuestionLists"></param> /// <param name="tableQuestionLists"></param>
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer,bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer) private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer,bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer,Guid? TaskId)
{ {
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList(); item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList();
item.TableQuestions = new TrialReadTableQuestion(); item.TableQuestions = new TrialReadTableQuestion();
@ -1193,16 +1221,20 @@ namespace IRaCIS.Application.Services
answers.Add("MeasureData", rowInfo == null ? string.Empty : rowInfo.MeasureData); answers.Add("MeasureData", rowInfo == null ? string.Empty : rowInfo.MeasureData);
answers.Add("RowIndex", x.ToString()); answers.Add("RowIndex", x.ToString());
answers.Add("RowId", rowInfo.Id.ToString()); answers.Add("RowId", rowInfo.Id.ToString());
answers.Add("StudyId", rowInfo.StudyId.ToString()); answers.Add("MarkTool", rowInfo.MarkTool);
answers.Add("StudyId", rowInfo.StudyId.ToString());
answers.Add("OrganInfoId", rowInfo.OrganInfoId.ToString()); answers.Add("OrganInfoId", rowInfo.OrganInfoId.ToString());
answers.Add("IsCanEditPosition", rowInfo.IsCanEditPosition.ToString()); answers.Add("IsFristAdd", (rowInfo.FristAddTaskId== TaskId).ToString());
answers.Add("IsCanEditPosition", rowInfo.IsCanEditPosition.ToString());
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString()); answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString()); answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString()); answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName); answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString()); answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
answers.Add("LastTaskState", lastTaskTableAnswer.Where(n=>n.QuestionId== item.Id&&n.ReadingTableQuestionTrial.QuestionMark==QuestionMark.State&&n.RowIndex==x).Select(n=>n.Answer).FirstOrDefault()??string.Empty); answers.Add("LastTaskState", lastTaskTableAnswer.Where(n=>n.QuestionId== item.Id&&n.ReadingTableQuestionTrial.QuestionMark==QuestionMark.State&&n.RowIndex==x).Select(n=>n.Answer).FirstOrDefault()??string.Empty);
if (rowInfo.LesionType == LesionType.BaselineLesions) answers.Add("LastTaskMajorAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
answers.Add("LastTaskShortAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
if (rowInfo.LesionType == LesionType.BaselineLesions)
{ {
answers.Add("BaseLineLesionNumber", baseLineTableAnswer.Where(n => n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && n.RowIndex == rowInfo.RowIndex).Select(x => x.Answer).FirstIsNullReturnEmpty()); answers.Add("BaseLineLesionNumber", baseLineTableAnswer.Where(n => n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && n.RowIndex == rowInfo.RowIndex).Select(x => x.Answer).FirstIsNullReturnEmpty());
} }
@ -1215,7 +1247,7 @@ namespace IRaCIS.Application.Services
{ {
item.Childrens.ForEach(x => item.Childrens.ForEach(x =>
{ {
this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer); this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TaskId);
}); });
} }
} }
@ -1848,7 +1880,8 @@ namespace IRaCIS.Application.Services
rowInfo.IsDicomReading = inDto.IsDicomReading; rowInfo.IsDicomReading = inDto.IsDicomReading;
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd; rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
rowInfo.NumberOfFrames = inDto.NumberOfFrames; rowInfo.NumberOfFrames = inDto.NumberOfFrames;
rowInfo.FristAddTaskNum = taskinfo.VisitTaskNum; rowInfo.MarkTool = inDto.MarkTool;
rowInfo.FristAddTaskNum = taskinfo.VisitTaskNum;
rowInfo.FristAddTaskId = inDto.VisitTaskId; rowInfo.FristAddTaskId = inDto.VisitTaskId;
rowInfo.PicturePath = inDto.PicturePath; rowInfo.PicturePath = inDto.PicturePath;
rowInfo.RowIndex = inDto.RowIndex; rowInfo.RowIndex = inDto.RowIndex;
@ -1899,6 +1932,7 @@ namespace IRaCIS.Application.Services
IsCurrentTaskAdd = isCurrentTaskAdd, IsCurrentTaskAdd = isCurrentTaskAdd,
WL = rowInfo.WL, WL = rowInfo.WL,
WW = rowInfo.WW, WW = rowInfo.WW,
MarkTool = inDto.MarkTool,
OrganInfoId = rowInfo.OrganInfoId, OrganInfoId = rowInfo.OrganInfoId,
PicturePath = rowInfo.PicturePath, PicturePath = rowInfo.PicturePath,
NumberOfFrames = rowInfo.NumberOfFrames, NumberOfFrames = rowInfo.NumberOfFrames,
@ -1908,7 +1942,7 @@ namespace IRaCIS.Application.Services
VisitTaskId = rowInfo.VisitTaskId, VisitTaskId = rowInfo.VisitTaskId,
StudyId = rowInfo.StudyId, StudyId = rowInfo.StudyId,
IsCanEditPosition = rowInfo.IsCanEditPosition, IsCanEditPosition = rowInfo.IsCanEditPosition,
}); }) ;
foreach (var item in inDto.AnswerList) foreach (var item in inDto.AnswerList)
@ -2329,7 +2363,9 @@ namespace IRaCIS.Application.Services
task.IsConvertedTask = visitTaskInfo.IsConvertedTask; task.IsConvertedTask = visitTaskInfo.IsConvertedTask;
var blindSubjectCode = await _visitTaskRepository.Where(x => x.Id == task.VisitTaskId).Select(x => x.BlindSubjectCode).FirstNotNullAsync(); var blindSubjectCode = await _visitTaskRepository.Where(x => x.Id == task.VisitTaskId).Select(x => x.BlindSubjectCode).FirstNotNullAsync();
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode; task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
return task; task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count() > 0;
return task;
} }
/// <summary> /// <summary>

View File

@ -72,11 +72,13 @@ namespace IRaCIS.Application.Services
if (await _readingPeriodSetRepository.AnyAsync(x => x.Id != addOrEditReadingPeriodSet.Id && x.IsTakeEffect != ReadingPeriodStatus.Revocation if (await _readingPeriodSetRepository.AnyAsync(x => x.Id != addOrEditReadingPeriodSet.Id && x.IsTakeEffect != ReadingPeriodStatus.Revocation
&& x.TrialId == addOrEditReadingPeriodSet.TrialId && x.ReadingPeriodName == addOrEditReadingPeriodSet.ReadingPeriodName && x.TrialReadingCriterionId == addOrEditReadingPeriodSet.TrialReadingCriterionId)) && x.TrialId == addOrEditReadingPeriodSet.TrialId && x.ReadingPeriodName == addOrEditReadingPeriodSet.ReadingPeriodName && x.TrialReadingCriterionId == addOrEditReadingPeriodSet.TrialReadingCriterionId))
{ {
return ResponseOutput.NotOk("阅片期名称重复,操作失败"); //---阅片期名称重复,操作失败
return ResponseOutput.NotOk(_localizer["ReadingPeriodSet_NameDup"]);
} }
if (addOrEditReadingPeriodSet.ReadingPeriodName == "Global") if (addOrEditReadingPeriodSet.ReadingPeriodName == "Global")
{ {
return ResponseOutput.NotOk("阅片期名称不能为Global"); //---阅片期名称不能为Global
return ResponseOutput.NotOk(_localizer["ReadingPeriodSet_Global"]);
} }
if (addOrEditReadingPeriodSet.Id == null) if (addOrEditReadingPeriodSet.Id == null)
{ {

View File

@ -281,7 +281,20 @@ namespace IRaCIS.Core.Application.Service
MetaKey = false, MetaKey = false,
Text= "Space", Text= "Space",
Code= "Space" Code= "Space"
}, }; },
new ShortcutKey (){
Keyboardkey= "m",
ShortcutKeyEnum = 19,
ImageToolType= 0,
AltKey = false,
CtrlKey = false,
ShiftKey = false,
MetaKey = false,
Text= "M",
Code= "KeyM"
},
};
return shortcutKeys; return shortcutKeys;

View File

@ -0,0 +1,102 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-05-08 15:26:52
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Models;
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
/// 用户WL模板
/// </summary>
[ApiExplorerSettings(GroupName = "Reading")]
public class UserWLTemplateService : BaseService
{
private readonly IRepository<UserWLTemplate> _userWLTemplateRepository;
private readonly IRepository<User> _userRepository;
public UserWLTemplateService(IRepository<UserWLTemplate> userWLTemplateRepository,
IRepository<User> userRepository
)
{
_userWLTemplateRepository = userWLTemplateRepository;
this._userRepository = userRepository;
}
/// <summary>
/// 获取模板
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
public async Task<List<UserWLTemplateView>> GetUserWLTemplateList(UserWLTemplateQuery inQuery)
{
var userWLTemplateQueryable = _userWLTemplateRepository
.Where(x=>x.UserId==_userInfo.Id)
.ProjectTo<UserWLTemplateView>(_mapper.ConfigurationProvider);
return await userWLTemplateQueryable.ToListAsync();
}
/// <summary>
/// 新增修改模板
/// </summary>
/// <param name="addOrEditUserWLTemplate"></param>
/// <returns></returns>
public async Task<IResponseOutput> AddOrUpdateUserWLTemplate(UserWLTemplateAddOrEdit addOrEditUserWLTemplate)
{
addOrEditUserWLTemplate.UserId = _userInfo.Id;
var entity = await _userWLTemplateRepository.InsertOrUpdateAsync(addOrEditUserWLTemplate, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除模板
/// </summary>
/// <param name="userWLTemplateId"></param>
/// <returns></returns>
[HttpDelete("{userWLTemplateId:guid}")]
public async Task<IResponseOutput> DeleteUserWLTemplate(Guid userWLTemplateId)
{
var success = await _userWLTemplateRepository.DeleteFromQueryAsync(t => t.Id == userWLTemplateId, true);
return ResponseOutput.Ok();
}
/// <summary>
/// 获取自动切换任务配置
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<object> GetAutoCutNextTask()
{
return await _userRepository.Where(x=>x.Id==_userInfo.Id).Select(x => new
{
AutoCutNextTask = x.AutoCutNextTask
}).FirstNotNullAsync();
}
/// <summary>
/// 设置自动切换任务
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto)
{
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, x => new User()
{
AutoCutNextTask = inDto.AutoCutNextTask
});
await _userRepository.SaveChangesAsync ();
return ResponseOutput.Ok();
}
}
}

View File

@ -20,7 +20,11 @@ namespace IRaCIS.Core.Application.Service
CreateMap<VisitTask, VisitTaskDto>(); CreateMap<VisitTask, VisitTaskDto>();
CreateMap<ShortcutKey, DefaultShortcutKeyView>(); CreateMap<ShortcutKey, DefaultShortcutKeyView>();
CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>();
CreateMap<UserWLTemplate, UserWLTemplateView>();
CreateMap<UserWLTemplate,UserWLTemplateAddOrEdit>().ReverseMap();
CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>();
CreateMap<AddOrUpdateTumorAssessmentInDto, TumorAssessment_RECIST1Point1>(); CreateMap<AddOrUpdateTumorAssessmentInDto, TumorAssessment_RECIST1Point1>();

View File

@ -535,10 +535,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
//整体肿瘤评估 //整体肿瘤评估
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor,IsConvertedTask=false}, new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor,IsConvertedTask=false},
// 转化时整体肿瘤评估 // 转化时整体肿瘤评估
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetConvertingTumor,IsConvertedTask=true,IsBeTransforming=true}, new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetConvertingTumor,IsConvertedTask=true,IsBeTransforming=true},
//IRECIST整体肿瘤评估 //IRECIST整体肿瘤评估
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetIRECSITTargetLesionEvaluate,IsConvertedTask=true}, new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetIRECSITTargetLesionEvaluate,IsConvertedTask=true},
@ -581,7 +579,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
QuestionType.NewLesions, QuestionType.NewLesions,
QuestionType.Tumor, QuestionType.Tumor,
QuestionType.ExistDisease, QuestionType.ExistDisease,
}; QuestionType.NewTargetLesion,
QuestionType.NewNoTargetLesion,
QuestionType.OtherNewTargetLesion,
QuestionType.IRECISTNewTargetLesion,
QuestionType.NewLesionEvaluation,
};
// 没有靶病灶就删除其他几个答案的值 // 没有靶病灶就删除其他几个答案的值
var isNeedDeleteTypes = calculateList.Where(x => !questionTypes.Contains(x.QuestionType)).Select(x => x.QuestionType).ToList(); var isNeedDeleteTypes = calculateList.Where(x => !questionTypes.Contains(x.QuestionType)).Select(x => x.QuestionType).ToList();
@ -783,9 +786,17 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}).ToListAsync(); }).ToListAsync();
var unableEvaluateRowIds = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.Answer == TargetState.UnableEvaluate.GetEnumInt() var unableEvaluateRowIds = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
) ).Where(x =>
(x.ReadingQuestionTrial.LesionType==LesionType.TargetLesion && x.Answer == TargetState.UnableEvaluate.GetEnumInt())
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewLesions && x.Answer == NewTargetLesionState.NotEvaluable.GetEnumInt())
|| (x.ReadingQuestionTrial.LesionType == LesionType.NonTargetLesions && x.Answer == NoTargetState.UnableEvaluate.GetEnumInt())
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewTargetLesion && x.Answer == NewTargetLesionState.NotEvaluable.GetEnumInt())
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewNonTargetLesion && x.Answer == NewNoTargetLesionState.NotEvaluable.GetEnumInt())
|| (x.ReadingQuestionTrial.LesionType == LesionType.OtherPreviousNewLesion && x.Answer == OtherPreviousNewLesionState.NotEvaluable.GetEnumInt())
|| (x.ReadingQuestionTrial.LesionType == LesionType.TriggeringIRECSIT && x.Answer == NewLesionAfterTriggeringiRECSITState.NotEvaluable.GetEnumInt())
)
.Select(x => x.RowId).Distinct().ToListAsync(); .Select(x => x.RowId).Distinct().ToListAsync();
@ -818,7 +829,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
if (errorMassage != string.Empty) if (errorMassage != string.Empty)
{ {
errorMassage = _localizer["ReadingCalculate_Questionable"] + errorMassage;
throw new BusinessValidationFailedException(errorMassage); throw new BusinessValidationFailedException(errorMassage);
} }
@ -1807,7 +1817,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// { /// {
/// 非靶病灶疗效为 iCPD /// 非靶病灶疗效为 iCPD
/// } /// }
/// else if (满足RECIST1.1的PD标准 && 任一非靶病灶状态评估为“显著增大iUPD”) /// else if (任一非靶病灶状态评估为“显著增大iUPD”)
/// { /// {
/// 非靶病灶疗效为 iUPD /// 非靶病灶疗效为 iUPD
/// } /// }
@ -1893,8 +1903,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 非靶病灶疗效为 iCPD // 非靶病灶疗效为 iCPD
result = NoTargetAssessment.iCPD; result = NoTargetAssessment.iCPD;
} }
// else if (满足RECIST1.1的PD标准 && 任一非靶病灶状态评估为“显著增大iUPD”) // else if ( 任一非靶病灶状态评估为“显著增大iUPD”)
else if (data.RECISTPD && data.ExistiUPD) else if ( data.ExistiUPD)
{ {
// 非靶病灶疗效为 iUPD // 非靶病灶疗效为 iUPD
result = NoTargetAssessment.iUPD; result = NoTargetAssessment.iUPD;
@ -1960,7 +1970,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
} }
var lastVisitTaskId = await GetLastVisitTaskId(inDto); var lastVisitTaskId = await GetLastVisitTaskId(inDto);
var newTargetLesionQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.NewTargetLesion).Select(x => x.QuestionId).FirstOrDefault(); var newTargetLesionQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.NewTargetLesion).Select(x => x.QuestionId).FirstOrDefault();
var sodQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SOD).Select(x => x.QuestionId).FirstOrDefault(); var isodQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.ISOD).Select(x => x.QuestionId).FirstOrDefault();
IRECISTNewTargetLesionDto data = new IRECISTNewTargetLesionDto() IRECISTNewTargetLesionDto data = new IRECISTNewTargetLesionDto()
{ {
// 不存在新靶病灶 // 不存在新靶病灶
@ -1974,14 +1984,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
.Select(x => x.Answer).FirstOrDefaultAsync()) ?? string.Empty, .Select(x => x.Answer).FirstOrDefaultAsync()) ?? string.Empty,
//SOD增加5mm以上 //SOD增加5mm以上
ISODAdd5mm = await GetSODData(inDto) - (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == lastVisitTaskId && x.ReadingQuestionTrialId == sodQuestionId) ISODAdd5mm = await GetiSODData(inDto) - (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == lastVisitTaskId && x.ReadingQuestionTrialId == isodQuestionId)
.Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0() >= 5, .Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0() >= 5,
//有"存在"状态的新靶病灶 //有"存在"状态的新靶病灶
HaveExixtsState = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.Exist)), HaveExixtsState = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.Exist)),
// 至少有一个新靶病无法评估 // 至少有一个新靶病无法评估
ExixtsUnevaluableState = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.Exist)), ExixtsUnevaluableState = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.NotEvaluable)),
}; };
@ -1991,7 +2001,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
data.AllVanish = data.AllVanish && item.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.Loss)); data.AllVanish = data.AllVanish && item.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.Loss));
} }
NewTargetLesionAssessment result = NewTargetLesionAssessment.NE; NewTargetLesionAssessment result = NewTargetLesionAssessment.ND;
// if所有新靶病灶消失或一直不存在任何新靶病灶 // if所有新靶病灶消失或一直不存在任何新靶病灶
if(data.NotExistsNewTargetLesion||data.AllVanish) if(data.NotExistsNewTargetLesion||data.AllVanish)
@ -2021,7 +2031,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
else if (data.ExixtsUnevaluableState) else if (data.ExixtsUnevaluableState)
{ {
// 疗效为 NE // 疗效为 NE
result = NewTargetLesionAssessment.iUPD; result = NewTargetLesionAssessment.NE;
} }
return result.GetEnumInt(); return result.GetEnumInt();
@ -2088,7 +2098,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
ExixtsUnevaluableState = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewNoTargetLesionState.NotEvaluable)), ExixtsUnevaluableState = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewNoTargetLesionState.NotEvaluable)),
}; };
NewNoTargetLesionAssessment result = NewNoTargetLesionAssessment.NE; NewNoTargetLesionAssessment result = NewNoTargetLesionAssessment.ND;
// if所有新非靶病灶消失或一直不存在任何新非靶病灶时评估为该结果 // if所有新非靶病灶消失或一直不存在任何新非靶病灶时评估为该结果
if(data.NotExistsNewNoTargetLesion|| data.AllVanish) if(data.NotExistsNewNoTargetLesion|| data.AllVanish)
@ -2181,7 +2191,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}; };
OtherPreviousNewLesionAssessment result = OtherPreviousNewLesionAssessment.Equivocal; OtherPreviousNewLesionAssessment result = OtherPreviousNewLesionAssessment.ND;
// if有其它既往新病灶消失或一直不存在任何其它既往新病灶 // if有其它既往新病灶消失或一直不存在任何其它既往新病灶
if (data.NotExistsOtherNewTargetLesion || data.AllVanish) if (data.NotExistsOtherNewTargetLesion || data.AllVanish)
@ -2403,7 +2413,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.iUPD)) else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.iUPD))
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.iUPD)) || inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.iUPD))
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.iUPD)) || inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.iUPD))
|| lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.Yes)) || inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.Yes))
) )
{ {
// 疗效为 iUPD // 疗效为 iUPD

View File

@ -110,8 +110,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync(); var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync(); var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync(); var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
result.LesionCountList = tableAnsweRowInfos.GroupBy(x => x.LesionType).Select(x => new LesionDto
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); {
LesionType = x.Key.Value,
Count = x.ToList().Count()
}).ToList();
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();

View File

@ -442,7 +442,8 @@ namespace IRaCIS.Core.Application.Contracts
if (await _trialSiteSurveyRepository.AnyAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.PMCreatedAndLock)) if (await _trialSiteSurveyRepository.AnyAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.PMCreatedAndLock))
{ {
return ResponseOutput.NotOk("中心调研表已锁定,不允许操作"); //---中心调研已锁定,不允许操作。
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]);
} }
var success = await _trialSiteSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteSurveyId); var success = await _trialSiteSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteSurveyId);
@ -561,7 +562,8 @@ namespace IRaCIS.Core.Application.Contracts
if (await _repository.AnyAsync<TrialSiteSurvey>(t => t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id == trialSiteSurveyId)) if (await _repository.AnyAsync<TrialSiteSurvey>(t => t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id == trialSiteSurveyId))
{ {
return ResponseOutput.NotOk("中心调研表已锁定,不允许操作。"); //---中心调研已锁定,不允许操作。
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]);
} }
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
@ -668,7 +670,8 @@ namespace IRaCIS.Core.Application.Contracts
{ {
if (await _repository.AnyAsync<TrialSiteSurvey>(t => t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id == trialSiteSurveyId)) if (await _repository.AnyAsync<TrialSiteSurvey>(t => t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id == trialSiteSurveyId))
{ {
return ResponseOutput.NotOk("中心调研表已锁定,不允许操作。"); //---中心调研已锁定,不允许操作。
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]);
} }
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)

View File

@ -624,7 +624,8 @@ namespace IRaCIS.Core.Application
if (inDto.TrialCriterionAdditionalAssessmentTypeList.All(t => t.IsSelected != true)) if (inDto.TrialCriterionAdditionalAssessmentTypeList.All(t => t.IsSelected != true))
{ {
throw new BusinessValidationFailedException("选择了附加评估,必须勾选附加评估类型"); //---选择了附加评估,必须勾选附加评估类型
throw new BusinessValidationFailedException(_localizer["TrialConfig_AddEvalReq"]);
} }
var trialId = _readingQuestionTrialRepository.Where(t => t.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Select(t => t.TrialId).FirstOrDefault(); var trialId = _readingQuestionTrialRepository.Where(t => t.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Select(t => t.TrialId).FirstOrDefault();

View File

@ -184,7 +184,8 @@ namespace IRaCIS.Application.Services
{ {
if (await _repository.AnyAsync<TrialSiteUser>(t => t.UserId == trialUser.UserId && t.TrialId == trialUser.TrialId)) if (await _repository.AnyAsync<TrialSiteUser>(t => t.UserId == trialUser.UserId && t.TrialId == trialUser.TrialId))
{ {
return ResponseOutput.NotOk("Participant has participated in site maintenance"); // ----人员已加入现场维护
return ResponseOutput.NotOk(_localizer["TrialMaint_PersonnelJoined"]);
} }
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC) if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)

View File

@ -111,7 +111,8 @@ namespace IRaCIS.Application.Services
if (!await _trialRepository.Where(t => t.Id == visitPlan.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing || t.TrialStatusStr == StaticData.TrialState.TrialInitializing)) if (!await _trialRepository.Where(t => t.Id == visitPlan.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing || t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
{ {
throw new BusinessValidationFailedException("只有当项目状态为:初始化或进行中时,可以操作。 "); //---只有当项目状态为:初始化或进行中时,可以操作。
throw new BusinessValidationFailedException(_localizer["VisitPlan_OnlyInitOrOngoing"]);
} }
var visitPlanList = await _visitStageRepository.Where(t => t.TrialId == visitPlan.TrialId, ignoreQueryFilters: true) var visitPlanList = await _visitStageRepository.Where(t => t.TrialId == visitPlan.TrialId, ignoreQueryFilters: true)

View File

@ -1241,7 +1241,7 @@ namespace IRaCIS.Core.Domain.Share
/// <summary> /// <summary>
/// 存在 /// 存在
/// </summary> /// </summary>
Exist = 1, Exist = 0,
/// <summary> /// <summary>
/// 增大 /// 增大

View File

@ -30,7 +30,6 @@ namespace IRaCIS.Core.Domain.Models
public Dictionary FileType { get; set; } public Dictionary FileType { get; set; }
public Guid FileTypeId { get; set; } public Guid FileTypeId { get; set; }

View File

@ -88,7 +88,12 @@ namespace IRaCIS.Core.Domain.Models
public bool IsTestUser { get; set; } public bool IsTestUser { get; set; }
[Projectable] public string FullName => LastName + " / " + FirstName; /// <summary>
/// 自动切换下一个任务
/// </summary>
public bool AutoCutNextTask { get; set; } = false;
[Projectable] public string FullName => LastName + " / " + FirstName;
//[Projectable] public string FullName => $"{LastName} / {FirstName}"; //[Projectable] public string FullName => $"{LastName} / {FirstName}";
} }

View File

@ -173,8 +173,13 @@ namespace IRaCIS.Core.Domain.Models
//病灶编号 //病灶编号
public string RowMark { get; set; } = string.Empty; public string RowMark { get; set; } = string.Empty;
/// <summary>
/// 标记工具
/// </summary>
public string MarkTool { get; set; } = string.Empty;
[JsonIgnore]
[JsonIgnore]
[ForeignKey("VisitTaskId")] [ForeignKey("VisitTaskId")]
public VisitTask VisitTask { get; set; } public VisitTask VisitTask { get; set; }

View File

@ -0,0 +1,66 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-05-08 15:14:38
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///UserWLTemplate
///</summary>
[Table("UserWLTemplate")]
public class UserWLTemplate : Entity, IAuditAdd
{
/// <summary>
/// TemplateName
/// </summary>
[Required]
public string TemplateName { get; set; }
/// <summary>
/// UserId
/// </summary>
[Required]
public Guid UserId { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Required]
public DateTime CreateTime { get; set; }
/// <summary>
/// CreateUserId
/// </summary>
[Required]
public Guid CreateUserId { get; set; }
/// <summary>
/// WW
/// </summary>
public int WW { get; set; }
/// <summary>
/// WL
/// </summary>
public int WL { get; set; }
/// <summary>
/// ShowOrder
/// </summary>
public int ShowOrder { get; set; } = 0;
/// <summary>
/// 是否为默认
/// </summary>
public bool IsPitchOn { get; set; } = true;
}
}

View File

@ -451,7 +451,9 @@ namespace IRaCIS.Core.Infra.EFCore
#endregion #endregion
public virtual DbSet<ShortcutKey> ShortcutKey { get; set; } public virtual DbSet<ShortcutKey> ShortcutKey { get; set; }
public virtual DbSet<EmailNoticeConfig> EmailNoticeConfig { get; set; }
public virtual DbSet<UserWLTemplate> UserWLTemplate { get; set; }
public virtual DbSet<EmailNoticeConfig> EmailNoticeConfig { get; set; }
public virtual DbSet<SystemBasicData> SystemBasicData { get; set; } public virtual DbSet<SystemBasicData> SystemBasicData { get; set; }
public virtual DbSet<TrialSign> TrialSign { get; set; } public virtual DbSet<TrialSign> TrialSign { get; set; }

View File

@ -429,7 +429,9 @@ namespace IRaCIS.Core.Infra.EFCore
{ {
if (updateFilter == null) if (updateFilter == null)
{ {
throw new ArgumentException("更新过滤条件不允许为空", nameof(updateFilter));
throw new ArgumentException("The update filter condition cannot be empty", nameof(updateFilter));
} }
var query = ignoreQueryFilter ? _dbContext.Set<T>().AsNoTracking().IgnoreQueryFilters() : _dbContext.Set<T>().AsNoTracking(); var query = ignoreQueryFilter ? _dbContext.Set<T>().AsNoTracking().IgnoreQueryFilters() : _dbContext.Set<T>().AsNoTracking();

View File

@ -229,7 +229,7 @@ namespace IRaCIS.Core.Infra.EFCore
{ {
if (updateFilter == null) if (updateFilter == null)
{ {
throw new ArgumentException("更新过滤条件不允许为空", nameof(updateFilter)); throw new ArgumentException("The update filter condition cannot be empty", nameof(updateFilter));
} }
var query = ignoreQueryFilter ? _dbSet.AsNoTracking().IgnoreQueryFilters() : _dbSet.AsNoTracking(); var query = ignoreQueryFilter ? _dbSet.AsNoTracking().IgnoreQueryFilters() : _dbSet.AsNoTracking();

View File

@ -54,7 +54,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
if (isMultiSortFiled&& sortArray==default) if (isMultiSortFiled&& sortArray==default)
{ {
throw new System.Exception("必须指定排序字段"); throw new System.Exception("The sort field must be specified");
} }
if (pageNumber <= 0) if (pageNumber <= 0)

View File

@ -7,10 +7,10 @@ namespace IRaCIS.Core.Infrastructure.Extention
/// </summary> /// </summary>
public class ResponseOutput<T> : IResponseOutput<T> public class ResponseOutput<T> : IResponseOutput<T>
{ {
/// <summary> /// <summary>
/// 是否成功标记 /// 是否成功标记
/// </summary> /// </summary>
public bool IsSuccess { get; private set; } public bool IsSuccess { get; private set; }
public ApiResponseCodeEnum Code { get; set; } = ApiResponseCodeEnum.OK; public ApiResponseCodeEnum Code { get; set; } = ApiResponseCodeEnum.OK;
@ -169,7 +169,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
public static IResponseOutput<string> DBNotExistIfNUll(object businessObject) public static IResponseOutput<string> DBNotExistIfNUll(object businessObject)
{ {
return new ResponseOutput<string>().NotOk($"The business object{businessObject.GetType().Name} does not exist in the database, or was deleted by someone else, or an incorrect parameter query caused"); return new ResponseOutput<string>().NotOk("The business object{businessObject.GetType().Name} does not exist in the database, or was deleted by someone else, or an incorrect parameter query caused");
} }

View File

@ -4,7 +4,7 @@
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"; public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
public static readonly string DbDatabase = "IRaCIS_New_Tet"; public static readonly string DbDatabase = "IRaCIS_New_Tet";
//表名称用字符串,拼接 //表名称用字符串,拼接
public static readonly string TableName = "ReadingTrialCriterionDictionary"; public static readonly string TableName = "UserWLTemplate";
//具体文件里面 例如service 可以配置是否分页 //具体文件里面 例如service 可以配置是否分页
} }
#> #>

View File

@ -77,13 +77,15 @@ namespace Zhaoxi.NET6.AuthenticationCenter.Controllers
} }
else else
{ {
return ResponseOutput.NotOk("Token获取失败");
return ResponseOutput.NotOk("Token获取失败");
} }
} }
else else
{ {
return ResponseOutput.NotOk("验证失败"); return ResponseOutput.NotOk("验证失败");
} }

Binary file not shown.