Uat_Study
hang 2022-09-27 16:21:39 +08:00
parent c3f33a2812
commit 0cffb8daf2
7 changed files with 60 additions and 27 deletions

View File

@ -8425,6 +8425,13 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Application.Services.DoctorWorkloadService.UpdateTrialReviewerState(IRaCIS.Application.Contracts.SetEnrollEnableCommand)">
<summary>
修改项目医生启用禁用状态
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.DoctorWorkloadService.UpdateReviewerReadingType(System.Guid,System.Guid,System.Int32)"> <member name="M:IRaCIS.Application.Services.DoctorWorkloadService.UpdateReviewerReadingType(System.Guid,System.Guid,System.Int32)">
<summary> <summary>
0代表裁判和Tp 都可以 1、代表Tp 2 代表裁判 0代表裁判和Tp 都可以 1、代表Tp 2 代表裁判

View File

@ -150,6 +150,20 @@ namespace IRaCIS.Application.Contracts
public List<ReadingCategory> ReadingCategorys { get; set; } public List<ReadingCategory> ReadingCategorys { get; set; }
} }
public class SetEnrollEnableCommand
{
[NotDefault]
public Guid EnrollId { get; set; }
public Guid TrialId { get; set; }
public bool IsEnable { get; set; }
}
public class WorkLoadDoctorQueryDTO : PageInput public class WorkLoadDoctorQueryDTO : PageInput
{ {
public Guid TrialId { get; set; } = Guid.Empty; public Guid TrialId { get; set; } = Guid.Empty;
@ -228,6 +242,8 @@ namespace IRaCIS.Application.Contracts
public class WorkLoadAndAgreementDTO : WorkLoadAndTrainingDTO public class WorkLoadAndAgreementDTO : WorkLoadAndTrainingDTO
{ {
public bool IsEnable { get; set; }
public Guid EnrollId { get; set; } public Guid EnrollId { get; set; }
public DateTime? OutEnrollTime { get; set; } public DateTime? OutEnrollTime { get; set; }
public Guid AgreementId { get; set; } public Guid AgreementId { get; set; }

View File

@ -23,7 +23,7 @@ namespace IRaCIS.Application.Services
private readonly IRepository<TrialRevenuesPrice> _trialRevenuesPriceRepository; private readonly IRepository<TrialRevenuesPrice> _trialRevenuesPriceRepository;
private readonly IRepository<TrialRevenuesPriceVerification> _trialRevenuesPriceVerificationRepository; private readonly IRepository<TrialRevenuesPriceVerification> _trialRevenuesPriceVerificationRepository;
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
public DoctorWorkloadService(IRepository<Trial> clinicalTrialProjectRepository, public DoctorWorkloadService(IRepository<Trial> clinicalTrialProjectRepository,
IRepository<Enroll> intoGroupRepository, IRepository<Enroll> intoGroupRepository,
IRepository<Doctor> doctorInfoRepository, IRepository<Doctor> doctorInfoRepository,
@ -32,9 +32,11 @@ namespace IRaCIS.Application.Services
IRepository<Attachment> attachmentRepository, IRepository<Attachment> attachmentRepository,
IRepository<Payment> costStatisticsRepository, IRepository<Payment> costStatisticsRepository,
IRepository<TrialRevenuesPrice> trialRevenuesPriceRepository, IRepository<TrialRevenuesPrice> trialRevenuesPriceRepository,
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
IRepository<TrialRevenuesPriceVerification> trialRevenuesPriceVerificationRepository, IRepository<TrialRevenuesPriceVerification> trialRevenuesPriceVerificationRepository,
IMapper mapper) IMapper mapper)
{ {
_taskAllocationRuleRepository = taskAllocationRuleRepository;
_trialRepository = clinicalTrialProjectRepository; _trialRepository = clinicalTrialProjectRepository;
_enrollRepository = intoGroupRepository; _enrollRepository = intoGroupRepository;
_doctorRepository = doctorInfoRepository; _doctorRepository = doctorInfoRepository;
@ -147,6 +149,19 @@ namespace IRaCIS.Application.Services
return ResponseOutput.Ok(result); return ResponseOutput.Ok(result);
} }
/// <summary>
/// 修改项目医生启用禁用状态
/// </summary>
/// <param name="inCommand"></param>
/// <returns></returns>
[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> UpdateTrialReviewerState(SetEnrollEnableCommand inCommand)
{
await _taskAllocationRuleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == inCommand.TrialId && t.EnrollId == inCommand.EnrollId, u => new TaskAllocationRule() { IsEnable = inCommand.IsEnable },true);
return ResponseOutput.Ok();
}
/// <summary> /// <summary>
/// 0代表裁判和Tp 都可以 1、代表Tp 2 代表裁判 /// 0代表裁判和Tp 都可以 1、代表Tp 2 代表裁判
@ -178,6 +193,7 @@ namespace IRaCIS.Application.Services
var doctorIntoGroupQueryable = var doctorIntoGroupQueryable =
from intoGroup in _enrollRepository.Where(x => x.TrialId == trialId && x.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) from intoGroup in _enrollRepository.Where(x => x.TrialId == trialId && x.EnrollStatus >= EnrollStatus.ConfirmIntoGroup)
join allocateRule in _taskAllocationRuleRepository.AsQueryable() on intoGroup.Id equals allocateRule.EnrollId
join doctor in _doctorRepository.AsQueryable() on intoGroup.DoctorId equals doctor.Id join doctor in _doctorRepository.AsQueryable() on intoGroup.DoctorId equals doctor.Id
join attachmentItem in _attachmentRepository.AsQueryable() on intoGroup.AttachmentId equals attachmentItem.Id into cc join attachmentItem in _attachmentRepository.AsQueryable() on intoGroup.AttachmentId equals attachmentItem.Id into cc
from attachment in cc.DefaultIfEmpty() from attachment in cc.DefaultIfEmpty()
@ -204,6 +220,8 @@ namespace IRaCIS.Application.Services
select new WorkLoadAndAgreementDTO() select new WorkLoadAndAgreementDTO()
{ {
EnrollId = intoGroup.Id, EnrollId = intoGroup.Id,
IsEnable = allocateRule.IsEnable,
ReadingCategorys = intoGroup.EnrollReadingCategoryList.Select(x => x.ReadingCategory).OrderBy(x => x).ToList(), ReadingCategorys = intoGroup.EnrollReadingCategoryList.Select(x => x.ReadingCategory).OrderBy(x => x).ToList(),
DoctorId = doctor.Id, DoctorId = doctor.Id,
Code = doctor.ReviewerCode, Code = doctor.ReviewerCode,

View File

@ -16,8 +16,6 @@ namespace IRaCIS.Core.Domain.Models
public class TrialSiteEquipmentSurvey : Entity, IAuditUpdate, IAuditAdd public class TrialSiteEquipmentSurvey : Entity, IAuditUpdate, IAuditAdd
{ {
[ForeignKey("TrialSiteSurveyId")] [ForeignKey("TrialSiteSurveyId")]
public TrialSiteSurvey TrialSiteSurvey { get; set; } public TrialSiteSurvey TrialSiteSurvey { get; set; }

View File

@ -16,9 +16,6 @@ namespace IRaCIS.Core.Domain.Models
[Table("TrialSiteSurvey")] [Table("TrialSiteSurvey")]
public class TrialSiteSurvey : Entity, IAuditUpdate, IAuditAdd,ISoftDelete public class TrialSiteSurvey : Entity, IAuditUpdate, IAuditAdd,ISoftDelete
{ {
//public bool IsLocked { get; set; }=false;
public TrialSiteSurveyEnum State { get; set; } = TrialSiteSurveyEnum.ToSubmit; public TrialSiteSurveyEnum State { get; set; } = TrialSiteSurveyEnum.ToSubmit;

View File

@ -21,9 +21,6 @@ namespace IRaCIS.Core.Domain.Models
public Guid TrialSiteSurveyId { get; set; } public Guid TrialSiteSurveyId { get; set; }
[ForeignKey("UserTypeId")] [ForeignKey("UserTypeId")]
public UserType UserTypeRole { get; set; } public UserType UserTypeRole { get; set; }