From 15daf09afa415d31f68fe19dfd54084de734f5c8 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 14 Jun 2022 09:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A3=81=E5=88=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/VisitTaskViewModel.cs | 5 +- .../Service/Allocation/_MapConfig.cs | 17 +- .../Allocation/AllocationRelation.cs | 1 + IRaCIS.Core.Domain/Allocation/VisitTask.cs | 165 +++++++++--------- 4 files changed, 99 insertions(+), 89 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 1edfbd19e..6de6e11cc 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -57,7 +57,6 @@ namespace IRaCIS.Core.Application.ViewModel public class JudgeVisitTaskView : VisitTaskView { - public string? JudgeTaskCode { get; set; } public List HistoryReadingDoctorUserList { get; set; } @@ -68,6 +67,8 @@ namespace IRaCIS.Core.Application.ViewModel public class HistoryReadingDoctorUser { + + public string? JudgeTaskCode { get; set; } public Guid DoctorUserId { get; set; } public string UserCode { get; set; } @@ -202,7 +203,7 @@ namespace IRaCIS.Core.Application.ViewModel { public Guid SubjectId { get; set; } - public List DoctorUserIdList { get; set; } + public List DoctorUserIdList { get; set; }=new List (); } public class AutoSubjectAssignCommand diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 4e5f1298b..40001852b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -48,14 +48,15 @@ namespace IRaCIS.Core.Application.Service .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.JudgeTaskCode, t => t.MapFrom(u => u.JudgeVisitTask.TaskCode)) - .ForMember(o => o.HistoryReadingDoctorUserList, t => t.MapFrom(u => u.JudgeVisitList.Select(u=>u.DoctorUser))); + + .ForMember(o => o.HistoryReadingDoctorUserList, t => t.MapFrom(u => u.JudgeVisitList)); - CreateMap() - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.FullName)) - .ForMember(o => o.DoctorUserId, t => t.MapFrom(u => u.Id)); + CreateMap() + .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.JudgeTaskCode, t => t.MapFrom(u => u.TaskCode)) + .ForMember(o => o.DoctorUserId, t => t.MapFrom(u => u.DoctorUser.Id)); CreateMap() @@ -65,7 +66,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.IsAssignedDoctorUser, t => t.MapFrom(u => u.SubjectDoctorList.Any())) - .ForMember(o => o.DoctorUserList, t => t.MapFrom(u => u.SubjectDoctorList.OrderByDescending(t=>t.ArmEnum))); + .ForMember(o => o.DoctorUserList, t => t.MapFrom(u => u.SubjectDoctorList.OrderBy(t=>t.ArmEnum))); CreateMap() //.ForMember(o => o.AssignTime, t => t.MapFrom(u => u.AssignTime)) diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index b743c4b08..961d20d91 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -13,6 +13,7 @@ namespace IRaCIS.Core.Domain.Share //全局 Global=3, + //裁判 Judge=4 } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index a1595deb4..bcf5c6df5 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -11,127 +11,134 @@ using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models { - /// - ///VisitTask - /// - [Table("VisitTask")] - public class VisitTask : Entity, IAuditUpdate, IAuditAdd - { - - public Guid TrialId { get; set; } + /// + ///VisitTask + /// + [Table("VisitTask")] + public class VisitTask : Entity, IAuditUpdate, IAuditAdd + { - /// + public Guid TrialId { get; set; } + + /// /// CreateUserId /// - [Required] - public Guid CreateUserId { get; set; } - - /// + [Required] + public Guid CreateUserId { get; set; } + + /// /// CreateTime /// - [Required] - public DateTime CreateTime { get; set; } - - /// + [Required] + public DateTime CreateTime { get; set; } + + /// /// UpdateTime /// - [Required] - public DateTime UpdateTime { get; set; } - - /// + [Required] + public DateTime UpdateTime { get; set; } + + /// /// UpdateUserId /// - [Required] - public Guid UpdateUserId { get; set; } - - /// + [Required] + public Guid UpdateUserId { get; set; } + + /// /// TaskName /// - [Required] - public string TaskName { get; set; }=string.Empty; - - /// + [Required] + public string TaskName { get; set; } = string.Empty; + + /// /// TaskBlindName /// - [Required] - public string TaskBlindName { get; set; } = string.Empty; + [Required] + public string TaskBlindName { get; set; } = string.Empty; - /// - /// ReadingCategory - /// - [Required] - public ReadingCategory ReadingCategory { get; set; } - - /// + /// + /// ReadingCategory + /// + [Required] + public ReadingCategory ReadingCategory { get; set; } + + /// /// CheckPassedTime /// - public DateTime? CheckPassedTime { get; set; } - - /// + public DateTime? CheckPassedTime { get; set; } + + /// /// AllocateTime /// - public DateTime? AllocateTime { get; set; } - - /// + public DateTime? AllocateTime { get; set; } + + /// /// SubjectId /// - [Required] - public Guid SubjectId { get; set; } + [Required] + public Guid SubjectId { get; set; } - public Subject Subject { get; set; } - - /// + public Subject Subject { get; set; } + + /// /// Code /// - [Required] - public int Code { get; set; } - - /// + [Required] + public int Code { get; set; } + + /// /// TaskCode /// - [Required] - public string TaskCode { get; set; } = string.Empty; + [Required] + public string TaskCode { get; set; } = string.Empty; - /// - /// IsUrgent - /// - [Required] - public bool IsUrgent { get; set; } - - /// + /// + /// IsUrgent + /// + [Required] + public bool IsUrgent { get; set; } + + /// /// ArmEnum /// - [Required] - public int ArmEnum { get; set; } + [Required] + public int ArmEnum { get; set; } - public TaskState TaskState { get; set; } + public TaskState TaskState { get; set; } - /// - /// DoctorUserId - /// - public Guid? DoctorUserId { get; set; } - [ForeignKey("DoctorUserId")] + /// + /// DoctorUserId + /// + public Guid? DoctorUserId { get; set; } + [ForeignKey("DoctorUserId")] - public User DoctorUser { get; set; } + public User DoctorUser { get; set; } - public TaskAllocationRule DoctorTaskAllocationRule { get; set; } + public TaskAllocationRule DoctorTaskAllocationRule { get; set; } - //裁判任务的Id - public Guid? JudgeVisitTaskId { get; set; } + //裁判任务的Id + public Guid? JudgeVisitTaskId { get; set; } - public VisitTask JudgeVisitTask { get; set; } + public VisitTask JudgeVisitTask { get; set; } + + //对于裁判项而言,触发裁判的列表 + public List JudgeVisitList { get; set; } - //对于裁判项而言,触发裁判的列表 + //建议完成时间 + public int SuggesteDays { get; set; } - public List JudgeVisitList { get; set; } + public int ReadingTaskState { get; set; } + public DateTime? SignTime { get; set; } + //是否回退过 + public bool IsReturned { get; set; } - } + } -} +}