Merge branch 'develop' into adiDev
# Conflicts: # src/controllers/SalaryController.ts
This commit is contained in:
commit
bea9ee28fc
2 changed files with 54 additions and 13 deletions
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
|
|
@ -9,7 +9,7 @@ env:
|
|||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-salary-service
|
||||
DEPLOY_HOST: 49.0.91.80
|
||||
COMPOSE_PATH: /home/frappet/docker/bma-ehr-salary
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-salary
|
||||
jobs:
|
||||
# act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=test-v1 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||
release-test:
|
||||
|
|
@ -62,8 +62,8 @@ jobs:
|
|||
port: 10102
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker-compose pull
|
||||
docker-compose up -d
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ export class Salary extends Controller {
|
|||
@Post()
|
||||
@Example({
|
||||
salaryType: "string", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posType: "string", //*ระดับของตำแหน่ง
|
||||
posLevel: "string", //*ประเภทของตำแหน่ง
|
||||
posTypeId: "string(Guid)", //*ระดับของตำแหน่ง
|
||||
posLevelId: "string(Guid)", //*ประเภทของตำแหน่ง
|
||||
isActive: "boolean", //*สถานะการใช้งาน
|
||||
date: "datetime", //ให้ไว้ ณ วันที่
|
||||
startDate: "datetime", //วันที่มีผลบังคับใช้
|
||||
|
|
@ -110,8 +110,8 @@ export class Salary extends Controller {
|
|||
@Put("{id}")
|
||||
@Example({
|
||||
salaryType: "string", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posType: "string", //*ระดับของตำแหน่ง
|
||||
posLevel: "string", //*ประเภทของตำแหน่ง
|
||||
posTypeId: "string(Guid)", //*ระดับของตำแหน่ง
|
||||
posLevelId: "string(Guid)", //*ประเภทของตำแหน่ง
|
||||
isActive: "boolean", //*สถานะการใช้งาน
|
||||
date: "datetime", //ให้ไว้ ณ วันที่
|
||||
startDate: "datetime", //วันที่มีผลบังคับใช้
|
||||
|
|
@ -217,12 +217,53 @@ export class Salary extends Controller {
|
|||
}
|
||||
|
||||
/**
|
||||
* API รายการผังเงินเดือน
|
||||
*
|
||||
* @summary SLR_005 - รายการผังเงินเดือน #5
|
||||
*
|
||||
|
||||
*/
|
||||
* API รายละเอียดผังเงินเดือน
|
||||
*
|
||||
* @summary SLR_004 - รายละเอียดผังเงินเดือน #4
|
||||
*
|
||||
* @param {string} id Guid, *Id ผังเงินเดือน
|
||||
*/
|
||||
@Get("{id}")
|
||||
@Example({
|
||||
salaryType: "string", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posTypeId: "string(Guid)", //*ระดับของตำแหน่ง
|
||||
posLevelId: "string(Guid)", //*ประเภทของตำแหน่ง
|
||||
isActive: "boolean", //*สถานะการใช้งาน
|
||||
date: "datetime", //ให้ไว้ ณ วันที่
|
||||
startDate: "datetime", //วันที่มีผลบังคับใช้
|
||||
endDate: "datetime", //วันที่สิ้นสุดบังคับใช้
|
||||
detail: "string", //คำอธิบาย
|
||||
})
|
||||
async GetSalaryById(@Path() id: string) {
|
||||
try {
|
||||
const salary = await this.salaryRepository.findOne({
|
||||
where: { id: id },
|
||||
select: [
|
||||
"salaryType",
|
||||
"posTypeId",
|
||||
"posLevelId",
|
||||
"isActive",
|
||||
"date",
|
||||
"startDate",
|
||||
"endDate",
|
||||
"details",
|
||||
],
|
||||
});
|
||||
if (!salary) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: " + id);
|
||||
}
|
||||
return new HttpSuccess(salary);
|
||||
} catch (error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API รายการผังเงินเดือน
|
||||
*
|
||||
* @summary SLR_005 - รายการผังเงินเดือน #5
|
||||
*
|
||||
*/
|
||||
@Get()
|
||||
async listSalary(
|
||||
@Query("page") page: number = 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue