add api use
This commit is contained in:
parent
5f80de81a4
commit
3b7a5855ef
2 changed files with 55 additions and 36 deletions
72
.github/workflows/release_Retirement.yaml
vendored
72
.github/workflows/release_Retirement.yaml
vendored
|
|
@ -68,40 +68,40 @@ jobs:
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||||
- name: Notify Discord Success
|
# - name: Notify Discord Success
|
||||||
if: success()
|
# if: success()
|
||||||
run: |
|
# run: |
|
||||||
curl -H "Content-Type: application/json" \
|
# curl -H "Content-Type: application/json" \
|
||||||
-X POST \
|
# -X POST \
|
||||||
-d '{
|
# -d '{
|
||||||
"embeds": [{
|
# "embeds": [{
|
||||||
"title": "✅ Deployment Success!",
|
# "title": "✅ Deployment Success!",
|
||||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||||
"color": 3066993,
|
# "color": 3066993,
|
||||||
"footer": {
|
# "footer": {
|
||||||
"text": "Release Notification",
|
# "text": "Release Notification",
|
||||||
"icon_url": "https://example.com/success-icon.png"
|
# "icon_url": "https://example.com/success-icon.png"
|
||||||
},
|
# },
|
||||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||||
}]
|
# }]
|
||||||
}' \
|
# }' \
|
||||||
${{ secrets.DISCORD_WEBHOOK }}
|
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
- name: Notify Discord Failure
|
# - name: Notify Discord Failure
|
||||||
if: failure()
|
# if: failure()
|
||||||
run: |
|
# run: |
|
||||||
curl -H "Content-Type: application/json" \
|
# curl -H "Content-Type: application/json" \
|
||||||
-X POST \
|
# -X POST \
|
||||||
-d '{
|
# -d '{
|
||||||
"embeds": [{
|
# "embeds": [{
|
||||||
"title": "❌ Deployment Failed!",
|
# "title": "❌ Deployment Failed!",
|
||||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||||
"color": 15158332,
|
# "color": 15158332,
|
||||||
"footer": {
|
# "footer": {
|
||||||
"text": "Release Notification",
|
# "text": "Release Notification",
|
||||||
"icon_url": "https://example.com/failure-icon.png"
|
# "icon_url": "https://example.com/failure-icon.png"
|
||||||
},
|
# },
|
||||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||||
}]
|
# }]
|
||||||
}' \
|
# }' \
|
||||||
${{ secrets.DISCORD_WEBHOOK }}
|
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
|
||||||
|
|
@ -844,6 +844,25 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// หน่วยงานที่ถูกเลือกไปแล้ว
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200"></response>
|
||||||
|
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpGet("use")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> GetPositionUse()
|
||||||
|
{
|
||||||
|
var position = await _context.RetirementOthers
|
||||||
|
.Where(x => x.posmasterId != null)
|
||||||
|
.Where(x => x.Status != "DONE")
|
||||||
|
.Select(x => x.posmasterId)
|
||||||
|
.ToListAsync();
|
||||||
|
return Success(position);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ส่งรายชื่อออกคำสั่ง C-PM-09
|
/// ส่งรายชื่อออกคำสั่ง C-PM-09
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue