From fbc446df93fe66049523508bff7406ac059b228a Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Mon, 18 Jul 2022 15:49:42 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Allocation/VisitTaskService.cs | 4 +-
.../Reading/ReadingImageTaskService.cs | 2 +-
.../Reading/ReadingGlobalTaskInfo.cs | 76 +++++++++++++++++++
.../Context/IRaCISDBContext.cs | 2 +
IRaCIS.Core.Test/DbHelper.ttinclude | 2 +-
5 files changed, 82 insertions(+), 4 deletions(-)
create mode 100644 IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
index 9708317eb..74362b7f8 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
@@ -393,8 +393,8 @@ namespace IRaCIS.Core.Application.Service
else
{
- var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
- .Where(x => !x.Subject.IsDeleted).Where(x => x.Subject.SubjectDoctorList.Where(y => y.TrialId == iRUnReadSubjectQuery.TrialId && y.DoctorUserId == _userInfo.Id).Count() > 0);
+ var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id&&x.TaskState == TaskState.Effect)
+ .Where(x => !x.Subject.IsDeleted);
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto()
{
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 8e2e32664..aaca5509c 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -103,7 +103,7 @@ namespace IRaCIS.Application.Services
else if (inDto.SubjectId != null)
{
var subjectList =await _subjectRepository.Where(t => t.TrialId == inDto.TrialId)
- .Where(t => t.SubjectDoctorList.Any(t => t.DoctorUserId == _userInfo.Id))
+
.Select(s => new SubjectTask()
{
SubjectId = s.Id,
diff --git a/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs b/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs
new file mode 100644
index 000000000..c1727dd41
--- /dev/null
+++ b/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs
@@ -0,0 +1,76 @@
+
+using System;
+using IRaCIS.Core.Domain.Share;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+namespace IRaCIS.Core.Domain.Models
+{
+ ///
+ /// 阅片全局任务信息
+ ///
+ [Table("ReadingGlobalTaskInfo")]
+ public class ReadingGlobalTaskInfo : Entity, IAuditAdd
+ {
+
+ ///
+ /// 全局任务Id
+ ///
+ public Guid GlobalTaskId { get; set; }
+
+ ///
+ /// 原任务ID
+ ///
+
+ public Guid TaskId { get; set; }
+
+ ///
+ /// 问题ID
+ ///
+ public Guid? QuestionId { get; set; }
+
+ ///
+ /// 问题答案
+ ///
+
+ public string Answer { get; set; }
+
+ ///
+ /// 问题类型
+ ///
+ public int AnswerType { get; set; }
+
+ ///
+ /// 访视ID
+ ///
+ public Guid VisitId { get; set; }
+
+ ///
+ /// 访视num
+ ///
+ public decimal VisitNum { get; set; }
+
+ ///
+ /// CreateTime
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// CreateUserId
+ ///
+ public Guid CreateUserId { get; set; }
+
+ ///
+ /// TrialId
+ ///
+
+ public Guid TrialId { get; set; }
+
+ ///
+ /// SubjectId
+ ///
+ public Guid SubjectId { get; set; }
+
+ }
+
+
+}
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index f4a5bf75a..a2fc022bb 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -206,6 +206,8 @@ namespace IRaCIS.Core.Infra.EFCore
public virtual DbSet ReadingClinicalData { get; set; }
+
+ public virtual DbSet ReadingGlobalTaskInfo { get; set; }
public virtual DbSet ReadingQuestionCriterionSystem { get; set; }
public virtual DbSet ReadingQuestionCriterionTrial { get; set; }
diff --git a/IRaCIS.Core.Test/DbHelper.ttinclude b/IRaCIS.Core.Test/DbHelper.ttinclude
index 43d2fb565..df1dd619b 100644
--- a/IRaCIS.Core.Test/DbHelper.ttinclude
+++ b/IRaCIS.Core.Test/DbHelper.ttinclude
@@ -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 DbDatabase = "IRaCIS_New_Tet";
//ַ,ƴ
- public static readonly string TableName = "ReadingCriterionPage";
+ public static readonly string TableName = "ReadingGlobalTaskInfo";
//ļ service Ƿҳ
}
#>