增加项目任务配置
This commit is contained in:
@@ -121,6 +121,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TrialTaskConfig
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
public TaskAllocateObj TaskAllocateObjEnum { get; set; }
|
||||
|
||||
public TaskAllocateDefaultState TaskAllocateDefaultState { get; set; }
|
||||
}
|
||||
|
||||
public class TrialUrgentConfig
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
@@ -348,6 +348,20 @@ namespace IRaCIS.Core.Application
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 配置项目任务信息
|
||||
/// </summary>
|
||||
/// <param name="trialConfig"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<IResponseOutput> ConfigTrialTaskInfo(TrialTaskConfig trialConfig)
|
||||
{
|
||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
||||
|
||||
_mapper.Map(trialConfig, trialInfo);
|
||||
|
||||
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
//CreateMap<TrialAttachmentCommand, TrialAttachment>().ForMember(t => t.UserTypes, u => u.MapFrom(k => string.Join(',', k.UserTypeList)));
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<TrialTaskConfig, Trial>().ForMember(d => d.Id, u => u.MapFrom(s => s.TrialId)).ReverseMap();
|
||||
|
||||
CreateMap<UserTrialCommand, TrialUser>();
|
||||
|
||||
CreateMap<TrialSiteCommand, TrialSite>()
|
||||
|
||||
Reference in New Issue
Block a user