Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running

This commit is contained in:
2026-05-12 11:45:56 +08:00
8 changed files with 22285 additions and 9 deletions
@@ -103,7 +103,7 @@ namespace IRaCIS.Core.Application.Service
addOrEditUserFeedBack.SubjectVisitId = info.SourceSubjectVisitId;
}
addOrEditUserFeedBack.State = 0;//设置解决后IR 更新反馈自动变为未解决
//addOrEditUserFeedBack.State = 0;//设置解决后IR 更新反馈自动变为未解决
}
else if (addOrEditUserFeedBack.SubjectVisitId != null)
@@ -94,11 +94,20 @@ public class SegmentationVersionView
public long FileSize { get; set; }
public DateTime CreateTime { get; set; }
public string CreateUserName { get; set; }
/// <summary>
/// 版本开始时间
/// </summary>
public DateTime? StartTime { get; set; }
}
public class SaveSegmentationVersionAsyncInDto
{
public Guid SegmentationId { get; set; }
public string SEGUrl { get; set; }
public bool IsRestore { get; set; } = false;
}
public class SegmentationVersionQuery : PageInput
@@ -78,7 +78,7 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
if (addOrEditSegmentation.Id != null)
{
await SaveSegmentationVersionAsync(new SaveSegmentationVersionAsyncInDto() { SegmentationId = addOrEditSegmentation.Id.Value });
await SaveSegmentationVersionAsync(new SaveSegmentationVersionAsyncInDto() { SegmentationId = addOrEditSegmentation.Id.Value,SEGUrl=addOrEditSegmentation.SEGUrl });
}
var entity = await _segmentationRepository.InsertOrUpdateAsync(addOrEditSegmentation, true);
return ResponseOutput.Ok(entity.Id.ToString());
@@ -94,16 +94,16 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
var data = await _segmentationRepository.FirstOrDefaultNoTrackingAsync(x => x.Id == inDto.SegmentationId);
var segmentList = await _segmentRepository.Where(x => x.SegmentationId == inDto.SegmentationId).OrderBy(x=>x.SegmentNumber).ProjectTo<SegmentVersionData>(_mapper.ConfigurationProvider).ToListAsync();
if (data.SEGUrl != string.Empty)
if (data.SEGUrl != string.Empty&&(inDto.SEGUrl!=data.SEGUrl||inDto.IsRestore))
{
// 如果是新增或修改,记录一条版本信息
var maxVersion = await _segmentationVersionRepository
.Where(x => x.SegmentationId == data.Id)
.OrderByDescending(x => x.Version)
.Select(x => x.Version)
.FirstOrDefaultAsync();
var newVersion = maxVersion + 1;
var newVersion = maxVersion == null ? 1 : maxVersion.Version + 1;
var startTime = maxVersion != null ? maxVersion.CreateTime : data.UpdateTime ;
var versionEntity = new SegmentationVersion
{
@@ -113,6 +113,7 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
SEGUrl = data.SEGUrl,
FileSize = data.FileSize,
SegmentList= segmentList,
StartTime= startTime,
};
await _segmentationVersionRepository.AddAsync(versionEntity);
@@ -151,7 +152,7 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
var version = await _segmentationVersionRepository.Where(x => x.Id == inDto.VersionId && x.SegmentationId == inDto.SegmentationId).FirstNotNullAsync();
var segmentation = await _segmentationRepository.Where(x => x.Id == inDto.SegmentationId).FirstNotNullAsync();
await SaveSegmentationVersionAsync(new SaveSegmentationVersionAsyncInDto() { SegmentationId=inDto.SegmentationId});
await SaveSegmentationVersionAsync(new SaveSegmentationVersionAsyncInDto() { SegmentationId=inDto.SegmentationId,IsRestore=true,});
await _segmentationRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.SegmentationId, t => new Segmentation
{
SegmentationJson = version.SegmentationJson,