From e26ee1d14a459af09bc23104ea7d18a2e4972ea7 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 8 Jun 2022 10:15:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Allocation/DTO/TaskAllocationRuleViewModel.cs | 5 +++++
.../Service/Allocation/DTO/VisitTaskViewModel.cs | 7 +++++++
.../Service/Allocation/_MapConfig.cs | 15 ++++++++++++---
.../Allocation/TaskAllocationRule.cs | 3 +++
IRaCIS.Core.Domain/Allocation/VisitTask.cs | 6 ++++--
5 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs
index 5f4851b64..ee1cbdaa5 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs
@@ -13,6 +13,11 @@ namespace IRaCIS.Core.Application.ViewModel
/// TaskAllocationRuleView 列表视图模型
public class TaskAllocationRuleView : TaskAllocationRuleAddOrEdit
{
+ public string UserCode { get; set; }
+ public string UserName { get; set; }
+ public string FullName { get; set; }
+
+ public string UserTypeShortName { get; set; }
public Guid CreateUserId { get; set; }
public DateTime CreateTime { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
index 050b20cab..5032845f7 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
@@ -44,6 +44,13 @@ namespace IRaCIS.Core.Application.ViewModel
public Guid SiteId { get; set; }
public String TrialSiteCode { get; set; } = String.Empty;
public string SubjectCode { get; set; } = String.Empty;
+
+
+ public string UserCode { get; set; }
+ public string UserName { get; set; }
+ public string FullName { get; set; }
+
+ public string UserTypeShortName { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
index c9415e71c..b35b35e45 100644
--- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
@@ -12,13 +12,22 @@ namespace IRaCIS.Core.Application.Service
{
CreateMap()
- .ForMember(o => o.TotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count()))
- .ForMember(o => o.SelfTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t=>t.DoctorUserId==u.DoctorUserId)));
+ .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode))
+ .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
+ .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
+ .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName))
+ .ForMember(o => o.TotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count()))
+ .ForMember(o => o.SelfTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t=>t.DoctorUserId==u.DoctorUserId)));
+
CreateMap()
.ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId))
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
- .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code));
+ .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
+ .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode))
+ .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
+ .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
+ .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName));
CreateMap();
diff --git a/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs b/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs
index 4980b544a..e8b386872 100644
--- a/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs
+++ b/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs
@@ -53,6 +53,9 @@ namespace IRaCIS.Core.Domain.Models
public Guid DoctorUserId { get; set; }
+
+ public User DoctorUser { get; set; }
+
///
/// IsEnable
///
diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
index ea3b32211..02b47455c 100644
--- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs
+++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
@@ -111,7 +111,9 @@ namespace IRaCIS.Core.Domain.Models
/// DoctorUserId
///
public Guid? DoctorUserId { get; set; }
-
- }
+
+ public User DoctorUser { get; set; }
+
+ }
}