修改
This commit is contained in:
@@ -1652,7 +1652,7 @@
|
||||
<param name="trialConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.UpdateTrialState(System.Guid,System.String,System.Guid,System.String,EasyCaching.Core.IEasyCachingProvider)">
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.UpdateTrialState(System.Guid,System.String,System.String)">
|
||||
<summary>
|
||||
更新项目状态
|
||||
</summary>
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||
////需要单独处理
|
||||
//public string IP { get; set; }
|
||||
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public DateTime? CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
public bool NeedSava { get; set; } = true;
|
||||
|
||||
@@ -363,6 +363,19 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||
|
||||
}
|
||||
|
||||
public class UpdateTrialState
|
||||
{
|
||||
public Guid trialId { get; set; }
|
||||
public string trialStatusStr { get; set; }
|
||||
public string reason { get; set; }
|
||||
}
|
||||
|
||||
public class AbandonTrial
|
||||
{
|
||||
public Guid trialId { get; set; }
|
||||
public bool isAbandon { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetDataInspectionDto : PageInput
|
||||
{
|
||||
|
||||
@@ -6,7 +6,8 @@ namespace IRaCIS.Application.Interfaces
|
||||
{
|
||||
public interface ITrialConfigService
|
||||
{
|
||||
|
||||
Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason);
|
||||
Task<IResponseOutput> AbandonTrial(Guid trialId, bool isAbandon);
|
||||
Task<TrialConfigDTO> GetTrialConfigInfo(Guid trialId);
|
||||
|
||||
Task<IResponseOutput> ConfigTrialBasicInfo(BasicTrialConfig trialConfig);
|
||||
|
||||
@@ -14,10 +14,14 @@ namespace IRaCIS.Core.Application
|
||||
public class TrialConfigService : BaseService, ITrialConfigService
|
||||
{
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
|
||||
public TrialConfigService(IRepository<Trial> trialRepository)
|
||||
public TrialConfigService(IRepository<Trial> trialRepository,
|
||||
IEasyCachingProvider provider
|
||||
)
|
||||
{
|
||||
_trialRepository = trialRepository;
|
||||
this._provider = provider;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -187,7 +191,7 @@ namespace IRaCIS.Core.Application
|
||||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{signId:guid}/{trialStatusStr}/{reason?}")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, Guid signId, string? reason, [FromServices] IEasyCachingProvider _provider)
|
||||
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason)
|
||||
{
|
||||
|
||||
var trial = (await _trialRepository.Where(t => t.Id == trialId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
@@ -227,10 +231,10 @@ namespace IRaCIS.Core.Application
|
||||
await _repository.SaveChangesAsync();
|
||||
|
||||
|
||||
var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
//var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -265,7 +265,6 @@ namespace IRaCIS.Application.Services
|
||||
t.VisitNum,
|
||||
t.IsBaseLine,
|
||||
t.BlindName,
|
||||
|
||||
t.Description,
|
||||
IsConfirmed = true,
|
||||
}).ToListAsync();
|
||||
@@ -368,9 +367,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
BlindName = x.BlindName,
|
||||
IsBaseLine = x.IsBaseLine,
|
||||
IsCheckBack = x.IsBaseLine,
|
||||
|
||||
IsUrgent = trial.IsSubjectExpeditedView,
|
||||
IsUrgent = false,
|
||||
};
|
||||
|
||||
subjectVisits.Add(subjectVisit);
|
||||
@@ -399,11 +397,11 @@ namespace IRaCIS.Application.Services
|
||||
VisitWindowLeft = x.VisitWindowLeft,
|
||||
VisitWindowRight = x.VisitWindowRight,
|
||||
IsEnrollment = y.IsEnrollment,
|
||||
IsUrgent = trial.IsSubjectExpeditedView,
|
||||
IsUrgent = false,
|
||||
IsFinalVisit = subjectVisit.IsFinalVisit,
|
||||
IsLostVisit = subjectVisit.IsLostVisit,
|
||||
|
||||
PDState = trial.IsPDProgressView,
|
||||
PDState = false,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -415,7 +413,7 @@ namespace IRaCIS.Application.Services
|
||||
SubjectVisitId = guid,
|
||||
SubjectCode = y.Code,
|
||||
BlindName = x.BlindName,
|
||||
ParentId = dataindtid,
|
||||
//ParentId = dataindtid,
|
||||
SubjectVisitName = x.VisitName,
|
||||
IsSign = false,
|
||||
TrialId = x.TrialId,
|
||||
@@ -437,7 +435,7 @@ namespace IRaCIS.Application.Services
|
||||
VisitWindowRight = x.VisitWindowRight,
|
||||
IsFinalVisit = subjectVisit.IsFinalVisit,
|
||||
IsLostVisit = subjectVisit.IsLostVisit,
|
||||
PDState = trial.IsPDProgressView,
|
||||
PDState = false,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user