Uat_Study
parent
f5a70d54d2
commit
2da10559c7
|
@ -84,6 +84,34 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
#region 文件管理
|
||||
|
||||
/// <summary>
|
||||
/// 废除项目
|
||||
/// </summary>
|
||||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/TrialConfig/AbandonTrial")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> AbandonTrial(DataInspectionDto<AbandonTrial> opt)
|
||||
{
|
||||
var fun = await _trialConfigService.AbandonTrial(opt.OptCommand.trialId,opt.OptCommand.isAbandon);
|
||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改项目状态项目
|
||||
/// </summary>
|
||||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/TrialConfig/UpdateTrialState")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialState> opt)
|
||||
{
|
||||
var fun = await _trialConfigService.UpdateTrialState(opt.OptCommand.trialId, opt.OptCommand.trialStatusStr, opt.OptCommand.reason);
|
||||
opt.AuditInfo.Reason = opt.OptCommand.reason;
|
||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -57,6 +57,20 @@
|
|||
Financials /Monthly Payment 列表查询接口
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.AbandonTrial(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Inspection.DTO.AbandonTrial})">
|
||||
<summary>
|
||||
废除项目
|
||||
</summary>
|
||||
<param name="opt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.UpdateTrialState(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Inspection.DTO.UpdateTrialState})">
|
||||
<summary>
|
||||
修改项目状态项目
|
||||
</summary>
|
||||
<param name="opt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.AddOrUpdateTrialDocument(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.AddOrEditTrialDocument})">
|
||||
<summary>
|
||||
|
||||
|
|
|
@ -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,
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue