ประวัติการขยายเพิ่มเก็บค่าจำนวนวันขยาย

This commit is contained in:
Kittapath 2023-12-07 23:43:49 +07:00
parent 0b4ea7c9ce
commit 84e656b0c8
7 changed files with 11514 additions and 0 deletions

View file

@ -420,6 +420,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
{
Name = e.Name,
Num = e.Num,
DaysExtend = e.DaysExtend,
DateStart = e.DateStart,
DateEnd = e.DateEnd,
}),
@ -616,6 +617,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
{
Name = sumExtend > 0 ? "ขยายครั้งที่" + sumExtend : "วันที่สอบสวน",
Num = sumExtend,
DaysExtend = data.DisciplinaryDaysExtend,
DateStart = sumExtend > 0 ? data.DisciplinaryDateEnd.Value.AddDays(data.DisciplinaryDaysExtend == null ? 0 : -(double)data.DisciplinaryDaysExtend) : data.DisciplinaryDateStart,
DateEnd = data.DisciplinaryDateEnd,
CreatedFullName = FullName ?? "System Administrator",

View file

@ -250,6 +250,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
{
Name = e.Name,
Num = e.Num,
DaysExtend = e.DaysExtend,
DateStart = e.DateStart,
DateEnd = e.DateEnd,
}),
@ -388,6 +389,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
{
Name = sumExtend > 0 ? "ขยายครั้งที่" + sumExtend : "วันที่สืบสวน",
Num = sumExtend,
DaysExtend = data.InvestigationDaysExtend,
DateStart = sumExtend > 0 ? data.InvestigationDateEnd.Value.AddDays(data.InvestigationDaysExtend == null ? 0 : -(double)data.InvestigationDaysExtend) : data.InvestigationDateStart,
DateEnd = data.InvestigationDateEnd,
CreatedFullName = FullName ?? "System Administrator",

View file

@ -13,6 +13,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? Name { get; set; }
[Comment("ครั้งที่ขยาย")]
public int Num { get; set; }
[Comment("จำนวนวันที่การขยาย")]
public int? DaysExtend { get; set; }
[Comment("วันที่เริ่ม")]
public DateTime? DateStart { get; set; }
[Comment("วันที่สิ้นสุด")]

View file

@ -13,6 +13,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? Name { get; set; }
[Comment("ครั้งที่ขยาย")]
public int Num { get; set; }
[Comment("จำนวนวันที่การขยาย")]
public int? DaysExtend { get; set; }
[Comment("วันที่เริ่ม")]
public DateTime? DateStart { get; set; }
[Comment("วันที่สิ้นสุด")]

View file

@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetableDisciplineInvestigateExtendsaddDaysExtend : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "DaysExtend",
table: "DisciplineInvestigateExtends",
type: "int",
nullable: true,
comment: "จำนวนวันที่การขยาย");
migrationBuilder.AddColumn<int>(
name: "DaysExtend",
table: "DisciplineDisciplinaryExtends",
type: "int",
nullable: true,
comment: "จำนวนวันที่การขยาย");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DaysExtend",
table: "DisciplineInvestigateExtends");
migrationBuilder.DropColumn(
name: "DaysExtend",
table: "DisciplineDisciplinaryExtends");
}
}
}

View file

@ -715,6 +715,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("datetime(6)")
.HasComment("วันที่เริ่ม");
b.Property<int?>("DaysExtend")
.HasColumnType("int")
.HasComment("จำนวนวันที่การขยาย");
b.Property<Guid>("DisciplineDisciplinaryId")
.HasColumnType("char(36)");
@ -1617,6 +1621,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("datetime(6)")
.HasComment("วันที่เริ่ม");
b.Property<int?>("DaysExtend")
.HasColumnType("int")
.HasComment("จำนวนวันที่การขยาย");
b.Property<Guid>("DisciplineInvestigateId")
.HasColumnType("char(36)");