添加分割保存状态
This commit is contained in:
@@ -19,6 +19,16 @@ public class SegmentationView : SegmentationAddOrEdit
|
||||
}
|
||||
|
||||
|
||||
public class ChangeSegmentationSavedStatusInDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否保存
|
||||
/// </summary>
|
||||
public bool IsSaved { get; set; } = false;
|
||||
}
|
||||
|
||||
public class SegmentationAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
@@ -40,7 +50,12 @@ public class SegmentationAddOrEdit
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否保存
|
||||
/// </summary>
|
||||
public bool IsSaved { get; set; } = false;
|
||||
}
|
||||
|
||||
public class SegmentationQuery:PageInput
|
||||
{
|
||||
|
||||
@@ -93,6 +93,23 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改分割组的保存状态
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ChangeSegmentationSavedStatus(ChangeSegmentationSavedStatusInDto inDto)
|
||||
{
|
||||
await _segmentationRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, t => new Segmentation
|
||||
{
|
||||
IsSaved = inDto.IsSaved
|
||||
});
|
||||
await _segmentationRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取分割
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user