375 lines
		
	
	
		
			9.6 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			375 lines
		
	
	
		
			9.6 KiB
		
	
	
	
		
			C#
		
	
	
using System.ComponentModel.DataAnnotations;
 | 
						|
using IRaCIS.Core.Infrastructure.Extention;
 | 
						|
using IRaCIS.Core.Domain.Share;
 | 
						|
using MiniExcelLibs.Attributes;
 | 
						|
using Newtonsoft.Json;
 | 
						|
using IRaCIS.Core.Application.Contracts;
 | 
						|
using IRaCIS.Core.Application.Helper;
 | 
						|
using System;
 | 
						|
 | 
						|
namespace IRaCIS.Application.Contracts
 | 
						|
{
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class UserTrialDTO : UserTrialCommand
 | 
						|
    {
 | 
						|
        [JsonIgnore]
 | 
						|
        public string State => IsDeleted ? "退出" : "加入";
 | 
						|
 | 
						|
 | 
						|
        [DictionaryTranslateAttribute("IsUserExitTrial")]
 | 
						|
        public bool IsDeleted { get; set; }
 | 
						|
 | 
						|
        [ExcelFormat("yyyy-MM-dd HH:mm:ss")]
 | 
						|
        public DateTime? DeletedTime { get; set; }
 | 
						|
 | 
						|
        public Guid? TrialSiteId { get; set; }
 | 
						|
        public string Phone { get; set; } = String.Empty;
 | 
						|
        public DateTime UpdateTime { get; set; }
 | 
						|
 | 
						|
        [ExcelFormat("yyyy-MM-dd HH:mm:ss")]
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
 | 
						|
        public string UserType { get; set; } = String.Empty;
 | 
						|
        public string UserRealName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string OrganizationName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string UserName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string EMail { get; set; } = string.Empty;
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialUserSelct: UserTrialCommand
 | 
						|
    {
 | 
						|
        public string Phone { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string Email { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string RealName { get; set; } = String.Empty;
 | 
						|
        public string UserName { get; set; } = String.Empty;
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialUserBasicInfo
 | 
						|
    {
 | 
						|
        public Guid UserTypeId { get; set; }
 | 
						|
 | 
						|
        public string UserName { get; set; }
 | 
						|
 | 
						|
        public string FullName { get; set; }
 | 
						|
 | 
						|
        public Guid UserId { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialMaintenanceDTO : UserTrialCommand
 | 
						|
    {
 | 
						|
        //[JsonIgnore]
 | 
						|
        //public int No { get; set; }
 | 
						|
        //For MiniExcel  ExcelFormat
 | 
						|
        public string State => IsDeleted ? "退出" : "加入";
 | 
						|
 | 
						|
 | 
						|
        //[ValueMapping(text: "退出", true)]
 | 
						|
        //[ValueMapping(text: "加入", false)]
 | 
						|
 | 
						|
        [DictionaryTranslateAttribute("IsUserExitTrial")]
 | 
						|
        public bool IsDeleted { get; set; }
 | 
						|
 | 
						|
        //[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
 | 
						|
        [ExcelFormat("yyyy-MM-dd hh:mm:ss")]
 | 
						|
        public DateTime? DeletedTime { get; set; }
 | 
						|
 | 
						|
 | 
						|
        //[ExporterHeader(Format = "yyyy-mm-DD")]
 | 
						|
        [ExcelFormat("yyyy-MM-dd")]
 | 
						|
        public DateTime? RemoveTime { get; set; }
 | 
						|
 | 
						|
 | 
						|
        //[ExporterHeader(Format = "yyyy-mm-DD")]
 | 
						|
        [ExcelFormat("yyyy-MM-dd")]
 | 
						|
        public DateTime? JoinTime { get; set; }
 | 
						|
 | 
						|
 | 
						|
        //[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
 | 
						|
        [ExcelFormat("yyyy-MM-dd HH:mm:ss")]
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
 | 
						|
        public string Phone { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string EMail { get; set; } = string.Empty;
 | 
						|
 | 
						|
 | 
						|
        public DateTime UpdateTime { get; set; } = DateTime.Now;
 | 
						|
 | 
						|
        public Guid UserTypeId { get; set; }
 | 
						|
        public string UserType { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public UserTypeEnum UserTypeEnum { get; set; }
 | 
						|
 | 
						|
        public string OrganizationName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string UserRealName { get; set; } = String.Empty;
 | 
						|
        public string UserName { get; set; } = String.Empty;
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class TrialCRCUploadImageList_Export: ExcelExportInfo
 | 
						|
    {
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class ExcelExportInfo : TrialSelectDTO
 | 
						|
    {
 | 
						|
       
 | 
						|
        public string CurrentTime  => TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.Local, TimeZoneInfo.FindSystemTimeZoneById(ClientZoneId)).ToString("yyyy-MM-dd HH:mm:ss");
 | 
						|
 | 
						|
        public bool IsEn_US { get; set; }
 | 
						|
 | 
						|
        public string ClientZoneId { get; set; } = string.Empty;
 | 
						|
        public object List { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialUserExportDTO : ExcelExportInfo
 | 
						|
    {
 | 
						|
 | 
						|
        public List<TrialMaintenanceDTO> TrialUserList { get; set; } = new List<TrialMaintenanceDTO>();
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class TrialSiteUserExportDto : ExcelExportInfo
 | 
						|
    {
 | 
						|
 | 
						|
        public List<SiteUserExportDTO> TrialSiteUserList { get; set; } = new List<SiteUserExportDTO>();
 | 
						|
    }
 | 
						|
    public class SiteUserExportDTO : UserTrialDTO
 | 
						|
    {
 | 
						|
 | 
						|
        public string TrialSiteCode { get; set; } = String.Empty;
 | 
						|
        public string TrialSiteAliasName { get; set; } = String.Empty;
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialSiteUserSummaryExportDto : ExcelExportInfo
 | 
						|
    {
 | 
						|
 | 
						|
        public List<TrialSiteUserSummaryDto> TrialSiteUserList { get; set; } = new List<TrialSiteUserSummaryDto>();
 | 
						|
        
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialSiteUserSummaryDto: TrialSiteUserSurveyView
 | 
						|
    {
 | 
						|
 | 
						|
 | 
						|
        public string TrialSiteCode { get; set; } = String.Empty;
 | 
						|
        public string TrialSiteAliasName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string UserRealName => LastName + " / " + FirstName;
 | 
						|
 | 
						|
 | 
						|
        //public string IsGenerateAccountStr => IsGenerateAccount ? "是" : "否";
 | 
						|
 | 
						|
        
 | 
						|
        //public string StateStr => State.GetDescription();
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class SiteCRCCommand : UserTrialCommand
 | 
						|
    {
 | 
						|
        public Guid TrialSiteId { get; set; }
 | 
						|
 | 
						|
        public Guid UserTypeId { get; set; }
 | 
						|
        public string UserType { get; set; } = String.Empty;
 | 
						|
        public string UserRealName { get; set; } = String.Empty;
 | 
						|
 | 
						|
 | 
						|
        public UserTypeEnum UserTypeEnum { get; set; }
 | 
						|
 | 
						|
 | 
						|
        public string OrganizationName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string UserName { get; set; } = String.Empty;
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class UserTrialCommand
 | 
						|
    {
 | 
						|
        public Guid? Id { get; set; }
 | 
						|
        public Guid UserId { get; set; }
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class SiteStatDTO : SiteStatSimpleDTO
 | 
						|
    {
 | 
						|
 | 
						|
 | 
						|
 | 
						|
        //public int? VisitCount { get; set; }
 | 
						|
        //public int? SubjectCount { get; set; }
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class SiteStatSimpleDTO
 | 
						|
    {
 | 
						|
        public Guid Id { get; set; }
 | 
						|
 | 
						|
        public Guid TrialSiteId { get; set; }
 | 
						|
 | 
						|
        public int? UserCount { get; set; }
 | 
						|
 | 
						|
        public string TrialSiteCode { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string TrialSiteName { get; set; } = String.Empty;
 | 
						|
        public string TrialSiteAliasName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool IsDeleted { get; set; }
 | 
						|
 | 
						|
        public DateTime? DeletedTime { get; set; }
 | 
						|
 | 
						|
        public DateTime? EnabledTime { get; set; }
 | 
						|
 | 
						|
        public DateTime UpdateTime { get; set; }
 | 
						|
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
        //public string Site { get; set; } = String.Empty;
 | 
						|
        //public string SiteCode { get; set; } = String.Empty;
 | 
						|
        //public string Hospital { get; set; } = String.Empty;
 | 
						|
        //public string City { get; set; } = String.Empty;
 | 
						|
        //public string Country { get; set; } = String.Empty;
 | 
						|
        //public string DirectorName { get; set; } = String.Empty;
 | 
						|
        //public string DirectorPhone { get; set; } = String.Empty;
 | 
						|
        //public string ContactName { get; set; } = String.Empty;
 | 
						|
        //public string ContactPhone { get; set; } = String.Empty;
 | 
						|
        //public string Address { get; set; } = String.Empty;
 | 
						|
 | 
						|
 | 
						|
        public List<string> UserNameList { get; set; } = new List<string>();
 | 
						|
 | 
						|
        public int? VisitCount { get; set; }
 | 
						|
        public int? SubjectCount { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class TrialMaintenanceExportQuery
 | 
						|
    {
 | 
						|
        public Guid TrialId { get; set; } = Guid.Empty;
 | 
						|
        public string UserRealName { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public Guid? UserTypeId { get; set; }
 | 
						|
 | 
						|
        public string UserName { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string OrganizationName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool? IsDeleted { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialMaintenanceQuery : PageInput
 | 
						|
    {
 | 
						|
        public Guid TrialId { get; set; } = Guid.Empty;
 | 
						|
        public string UserRealName { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public Guid? UserTypeId { get; set; }
 | 
						|
 | 
						|
        public string UserName { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string OrganizationName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool? IsDeleted { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class SiteCRCQuery : TrialMaintenanceQuery
 | 
						|
    {
 | 
						|
        [NotDefault]
 | 
						|
        public Guid TrialSiteId { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class TrialUserQuery : PageInput
 | 
						|
    {
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
        public string UserName { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string UserRealName { get; set; } = string.Empty;
 | 
						|
        public string OrganizationName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public UserTypeEnum? UserTypeEnum { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
    public class TrialUserScreeningDTO : TrialUserAddCommand
 | 
						|
    {
 | 
						|
 | 
						|
        public int Sex { get; set; } // 1-男  2-女
 | 
						|
 | 
						|
        public string Phone { get; set; } = string.Empty;
 | 
						|
        public string EMail { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string DepartmentName { get; set; } = String.Empty;
 | 
						|
        public string PositionName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string UserName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool IsSelect { get; set; }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
        public Guid UserTypeId { get; set; }
 | 
						|
        public string UserType { get; set; } = string.Empty;
 | 
						|
        public UserTypeEnum UserTypeEnum { get; set; }
 | 
						|
 | 
						|
        public string OrganizationName { get; set; } = string.Empty;
 | 
						|
        public string UserRealName { get; set; } = string.Empty;
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class TrialUserAddCommand
 | 
						|
    {
 | 
						|
        public Guid UserId { get; set; }
 | 
						|
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class UpdateTrialUserCommand
 | 
						|
    {
 | 
						|
        [NotDefault]
 | 
						|
        public Guid Id { get; set; }
 | 
						|
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
 | 
						|
        public bool IsDeleted { get; set; }
 | 
						|
 | 
						|
        public DateTime? RemoveTime { get; set; }
 | 
						|
 | 
						|
        public DateTime? JoinTime { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
}
 |