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
Details
continuous-integration/drone/push Build is running
Details
commit
030aa36f94
|
|
@ -17429,17 +17429,17 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
||||||
<summary>
|
<summary>
|
||||||
质疑
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
||||||
<summary>
|
<summary>
|
||||||
一致性核查
|
һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
||||||
<summary>
|
<summary>
|
||||||
复制
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||||
|
|
@ -18242,6 +18242,11 @@
|
||||||
文件大小,单位字节
|
文件大小,单位字节
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.ViewModel.SegmentationVersionView.StartTime">
|
||||||
|
<summary>
|
||||||
|
版本开始时间
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.ViewModel.SegmentBindingView.IsLock">
|
<member name="P:IRaCIS.Core.Application.ViewModel.SegmentBindingView.IsLock">
|
||||||
<summary>
|
<summary>
|
||||||
是否锁定
|
是否锁定
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
addOrEditUserFeedBack.SubjectVisitId = info.SourceSubjectVisitId;
|
addOrEditUserFeedBack.SubjectVisitId = info.SourceSubjectVisitId;
|
||||||
}
|
}
|
||||||
|
|
||||||
addOrEditUserFeedBack.State = 0;//设置解决后IR 更新反馈自动变为未解决
|
//addOrEditUserFeedBack.State = 0;//设置解决后IR 更新反馈自动变为未解决
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (addOrEditUserFeedBack.SubjectVisitId != null)
|
else if (addOrEditUserFeedBack.SubjectVisitId != null)
|
||||||
|
|
|
||||||
|
|
@ -94,11 +94,20 @@ public class SegmentationVersionView
|
||||||
public long FileSize { get; set; }
|
public long FileSize { get; set; }
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
public string CreateUserName { get; set; }
|
public string CreateUserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 版本开始时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SaveSegmentationVersionAsyncInDto
|
public class SaveSegmentationVersionAsyncInDto
|
||||||
{
|
{
|
||||||
public Guid SegmentationId { get; set; }
|
public Guid SegmentationId { get; set; }
|
||||||
|
|
||||||
|
public string SEGUrl { get; set; }
|
||||||
|
|
||||||
|
public bool IsRestore { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SegmentationVersionQuery : PageInput
|
public class SegmentationVersionQuery : PageInput
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
|
||||||
if (addOrEditSegmentation.Id != null)
|
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);
|
var entity = await _segmentationRepository.InsertOrUpdateAsync(addOrEditSegmentation, true);
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
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 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();
|
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
|
var maxVersion = await _segmentationVersionRepository
|
||||||
.Where(x => x.SegmentationId == data.Id)
|
.Where(x => x.SegmentationId == data.Id)
|
||||||
.OrderByDescending(x => x.Version)
|
.OrderByDescending(x => x.Version)
|
||||||
.Select(x => x.Version)
|
|
||||||
.FirstOrDefaultAsync();
|
.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
|
var versionEntity = new SegmentationVersion
|
||||||
{
|
{
|
||||||
|
|
@ -113,6 +113,7 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
|
||||||
SEGUrl = data.SEGUrl,
|
SEGUrl = data.SEGUrl,
|
||||||
FileSize = data.FileSize,
|
FileSize = data.FileSize,
|
||||||
SegmentList= segmentList,
|
SegmentList= segmentList,
|
||||||
|
StartTime= startTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
await _segmentationVersionRepository.AddAsync(versionEntity);
|
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 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();
|
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
|
await _segmentationRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.SegmentationId, t => new Segmentation
|
||||||
{
|
{
|
||||||
SegmentationJson = version.SegmentationJson,
|
SegmentationJson = version.SegmentationJson,
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@ public class SegmentationVersion : BaseAddAuditEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public long FileSize { get; set; } = 0;
|
public long FileSize { get; set; } = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 版本开始时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SgenmentList
|
/// SgenmentList
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
22224
IRaCIS.Core.Infra.EFCore/Migrations/20260511073220_maxVersionStartTime.Designer.cs
generated
Normal file
22224
IRaCIS.Core.Infra.EFCore/Migrations/20260511073220_maxVersionStartTime.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,29 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class maxVersionStartTime : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "StartTime",
|
||||||
|
table: "SegmentationVersion",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "StartTime",
|
||||||
|
table: "SegmentationVersion");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9585,6 +9585,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("StartTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<int>("Version")
|
b.Property<int>("Version")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue