添加分割保存状态

This commit is contained in:
he
2026-03-30 10:54:09 +08:00
parent 3f9e506d09
commit 25f62a35ee
7 changed files with 22144 additions and 4 deletions
@@ -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>