Merge branch 'develop' into working
This commit is contained in:
commit
6fd3fff0c8
33 changed files with 20956 additions and 577 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 up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
# - name: Notify Discord Success
|
||||
# if: success()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "✅ Deployment Success!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
# "color": 3066993,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/success-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
# - name: Notify Discord Failure
|
||||
# if: failure()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "❌ Deployment Failed!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
# "color": 15158332,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/failure-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
182
.github/workflows/release_command.yaml
vendored
182
.github/workflows/release_command.yaml
vendored
|
|
@ -1,89 +1,107 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
# push:
|
||||
# tags:
|
||||
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
# tags-ignore:
|
||||
# - '2.*'
|
||||
# Allow run workflow manually from Action tab
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- "command-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-command-service
|
||||
DEPLOY_HOST: frappet.com
|
||||
DEPLOY_PORT: 10102
|
||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-command
|
||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-command-service
|
||||
DEPLOY_HOST: frappet.com
|
||||
DEPLOY_PORT: 10102
|
||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-command
|
||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||
|
||||
jobs:
|
||||
# act workflow_dispatch -W .github/workflows/release_command.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||
release-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# skip Set up QEMU because it fail on act and container
|
||||
- name: Gen Version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Test Version
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{env.REGISTRY}}
|
||||
username: ${{secrets.DOCKER_USER}}
|
||||
password: ${{secrets.DOCKER_PASS}}
|
||||
- name: Build and load local docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
file: BMA.EHR.Command.Service/Dockerfile
|
||||
push: true
|
||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||
# act workflow_dispatch -W .github/workflows/release_command.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||
release-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
- name: Gen Version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Check Version
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{env.REGISTRY}}
|
||||
username: ${{secrets.DOCKER_USER}}
|
||||
password: ${{secrets.DOCKER_PASS}}
|
||||
- name: Build and load local docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
file: BMA.EHR.Command.Service/Dockerfile
|
||||
push: true
|
||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||
|
||||
- name: Reload docker compose
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{env.DEPLOY_HOST}}
|
||||
username: frappet
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{env.DEPLOY_PORT}}
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- uses: snow-actions/line-notify@v1.1.0
|
||||
if: success()
|
||||
with:
|
||||
access_token: ${{ env.TOKEN_LINE }}
|
||||
message: |
|
||||
-Success✅✅✅
|
||||
Image: ${{env.IMAGE_NAME}}
|
||||
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||
By: ${{secrets.DOCKER_USER}}
|
||||
- uses: snow-actions/line-notify@v1.1.0
|
||||
if: failure()
|
||||
with:
|
||||
access_token: ${{ env.TOKEN_LINE }}
|
||||
message: |
|
||||
-Failure❌❌❌
|
||||
Image: ${{env.IMAGE_NAME}}
|
||||
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||
By: ${{secrets.DOCKER_USER}}
|
||||
- name: Reload docker compose
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{env.DEPLOY_HOST}}
|
||||
username: frappet
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{env.DEPLOY_PORT}}
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
190
.github/workflows/release_discipline.yaml
vendored
190
.github/workflows/release_discipline.yaml
vendored
|
|
@ -6,102 +6,102 @@ on:
|
|||
- "discipline-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-discipline-service
|
||||
DEPLOY_HOST: frappet.com
|
||||
DEPLOY_PORT: 10102
|
||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-discipline
|
||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-discipline-service
|
||||
DEPLOY_HOST: frappet.com
|
||||
DEPLOY_PORT: 10102
|
||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-discipline
|
||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||
|
||||
jobs:
|
||||
# act workflow_dispatch -W .github/workflows/release_discipline.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||
release-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
- name: Gen Version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Check Version
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{env.REGISTRY}}
|
||||
username: ${{secrets.DOCKER_USER}}
|
||||
password: ${{secrets.DOCKER_PASS}}
|
||||
- name: Build and load local docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
file: BMA.EHR.Discipline.Service/Dockerfile
|
||||
push: true
|
||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||
# act workflow_dispatch -W .github/workflows/release_discipline.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||
release-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
- name: Gen Version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Check Version
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{env.REGISTRY}}
|
||||
username: ${{secrets.DOCKER_USER}}
|
||||
password: ${{secrets.DOCKER_PASS}}
|
||||
- name: Build and load local docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
file: BMA.EHR.Discipline.Service/Dockerfile
|
||||
push: true
|
||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||
|
||||
- name: Reload docker compose
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{env.DEPLOY_HOST}}
|
||||
username: frappet
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{env.DEPLOY_PORT}}
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: Reload docker compose
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{env.DEPLOY_HOST}}
|
||||
username: frappet
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{env.DEPLOY_PORT}}
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
# - name: Notify Discord Success
|
||||
# if: success()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "✅ Deployment Success!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
# "color": 3066993,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/success-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
# - name: Notify Discord Failure
|
||||
# if: failure()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "❌ Deployment Failed!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
# "color": 15158332,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/failure-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
|
|
@ -99,11 +99,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
PositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
PositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
PositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
Salary = p.Amount == null ? "0" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
ExamNumber = p.ExamNumber == null ? "0" : p.ExamNumber.Value.ToString().ToThaiNumber(),
|
||||
|
|
@ -152,11 +152,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
PositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
PositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
PositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
Salary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
ExamNumber = p.ExamNumber == null ? "" : p.ExamNumber.Value.ToString().ToThaiNumber(),
|
||||
|
|
@ -206,11 +206,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
|
||||
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
|
|
@ -218,11 +218,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
RemarkHorizontal = p.RemarkHorizontal,
|
||||
|
|
@ -269,22 +269,22 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
|
||||
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.positionName == null ? "" : p.positionName,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
|
|
@ -329,22 +329,22 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
|
||||
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.positionName == null ? "" : p.positionName,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
|
|
@ -407,11 +407,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
|
|
@ -477,11 +477,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
|
|
@ -750,11 +750,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
|
|
@ -1173,11 +1173,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName.ToThaiNumber(),
|
||||
// NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
|
|
@ -1307,11 +1307,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
// NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3113,11 +3113,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = placementProfile.PositionSalaryAmount,
|
||||
mouthSalaryAmount = placementProfile.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.positionName == null ? string.Empty : placementProfile.positionName,
|
||||
positionLine = string.Empty,
|
||||
positionPathSide = string.Empty,
|
||||
|
|
@ -3297,11 +3297,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.positionName,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -3478,11 +3478,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.positionName,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -3659,11 +3659,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.positionName,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -3842,11 +3842,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.position,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -4027,11 +4027,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.position,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -4209,11 +4209,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.position,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -5450,11 +5450,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = placementProfile.posMasterNo == null ? "" :
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "",
|
||||
placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" :
|
||||
placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "",
|
||||
position = placementProfile.position,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
|
|
@ -6887,11 +6887,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = data.posMasterNo == null ? "" :
|
||||
data.node == 4 ? $"{data.child4ShortName}{data.posMasterNo}" :
|
||||
data.node == 3 ? $"{data.child3ShortName}{data.posMasterNo}" :
|
||||
data.node == 2 ? $"{data.child2ShortName}{data.posMasterNo}" :
|
||||
data.node == 1 ? $"{data.child1ShortName}{data.posMasterNo}" :
|
||||
data.node == 0 ? $"{data.rootShortName}{data.posMasterNo}" : "",
|
||||
data.node == 4 ? $"{data.child4ShortName} {data.posMasterNo}" :
|
||||
data.node == 3 ? $"{data.child3ShortName} {data.posMasterNo}" :
|
||||
data.node == 2 ? $"{data.child2ShortName} {data.posMasterNo}" :
|
||||
data.node == 1 ? $"{data.child1ShortName} {data.posMasterNo}" :
|
||||
data.node == 0 ? $"{data.rootShortName} {data.posMasterNo}" : "",
|
||||
position = data.position,
|
||||
positionType = data.posTypeName,
|
||||
positionLevel = data.posLevelName,
|
||||
|
|
@ -7225,11 +7225,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionSalaryAmount = recv.PositionSalaryAmount,
|
||||
mouthSalaryAmount = recv.MouthSalaryAmount,
|
||||
posNo = data.posMasterNo == null ? "" :
|
||||
data.node == 4 ? $"{data.child4ShortName}{data.posMasterNo}" :
|
||||
data.node == 3 ? $"{data.child3ShortName}{data.posMasterNo}" :
|
||||
data.node == 2 ? $"{data.child2ShortName}{data.posMasterNo}" :
|
||||
data.node == 1 ? $"{data.child1ShortName}{data.posMasterNo}" :
|
||||
data.node == 0 ? $"{data.rootShortName}{data.posMasterNo}" : "",
|
||||
data.node == 4 ? $"{data.child4ShortName} {data.posMasterNo}" :
|
||||
data.node == 3 ? $"{data.child3ShortName} {data.posMasterNo}" :
|
||||
data.node == 2 ? $"{data.child2ShortName} {data.posMasterNo}" :
|
||||
data.node == 1 ? $"{data.child1ShortName} {data.posMasterNo}" :
|
||||
data.node == 0 ? $"{data.rootShortName} {data.posMasterNo}" : "",
|
||||
position = data.position,
|
||||
positionType = data.posTypeName,
|
||||
positionLevel = data.posLevelName,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
return data;
|
||||
}
|
||||
|
||||
public async Task<List<ProcessUserTimeStamp>> GetTimestampByDateLateAsync(string type, string role, string nodeId, int node)
|
||||
public async Task<List<ProcessUserTimeStamp>> GetTimestampByDateLateAsync(string type, string role, string nodeId, int node, DateTime StartDate, DateTime EndDate)
|
||||
{
|
||||
var _nodeId = Guid.Parse(nodeId);
|
||||
var data = new List<ProcessUserTimeStamp>();
|
||||
|
|
@ -147,6 +147,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
{
|
||||
data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
||||
.Where(x => x.CheckInStatus == "LATE")
|
||||
.Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
||||
.ToListAsync();
|
||||
|
|
@ -155,6 +156,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
{
|
||||
data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
||||
.Where(x => x.CheckInStatus == "LATE")
|
||||
.Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
||||
.Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true))))
|
||||
|
|
|
|||
|
|
@ -280,7 +280,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
.ThenBy(x => child4Order.ToObject<List<string>>().IndexOf(x.child4 ?? ""))
|
||||
.ThenBy(x => posTypeNameOrder.ToObject<List<string>>().IndexOf(x.posTypeName ?? ""))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? "")).ToList();
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? ""))
|
||||
.ThenBy(x => x.posNo).ToList();
|
||||
}
|
||||
mapProfiles = profile_retire.Select((profile, index) =>
|
||||
{
|
||||
|
|
@ -482,6 +483,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
p.SendDate,
|
||||
p.ActiveDate,
|
||||
p.Reason,
|
||||
p.ReasonResign,
|
||||
p.Remark,
|
||||
p.Status,
|
||||
salary = p.AmountOld,
|
||||
p.ApproveReason,
|
||||
|
|
@ -517,6 +520,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
p.SendDate,
|
||||
p.ActiveDate,
|
||||
p.Reason,
|
||||
p.ReasonResign,
|
||||
p.Remark,
|
||||
p.Status,
|
||||
salary = p.AmountOld,
|
||||
p.ApproveReason,
|
||||
|
|
@ -547,11 +552,14 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
data.prefix,
|
||||
data.firstName,
|
||||
data.lastName,
|
||||
data.Location,
|
||||
Location = string.IsNullOrEmpty(data.Location) ? string.Empty : data.Location.ToThaiNumber(),
|
||||
FullName = $"{data.prefix}{data.firstName} {data.lastName}",
|
||||
SendDate = string.IsNullOrEmpty(data.SendDate.ToString()) ? string.Empty : DateTime.Parse(data.SendDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
ActiveDate = string.IsNullOrEmpty(data.ActiveDate.ToString()) ? string.Empty : DateTime.Parse(data.ActiveDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
data.Reason,
|
||||
data.ReasonResign,
|
||||
data.Remark,
|
||||
ReasonRemark = data.Reason == "OTHER" ? string.IsNullOrEmpty(data.Remark) ? data.ReasonResign : $"{data.ReasonResign}({data.Remark})" : data.ReasonResign,
|
||||
data.Status,
|
||||
data.salary,
|
||||
data.PositionTypeOld,
|
||||
|
|
|
|||
|
|
@ -10,5 +10,8 @@
|
|||
public string name { get; set; }
|
||||
|
||||
public string url { get; set; }
|
||||
|
||||
public bool? isReport { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,11 +317,13 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
[HttpPost()]
|
||||
public async Task<ActionResult<ResponseObject>> CreateDiscipline([FromForm] DisciplineComplaint_AppealRequest req)
|
||||
{
|
||||
|
||||
var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position";
|
||||
var id = "";
|
||||
var type = "";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Authorization =
|
||||
new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||
var _res = await client.SendAsync(_req);
|
||||
|
|
@ -331,78 +333,86 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
|
||||
if (org == null || org.result == null)
|
||||
return Success(new { data = new List<dynamic>(), total = 0 });
|
||||
var id = org.result.profileId;
|
||||
id = org.result.profileId;
|
||||
if (id == "")
|
||||
return Success(new { data = new List<dynamic>(), total = 0 });
|
||||
var disciplineComplaint_Appeal = new Domain.Models.Discipline.DisciplineComplaint_Appeal
|
||||
type = org.result.profileType;
|
||||
}
|
||||
|
||||
var disciplineComplaint_Appeal = new Domain.Models.Discipline.DisciplineComplaint_Appeal
|
||||
{
|
||||
Title = req.Title,
|
||||
Description = req.Description,
|
||||
Status = "NEW",
|
||||
Type = req.Type.Trim().ToUpper(),
|
||||
Year = req.Year == null ? DateTime.Now.Year : req.Year,
|
||||
CaseType = req.CaseType,
|
||||
CaseNumber = req.CaseNumber,
|
||||
Fullname = req.Fullname,
|
||||
CitizenId = req.CitizenId,
|
||||
ProfileId = id,
|
||||
Position = req.Position,
|
||||
Oc = req.Oc,
|
||||
profileType = type,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
};
|
||||
var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History
|
||||
{
|
||||
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
};
|
||||
// await _context.DisciplineComplaint_Appeals.AddAsync(disciplineComplaint_Appeal);
|
||||
await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History);
|
||||
await _context.SaveChangesAsync();
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
foreach (var file in Request.Form.Files)
|
||||
{
|
||||
Title = req.Title,
|
||||
Description = req.Description,
|
||||
Status = "NEW",
|
||||
Type = req.Type.Trim().ToUpper(),
|
||||
Year = req.Year == null ? DateTime.Now.Year : req.Year,
|
||||
CaseType = req.CaseType,
|
||||
CaseNumber = req.CaseNumber,
|
||||
Fullname = req.Fullname,
|
||||
CitizenId = req.CitizenId,
|
||||
ProfileId = id,
|
||||
Position = req.Position,
|
||||
Oc = req.Oc,
|
||||
profileType = org.result.profileType,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
};
|
||||
var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History
|
||||
{
|
||||
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
};
|
||||
// await _context.DisciplineComplaint_Appeals.AddAsync(disciplineComplaint_Appeal);
|
||||
await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History);
|
||||
await _context.SaveChangesAsync();
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
foreach (var file in Request.Form.Files)
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
var _doc = await _context.Documents.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == doc.Id);
|
||||
if (_doc != null)
|
||||
{
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
var _doc = await _context.Documents.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == doc.Id);
|
||||
if (_doc != null)
|
||||
var disciplineComplaint_Appeal_Doc = new DisciplineComplaint_Appeal_Doc
|
||||
{
|
||||
var disciplineComplaint_Appeal_Doc = new DisciplineComplaint_Appeal_Doc
|
||||
{
|
||||
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
|
||||
Document = _doc,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
};
|
||||
await _context.DisciplineComplaint_Appeal_Docs.AddAsync(disciplineComplaint_Appeal_Doc);
|
||||
}
|
||||
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
|
||||
Document = _doc,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
};
|
||||
await _context.DisciplineComplaint_Appeal_Docs.AddAsync(disciplineComplaint_Appeal_Doc);
|
||||
}
|
||||
}
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director";
|
||||
var refId = new List<Guid>();
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
}
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
var system = "SYS_DISCIPLINE_APPEAL";
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director/{system}";
|
||||
var refId = new List<Guid>();
|
||||
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization =
|
||||
new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var __res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
refId = new List<Guid> { id },
|
||||
refId = new List<Guid> { Guid.Parse(id) },
|
||||
});
|
||||
var __result = await __res.Content.ReadAsStringAsync();
|
||||
var __org = JsonConvert.DeserializeObject<DirectorRequest>(__result);
|
||||
|
|
@ -410,6 +420,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
{
|
||||
refId = __org.result.Select(x => Guid.Parse(x.id)).ToList();
|
||||
}
|
||||
|
||||
await _repositoryNoti.PushNotificationsAsync(
|
||||
refId.ToArray(),
|
||||
$"มีคำขอยื่นอุทธรณ์/ร้องทุกข์จาก {req.Fullname}",
|
||||
|
|
@ -419,10 +430,10 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
true,
|
||||
true
|
||||
);
|
||||
await _context.SaveChangesAsync();
|
||||
return Success(disciplineComplaint_Appeal.Id);
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
return Success(disciplineComplaint_Appeal.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -498,7 +509,8 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
}
|
||||
}
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director";
|
||||
var system = "SYS_DISCIPLINE_APPEAL";
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director/{system}";
|
||||
var refId = new List<Guid>();
|
||||
|
||||
using (var client = new HttpClient())
|
||||
|
|
|
|||
|
|
@ -74,20 +74,20 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
{
|
||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||
}
|
||||
var profile = new List<GetProfileByKeycloakIdRootDto>();
|
||||
if (type.Trim().ToUpper() == "OFFICER")
|
||||
{
|
||||
profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
||||
}
|
||||
else
|
||||
{
|
||||
profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
||||
}
|
||||
//var profile = new List<GetProfileByKeycloakIdRootDto>();
|
||||
//if (type.Trim().ToUpper() == "OFFICER")
|
||||
//{
|
||||
// profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
||||
//}
|
||||
|
||||
if (req.posLevel != null || req.posType != null)
|
||||
{
|
||||
profile = profile.Where(x => x.PositionType == req.posType || x.PositionLevel == req.posLevel).ToList();
|
||||
}
|
||||
//if (req.posLevel != null || req.posType != null)
|
||||
//{
|
||||
// profile = profile.Where(x => x.PositionType == req.posType || x.PositionLevel == req.posLevel).ToList();
|
||||
//}
|
||||
|
||||
var data_search = await _context.DisciplineDisciplinarys
|
||||
.Include(x => x.DisciplineDisciplinary_ProfileComplaintInvestigates)
|
||||
|
|
@ -122,9 +122,25 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
: ""
|
||||
: "",
|
||||
faultLevel = d.DisciplinaryFaultLevel,
|
||||
Child4Id = profile.child4Id,
|
||||
Child4 = profile.child4,
|
||||
Child3Id = profile.child3Id,
|
||||
Child3 = profile.child3,
|
||||
Child2Id = profile.child2Id,
|
||||
Child2 = profile.child2,
|
||||
Child1Id = profile.child1Id,
|
||||
Child1 = profile.child1,
|
||||
RootId = profile.rootId,
|
||||
Root = profile.root,
|
||||
PosType = profile.posTypeName,
|
||||
PosLevel = profile.posLevelName
|
||||
}))
|
||||
.Where(x =>
|
||||
x.citizenId != null && profile.Any(p => p.CitizenId == x.citizenId))
|
||||
//.Where(x =>
|
||||
// x.citizenId != null && profile.Any(p => p.CitizenId == x.citizenId))
|
||||
.Where(x => req.node == 4 ? x.Child4Id == req.nodeId : (req.node == 3 ? x.Child3Id == req.nodeId : (req.node == 2 ? x.Child2Id == req.nodeId : (req.node == 1 ? x.Child1Id == req.nodeId : (req.node == 0 ? x.RootId == req.nodeId : (req.node == null ? true : true))))))
|
||||
.Where(x => jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD" ? true : (req.node == 0 ? x.Child1Id == null : (req.node == 1 ? x.Child2Id == null : (req.node == 2 ? x.Child3Id == null : (req.node == 3 ? x.Child4Id == null : true)))))
|
||||
.Where(x => string.IsNullOrEmpty(req.posType) || x.PosType == req.posType)
|
||||
.Where(x => string.IsNullOrEmpty(req.posLevel) || x.PosLevel == req.posLevel)
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.ToList();
|
||||
|
||||
|
|
@ -139,7 +155,11 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
citizenId = p.citizenId,
|
||||
position = p.position,
|
||||
posLevel = p.posLevel,
|
||||
oc = profile.FirstOrDefault(x => x.CitizenId == p.citizenId)?.Oc ?? "",
|
||||
oc = (p.Child4 == null ? "" : p.Child4 + "\n") +
|
||||
(p.Child3 == null ? "" : p.Child3 + "\n") +
|
||||
(p.Child2 == null ? "" : p.Child2 + "\n") +
|
||||
(p.Child1 == null ? "" : p.Child1 + "\n") +
|
||||
(p.Root == null ? "" : p.Root),
|
||||
offense = p.offense,
|
||||
faultLevel = p.faultLevel,
|
||||
one = 0,
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
// continue;
|
||||
|
||||
// uppdated.CommandTypeId = commandTypeId;
|
||||
// uppdated.Status = "REPORT";
|
||||
// uppdated.Status = req.status.Trim().ToUpper();
|
||||
// uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
// uppdated.LastUpdateUserId = UserId ?? "";
|
||||
// uppdated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -769,7 +769,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -835,6 +835,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -898,7 +905,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -964,6 +971,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1029,7 +1043,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineReport_Profiles
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1171,6 +1185,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1209,7 +1230,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineReport_Profiles
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1289,6 +1310,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1327,7 +1355,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1405,6 +1433,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1443,7 +1478,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1521,6 +1556,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1559,7 +1601,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1637,6 +1679,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1675,7 +1724,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1753,6 +1802,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1791,7 +1847,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
data.ForEach(profile => profile.Status = "REPORT");
|
||||
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1869,6 +1925,13 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1908,12 +1971,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
|
||||
data1.ForEach(profile => profile.IsReport = "REPORT");
|
||||
data1.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper());
|
||||
var data2 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
|
||||
data2.ForEach(profile => profile.IsReport = "REPORT");
|
||||
data2.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper());
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
|
|
@ -2001,7 +2064,15 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
commandCode = r.commandCode,
|
||||
commandName = r.commandName,
|
||||
remark = r.remark,
|
||||
orgRoot = p.root,
|
||||
orgChild1 = p.child1,
|
||||
orgChild2 = p.child2,
|
||||
orgChild3 = p.child3,
|
||||
orgChild4 = p.child4,
|
||||
posNo = p.posMasterNo,
|
||||
posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.child4ShortName != null ? p.child4ShortName : "")))),
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline";
|
||||
using (var client = new HttpClient())
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(int page = 1, int pageSize = 25, string keyword = "", string profileType = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "")
|
||||
{
|
||||
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_SUSPENDED");
|
||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||
|
|
@ -68,6 +68,16 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
}
|
||||
var data_search = (from x in _context.DisciplineReport_Profiles.Include(x => x.DisciplineDisciplinary)
|
||||
where
|
||||
(
|
||||
endDate != null && startDate != null?
|
||||
(
|
||||
(x.StartDateSuspend.Value.Date >= startDate.Value.Date && x.StartDateSuspend.Value.Date <= endDate.Value.Date) ||
|
||||
(x.EndDateSuspend.Value.Date >= startDate.Value.Date && x.EndDateSuspend.Value.Date <= endDate.Value.Date) ||
|
||||
(x.StartDateSuspend.Value.Date <= startDate.Value.Date && x.EndDateSuspend.Value.Date >= endDate.Value.Date)
|
||||
) :
|
||||
true
|
||||
)
|
||||
&&
|
||||
(
|
||||
(x.CitizenId != null && x.CitizenId.Contains(keyword)) ||
|
||||
((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) ||
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ namespace BMA.EHR.Discipline.Service.Requests
|
|||
public class ReportPersonRequest
|
||||
{
|
||||
public string[] refIds { get; set; }
|
||||
public string? status { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ namespace BMA.EHR.Domain.Models.Retirement
|
|||
public bool IsSendNotification { get; set; } = true;
|
||||
|
||||
[Comment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง")]
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
public string? OrganizationName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง")]
|
||||
public string PositionName { get; set; } = string.Empty;
|
||||
public string? PositionName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("Fk Table Document")]
|
||||
public Document? Document { get; set; }
|
||||
|
|
|
|||
20074
BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.Designer.cs
generated
Normal file
20074
BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,82 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class update_table_placementRepatriation_add_refId1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PositionName",
|
||||
table: "RetirementDeceasedNotis",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "OrganizationName",
|
||||
table: "RetirementDeceasedNotis",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "RetirementDeceasedNotis",
|
||||
keyColumn: "PositionName",
|
||||
keyValue: null,
|
||||
column: "PositionName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PositionName",
|
||||
table: "RetirementDeceasedNotis",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "RetirementDeceasedNotis",
|
||||
keyColumn: "OrganizationName",
|
||||
keyValue: null,
|
||||
column: "OrganizationName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "OrganizationName",
|
||||
table: "RetirementDeceasedNotis",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14839,12 +14839,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("OrganizationName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง");
|
||||
|
||||
b.Property<string>("PositionName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง");
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
// approver = list.First().Name;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
return new
|
||||
{
|
||||
|
|
@ -1357,7 +1357,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
count++;
|
||||
}
|
||||
}
|
||||
employees = employees.OrderBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue).ToList();
|
||||
employees = employees.OrderBy(x => x.checkInDate).ThenBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue).ToList();
|
||||
for (int i = 0; i < employees.Count; i++)
|
||||
{
|
||||
employees[i].no = i + 1;
|
||||
|
|
@ -1421,7 +1421,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var employees = new List<dynamic>();
|
||||
var count = 1;
|
||||
|
||||
var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), jsonData["result"]?.ToString(), req.nodeId, req.node);
|
||||
var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), jsonData["result"]?.ToString(), req.nodeId, req.node, req.StartDate, req.EndDate);
|
||||
foreach (var p in userTimeStamps)
|
||||
{
|
||||
var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}";
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
placementAppointment.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
placementAppointment.PositionLevelOld = org.result.posLevelName;
|
||||
placementAppointment.PositionTypeOld = org.result.posTypeName;
|
||||
placementAppointment.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
placementAppointment.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -759,7 +759,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.Status = "REPORT";
|
||||
profile.Status = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "APPOINT";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -831,11 +831,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -969,7 +969,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.Status = "REPORT";
|
||||
profile.Status = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "MOVE";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1041,11 +1041,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -1180,7 +1180,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.Status = "REPORT";
|
||||
profile.Status = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "SLIP";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1250,11 +1250,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
(p.root == null ? "" : $"{p.root}"),
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName.ToThaiNumber(),
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
RemarkVertical = r.RemarkVertical,
|
||||
|
|
@ -1380,7 +1380,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.Status = "REPORT";
|
||||
profile.Status = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "MOVE";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1439,11 +1439,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "-" :
|
||||
p.child4Old != null ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child3Old != null ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child2Old != null ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child1Old != null ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.rootOld != null ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
p.child4Old != null ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child3Old != null ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child2Old != null ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child1Old != null ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.rootOld != null ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = (p.position == null ? "" : $"{p.position}\n") +
|
||||
(p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") +
|
||||
|
|
@ -1453,11 +1453,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
(p.child1 == null ? "" : $"{p.child1}\n") +
|
||||
(p.root == null ? "" : $"{p.root}"),
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
ReportingDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -1588,7 +1588,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.Status = "REPORT";
|
||||
profile.Status = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "SLIP";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1652,11 +1652,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
|
||||
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "-" :
|
||||
p.child4Old != null ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child3Old != null ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child2Old != null ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child1Old != null ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.rootOld != null ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
p.child4Old != null ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child3Old != null ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child2Old != null ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.child1Old != null ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.rootOld != null ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
PositionDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = (p.position == null ? "" : $"{p.position}\n") +
|
||||
|
|
@ -1669,11 +1669,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
placementAppointment.positionOld = org.result.position;
|
||||
placementAppointment.PositionLevelOld = org.result.posLevelName;
|
||||
placementAppointment.PositionTypeOld = org.result.posTypeName;
|
||||
placementAppointment.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
placementAppointment.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
|
|||
|
|
@ -1564,7 +1564,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "APPOINT";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1639,11 +1639,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
PositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
PositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
PositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -1895,7 +1895,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "APPOINT";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1970,11 +1970,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
PositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
PositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
PositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -2219,10 +2219,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// .Where(x => x.Placement!.PlacementType!.Name == "แต่งตั้งข้าราชการ")
|
||||
// .Where(x => x.typeCommand.Trim().ToUpper() == "APPOIN")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = req.status.Trim().ToUpper());
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "APPOIN";
|
||||
});
|
||||
|
||||
|
|
@ -2294,11 +2294,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
|
||||
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "-" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldPosition = p.positionNameOld == null ? "-" : p.positionNameOld,
|
||||
NewOc = (p.positionName == null ? "" : $"{p.positionName}\n") +
|
||||
|
|
@ -2312,11 +2312,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -2455,7 +2455,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||
profile.typeCommand = "MOVE";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -2527,11 +2527,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
|
||||
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "-" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = (p.positionName == null ? "" : $"{p.positionName}\n") +
|
||||
(p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") +
|
||||
|
|
@ -2544,11 +2544,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
@ -2681,7 +2681,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var placementProfiles = await _context.PlacementProfiles
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -2747,11 +2747,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
|
||||
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "-" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-",
|
||||
OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
LeaveDate = "-",
|
||||
NewOc = (p.positionName == null ? "" : $"{p.positionName}\n") +
|
||||
|
|
@ -2764,11 +2764,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
|
|
|
|||
|
|
@ -405,13 +405,13 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
placementOfficer.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
placementOfficer.PositionLevelOld = org.result.posLevelName;
|
||||
placementOfficer.PositionTypeOld = org.result.posTypeName;
|
||||
placementOfficer.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
placementOfficer.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
placementOfficer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
(org.result.child1 == null ? "" : org.result.child1 + "\n") +
|
||||
(org.result.root == null ? "" : org.result.root);
|
||||
placementOfficer.OrganizationPositionOld = org.result.position + "\n" + (placementOfficer.PositionExecutiveOld == null ? "" : placementOfficer.PositionExecutiveOld + "\n") + placementOfficer.OrganizationOld;
|
||||
placementOfficer.OrganizationPositionOld = org.result.position + "\n" + (placementOfficer.PositionExecutiveOld == null ? "" : placementOfficer.PositionExecutiveOld + "\n") + placementOfficer.OrganizationOld;
|
||||
}
|
||||
await _context.PlacementOfficers.AddAsync(placementOfficer);
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -561,7 +561,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var placementProfiles = await _context.PlacementOfficers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
placementReceive.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
placementReceive.PositionLevelOld = org.result.posLevelName;
|
||||
placementReceive.PositionTypeOld = org.result.posTypeName;
|
||||
placementReceive.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
placementReceive.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
placementReceive.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -885,7 +885,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var placementProfiles = await _context.PlacementReceives
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -960,11 +960,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
|
||||
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "-" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
placementRepatriation.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
placementRepatriation.PositionLevelOld = org.result.posLevelName;
|
||||
placementRepatriation.PositionTypeOld = org.result.posTypeName;
|
||||
placementRepatriation.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
placementRepatriation.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
placementRepatriation.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -500,7 +500,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var placementProfiles = await _context.PlacementRepatriations
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
placementTransfer.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
placementTransfer.PositionLevelOld = org.result.posLevelName;
|
||||
placementTransfer.PositionTypeOld = org.result.posTypeName;
|
||||
placementTransfer.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
placementTransfer.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
placementTransfer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -752,7 +752,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var placementProfiles = await _context.PlacementTransfers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public class ReportPersonRequest
|
||||
{
|
||||
public string[] refIds { get; set; }
|
||||
public string? status { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,7 +337,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
.ThenBy(x => child4Order.ToObject<List<string>>().IndexOf(x.child4 ?? ""))
|
||||
.ThenBy(x => posTypeNameOrder.ToObject<List<string>>().IndexOf(x.posTypeName ?? ""))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? "")))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? ""))
|
||||
.ThenBy(x => x.posNo))
|
||||
{
|
||||
var data = new RetirementProfile
|
||||
{
|
||||
|
|
@ -438,10 +439,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
return Error(GlobalMessages.RetirementNotCreated);
|
||||
if (req.Option == null)
|
||||
req.Option = "EDIT";
|
||||
|
||||
|
||||
var profile_old = await _context.RetirementProfiles
|
||||
.Where(x => x.RetirementPeriod == retire)
|
||||
.Select((x,index) => new
|
||||
.Select((x, index) => new
|
||||
{
|
||||
order = x.Order,
|
||||
id = x.Id,
|
||||
|
|
@ -1291,8 +1292,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||
}
|
||||
var retire = await _context.RetirementPeriods
|
||||
.Include(x=>x.RetirementProfiles)
|
||||
.Include(x=>x.RetirementRawProfiles)
|
||||
.Include(x => x.RetirementProfiles)
|
||||
.Include(x => x.RetirementRawProfiles)
|
||||
.FirstOrDefaultAsync(x => x.Id == retireId);
|
||||
if (retire == null)
|
||||
return Error(GlobalMessages.RetirementNotFound, 404);
|
||||
|
|
@ -1310,7 +1311,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
retire.LastUpdateUserId = UserId ?? "";
|
||||
retire.LastUpdatedAt = DateTime.Now;
|
||||
}
|
||||
if(retire.TypeReport == null)
|
||||
if (retire.TypeReport == null)
|
||||
{
|
||||
var apiUrl = $"{_configuration["API"]}/org/root/search/sort";
|
||||
dynamic rootOrder = new List<string>();
|
||||
|
|
@ -1351,7 +1352,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
.ThenBy(x => child4Order.ToObject<List<string>>().IndexOf(x.child4 ?? ""))
|
||||
.ThenBy(x => posTypeNameOrder.ToObject<List<string>>().IndexOf(x.posTypeName ?? ""))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? "")))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? ""))
|
||||
.ThenBy(x => x.posNo))
|
||||
{
|
||||
profile.Order = order;
|
||||
order++;
|
||||
|
|
@ -1365,7 +1367,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
.ThenBy(x => child4Order.ToObject<List<string>>().IndexOf(x.child4 ?? ""))
|
||||
.ThenBy(x => posTypeNameOrder.ToObject<List<string>>().IndexOf(x.posTypeName ?? ""))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? "")))
|
||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? ""))
|
||||
.ThenBy(x => x.posNo))
|
||||
{
|
||||
profile.Order = order;
|
||||
order++;
|
||||
|
|
@ -2119,7 +2122,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
[HttpGet("31/{exportType}/{Id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetProfileRetirement([FromRoute] Guid Id, string exportType = "pdf")
|
||||
{
|
||||
var retire = await _service.GetProfileRetirementdAsync(Id,token);
|
||||
var retire = await _service.GetProfileRetirementdAsync(Id, token);
|
||||
return Success("xxx");
|
||||
if (retire != null)
|
||||
{
|
||||
var reportfile = string.Empty;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ using Newtonsoft.Json.Linq;
|
|||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
|
||||
namespace BMA.EHR.Retirement.Service.Controllers
|
||||
{
|
||||
|
|
@ -434,25 +435,25 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
{
|
||||
if (higher.profileId != null)
|
||||
{
|
||||
//var payload_attach = new List<PayloadAttachment>();
|
||||
//payload_attach.Add(new PayloadAttachment
|
||||
//{
|
||||
// name = "หนังสือเวียนถึงแก่กรรม",
|
||||
// url = $"{_configuration["APIV2"]}/report/deceased/copy/36/{retirementDeceased.Id}"
|
||||
//});
|
||||
var payload_attach = new List<PayloadAttachment>();
|
||||
payload_attach.Add(new PayloadAttachment
|
||||
{
|
||||
name = "หนังสือเวียนถึงแก่กรรม",
|
||||
url = $"{_configuration["API"]}/retirement/deceased/report/36/{retirementDeceased.Id}",
|
||||
isReport = true
|
||||
});
|
||||
|
||||
//var payload = new CommandPayload()
|
||||
//{
|
||||
// attachments = payload_attach
|
||||
//};
|
||||
var payload = new CommandPayload()
|
||||
{
|
||||
attachments = payload_attach
|
||||
};
|
||||
|
||||
//var payload_str = JsonConvert.SerializeObject(payload);
|
||||
var payload_str = JsonConvert.SerializeObject(payload);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(higher.profileId),
|
||||
$"หนังสือเวียนถึงแก่กรรมของ {higher.prefix}{higher.firstName} {higher.lastName}",
|
||||
$"แจ้งข่าวการถึงแก่กรรมของ {retirementDeceased.prefix}{retirementDeceased.firstName} {retirementDeceased.lastName}",
|
||||
//payload_str,
|
||||
"",
|
||||
payload_str,
|
||||
"",
|
||||
true,
|
||||
true
|
||||
|
|
@ -772,7 +773,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
payload_attach.Add(new PayloadAttachment
|
||||
{
|
||||
name = "หนังสือเวียนถึงแก่กรรม",
|
||||
url = $"{_configuration["APIV2"]}/report/deceased/copy/36/{retirementDeceased.Id}"
|
||||
//url = $"{_configuration["APIV2"]}/report/deceased/copy/36/{retirementDeceased.Id}"
|
||||
url = $"{_configuration["API"]}/retirement/deceased/report/36/{retirementDeceased.Id}",
|
||||
isReport = true
|
||||
});
|
||||
|
||||
var payload = new CommandPayload()
|
||||
|
|
@ -882,5 +885,56 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// รายงานบันทึกเวียนแจ้งการถึงแก่กรรม
|
||||
/// </summary>
|
||||
/// <param name="id">Id รายการบันทึกเวียนแจ้งการถึงแก่กรรม</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report/36/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetDeceasedNotiReportAsync(Guid id)
|
||||
{
|
||||
try
|
||||
{
|
||||
var head = await _repositoryRetireReport.GetHeadRetirementDeceasedAsync(id);
|
||||
var detail = await _repositoryRetireReport.GetRetirementDeceasedAsync(id);
|
||||
|
||||
if (detail == null || head == null)
|
||||
{
|
||||
return Error("รายการบันทึกเวียนแจ้งการถึงแก่กรรม", 404);
|
||||
}
|
||||
|
||||
var mergeData = new
|
||||
{
|
||||
Oc = head.GetType().GetProperty("Oc")?.GetValue(head),
|
||||
Number = head.GetType().GetProperty("Number")?.GetValue(head),
|
||||
Date = head.GetType().GetProperty("Date")?.GetValue(head),
|
||||
Subject = head.GetType().GetProperty("Subject")?.GetValue(head),
|
||||
Send = head.GetType().GetProperty("Send")?.GetValue(head),
|
||||
FullName = detail.GetType().GetProperty("FullName")?.GetValue(detail),
|
||||
Position = detail.GetType().GetProperty("Position")?.GetValue(detail),
|
||||
Reason = detail.GetType().GetProperty("Reason")?.GetValue(detail),
|
||||
DeceasedDate = detail.GetType().GetProperty("Date")?.GetValue(detail),
|
||||
CurrentDate = detail.GetType().GetProperty("CurrentDate")?.GetValue(detail),
|
||||
DeceasedNumber = detail.GetType().GetProperty("Number")?.GetValue(detail),
|
||||
Location = detail.GetType().GetProperty("Location")?.GetValue(detail),
|
||||
};
|
||||
|
||||
var data = new
|
||||
{
|
||||
template = "deceased",
|
||||
reportName = "docx-report",
|
||||
data = mergeData
|
||||
};
|
||||
return Success(data);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
retirementOther.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
retirementOther.PositionLevelOld = org.result.posLevelName;
|
||||
retirementOther.PositionTypeOld = org.result.posTypeName;
|
||||
retirementOther.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
retirementOther.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
retirementOther.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -660,7 +660,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementOthers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -880,7 +880,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementOthers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
retirementOut.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
retirementOut.PositionLevelOld = org.result.posLevelName;
|
||||
retirementOut.PositionTypeOld = org.result.posTypeName;
|
||||
retirementOut.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
retirementOut.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
retirementOut.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -357,13 +357,13 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
retirementOut.PositionOld = org.result.position;
|
||||
retirementOut.PositionLevelOld = org.result.posLevelName;
|
||||
retirementOut.PositionTypeOld = org.result.posTypeName;
|
||||
retirementOut.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
retirementOut.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
retirementOut.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
(org.result.child1 == null ? "" : org.result.child1 + "\n") +
|
||||
(org.result.root == null ? "" : org.result.root);
|
||||
retirementOut.OrganizationPositionOld = org.result.position + "\n" + (retirementOut.PositionExecutiveOld == null ? "" : retirementOut.PositionExecutiveOld + "\n") + retirementOut.OrganizationOld;
|
||||
retirementOut.OrganizationPositionOld = org.result.position + "\n" + (retirementOut.PositionExecutiveOld == null ? "" : retirementOut.PositionExecutiveOld + "\n") + retirementOut.OrganizationOld;
|
||||
retirementOut.AmountOld = org.result.salary;
|
||||
}
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementResigns
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -942,13 +942,13 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
retirementResign.PositionExecutiveOld = org.result.posExecutiveName;
|
||||
retirementResign.PositionLevelOld = org.result.posLevelName;
|
||||
retirementResign.PositionTypeOld = org.result.posTypeName;
|
||||
retirementResign.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
retirementResign.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
retirementResign.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
(org.result.child1 == null ? "" : org.result.child1 + "\n") +
|
||||
(org.result.root == null ? "" : org.result.root);
|
||||
retirementResign.OrganizationPositionOld = org.result.position + "\n" + (retirementResign.PositionExecutiveOld == null ? "" : retirementResign.PositionExecutiveOld + "\n") + retirementResign.OrganizationOld;
|
||||
retirementResign.OrganizationPositionOld = org.result.position + "\n" + (retirementResign.PositionExecutiveOld == null ? "" : retirementResign.PositionExecutiveOld + "\n") + retirementResign.OrganizationOld;
|
||||
}
|
||||
await _context.RetirementResigns.AddAsync(retirementResign);
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1159,7 +1159,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
if (updated == null)
|
||||
return Error(GlobalMessages.RetirementResignNotFound, 404);
|
||||
updated.CancelReason = req.Reason;
|
||||
if (updated.Status == "DONE")
|
||||
if (updated.Status == "DONE" || updated.Status == "WAITING")
|
||||
{
|
||||
var retirementResignCancel = new RetirementResignCancel
|
||||
{
|
||||
|
|
@ -1246,6 +1246,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
updated.IsCancel = true;
|
||||
}
|
||||
else if (updated.Status == "REPORT")
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
|
||||
Console.WriteLine(_res);
|
||||
Console.WriteLine($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
|
||||
}
|
||||
}
|
||||
updated.Status = "CANCEL";
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
|
|
@ -2116,7 +2127,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementResigns
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -2242,7 +2253,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
positionExecutive = "",
|
||||
positionType = p.PositionTypeOld,
|
||||
positionLevel = p.PositionLevelOld,
|
||||
isLeave = true,
|
||||
isLeave = p.IsCancel == true ? false : true,
|
||||
leaveReason = "ออกจากราชการ",
|
||||
dateLeave = r.commandDateAffect,
|
||||
commandId = r.commandId,
|
||||
|
|
@ -2302,7 +2313,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementResignCancels
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -2357,7 +2368,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
PositionName = p.PositionOld ?? "-",
|
||||
Organization = p.OrganizationPositionOld ?? "-",
|
||||
Oc = (p.PositionOld == null ? "" : $"{p.PositionOld}\n") +
|
||||
Oc = (p.PositionOld == null ? "" : $"{p.PositionOld}\n") +
|
||||
(p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") +
|
||||
(p.child4Old == null ? "" : $"{p.child4Old}\n") +
|
||||
(p.child3Old == null ? "" : $"{p.child3Old}\n") +
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
retirementResignEmployee.PositionOld = org.result.position;
|
||||
retirementResignEmployee.PositionLevelOld = org.result.posLevelName;
|
||||
retirementResignEmployee.PositionTypeOld = org.result.posTypeName;
|
||||
retirementResignEmployee.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
|
||||
retirementResignEmployee.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo;
|
||||
retirementResignEmployee.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") +
|
||||
(org.result.child3 == null ? "" : org.result.child3 + "\n") +
|
||||
(org.result.child2 == null ? "" : org.result.child2 + "\n") +
|
||||
|
|
@ -1152,6 +1152,15 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
updated.IsCancel = true;
|
||||
}
|
||||
else if (updated.Status == "REPORT")
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel23/{updated.Id}");
|
||||
}
|
||||
}
|
||||
updated.Status = "CANCEL";
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
|
|
@ -1557,7 +1566,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementResignEmployees
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1682,7 +1691,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
positionType = p.PositionTypeOld,
|
||||
positionLevel = p.PositionLevelOld,
|
||||
isLeave = true,
|
||||
isLeave = p.IsCancel == true ? false : true,
|
||||
leaveReason = "ออกจากราชการ",
|
||||
dateLeave = r.commandDateAffect,
|
||||
commandId = r.commandId,
|
||||
|
|
@ -1742,7 +1751,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var placementProfiles = await _context.RetirementResignEmployeeCancels
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
||||
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ namespace BMA.EHR.Retirement.Service.Requests
|
|||
public class ReportPersonRequest
|
||||
{
|
||||
public string[] refIds { get; set; }
|
||||
public string? status { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue