Merge branch 'develop' into working
This commit is contained in:
commit
9412f09f71
6 changed files with 3116 additions and 9 deletions
|
|
@ -61,7 +61,8 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
x.LastName.Contains(keyword) ||
|
x.LastName.Contains(keyword) ||
|
||||||
x.Position.Contains(keyword) ||
|
x.Position.Contains(keyword) ||
|
||||||
x.Email.Contains(keyword) ||
|
x.Email.Contains(keyword) ||
|
||||||
x.Phone.Contains(keyword)
|
x.Phone.Contains(keyword) ||
|
||||||
|
x.Qualification.Contains(keyword)
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
var data = data_search
|
var data = data_search
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
|
|
@ -73,6 +74,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
Position = x.Position,
|
Position = x.Position,
|
||||||
Email = x.Email,
|
Email = x.Email,
|
||||||
Phone = x.Phone,
|
Phone = x.Phone,
|
||||||
|
Qualification = x.Qualification,
|
||||||
TotalInvestigate = x.DisciplineInvestigate_Directors.Count(),
|
TotalInvestigate = x.DisciplineInvestigate_Directors.Count(),
|
||||||
TotalDisciplinary = x.DisciplineDisciplinary_DirectorInvestigates.Count(),
|
TotalDisciplinary = x.DisciplineDisciplinary_DirectorInvestigates.Count(),
|
||||||
})
|
})
|
||||||
|
|
@ -103,6 +105,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
Position = x.Position,
|
Position = x.Position,
|
||||||
Email = x.Email,
|
Email = x.Email,
|
||||||
Phone = x.Phone,
|
Phone = x.Phone,
|
||||||
|
Qualification = x.Qualification,
|
||||||
TotalInvestigate = x.DisciplineInvestigate_Directors.Count(),
|
TotalInvestigate = x.DisciplineInvestigate_Directors.Count(),
|
||||||
TotalDisciplinary = x.DisciplineDisciplinary_DirectorInvestigates.Count(),
|
TotalDisciplinary = x.DisciplineDisciplinary_DirectorInvestigates.Count(),
|
||||||
})
|
})
|
||||||
|
|
@ -136,6 +139,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
Position = req.position,
|
Position = req.position,
|
||||||
Email = req.email,
|
Email = req.email,
|
||||||
Phone = req.phone,
|
Phone = req.phone,
|
||||||
|
Qualification = req.qualification,
|
||||||
CreatedFullName = FullName ?? "System Administrator",
|
CreatedFullName = FullName ?? "System Administrator",
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
CreatedAt = DateTime.Now,
|
CreatedAt = DateTime.Now,
|
||||||
|
|
@ -173,6 +177,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
data.Position = req.position;
|
data.Position = req.position;
|
||||||
data.Email = req.email;
|
data.Email = req.email;
|
||||||
data.Phone = req.phone;
|
data.Phone = req.phone;
|
||||||
|
data.Qualification = req.qualification;
|
||||||
data.LastUpdateFullName = FullName ?? "System Administrator";
|
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||||
data.LastUpdateUserId = UserId ?? "";
|
data.LastUpdateUserId = UserId ?? "";
|
||||||
data.LastUpdatedAt = DateTime.Now;
|
data.LastUpdatedAt = DateTime.Now;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ namespace BMA.EHR.Discipline.Service.Requests
|
||||||
public string firstName { get; set; }
|
public string firstName { get; set; }
|
||||||
public string lastName { get; set; }
|
public string lastName { get; set; }
|
||||||
public string position { get; set; }
|
public string position { get; set; }
|
||||||
public string email { get; set; }
|
public string? email { get; set; }
|
||||||
public string phone { get; set; }
|
public string? phone { get; set; }
|
||||||
|
public string? qualification { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,14 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Required, Comment("ตำแหน่ง")]
|
[Required, Comment("ตำแหน่ง")]
|
||||||
public string Position { get; set; } = string.Empty;
|
public string Position { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required, Comment("อีเมล")]
|
[Comment("อีเมล")]
|
||||||
public string Email { get; set; } = string.Empty;
|
public string? Email { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required, Comment("เบอร์โทรศัพท์")]
|
[Comment("เบอร์โทรศัพท์")]
|
||||||
public string Phone { get; set; } = string.Empty;
|
public string? Phone { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Comment("คุณวุฒิ")]
|
||||||
|
public string? Qualification { get; set; } = string.Empty;
|
||||||
public virtual List<DisciplineInvestigate_Director> DisciplineInvestigate_Directors { get; set; } = new List<DisciplineInvestigate_Director>();
|
public virtual List<DisciplineInvestigate_Director> DisciplineInvestigate_Directors { get; set; } = new List<DisciplineInvestigate_Director>();
|
||||||
public virtual List<DisciplineDisciplinary_DirectorInvestigate> DisciplineDisciplinary_DirectorInvestigates { get; set; } = new List<DisciplineDisciplinary_DirectorInvestigate>();
|
public virtual List<DisciplineDisciplinary_DirectorInvestigate> DisciplineDisciplinary_DirectorInvestigates { get; set; } = new List<DisciplineDisciplinary_DirectorInvestigate>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,94 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class updatetableDisciplineDirectorsaddqualification : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Phone",
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "เบอร์โทรศัพท์",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldComment: "เบอร์โทรศัพท์")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Email",
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "อีเมล",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldComment: "อีเมล")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Qualification",
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "คุณวุฒิ")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Qualification",
|
||||||
|
table: "DisciplineDirectors");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
keyColumn: "Phone",
|
||||||
|
keyValue: null,
|
||||||
|
column: "Phone",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Phone",
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
comment: "เบอร์โทรศัพท์",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "เบอร์โทรศัพท์")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
keyColumn: "Email",
|
||||||
|
keyValue: null,
|
||||||
|
column: "Email",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Email",
|
||||||
|
table: "DisciplineDirectors",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
comment: "อีเมล",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "อีเมล")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -607,7 +607,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||||
.HasComment("User Id ที่สร้างข้อมูล");
|
.HasComment("User Id ที่สร้างข้อมูล");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasComment("อีเมล");
|
.HasComment("อีเมล");
|
||||||
|
|
||||||
|
|
@ -641,7 +640,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||||
|
|
||||||
b.Property<string>("Phone")
|
b.Property<string>("Phone")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasComment("เบอร์โทรศัพท์");
|
.HasComment("เบอร์โทรศัพท์");
|
||||||
|
|
||||||
|
|
@ -655,6 +653,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasComment("คำนำหน้าชื่อ");
|
.HasComment("คำนำหน้าชื่อ");
|
||||||
|
|
||||||
|
b.Property<string>("Qualification")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("คุณวุฒิ");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("DisciplineDirectors");
|
b.ToTable("DisciplineDirectors");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue