添加字段
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
he 2026-05-11 15:33:41 +08:00
parent 547bd54085
commit 44d9c23c0c
7 changed files with 22274 additions and 2 deletions

View File

@ -18242,6 +18242,11 @@
文件大小,单位字节
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.SegmentationVersionView.StartTime">
<summary>
版本开始时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.SegmentBindingView.IsLock">
<summary>
是否锁定

View File

@ -94,6 +94,11 @@ 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

View File

@ -100,10 +100,10 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
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);

View File

@ -39,6 +39,11 @@ public class SegmentationVersion : BaseAddAuditEntity
/// </summary>
public long FileSize { get; set; } = 0;
/// <summary>
/// 版本开始时间
/// </summary>
public DateTime? StartTime { get; set; }
/// <summary>
/// SgenmentList
/// </summary>

File diff suppressed because it is too large Load Diff

View File

@ -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");
}
}
}

View File

@ -9582,6 +9582,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("StartTime")
.HasColumnType("datetime2");
b.Property<int>("Version")
.HasColumnType("int");