เพิ่มเก็บคะแนนภาค ข ค
This commit is contained in:
parent
096648cce1
commit
0273a37503
9 changed files with 1816 additions and 25 deletions
|
|
@ -879,6 +879,40 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
|
||||
var file = Request.Form.Files[0];
|
||||
await _candidateService.UpdateAsyncPaymentImage(examId, positionId, file);
|
||||
// await _candidateService.UserCheckCandidateService(examId, positionId, "checkPayment");
|
||||
|
||||
return Success();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ตรวจสอบหลักฐานการชำระเงิน
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อตรวจสอบหลักฐานสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("payment-image/{examId:length(36)}/{positionId:length(36)}"), DisableRequestSizeLimit]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> ConfirmPaymentCandidateService(string examId, string positionId)
|
||||
{
|
||||
try
|
||||
{
|
||||
// if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
||||
// {
|
||||
// return Error(GlobalMessages.NoFileToUpload);
|
||||
// }
|
||||
|
||||
// var file = Request.Form.Files[0];
|
||||
// await _candidateService.UpdateAsyncPaymentImage(examId, positionId, file);
|
||||
await _candidateService.UserCheckCandidateService(examId, positionId, "checkPayment");
|
||||
|
||||
return Success();
|
||||
|
|
|
|||
|
|
@ -598,8 +598,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ประเภทอาชีพที่ทำงานมาก่อน");
|
||||
|
||||
b.Property<bool?>("Pass")
|
||||
.HasColumnType("tinyint(1)")
|
||||
b.Property<string>("Pass")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผลสมัครสอบ");
|
||||
|
||||
b.Property<Guid?>("PaymentImgId")
|
||||
|
|
@ -608,9 +608,21 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
b.Property<Guid>("PeriodExamId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Point")
|
||||
b.Property<string>("PointB")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คะแนน");
|
||||
.HasComment("คะแนนภาค ข");
|
||||
|
||||
b.Property<string>("PointC")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คะแนนภาค ค");
|
||||
|
||||
b.Property<string>("PointTotalB")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คะแนนเต็มภาค ข");
|
||||
|
||||
b.Property<string>("PointTotalC")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คะแนนเต็มภาค ค");
|
||||
|
||||
b.Property<Guid?>("PositionExamId")
|
||||
.HasColumnType("char(36)");
|
||||
|
|
@ -675,6 +687,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ศาสนา");
|
||||
|
||||
b.Property<string>("ResultB")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผลสอบภาค ข");
|
||||
|
||||
b.Property<string>("ResultC")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผลสอบภาค ค");
|
||||
|
||||
b.Property<string>("SeatNumber")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เลขที่นั่งสอบ");
|
||||
|
|
|
|||
1559
Migrations/20230424125726_update table candidate add pointB C.Designer.cs
generated
Normal file
1559
Migrations/20230424125726_update table candidate add pointB C.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
126
Migrations/20230424125726_update table candidate add pointB C.cs
Normal file
126
Migrations/20230424125726_update table candidate add pointB C.cs
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablecandidateaddpointBC : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Point",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Pass",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ผลสมัครสอบ",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldNullable: true,
|
||||
oldComment: "ผลสมัครสอบ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PointB",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คะแนนภาค ข")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PointC",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คะแนนภาค ค")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PointTotalB",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คะแนนเต็มภาค ข")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PointTotalC",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คะแนนเต็มภาค ค")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ResultB",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ผลสอบภาค ข")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ResultC",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ผลสอบภาค ค")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointB",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointC",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointTotalB",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointTotalC",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ResultB",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ResultC",
|
||||
table: "Candidates");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "Pass",
|
||||
table: "Candidates",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ผลสมัครสอบ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "ผลสมัครสอบ")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Point",
|
||||
table: "Candidates",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คะแนน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -25,8 +25,23 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
[Comment("เลขที่นั่งสอบ")]
|
||||
public string? SeatNumber { get; set; }
|
||||
|
||||
[Comment("คะแนน")]
|
||||
public string? Point { get; set; }
|
||||
[Comment("คะแนนเต็มภาค ข")]
|
||||
public string? PointTotalB { get; set; }
|
||||
|
||||
[Comment("คะแนนภาค ข")]
|
||||
public string? PointB { get; set; }
|
||||
|
||||
[Comment("ผลสอบภาค ข")]
|
||||
public string? ResultB { get; set; }
|
||||
|
||||
[Comment("คะแนนเต็มภาค ค")]
|
||||
public string? PointTotalC { get; set; }
|
||||
|
||||
[Comment("คะแนนภาค ค")]
|
||||
public string? PointC { get; set; }
|
||||
|
||||
[Comment("ผลสอบภาค ค")]
|
||||
public string? ResultC { get; set; }
|
||||
|
||||
[Comment("Id รูปโปรไฟล์")]
|
||||
public virtual Document? ProfileImg { get; set; }
|
||||
|
|
@ -227,7 +242,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
public string? RejectDetail { get; set; }
|
||||
|
||||
[Comment("ผลสมัครสอบ")]
|
||||
public bool? Pass { get; set; }
|
||||
public string? Pass { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public string? CitizenId { get; set; }
|
||||
public string? ExamIdenNumber { get; set; }
|
||||
public string? SeatNumber { get; set; }
|
||||
public string? Point { get; set; }
|
||||
public string? PointTotalB { get; set; }
|
||||
public string? PointB { get; set; }
|
||||
public string? ResultB { get; set; }
|
||||
public string? PointTotalC { get; set; }
|
||||
public string? PointC { get; set; }
|
||||
public string? ResultC { get; set; }
|
||||
public string? Pass { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public string? CitizenId { get; set; }
|
||||
public string? ExamIdenNumber { get; set; }
|
||||
public string? SeatNumber { get; set; }
|
||||
public string? Point { get; set; }
|
||||
public bool? Pass { get; set; }
|
||||
public string? PointTotalB { get; set; }
|
||||
public string? PointB { get; set; }
|
||||
public string? ResultB { get; set; }
|
||||
public string? PointTotalC { get; set; }
|
||||
public string? PointC { get; set; }
|
||||
public string? ResultC { get; set; }
|
||||
public string? Pass { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1464,7 +1464,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CitizenId = candidate.CitizenId,
|
||||
ExamIdenNumber = candidate.ExamIdenNumber,
|
||||
SeatNumber = candidate.SeatNumber,
|
||||
Point = candidate.Point,
|
||||
PointTotalB = candidate.PointTotalB,
|
||||
PointB = candidate.PointB,
|
||||
ResultB = candidate.ResultB,
|
||||
PointTotalC = candidate.PointTotalC,
|
||||
PointC = candidate.PointC,
|
||||
ResultC = candidate.ResultC,
|
||||
Pass = candidate.Pass,
|
||||
Id = candidate.Id,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
public async Task<IEnumerable<Education?>> GetsAsyncEducation(string candidateId)
|
||||
{
|
||||
return await _context.Educations.AsQueryable()
|
||||
.Where(x => x.Id == Guid.Parse(candidateId))
|
||||
.Where(x => x.Candidate.Id == Guid.Parse(candidateId))
|
||||
.OrderBy(d => d.DurationStart)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
|
@ -697,7 +697,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
public async Task<IEnumerable<Career?>> GetsAsyncCareer(string candidateId)
|
||||
{
|
||||
return await _context.Careers.AsQueryable()
|
||||
.Where(x => x.Id == Guid.Parse(candidateId))
|
||||
.Where(x => x.Candidate.Id == Guid.Parse(candidateId))
|
||||
.OrderBy(d => d.DurationStart)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
|
@ -753,11 +753,16 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
list.Add(new RequestImportSeat
|
||||
{
|
||||
CitizenId = worksheet.Cells[row, 1].Value != null ? worksheet.Cells[row, 1].Value.ToString() : "-",
|
||||
ExamIdenNumber = worksheet.Cells[row, 2].Value != null ? worksheet.Cells[row, 2].Value.ToString() : "-",
|
||||
SeatNumber = worksheet.Cells[row, 3].Value != null ? worksheet.Cells[row, 3].Value.ToString() : "-",
|
||||
Point = worksheet.Cells[row, 4].Value != null ? worksheet.Cells[row, 4].Value.ToString() : "-",
|
||||
Pass = worksheet.Cells[row, 4].Value != null ? (worksheet.Cells[row, 4].Value.ToString() == "1" ? true : false) : null,
|
||||
CitizenId = worksheet.Cells[row, 1].Value != null ? worksheet.Cells[row, 1].Value.ToString() : null,
|
||||
ExamIdenNumber = worksheet.Cells[row, 2].Value != null ? worksheet.Cells[row, 2].Value.ToString() : null,
|
||||
SeatNumber = worksheet.Cells[row, 3].Value != null ? worksheet.Cells[row, 3].Value.ToString() : null,
|
||||
PointTotalB = worksheet.Cells[row, 4].Value != null ? worksheet.Cells[row, 4].Value.ToString() : null,
|
||||
PointB = worksheet.Cells[row, 5].Value != null ? worksheet.Cells[row, 5].Value.ToString() : null,
|
||||
ResultB = worksheet.Cells[row, 6].Value != null ? worksheet.Cells[row, 6].Value.ToString() : null,
|
||||
PointTotalC = worksheet.Cells[row, 7].Value != null ? worksheet.Cells[row, 7].Value.ToString() : null,
|
||||
PointC = worksheet.Cells[row, 8].Value != null ? worksheet.Cells[row, 8].Value.ToString() : null,
|
||||
ResultC = worksheet.Cells[row, 9].Value != null ? worksheet.Cells[row, 9].Value.ToString() : null,
|
||||
Pass = worksheet.Cells[row, 10].Value != null ? (worksheet.Cells[row, 10].Value.ToString()) : null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -830,7 +835,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
if (candidate.Status == "checkPoint" || candidate.Status == "done")
|
||||
{
|
||||
candidate.Point = item.Point;
|
||||
candidate.PointTotalB = item.PointTotalB;
|
||||
candidate.PointB = item.PointB;
|
||||
candidate.ResultB = item.ResultB;
|
||||
candidate.PointTotalC = item.PointTotalC;
|
||||
candidate.PointC = item.PointC;
|
||||
candidate.ResultC = item.ResultC;
|
||||
candidate.Pass = item.Pass;
|
||||
candidate.Status = "done";
|
||||
}
|
||||
|
|
@ -885,8 +895,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[1, 1].Value = "เลขบัตรประชาชน";
|
||||
summarySheet.Cells[1, 2].Value = "เลขประจำตัวสอบ";
|
||||
summarySheet.Cells[1, 3].Value = "เลขที่นั่งสอบ";
|
||||
summarySheet.Cells[1, 4].Value = "คะแนน";
|
||||
summarySheet.Cells[1, 5].Value = "ผลการสอบ";
|
||||
summarySheet.Cells[1, 4].Value = "คะแนนเต็มภาค ข";
|
||||
summarySheet.Cells[1, 5].Value = "คะแนนเต็มภาค ข";
|
||||
summarySheet.Cells[1, 6].Value = "ผลสอบภาค ข";
|
||||
summarySheet.Cells[1, 7].Value = "คะแนนเต็มภาค ค";
|
||||
summarySheet.Cells[1, 8].Value = "คะแนนเต็มภาค ค";
|
||||
summarySheet.Cells[1, 9].Value = "ผลสอบภาค ค";
|
||||
summarySheet.Cells[1, 10].Value = "ผลการสอบ";
|
||||
int row = 2;
|
||||
|
||||
foreach (var item in candidates)
|
||||
|
|
@ -894,8 +909,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 1].Value = item.CitizenId;
|
||||
summarySheet.Cells[row, 2].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 3].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 4].Value = item.Point;
|
||||
summarySheet.Cells[row, 5].Value = item.Pass;
|
||||
summarySheet.Cells[row, 4].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 5].Value = item.PointB;
|
||||
summarySheet.Cells[row, 6].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 7].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 8].Value = item.PointC;
|
||||
summarySheet.Cells[row, 9].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 10].Value = item.Pass;
|
||||
row++;
|
||||
}
|
||||
summarySheet.Cells[summarySheet.Dimension.Address].AutoFitColumns();
|
||||
|
|
@ -959,13 +979,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
Id = 4,
|
||||
Name = "ผ่านการสอบ",
|
||||
Count = periodExam.Candidate.Where(x=>x.Pass == true).Count()
|
||||
Count = periodExam.Candidate.Where(x=>x.Pass.Contains("ผ่าน")).Count()
|
||||
},
|
||||
new DashboardResponseItem
|
||||
{
|
||||
Id = 5,
|
||||
Name = "ไม่ผ่านการสอบ",
|
||||
Count = periodExam.Candidate.Where(x=>x.Pass == false).Count()
|
||||
Count = periodExam.Candidate.Where(x=>!x.Pass.Contains("ผ่าน")).Count()
|
||||
},
|
||||
new DashboardResponseItem
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue