ออกคำสั่ง
This commit is contained in:
parent
505baa7bba
commit
40f45b01e6
5 changed files with 203 additions and 3 deletions
|
|
@ -299,6 +299,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
kpiUserEvaluation.posLevelName = x.posLevelName;
|
||||
kpiUserEvaluation.posTypeName = x.posTypeName;
|
||||
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
||||
kpiUserEvaluation.org = x.root;
|
||||
})
|
||||
.catch((x) => {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลในทะเบียนประวัติ");
|
||||
|
|
@ -315,11 +316,23 @@ export class KpiUserEvaluationController extends Controller {
|
|||
kpiUserEvaluation.posLevelName = x.posLevelName;
|
||||
kpiUserEvaluation.posTypeName = x.posTypeName;
|
||||
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
||||
kpiUserEvaluation.org = x.root;
|
||||
})
|
||||
.catch((x) => {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลในทะเบียนประวัติ");
|
||||
});
|
||||
}
|
||||
await new CallAPI()
|
||||
.GetData(request, "org/profile/profileid/position/" + requestBody.evaluatorId)
|
||||
.then((x) => {
|
||||
kpiUserEvaluation.prefixEvaluator = x.prefix;
|
||||
kpiUserEvaluation.firstNameEvaluator = x.firstName;
|
||||
kpiUserEvaluation.lastNameEvaluator = x.lastName;
|
||||
kpiUserEvaluation.positionEvaluator = x.position;
|
||||
kpiUserEvaluation.posLevelNameEvaluator = x.posLevelName;
|
||||
kpiUserEvaluation.posTypeNameEvaluator = x.posTypeName;
|
||||
kpiUserEvaluation.orgEvaluator = x.root;
|
||||
});
|
||||
kpiUserEvaluation.evaluationStatus = "NEW";
|
||||
kpiUserEvaluation.evaluationResults = "PENDING";
|
||||
kpiUserEvaluation.createdUserId = request.user.sub;
|
||||
|
|
@ -701,6 +714,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
totalPoint2_2: kpiUserEvaluation.totalPoint2_2,
|
||||
summaryPoint: kpiUserEvaluation.summaryPoint,
|
||||
isOpen: kpiUserEvaluation.isOpen,
|
||||
openDate: kpiUserEvaluation.openDate,
|
||||
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
||||
durationKPI:
|
||||
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||
|
|
@ -1041,6 +1055,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
);
|
||||
}
|
||||
kpiUserEvaluation.isOpen = true;
|
||||
kpiUserEvaluation.openDate = new Date();
|
||||
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
||||
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
||||
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue