添加字段
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
547bd54085
commit
44d9c23c0c
|
|
@ -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>
|
||||||
是否锁定
|
是否锁定
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,11 @@ 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
|
||||||
|
|
|
||||||
|
|
@ -100,10 +100,10 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9582,6 +9582,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