แก้env
This commit is contained in:
parent
01cf95e407
commit
25fa65b3b5
4 changed files with 63 additions and 3 deletions
3
.github/workflows/release.yaml
vendored
3
.github/workflows/release.yaml
vendored
|
|
@ -9,7 +9,8 @@ env:
|
||||||
REGISTRY: docker.frappet.com
|
REGISTRY: docker.frappet.com
|
||||||
IMAGE_NAME: ehr/bma-ehr-kpi-service
|
IMAGE_NAME: ehr/bma-ehr-kpi-service
|
||||||
DEPLOY_HOST: frappet.com
|
DEPLOY_HOST: frappet.com
|
||||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-kpi
|
COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||||
|
# COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-kpi
|
||||||
jobs:
|
jobs:
|
||||||
# act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
# act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||||
release-test:
|
release-test:
|
||||||
|
|
|
||||||
|
|
@ -1234,6 +1234,49 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
||||||
return new HttpSuccess(kpiUserEvaluation.id);
|
return new HttpSuccess(kpiUserEvaluation.id);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* API บันทึกข้อมูลลง kp7 (USER)
|
||||||
|
*
|
||||||
|
* @summary บันทึกข้อมูลลง kp7 (USER)
|
||||||
|
*
|
||||||
|
* @param {string} id Guid, *Id คนประเมิน (USER)
|
||||||
|
*/
|
||||||
|
@Post("done/kp7")
|
||||||
|
async updateKpiEvaluationTokp7(
|
||||||
|
@Body()
|
||||||
|
requestBody: {
|
||||||
|
id: string[];
|
||||||
|
},
|
||||||
|
@Request() request: { user: Record<string, any> },
|
||||||
|
) {
|
||||||
|
const kpiUserEvaluations = await this.kpiUserEvalutionRepository.find({
|
||||||
|
where: { id: In(requestBody.id) },
|
||||||
|
});
|
||||||
|
|
||||||
|
Promise.all(
|
||||||
|
kpiUserEvaluations.map(async (kpiUserEvaluation) => {
|
||||||
|
kpiUserEvaluation.evaluationStatus = "KP7";
|
||||||
|
await new CallAPI()
|
||||||
|
.PostData(request, "org/profile/assessments", {
|
||||||
|
date: new Date(),
|
||||||
|
name: kpiUserEvaluation.evaluationResults,
|
||||||
|
point1Total: kpiUserEvaluation.weightPoint1,
|
||||||
|
point1: kpiUserEvaluation.totalPoint1,
|
||||||
|
point2Total: kpiUserEvaluation.weightPoint2,
|
||||||
|
point2: kpiUserEvaluation.totalPoint2_1 + kpiUserEvaluation.totalPoint2_2,
|
||||||
|
pointSumTotal: kpiUserEvaluation.summaryWeight,
|
||||||
|
pointSum: kpiUserEvaluation.summaryPoint,
|
||||||
|
profileId: kpiUserEvaluation.profileId,
|
||||||
|
})
|
||||||
|
.then(async (x) => {});
|
||||||
|
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
||||||
|
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
||||||
|
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
return new HttpSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API รายละเอียดสรุปผลการประเมิน (USER)
|
* API รายละเอียดสรุปผลการประเมิน (USER)
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไป",
|
comment: "หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไป",
|
||||||
default: false,
|
default: null,
|
||||||
})
|
})
|
||||||
isReasonCommander: boolean;
|
isReasonCommander: boolean;
|
||||||
|
|
||||||
|
|
@ -326,7 +326,7 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
|
comment: "หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
|
||||||
default: false,
|
default: null,
|
||||||
})
|
})
|
||||||
isReasonCommanderHigh: boolean;
|
isReasonCommanderHigh: boolean;
|
||||||
|
|
||||||
|
|
|
||||||
16
src/migration/1720326486719-add_table_kpi_add_bool.ts
Normal file
16
src/migration/1720326486719-add_table_kpi_add_bool.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class AddTableKpiAddBool1720326486719 implements MigrationInterface {
|
||||||
|
name = 'AddTableKpiAddBool1720326486719'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`isReasonCommander\` \`isReasonCommander\` tinyint NULL COMMENT 'หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไป'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`isReasonCommanderHigh\` \`isReasonCommanderHigh\` tinyint NULL COMMENT 'หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`isReasonCommanderHigh\` \`isReasonCommanderHigh\` tinyint NULL COMMENT 'หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง' DEFAULT '0'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`isReasonCommander\` \`isReasonCommander\` tinyint NULL COMMENT 'หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไป' DEFAULT '0'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue