Compare commits
No commits in common. "dev" and "v1.0.27" have entirely different histories.
6 changed files with 9 additions and 1681 deletions
|
|
@ -480,7 +480,6 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
PaymentEndDate = req.PaymentEndDate,
|
PaymentEndDate = req.PaymentEndDate,
|
||||||
Note = req.Note,
|
Note = req.Note,
|
||||||
AnnouncementDate = req.AnnouncementDate,
|
AnnouncementDate = req.AnnouncementDate,
|
||||||
ScoreExpireDate = req.ScoreExpireDate,
|
|
||||||
OrganizationId = req.rootDnaId,
|
OrganizationId = req.rootDnaId,
|
||||||
CreatedAt = DateTime.Now,
|
CreatedAt = DateTime.Now,
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
|
|
@ -562,8 +561,6 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
data.ExamDate = req.ExamDate;
|
data.ExamDate = req.ExamDate;
|
||||||
data.Note = req.Note;
|
data.Note = req.Note;
|
||||||
data.AnnouncementDate = req.AnnouncementDate;
|
data.AnnouncementDate = req.AnnouncementDate;
|
||||||
if (req.ScoreExpireDate.HasValue)
|
|
||||||
data.ScoreExpireDate = req.ScoreExpireDate;
|
|
||||||
data.LastUpdatedAt = DateTime.Now;
|
data.LastUpdatedAt = DateTime.Now;
|
||||||
data.LastUpdateUserId = UserId ?? "";
|
data.LastUpdateUserId = UserId ?? "";
|
||||||
data.LastUpdateFullName = FullName ?? "System Administrator";
|
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||||
|
|
@ -689,7 +686,7 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
ImportYear = x.ScoreImport.Year,
|
ImportYear = x.ScoreImport.Year,
|
||||||
ImportDate = x.CreatedAt.Date.ToThaiShortDate(),
|
ImportDate = x.CreatedAt.Date.ToThaiShortDate(),
|
||||||
ScoreCount = x.ScoreImport.Scores.Count(),
|
ScoreCount = x.ScoreImport.Scores.Count(),
|
||||||
ResultCount = x.ScoreImport.Scores.Count(x => x.ExamStatus == "ผ่าน" && !string.IsNullOrEmpty(x.Number))
|
ResultCount = x.ScoreImport.Scores.Count(x => !string.IsNullOrEmpty(x.Number))
|
||||||
},
|
},
|
||||||
x.CreatedUserId,
|
x.CreatedUserId,
|
||||||
})
|
})
|
||||||
|
|
@ -1540,9 +1537,6 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
case "notpass":
|
case "notpass":
|
||||||
queryWithScores = queryWithScores.Where(x => x.score != null && x.score.ExamStatus == "ไม่ผ่าน");
|
queryWithScores = queryWithScores.Where(x => x.score != null && x.score.ExamStatus == "ไม่ผ่าน");
|
||||||
break;
|
break;
|
||||||
case "other":
|
|
||||||
queryWithScores = queryWithScores.Where(x => x.score != null && !new[] { "ขส.", "ผ่าน", "ไม่ผ่าน" }.Contains(x.score.ExamStatus));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1826,15 +1820,11 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
Score = score == null ? 0.0 : score.TotalScore,
|
Score = score == null ? 0.0 : score.TotalScore,
|
||||||
Number = score == null ? "" : score.Number,
|
Number = score == null ? "" : score.Number,
|
||||||
ExamCount = _recruitService.GetExamCount(recruit.CitizenId),
|
ExamCount = _recruitService.GetExamCount(recruit.CitizenId),
|
||||||
// เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า)
|
ScoreExpire = recruit.RecruitImport.AnnouncementDate == null
|
||||||
//ScoreExpire = recruit.RecruitImport.AnnouncementDate == null
|
|
||||||
// ? ""
|
|
||||||
// : recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
|
||||||
// ? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate()
|
|
||||||
// : "",
|
|
||||||
ScoreExpire = recruit.RecruitImport.ScoreExpireDate == null
|
|
||||||
? ""
|
? ""
|
||||||
: recruit.RecruitImport.ScoreExpireDate.Value.ToThaiShortDate(),
|
: recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
||||||
|
? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate()
|
||||||
|
: "",
|
||||||
typeTest = recruit.typeTest,
|
typeTest = recruit.typeTest,
|
||||||
ScoreResult = score == null ? null : new
|
ScoreResult = score == null ? null : new
|
||||||
{
|
{
|
||||||
|
|
@ -2661,15 +2651,11 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
T = score != null && score.TotalScore != null ? score.TotalScore.ToString().ToThaiNumber() : "",
|
T = score != null && score.TotalScore != null ? score.TotalScore.ToString().ToThaiNumber() : "",
|
||||||
Result = score == null ? "" : score.ExamStatus,
|
Result = score == null ? "" : score.ExamStatus,
|
||||||
Number = score != null && score.Number != null ? score.Number.ToString().ToThaiNumber() : "",
|
Number = score != null && score.Number != null ? score.Number.ToString().ToThaiNumber() : "",
|
||||||
// เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า)
|
Expire = recruit.RecruitImport.AnnouncementDate == null
|
||||||
//Expire = recruit.RecruitImport.AnnouncementDate == null
|
|
||||||
// ? ""
|
|
||||||
// : recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
|
||||||
// ? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber()
|
|
||||||
// : "",
|
|
||||||
Expire = recruit.RecruitImport.ScoreExpireDate == null
|
|
||||||
? ""
|
? ""
|
||||||
: recruit.RecruitImport.ScoreExpireDate.Value.ToThaiShortDate().ToString().ToThaiNumber(),
|
: recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
||||||
|
? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber()
|
||||||
|
: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
var result = new
|
var result = new
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,31 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Recruit.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class update_RecruitImport_add_ScoreExpireDate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "ScoreExpireDate",
|
|
||||||
table: "RecruitImports",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "วันหมดอายุบัญชี")
|
|
||||||
.Annotation("Relational:ColumnOrder", 15);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ScoreExpireDate",
|
|
||||||
table: "RecruitImports");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -728,11 +728,6 @@ namespace BMA.EHR.Recruit.Migrations
|
||||||
.HasColumnOrder(10)
|
.HasColumnOrder(10)
|
||||||
.HasComment("วันเริ่มสมัครสอบ");
|
.HasComment("วันเริ่มสมัครสอบ");
|
||||||
|
|
||||||
b.Property<DateTime?>("ScoreExpireDate")
|
|
||||||
.HasColumnType("datetime(6)")
|
|
||||||
.HasColumnOrder(15)
|
|
||||||
.HasComment("วันหมดอายุบัญชี");
|
|
||||||
|
|
||||||
b.Property<int>("Year")
|
b.Property<int>("Year")
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
.HasColumnOrder(1)
|
.HasColumnOrder(1)
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,6 @@ namespace BMA.EHR.Recruit.Models.Recruits
|
||||||
[Column(Order = 14), Comment("วันที่ประกาศผลสอบ")]
|
[Column(Order = 14), Comment("วันที่ประกาศผลสอบ")]
|
||||||
public DateTime? AnnouncementDate { get; set; }
|
public DateTime? AnnouncementDate { get; set; }
|
||||||
|
|
||||||
[Column(Order = 15), Comment("วันหมดอายุบัญชี")]
|
|
||||||
public DateTime? ScoreExpireDate { get; set; }
|
|
||||||
|
|
||||||
public Document ImportFile { get; set; } = new Document();
|
public Document ImportFile { get; set; } = new Document();
|
||||||
|
|
||||||
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
|
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,6 @@ namespace BMA.EHR.Recruit.Requests.Recruits
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? AnnouncementDate { get; set; }
|
public DateTime? AnnouncementDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// วันหมดอายุบัญชี
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? ScoreExpireDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// รหัส DNA หน่วยงาน
|
/// รหัส DNA หน่วยงาน
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue