项目中心修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0b3fe111b7
commit
54d17f2e24
|
@ -16205,6 +16205,12 @@
|
|||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetTrialSiteCRCList(System.Guid,System.Guid)">
|
||||
<summary>获取某一Site下面的负责的CRC列表</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.AssignSiteCRC(System.Collections.Generic.List{IRaCIS.Core.Application.Contracts.DTO.AssginSiteCRCCommand})">
|
||||
<summary> 批量添加Site下 CRC的负责人 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.DeleteSiteCRC(System.Guid,System.Boolean)">
|
||||
<summary> 删除CRC人员</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetSiteCRCList(IRaCIS.Core.Application.Contracts.DTO.SiteCrcQueryDTO)">
|
||||
<summary>Pannel 进去 SiteTab </summary>
|
||||
</member>
|
||||
|
@ -16224,12 +16230,6 @@
|
|||
<param name="editTrialSiteCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.AssignSiteCRC(System.Collections.Generic.List{IRaCIS.Core.Application.Contracts.DTO.AssginSiteCRCCommand})">
|
||||
<summary> 批量添加Site下 CRC的负责人 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.DeleteSiteCRC(System.Guid,System.Boolean)">
|
||||
<summary> 删除CRC人员</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetTrialSiteSelect(System.Guid)">
|
||||
<summary>
|
||||
获取项目下的 site 下拉框数据 CRC只看到他负责的
|
||||
|
|
|
@ -73,8 +73,6 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
[NotDefault]
|
||||
public Guid TrialSiteId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public DateTime? CreateTime { get; set; } = DateTime.Now;
|
||||
public string UserRealName { get; set; } = String.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
@ -94,6 +92,9 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
public string Phone { get; set; } = String.Empty;
|
||||
public string EMail { get; set; } = string.Empty;
|
||||
|
||||
public DateTime? CreateTime { get; set; } = DateTime.Now;
|
||||
public string UserRealName { get; set; } = String.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,31 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public class TrialSiteCRCListDTO
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public Guid IdentityUserId { get; set; }
|
||||
|
||||
public string UserType { get; set; }
|
||||
|
||||
public string Phone { get; set; } = String.Empty;
|
||||
|
||||
public string EMail { get; set; } = string.Empty;
|
||||
|
||||
public string OrganizationName { get; set; } = String.Empty;
|
||||
|
||||
public string UserName { get; set; } = String.Empty;
|
||||
|
||||
public string FullName { get; set; } = String.Empty;
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
|
||||
public class UserTrialDTO : UserTrialCommand
|
||||
|
@ -364,7 +388,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
public int? UserCount { get; set; }
|
||||
//public int? UserCount { get; set; }
|
||||
|
||||
public string TrialSiteCode { get; set; } = String.Empty;
|
||||
|
||||
|
|
|
@ -22,16 +22,51 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
/// <summary>获取某一Site下面的负责的CRC列表</summary>
|
||||
[HttpGet, Route("{trialId:guid}/{siteId:guid}")]
|
||||
public async Task<List<UserTrialDTO>> GetTrialSiteCRCList(Guid trialId, Guid siteId)
|
||||
public async Task<List<TrialSiteCRCListDTO>> GetTrialSiteCRCList(Guid trialId, Guid siteId)
|
||||
{
|
||||
var query = _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == siteId).IgnoreQueryFilters()
|
||||
.ProjectTo<UserTrialDTO>(_mapper.ConfigurationProvider);
|
||||
.ProjectTo<TrialSiteCRCListDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary> 批量添加Site下 CRC的负责人 </summary>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> AssignSiteCRC(List<AssginSiteCRCCommand> trialSiteCRCList)
|
||||
{
|
||||
var addArray = _mapper.Map<List<TrialSiteUserRole>>(trialSiteCRCList);
|
||||
|
||||
await _trialSiteUserRoleRepository.AddRangeAsync(addArray);
|
||||
|
||||
await _trialSiteUserRoleRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary> 删除CRC人员</summary>
|
||||
[HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete)
|
||||
{
|
||||
|
||||
|
||||
await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.Id == id, u => new TrialSiteUserRole() { IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null }, true, true);
|
||||
|
||||
//删除又启用改授权时间
|
||||
if (isDelete == false)
|
||||
{
|
||||
await _trialSiteUserRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialSiteUserRole() { CreateTime = DateTime.Now });
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
@ -208,46 +243,6 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
|
||||
/// <summary> 批量添加Site下 CRC的负责人 </summary>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> AssignSiteCRC(List<AssginSiteCRCCommand> trialSiteCRCList)
|
||||
{
|
||||
var addArray = _mapper.Map<List<TrialSiteUserRole>>(trialSiteCRCList);
|
||||
|
||||
await _trialSiteUserRoleRepository.AddRangeAsync(addArray);
|
||||
|
||||
await _trialSiteUserRoleRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary> 删除CRC人员</summary>
|
||||
[HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete)
|
||||
{
|
||||
|
||||
|
||||
await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.Id == id, u => new TrialSiteUserRole() { IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null }, true, true);
|
||||
|
||||
//删除又启用改授权时间
|
||||
if (isDelete == false)
|
||||
{
|
||||
await _trialSiteUserRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialSiteUserRole() { CreateTime = DateTime.Now });
|
||||
}
|
||||
|
||||
////不跟踪
|
||||
//await _trialSiteUserRoleRepository.ExecuteUpdateAsync(t => t.Id == id, s=>s.SetProperty(t=>t.IsDeleted,u=>isDelete)
|
||||
// .SetProperty(t=>t.DeletedTime,u=> isDelete ? DateTime.Now : null)
|
||||
// .SetProperty(t=>t.CreateTime,u=>isDelete?u.CreateTime:DateTime.Now));
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目下的 site 下拉框数据 CRC只看到他负责的
|
||||
|
|
|
@ -126,8 +126,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.TrialSiteId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count()))
|
||||
.ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count()))
|
||||
.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count()))
|
||||
.ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.UserRole.FullName)));
|
||||
//.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count()))
|
||||
.ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.UserRole.IdentityUser.FullName)));
|
||||
#endregion
|
||||
|
||||
|
||||
|
@ -140,10 +140,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.UpdateTime, u => u.MapFrom(s => s.UpdateTime))
|
||||
//.ForMember(d => d.Site, u => u.MapFrom(s => isEn_Us ?s.Site.SiteName:s.Site.SiteNameCN))
|
||||
//.ForMember(d => d.Hospital, u => u.MapFrom(s => s.Site.Hospital.HospitalName))
|
||||
.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count()))
|
||||
//.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count()))
|
||||
.ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count()))
|
||||
.ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count()))
|
||||
.ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.UserRole.FullName)))
|
||||
.ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.UserRole.IdentityUser.FullName)))
|
||||
.ForMember(d => d.CallingAEList, u => u.MapFrom(s => s.TrialSiteDicomAEList.Select(u => u.CallingAE)));
|
||||
//CreateMap<Site, SiteStatSimpleDTO>();
|
||||
|
||||
|
|
|
@ -58,10 +58,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<TrialUserRole, TrialIdentityUserRoleDto>();
|
||||
|
||||
|
||||
CreateMap<TrialSiteUserRole, TrialSiteCRCListDTO>()
|
||||
.ForMember(t => t.IdentityUserId, u => u.MapFrom(c => c.UserRole.IdentityUserId))
|
||||
.ForMember(t => t.UserType, u => u.MapFrom(c => c.UserRole.UserTypeRole.UserTypeShortName));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue