no message
This commit is contained in:
parent
1374757bf2
commit
9567181117
5 changed files with 528 additions and 6 deletions
|
|
@ -6741,5 +6741,410 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-25
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command25/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand25Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งลงโทษ พักจากราชการ"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/stop/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-26
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command26/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand26Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งลงโทษ ให้ออกจากราชการไว้ก่อน"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/stop/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-27
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command27/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand27Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งลงโทษ ลงโทษ ภาคทัณฑ์"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/up/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-28
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command28/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand28Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งลงโทษ ตัดเงินเดือน"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/up/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-29
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command29/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand29Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งลงโทษ ลดขั้นเงินเดือน"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/up/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-30
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command30/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand30Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งเพิ่มโทษ"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/up/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-31
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command31/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand31Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งงดโทษ"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/up/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-32
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command32/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand32Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
CommandAffectDate = x.commandAffectDate,
|
||||
CommandNo = x.commandNo,
|
||||
CommandYear = x.commandYear.ToThaiYear(),
|
||||
Detail = "คำสั่งยุติเรื่อง"
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/discipline/result/report/reject/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-33
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command33/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand33Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
refCommandNo = $"{x.commandNo}/{x.commandYear.ToThaiYear()}",
|
||||
templateDoc = x.templateDoc,
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/salary/report/command/33/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-34
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command34/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand34Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
refCommandNo = $"{x.commandNo}/{x.commandYear.ToThaiYear()}",
|
||||
templateDoc = x.templateDoc,
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/salary/report/command/34/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-35
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command35/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand35Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
refCommandNo = $"{x.commandNo}/{x.commandYear.ToThaiYear()}",
|
||||
templateDoc = x.templateDoc,
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/salary/report/command/35/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-36
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command36/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand36Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
Id = x.refId,
|
||||
refCommandNo = $"{x.commandNo}/{x.commandYear.ToThaiYear()}",
|
||||
templateDoc = x.templateDoc,
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/salary/report/command/36/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-37
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command37/report/excecute")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportCommand37Execute([FromBody] ReportExecuteRequest req)
|
||||
{
|
||||
var data = req.refIds.Select(x => new
|
||||
{
|
||||
refCommandNo = $"{x.commandNo}/{x.commandYear.ToThaiYear()}",
|
||||
templateDoc = x.templateDoc,
|
||||
});
|
||||
|
||||
var baseAPI = _configuration["API"];
|
||||
var apiUrl = $"{baseAPI}/salary/report/command/37/resume";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var res = await client.PostAsJsonAsync(apiUrl, new { result = data });
|
||||
var result = await res.Content.ReadAsStringAsync();
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue