Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
d3ea27eb3e
|
@ -488,7 +488,6 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// </summary>
|
||||
|
||||
/// <returns></returns>
|
||||
[NonDynamicMethod]
|
||||
public async Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand)
|
||||
{
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<Role, RoleDTO>();
|
||||
CreateMap<Menu, MenuFunctionDTO>();
|
||||
|
||||
CreateMap<User, UserSelectionModel>();
|
||||
|
||||
CreateMap<UserType, UserTypeViewModel>();
|
||||
|
||||
|
|
|
@ -83,8 +83,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public int EfficacyEvaluatorType { get; set; }
|
||||
public bool IsFollowStudyParameters { get; set; }
|
||||
public string NotFollowReson { get; set; } = string.Empty;
|
||||
//public bool IsLocked { get; set; } = false;
|
||||
|
||||
public TrialSiteSurveyEnum State { get; set; }
|
||||
|
||||
public string LatestBackReason { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
///<summary>TrialSiteSurveyQuery 列表查询参数模型</summary>
|
||||
|
|
|
@ -21,8 +21,21 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string TrialRoleName { get; set; }
|
||||
|
||||
public Guid? SystemUserId { get; set; }
|
||||
|
||||
public UserInfoBasic ReviewerUser { get; set; }
|
||||
public UserInfoBasic PreliminaryUser { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class UserInfoBasic
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string RealName { get; set; } = string.Empty;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
///<summary>TrialSiteUserSurveyQuery 列表查询参数模型</summary>
|
||||
public class TrialSiteUserSurveyQuery
|
||||
{
|
||||
|
|
|
@ -509,10 +509,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
}
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
|
||||
{
|
||||
if (_repository.Where<TrialSiteUserSurvey>(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any())
|
||||
{
|
||||
return ResponseOutput.NotOk("人员信息有不正确项,不允许提交");
|
||||
}
|
||||
//if (_repository.Where<TrialSiteUserSurvey>(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any())
|
||||
//{
|
||||
// return ResponseOutput.NotOk("人员信息有不正确项,不允许提交");
|
||||
//}
|
||||
|
||||
await _trialSiteSurveyRepository.UpdateFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved });
|
||||
|
||||
|
@ -524,13 +524,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
if (trialSiteSurvey == null) return Null404NotFound(trialSiteSurvey);
|
||||
|
||||
if (_trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any())
|
||||
{
|
||||
return ResponseOutput.NotOk("人员信息有不正确项,不允许提交");
|
||||
}
|
||||
//if (_trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any())
|
||||
//{
|
||||
// return ResponseOutput.NotOk("人员信息有不正确项,不允许提交");
|
||||
//}
|
||||
|
||||
//已生成的不管 管的只需要是 生成失败的并且需要生成账号的
|
||||
var needGenerateList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect && t.IsGenerateAccount && t.IsGenerateSuccess == false).ToList();
|
||||
var needGenerateList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsGenerateAccount && t.IsGenerateSuccess == false).ToList();
|
||||
|
||||
|
||||
var trialInfo = await _repository.FirstOrDefaultAsync<Trial>(t => t.Id == trialId);
|
||||
|
|
|
@ -56,6 +56,10 @@ namespace IRaCIS.Core.Application.AutoMapper
|
|||
|
||||
CreateMap<TrialSiteUserSurvey, User>();
|
||||
|
||||
|
||||
CreateMap<User, UserInfoBasic>().ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -131,13 +131,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
|
||||
|
||||
public class UserSelectionModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string RealName { get; set; } = string.Empty;
|
||||
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class TrialMaintenanceQuery : PageInput
|
||||
|
@ -150,6 +144,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public string OrganizationName { get; set; } = String.Empty;
|
||||
|
||||
public bool? IsDeleted { get; set; }
|
||||
|
||||
//public DateTime? RemoveTime { get; set; }
|
||||
|
||||
//public DateTime? JoinTime { get; set; }
|
||||
|
|
|
@ -31,15 +31,14 @@ namespace IRaCIS.Application.Services
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserType), t => t.User.UserTypeRole.UserTypeShortName.Contains(param.UserType))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName))
|
||||
|
||||
//.WhereIf( param.JoinTime!=null, t => t.JoinTime.to ==param.JoinTime.ToString("yyyy-MM-dd"))
|
||||
//.WhereIf(param.RemoveTime!=null, t => t.RemoveTime.ToString("yyyy-MM-dd") == param.JoinTime.ToString("yyyy-MM-dd"))
|
||||
|
||||
//.WhereIf( param.JoinTime!=null, t => t.JoinTime.to ==param.JoinTime.ToString("yyyy-MM-dd"))
|
||||
//.WhereIf(param.RemoveTime!=null, t => t.RemoveTime.ToString("yyyy-MM-dd") == param.JoinTime.ToString("yyyy-MM-dd"))
|
||||
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName), t => t.User.OrganizationName.Contains(param.OrganizationName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName), t => (t.User.LastName + " / " + t.User.FirstName).Contains(param.UserRealName))
|
||||
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await query.ToPagedListAsync(param.PageIndex,
|
||||
param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "UpdateTime" : param.SortField, param.Asc);
|
||||
return await query.ToPagedListAsync(param.PageIndex,param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "UpdateTime" : param.SortField, param.Asc);
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,9 +60,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
return await query.ToPagedListAsync(param.PageIndex,
|
||||
param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "UpdateTime" : param.SortField, param.Asc);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,16 +81,6 @@ namespace IRaCIS.Application.Services
|
|||
return await query.ToPagedListAsync(trialUserQuery.PageIndex,
|
||||
trialUserQuery.PageSize, string.IsNullOrWhiteSpace(trialUserQuery.SortField) ? "UserRealName" : trialUserQuery.SortField, trialUserQuery.Asc);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -128,7 +115,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPut]
|
||||
public async Task<IResponseOutput> UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand)
|
||||
{
|
||||
var trialUser = await _trialUseRepository.AsQueryable().IgnoreQueryFilters().FirstOrDefaultAsync(t => t.Id == updateTrialUserCommand.Id);
|
||||
var trialUser = await _trialUseRepository.Where(t => t.Id == updateTrialUserCommand.Id,true,true).FirstOrDefaultAsync();
|
||||
|
||||
if (trialUser == null) return Null404NotFound(trialUser);
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
|
||||
var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId, ignoreQueryFilters: true)
|
||||
.WhereIf(param.IsDeleted!=null, t => t.IsDeleted==param.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteAliasName.Contains(param.TrialSiteCode))
|
||||
|
@ -48,6 +49,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
|
||||
var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteAliasName.Contains(param.TrialSiteCode))
|
||||
|
|
|
@ -23,6 +23,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.SiteName))
|
||||
.ForMember(x => x.Id, x => x.Ignore());
|
||||
|
||||
CreateMap<EditTrialSiteCommand, TrialSite>();
|
||||
|
||||
CreateMap<UpdateTrialUserCommand, TrialUser>();
|
||||
|
||||
|
||||
|
||||
CreateMap<AssginSiteCRCCommand, TrialUser>();
|
||||
|
||||
CreateMap<TrialUserAddCommand, TrialUser>();
|
||||
|
|
|
@ -123,7 +123,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
[Required]
|
||||
public string NotFollowReson { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public string LatestBackReason { get; set; } = string.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,94 +9,82 @@ using System.ComponentModel.DataAnnotations;
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///TrialSiteUserSurvey
|
||||
///</summary>
|
||||
[Table("TrialSiteUserSurvey")]
|
||||
public class TrialSiteUserSurvey : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
[ForeignKey("TrialSiteSurveyId")]
|
||||
public TrialSiteSurvey TrialSiteSurvey { get; set; }
|
||||
///<summary>
|
||||
///TrialSiteUserSurvey
|
||||
///</summary>
|
||||
[Table("TrialSiteUserSurvey")]
|
||||
public class TrialSiteUserSurvey : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
[ForeignKey("TrialSiteSurveyId")]
|
||||
public TrialSiteSurvey TrialSiteSurvey { get; set; }
|
||||
|
||||
public Guid TrialSiteSurveyId { get; set; }
|
||||
|
||||
|
||||
//public TrialSiteSurveyEnum State { get; set; } = TrialSiteSurveyEnum.ToSubmit;
|
||||
|
||||
public bool IsGenerateSuccess { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("UserTypeId")]
|
||||
public UserType UserTypeRole { get; set; }
|
||||
|
||||
public Guid? UserTypeId { get; set; }
|
||||
|
||||
|
||||
public Guid? TrialRoleNameId { get; set; }
|
||||
|
||||
public Dictionary TrialRoleName { get; set; }
|
||||
public Guid TrialSiteSurveyId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
[ForeignKey("UserTypeId")]
|
||||
public UserType UserTypeRole { get; set; }
|
||||
|
||||
public Guid? UserTypeId { get; set; }
|
||||
|
||||
|
||||
public Guid? TrialRoleNameId { get; set; }
|
||||
|
||||
public Dictionary TrialRoleName { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
[Required]
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Phone
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Email
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// IsCorrect
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool IsCorrect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IsGenerateAccount
|
||||
/// <summary>
|
||||
/// Phone
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool IsGenerateAccount { get; set; }
|
||||
[Required]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// Email
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
public Guid? SystemUserId { get; set; }
|
||||
|
||||
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
|
||||
public Guid? SystemUserId { get; set; }
|
||||
|
||||
|
||||
public DateTime? ExpireTime { get; set; }
|
||||
|
@ -107,18 +95,27 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public string RejectReason { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// IsGenerateAccount
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool IsGenerateAccount { get; set; }
|
||||
|
||||
public bool IsGenerateSuccess { get; set; }
|
||||
|
||||
|
||||
|
||||
//public Guid GenerateUserId { get; set; }
|
||||
public Guid? PreliminaryUserId { get; set; }
|
||||
|
||||
|
||||
//public Guid TrialId { get; set; }
|
||||
/// <summary>
|
||||
/// IsDisable
|
||||
/// </summary>
|
||||
//[Required]
|
||||
//public bool IsAddTrial { get; set; }
|
||||
|
||||
}
|
||||
public Guid? ReviewerUserId { get; set; }
|
||||
|
||||
}
|
||||
public User ReviewerUser { get; set; }
|
||||
|
||||
public User PreliminaryUser { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 受试者编号具体规则
|
||||
/// </summary>
|
||||
public string SubjectCodeRule { get; set; }
|
||||
public string SubjectCodeRule { get; set; } = "筛选号由5位数字组成,前2位为中心编号,后3位为顺序号,请与EDC录入的编号保持一致";
|
||||
/// <summary>
|
||||
/// 是否 提醒受试者编号规则
|
||||
/// </summary>
|
||||
|
@ -163,7 +163,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 是否 验证拍片日期
|
||||
/// </summary>
|
||||
public bool IsVerifyVisitImageDate { get; set; } = false;
|
||||
public bool IsVerifyVisitImageDate { get; set; } = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue