no message
This commit is contained in:
parent
19703a4f0b
commit
f0af5a5c83
4 changed files with 81 additions and 89 deletions
|
|
@ -187,9 +187,9 @@ export class kpiCapacityController extends Controller {
|
||||||
@Get("head")
|
@Get("head")
|
||||||
async GetKpiCapacityTypeHEAD() {
|
async GetKpiCapacityTypeHEAD() {
|
||||||
const kpiCapacity = await this.kpiCapacityRepository.find({
|
const kpiCapacity = await this.kpiCapacityRepository.find({
|
||||||
where: {
|
where: {
|
||||||
type: In(["HEAD"]),
|
type: In(["HEAD"]),
|
||||||
kpiCapacityDetails: { level: "1" }
|
kpiCapacityDetails: { level: "1" },
|
||||||
},
|
},
|
||||||
select: ["id", "name"],
|
select: ["id", "name"],
|
||||||
relations: ["kpiCapacityDetails"],
|
relations: ["kpiCapacityDetails"],
|
||||||
|
|
@ -199,7 +199,7 @@ export class kpiCapacityController extends Controller {
|
||||||
id: x.id,
|
id: x.id,
|
||||||
name: x.name,
|
name: x.name,
|
||||||
level: x.kpiCapacityDetails.length > 0 ? x.kpiCapacityDetails[0].level : null,
|
level: x.kpiCapacityDetails.length > 0 ? x.kpiCapacityDetails[0].level : null,
|
||||||
description: x.kpiCapacityDetails.length > 0 ? x.kpiCapacityDetails[0].description : null,
|
description: x.kpiCapacityDetails.length > 0 ? x.kpiCapacityDetails[0].description : null,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return new HttpSuccess(mapData);
|
return new HttpSuccess(mapData);
|
||||||
|
|
@ -212,34 +212,34 @@ export class kpiCapacityController extends Controller {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Get("group")
|
@Get("group")
|
||||||
async GetKpiCapacityTypeGROUP(
|
async GetKpiCapacityTypeGROUP(@Query("positionName") positionName: string) {
|
||||||
@Query("positionName") positionName: string
|
|
||||||
) {
|
|
||||||
|
|
||||||
let position = await this.positionRepository.findOne({
|
let position = await this.positionRepository.findOne({
|
||||||
where: { name: Like(`%${positionName}%`) },
|
where: { name: Like(`${positionName}`) },
|
||||||
relations: ["kpiLink.kpiCapacitys"]
|
relations: ["kpiLink", "kpiLink.kpiCapacitys"],
|
||||||
})
|
});
|
||||||
|
|
||||||
if (position == null) {
|
if (position == null) {
|
||||||
position = await this.positionRepository.findOne({
|
position = await this.positionRepository.findOne({
|
||||||
where: { name: "นักจัดการงานทั่วไป" },
|
where: { name: "นักจัดการงานทั่วไป" },
|
||||||
relations: ["kpiLink.kpiCapacitys"]
|
relations: ["kpiLink", "kpiLink.kpiCapacitys"],
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let positionLinkId: any
|
let positionLinkId: any;
|
||||||
positionLinkId = position != null ? position : null
|
positionLinkId = position != null ? position : null;
|
||||||
const kpiCapacityIds = positionLinkId.kpiLink.kpiCapacitys.map((kpiCapacity:any) => kpiCapacity.id)
|
if (positionLinkId == null || positionLinkId.kpiLink == null) return new HttpSuccess([]);
|
||||||
|
const kpiCapacityIds = positionLinkId.kpiLink.kpiCapacitys.map(
|
||||||
|
(kpiCapacity: any) => kpiCapacity.id,
|
||||||
|
);
|
||||||
|
|
||||||
const kpiCapacity = await this.kpiCapacityRepository.find({
|
const kpiCapacity = await this.kpiCapacityRepository.find({
|
||||||
where: {
|
where: {
|
||||||
id: In(kpiCapacityIds),
|
id: In(kpiCapacityIds),
|
||||||
type: In(["GROUP"]),
|
type: In(["GROUP"]),
|
||||||
kpiCapacityDetails: { level: "2" }
|
kpiCapacityDetails: { level: "2" },
|
||||||
},
|
},
|
||||||
select: ["id", "name"],
|
select: ["id", "name"],
|
||||||
relations: ["kpiCapacityDetails",],
|
relations: ["kpiCapacityDetails"],
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapData = kpiCapacity.map((x) => ({
|
const mapData = kpiCapacity.map((x) => ({
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export class kpiPlanController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "org/find/all", {
|
.PostData(request, "/org/find/all", {
|
||||||
node: requestBody.node,
|
node: requestBody.node,
|
||||||
nodeId: requestBody.nodeId,
|
nodeId: requestBody.nodeId,
|
||||||
})
|
})
|
||||||
|
|
@ -82,7 +82,7 @@ export class kpiPlanController extends Controller {
|
||||||
})
|
})
|
||||||
.catch((x) => {});
|
.catch((x) => {});
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "development/strategy/find/all", {
|
.PostData(request, "/development/strategy/find/all", {
|
||||||
strategy: requestBody.strategy,
|
strategy: requestBody.strategy,
|
||||||
strategyId: requestBody.strategyId,
|
strategyId: requestBody.strategyId,
|
||||||
})
|
})
|
||||||
|
|
@ -221,7 +221,7 @@ export class kpiPlanController extends Controller {
|
||||||
}
|
}
|
||||||
Object.assign(kpiPlan, requestBody);
|
Object.assign(kpiPlan, requestBody);
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "org/find/all", {
|
.PostData(request, "/org/find/all", {
|
||||||
node: requestBody.node,
|
node: requestBody.node,
|
||||||
nodeId: requestBody.nodeId,
|
nodeId: requestBody.nodeId,
|
||||||
})
|
})
|
||||||
|
|
@ -244,7 +244,7 @@ export class kpiPlanController extends Controller {
|
||||||
})
|
})
|
||||||
.catch((x) => {});
|
.catch((x) => {});
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "development/strategy/find/all", {
|
.PostData(request, "/development/strategy/find/all", {
|
||||||
strategy: requestBody.strategy,
|
strategy: requestBody.strategy,
|
||||||
strategyId: requestBody.strategyId,
|
strategyId: requestBody.strategyId,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export class kpiRoleController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "org/find/all", {
|
.PostData(request, "/org/find/all", {
|
||||||
node: requestBody.node,
|
node: requestBody.node,
|
||||||
nodeId: requestBody.nodeId,
|
nodeId: requestBody.nodeId,
|
||||||
})
|
})
|
||||||
|
|
@ -218,7 +218,7 @@ export class kpiRoleController extends Controller {
|
||||||
}
|
}
|
||||||
Object.assign(kpiRole, requestBody);
|
Object.assign(kpiRole, requestBody);
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "org/find/all", {
|
.PostData(request, "/org/find/all", {
|
||||||
node: requestBody.node,
|
node: requestBody.node,
|
||||||
nodeId: requestBody.nodeId,
|
nodeId: requestBody.nodeId,
|
||||||
})
|
})
|
||||||
|
|
@ -324,7 +324,6 @@ export class kpiRoleController extends Controller {
|
||||||
orgRevisionId: kpiRole.orgRevisionId,
|
orgRevisionId: kpiRole.orgRevisionId,
|
||||||
position: kpiRole.position,
|
position: kpiRole.position,
|
||||||
documentInfoEvidence: kpiRole.documentInfoEvidence,
|
documentInfoEvidence: kpiRole.documentInfoEvidence,
|
||||||
|
|
||||||
};
|
};
|
||||||
return new HttpSuccess(formattedData);
|
return new HttpSuccess(formattedData);
|
||||||
}
|
}
|
||||||
|
|
@ -414,36 +413,29 @@ export class kpiRoleController extends Controller {
|
||||||
// period: `%${requestBody.period}%`,
|
// period: `%${requestBody.period}%`,
|
||||||
// },
|
// },
|
||||||
// )
|
// )
|
||||||
.andWhere(
|
.andWhere(requestBody.year ? "kpiRole.year LIKE :year" : "1=1", {
|
||||||
requestBody.year
|
year: `%${requestBody.year}%`,
|
||||||
? "kpiRole.year LIKE :year"
|
})
|
||||||
: "1=1",
|
.andWhere(requestBody.period ? "kpiRole.period LIKE :period" : "1=1", {
|
||||||
{
|
period: `%${requestBody.period}%`,
|
||||||
year: `%${requestBody.year}%`,
|
})
|
||||||
},
|
|
||||||
)
|
|
||||||
.andWhere(
|
|
||||||
requestBody.period
|
|
||||||
? "kpiRole.period LIKE :period"
|
|
||||||
: "1=1",
|
|
||||||
{
|
|
||||||
period: `%${requestBody.period}%`,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.andWhere(requestBody.position != undefined ? "kpiRole.position LIKE :position" : "1=1", {
|
.andWhere(requestBody.position != undefined ? "kpiRole.position LIKE :position" : "1=1", {
|
||||||
position: `%${requestBody.position}%`,
|
position: `%${requestBody.position}%`,
|
||||||
})
|
})
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.orWhere("kpiRole.including LIKE :keyword", {
|
qb.orWhere("kpiRole.including LIKE :keyword", {
|
||||||
keyword: `%${requestBody.keyword}%`
|
keyword: `%${requestBody.keyword}%`,
|
||||||
}).orWhere("kpiRole.includingName LIKE :keyword",{
|
})
|
||||||
keyword: `%${requestBody.keyword}%`
|
.orWhere("kpiRole.includingName LIKE :keyword", {
|
||||||
}).orWhere("kpiRole.year LIKE :keyword",{
|
keyword: `%${requestBody.keyword}%`,
|
||||||
keyword: `%${requestBody.keyword}%`
|
})
|
||||||
}).orWhere("kpiRole.period LIKE :keyword",{
|
.orWhere("kpiRole.year LIKE :keyword", {
|
||||||
keyword: `%${requestBody.keyword}%`
|
keyword: `%${requestBody.keyword}%`,
|
||||||
});
|
})
|
||||||
|
.orWhere("kpiRole.period LIKE :keyword", {
|
||||||
|
keyword: `%${requestBody.keyword}%`,
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.select([
|
.select([
|
||||||
|
|
@ -552,21 +544,21 @@ export class kpiRoleController extends Controller {
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API ประวัดิตัวชี้วัดตามตำแหน่ง
|
* API ประวัดิตัวชี้วัดตามตำแหน่ง
|
||||||
* @param id Guid, *Id ประวัดิตัวชี้วัดตามตำแหน่ง
|
* @param id Guid, *Id ประวัดิตัวชี้วัดตามตำแหน่ง
|
||||||
*/
|
*/
|
||||||
@Get("history/{id}")
|
@Get("history/{id}")
|
||||||
async GetHistory(@Path() id: string) {
|
async GetHistory(@Path() id: string) {
|
||||||
const kpiRoleHistory = await this.kpiRoleHistoryRepository.find({
|
const kpiRoleHistory = await this.kpiRoleHistoryRepository.find({
|
||||||
where: { kpiRoleId: id },
|
where: { kpiRoleId: id },
|
||||||
order:{
|
order: {
|
||||||
createdAt: "ASC"
|
createdAt: "ASC",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
if (!kpiRoleHistory) {
|
if (!kpiRoleHistory) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประวัดิตัวชี้วัดตามตำแหน่งนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประวัดิตัวชี้วัดตามตำแหน่งนี้");
|
||||||
}
|
}
|
||||||
return new HttpSuccess(kpiRoleHistory);
|
return new HttpSuccess(kpiRoleHistory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
) {
|
) {
|
||||||
let profileId: any = null;
|
let profileId: any = null;
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/keycloak/position")
|
.GetData(request, "/org/profile/keycloak/position")
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
profileId = x.profileId;
|
profileId = x.profileId;
|
||||||
})
|
})
|
||||||
|
|
@ -300,7 +300,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
const kpiUserEvaluation = Object.assign(new KpiUserEvaluation(), requestBody);
|
const kpiUserEvaluation = Object.assign(new KpiUserEvaluation(), requestBody);
|
||||||
if (requestBody.profileId != undefined && requestBody.profileId != null) {
|
if (requestBody.profileId != undefined && requestBody.profileId != null) {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/profileid/position/" + requestBody.profileId)
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.profileId)
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
kpiUserEvaluation.profileId = x.profileId;
|
kpiUserEvaluation.profileId = x.profileId;
|
||||||
kpiUserEvaluation.prefix = x.prefix;
|
kpiUserEvaluation.prefix = x.prefix;
|
||||||
|
|
@ -326,7 +326,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/keycloak/position")
|
.GetData(request, "/org/profile/keycloak/position")
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
kpiUserEvaluation.profileId = x.profileId;
|
kpiUserEvaluation.profileId = x.profileId;
|
||||||
kpiUserEvaluation.prefix = x.prefix;
|
kpiUserEvaluation.prefix = x.prefix;
|
||||||
|
|
@ -352,7 +352,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/profileid/position/" + requestBody.evaluatorId)
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.evaluatorId)
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
kpiUserEvaluation.prefixEvaluator = x.prefix;
|
kpiUserEvaluation.prefixEvaluator = x.prefix;
|
||||||
kpiUserEvaluation.firstNameEvaluator = x.firstName;
|
kpiUserEvaluation.firstNameEvaluator = x.firstName;
|
||||||
|
|
@ -418,7 +418,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
level = "1";
|
level = "1";
|
||||||
for (const capacity of mainCapacities) {
|
for (const capacity of mainCapacities) {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "kpi/user/capacity", {
|
.PostData(request, "/kpi/user/capacity", {
|
||||||
kpiUserEvaluationId: kpiUserEvaluation.id,
|
kpiUserEvaluationId: kpiUserEvaluation.id,
|
||||||
kpiCapacityId: capacity.id,
|
kpiCapacityId: capacity.id,
|
||||||
level: level,
|
level: level,
|
||||||
|
|
@ -479,7 +479,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
let groupCapacity = findKpiLink.kpiCapacitys;
|
let groupCapacity = findKpiLink.kpiCapacitys;
|
||||||
for (const capacity of groupCapacity) {
|
for (const capacity of groupCapacity) {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "kpi/user/capacity", {
|
.PostData(request, "/kpi/user/capacity", {
|
||||||
kpiUserEvaluationId: kpiUserEvaluation.id,
|
kpiUserEvaluationId: kpiUserEvaluation.id,
|
||||||
kpiCapacityId: capacity.id,
|
kpiCapacityId: capacity.id,
|
||||||
level: levelForGourp,
|
level: levelForGourp,
|
||||||
|
|
@ -692,7 +692,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
}
|
}
|
||||||
if (requestBody.status.trim().toUpperCase() == "NEW_EVALUATOR") {
|
if (requestBody.status.trim().toUpperCase() == "NEW_EVALUATOR") {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ส่งข้อตกลงการประเมินผลการปฏิบัติราชการระดับบุคคลให้อนุมัติ`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ส่งข้อตกลงการประเมินผลการปฏิบัติราชการระดับบุคคลให้อนุมัติ`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ส่งข้อตกลงการประเมินผลการปฏิบัติราชการระดับบุคคลให้อนุมัติ`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ส่งข้อตกลงการประเมินผลการปฏิบัติราชการระดับบุคคลให้อนุมัติ`,
|
||||||
receiverUserId: kpiUserEvaluation.evaluatorId,
|
receiverUserId: kpiUserEvaluation.evaluatorId,
|
||||||
|
|
@ -705,7 +705,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
.catch((x) => {});
|
.catch((x) => {});
|
||||||
} else if (requestBody.status.trim().toUpperCase() == "EVALUATING_EVALUATOR") {
|
} else if (requestBody.status.trim().toUpperCase() == "EVALUATING_EVALUATOR") {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} สรุปการประเมินผลการปฏิบัติราชการระดับบุคคล`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} สรุปการประเมินผลการปฏิบัติราชการระดับบุคคล`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} สรุปการประเมินผลการปฏิบัติราชการระดับบุคคล`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} สรุปการประเมินผลการปฏิบัติราชการระดับบุคคล`,
|
||||||
receiverUserId: kpiUserEvaluation.evaluatorId,
|
receiverUserId: kpiUserEvaluation.evaluatorId,
|
||||||
|
|
@ -795,7 +795,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
) {
|
) {
|
||||||
let profileId: any = null;
|
let profileId: any = null;
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/keycloak/position")
|
.GetData(request, "/org/profile/keycloak/position")
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
profileId = x.profileId;
|
profileId = x.profileId;
|
||||||
})
|
})
|
||||||
|
|
@ -884,7 +884,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
) {
|
) {
|
||||||
let profileId: any = null;
|
let profileId: any = null;
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/keycloak/position")
|
.GetData(request, "/org/profile/keycloak/position")
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
profileId = x.profileId;
|
profileId = x.profileId;
|
||||||
})
|
})
|
||||||
|
|
@ -918,7 +918,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
item.evaluationStatus = "APPROVE";
|
item.evaluationStatus = "APPROVE";
|
||||||
} else {
|
} else {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${item.prefix}${item.firstName} ${item.lastName} ผู้ประเมินอนุมัติข้อตกลง`,
|
subject: `${item.prefix}${item.firstName} ${item.lastName} ผู้ประเมินอนุมัติข้อตกลง`,
|
||||||
body: `${item.prefix}${item.firstName} ${item.lastName} ผู้ประเมินอนุมัติข้อตกลง`,
|
body: `${item.prefix}${item.firstName} ${item.lastName} ผู้ประเมินอนุมัติข้อตกลง`,
|
||||||
receiverUserId: item.commanderId,
|
receiverUserId: item.commanderId,
|
||||||
|
|
@ -938,7 +938,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
item.evaluationStatus = "APPROVE";
|
item.evaluationStatus = "APPROVE";
|
||||||
} else {
|
} else {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${item.prefix}${item.firstName} ${item.lastName} ผู้บังคับบัญชาเหนือขึ้นไปอนุมัติข้อตกลง`,
|
subject: `${item.prefix}${item.firstName} ${item.lastName} ผู้บังคับบัญชาเหนือขึ้นไปอนุมัติข้อตกลง`,
|
||||||
body: `${item.prefix}${item.firstName} ${item.lastName} ผู้บังคับบัญชาเหนือขึ้นไปอนุมัติข้อตกลง`,
|
body: `${item.prefix}${item.firstName} ${item.lastName} ผู้บังคับบัญชาเหนือขึ้นไปอนุมัติข้อตกลง`,
|
||||||
receiverUserId: item.commanderHighId,
|
receiverUserId: item.commanderHighId,
|
||||||
|
|
@ -984,7 +984,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
) {
|
) {
|
||||||
let profileId: any = null;
|
let profileId: any = null;
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/keycloak/position")
|
.GetData(request, "/org/profile/keycloak/position")
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
profileId = x.profileId;
|
profileId = x.profileId;
|
||||||
})
|
})
|
||||||
|
|
@ -1065,7 +1065,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
) {
|
) {
|
||||||
let profileId: any = null;
|
let profileId: any = null;
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.GetData(request, "org/profile/keycloak/position")
|
.GetData(request, "/org/profile/keycloak/position")
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
profileId = x.profileId;
|
profileId = x.profileId;
|
||||||
})
|
})
|
||||||
|
|
@ -1183,7 +1183,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
if (kpiUserEvaluation.commanderId == null) {
|
if (kpiUserEvaluation.commanderId == null) {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/keycloak", {
|
.PostData(request, "/placement/noti/keycloak", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
receiverUserId: "aec26ac3-417c-4cf9-9cbe-874939f99ecc",
|
receiverUserId: "aec26ac3-417c-4cf9-9cbe-874939f99ecc",
|
||||||
|
|
@ -1197,7 +1197,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
kpiUserEvaluation.evaluationStatus = "COMPLETE";
|
kpiUserEvaluation.evaluationStatus = "COMPLETE";
|
||||||
} else {
|
} else {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
receiverUserId: kpiUserEvaluation.commanderId,
|
receiverUserId: kpiUserEvaluation.commanderId,
|
||||||
|
|
@ -1253,7 +1253,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
if (kpiUserEvaluation.commanderHighId == null) {
|
if (kpiUserEvaluation.commanderHighId == null) {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/keycloak", {
|
.PostData(request, "/placement/noti/keycloak", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
receiverUserId: "aec26ac3-417c-4cf9-9cbe-874939f99ecc",
|
receiverUserId: "aec26ac3-417c-4cf9-9cbe-874939f99ecc",
|
||||||
|
|
@ -1267,7 +1267,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
kpiUserEvaluation.evaluationStatus = "COMPLETE";
|
kpiUserEvaluation.evaluationStatus = "COMPLETE";
|
||||||
} else {
|
} else {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
receiverUserId: kpiUserEvaluation.commanderHighId,
|
receiverUserId: kpiUserEvaluation.commanderHighId,
|
||||||
|
|
@ -1317,7 +1317,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
kpiUserEvaluation.evaluationStatus = "COMPLETE";
|
kpiUserEvaluation.evaluationStatus = "COMPLETE";
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/keycloak", {
|
.PostData(request, "/placement/noti/keycloak", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ผู้ประเมินแสดงความเห็น`,
|
||||||
receiverUserId: "aec26ac3-417c-4cf9-9cbe-874939f99ecc",
|
receiverUserId: "aec26ac3-417c-4cf9-9cbe-874939f99ecc",
|
||||||
|
|
@ -1358,7 +1358,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
kpiUserEvaluations.map(async (kpiUserEvaluation) => {
|
kpiUserEvaluations.map(async (kpiUserEvaluation) => {
|
||||||
kpiUserEvaluation.evaluationStatus = "KP7";
|
kpiUserEvaluation.evaluationStatus = "KP7";
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "org/profile/assessments", {
|
.PostData(request, "/org/profile/assessments", {
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
name: kpiUserEvaluation.evaluationResults,
|
name: kpiUserEvaluation.evaluationResults,
|
||||||
point1Total: kpiUserEvaluation.weightPoint1,
|
point1Total: kpiUserEvaluation.weightPoint1,
|
||||||
|
|
@ -1371,7 +1371,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
})
|
})
|
||||||
.then(async (x) => {});
|
.then(async (x) => {});
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "placement/noti/profile", {
|
.PostData(request, "/placement/noti/profile", {
|
||||||
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
|
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
|
||||||
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
|
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
|
||||||
receiverUserId: kpiUserEvaluation.profileId,
|
receiverUserId: kpiUserEvaluation.profileId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue