hrms-api-kpi/src/controllers/KpiUserDevelopmentController.ts

540 lines
21 KiB
TypeScript
Raw Normal View History

2024-05-08 15:18:17 +07:00
import {
2024-05-09 11:06:41 +07:00
Controller,
Get,
Post,
Put,
Delete,
Route,
Security,
Tags,
Body,
Path,
Request,
SuccessResponse,
Response,
Query,
} from "tsoa";
import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success";
import HttpStatusCode from "../interfaces/http-status";
import {
KpiUserDevelopment,
CreateKpiUserDevelopment,
UpdateKpiUserDevelopment,
KpiUserDevelopmentDataPoint,
} from "../entities/kpiUserDevelopment";
import HttpError from "../interfaces/http-error";
import { KpiUserEvaluation } from "../entities/kpiUserEvaluation";
import { Not, Brackets } from "typeorm";
2024-07-17 12:47:23 +07:00
import { DevelopmentProject } from "../entities/developmentProject";
2024-08-09 16:28:52 +07:00
import { RequestWithUser } from "../middlewares/user";
import permission from "../interfaces/permission";
2024-08-22 14:23:50 +07:00
import { addLogSequence, setLogDataDiff } from "../interfaces/utils";
2024-05-09 11:06:41 +07:00
@Route("api/v1/kpi/user/achievement/development")
@Tags("KpiUserDevelopment")
@Security("bearerAuth")
@Response(
HttpStatusCode.INTERNAL_SERVER_ERROR,
"เกิดข้อผิดพลาด ไม่สามารถแสดงรายการได้ กรุณาลองใหม่ในภายหลัง",
)
@SuccessResponse(HttpStatusCode.OK, "สำเร็จ")
export class KpiUserDevelopmentController extends Controller {
private kpiUserDevelopmentRepository = AppDataSource.getRepository(KpiUserDevelopment);
private kpiUserEvaluationRepository = AppDataSource.getRepository(KpiUserEvaluation);
2024-07-17 12:47:23 +07:00
private developmentProjectRepository = AppDataSource.getRepository(DevelopmentProject);
2024-05-09 11:06:41 +07:00
/**
* API
*
* @summary - #
*
*/
@Post()
async createKpiUserDevelopment(
@Body()
requestBody: CreateKpiUserDevelopment,
2024-08-09 16:28:52 +07:00
@Request() request: RequestWithUser,
2024-05-09 11:06:41 +07:00
) {
2024-08-09 16:28:52 +07:00
await new permission().PermissionCreate(request, "SYS_KPI_LIST");
2024-05-09 11:06:41 +07:00
const chkUserEvaluation = await this.kpiUserEvaluationRepository.findOne({
where: { id: requestBody.kpiUserEvaluationId },
});
if (!chkUserEvaluation) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลแบบประเมินผู้ใช้งาน");
}
const chkName = await this.kpiUserDevelopmentRepository.findOne({
2024-06-19 10:17:15 +07:00
where: { name: requestBody.name },
2024-05-09 11:06:41 +07:00
});
if (chkName) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
}
const kpiUserDevelopment = Object.assign(new KpiUserDevelopment(), requestBody);
if (!kpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
}
2024-05-08 15:18:17 +07:00
// const chk_indicator = await this.kpiUserDevelopmentRepository.findOne({
// where: {
// kpiUserEvaluationId: requestBody.kpiUserEvaluationId,
// },
// });
// if (
// (chk_indicator && chk_indicator.including == requestBody.including) ||
// (chk_indicator && chk_indicator.includingName == requestBody.includingName)
// ) {
// throw new HttpError(
// HttpStatusCode.CONFLICT,
// "ไม่สามารถเพิ่มข้อมูลได้เนื่องจากข้อมูลตัวชี้วัดซ้ำ",
// );
// }
2024-08-23 09:33:37 +07:00
let before:any = null;
2024-05-09 11:06:41 +07:00
kpiUserDevelopment.createdUserId = request.user.sub;
kpiUserDevelopment.createdFullName = request.user.name;
kpiUserDevelopment.lastUpdateUserId = request.user.sub;
kpiUserDevelopment.lastUpdateFullName = request.user.name;
2024-08-22 14:23:50 +07:00
await this.kpiUserDevelopmentRepository.save(kpiUserDevelopment, { data: request });
setLogDataDiff(request, { before, after: kpiUserDevelopment });
2024-07-17 12:47:23 +07:00
if (requestBody.developmentProjects != null) {
await Promise.all(
requestBody.developmentProjects.map(async (x) => {
let data = new DevelopmentProject();
data.name = x;
data.createdUserId = request.user.sub;
data.createdFullName = request.user.name;
data.lastUpdateUserId = request.user.sub;
data.lastUpdateFullName = request.user.name;
data.kpiUserDevelopmentId = kpiUserDevelopment.id;
2024-08-22 14:23:50 +07:00
await this.developmentProjectRepository.save(data, { data: request });
setLogDataDiff(request, { before, after: data });
2024-07-17 12:47:23 +07:00
}),
);
}
2024-05-09 11:06:41 +07:00
return new HttpSuccess(kpiUserDevelopment.id);
}
/**
* API
*
* @summary - #
*
* @param {string} id Id
*/
@Put("{id}")
async editKpiUserDevelopment(
@Path() id: string,
@Body() requestBody: UpdateKpiUserDevelopment,
2024-08-09 16:28:52 +07:00
@Request() request: RequestWithUser,
2024-05-09 11:06:41 +07:00
) {
2024-08-09 16:28:52 +07:00
await new permission().PermissionUpdate(request, "SYS_KPI_LIST");
2024-07-17 12:47:23 +07:00
const kpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
where: { id },
relations: {
developmentProjects: true,
},
});
2024-05-09 11:06:41 +07:00
if (!kpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลพัฒนาตนเองนี้");
}
const chkUserEvaluation = await this.kpiUserEvaluationRepository.findOne({
where: { id: requestBody.kpiUserEvaluationId },
});
if (!chkUserEvaluation) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลแบบประเมินผู้ใช้งาน");
}
const chkName = await this.kpiUserDevelopmentRepository.find({
where: {
id: Not(id),
2024-06-19 10:17:15 +07:00
name: requestBody.name,
2024-05-09 11:06:41 +07:00
},
});
2024-06-19 10:17:15 +07:00
2024-05-09 11:06:41 +07:00
if (chkName && chkName.length > 0) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
2024-05-08 15:18:17 +07:00
}
// const chk_indicator = await this.kpiUserDevelopmentRepository.findOne({
// where: {
// id: Not(id),
// kpiUserEvaluationId: requestBody.kpiUserEvaluationId,
// },
// });
// if (
// (chk_indicator && chk_indicator.including == requestBody.including) ||
// (chk_indicator && chk_indicator.includingName == requestBody.includingName)
// ) {
// throw new HttpError(
// HttpStatusCode.CONFLICT,
// "ไม่สามารถเพิ่มข้อมูลได้เนื่องจากข้อมูลตัวชี้วัดซ้ำ",
// );
// }
2024-08-22 14:23:50 +07:00
await this.developmentProjectRepository.remove(kpiUserDevelopment.developmentProjects, {
data: request,
});
2024-05-09 11:06:41 +07:00
2024-08-22 14:23:50 +07:00
const before = structuredClone(kpiUserDevelopment);
2024-05-09 11:06:41 +07:00
kpiUserDevelopment.lastUpdateUserId = request.user.sub;
kpiUserDevelopment.lastUpdateFullName = request.user.name;
Object.assign(kpiUserDevelopment, requestBody);
2024-08-22 14:23:50 +07:00
await this.kpiUserDevelopmentRepository.save(kpiUserDevelopment, { data: request });
setLogDataDiff(request, { before, after: kpiUserDevelopment });
2024-07-17 17:15:39 +07:00
if (requestBody.developmentProjects != null) {
await Promise.all(
requestBody.developmentProjects.map(async (x) => {
let data = new DevelopmentProject();
data.name = x;
data.createdUserId = request.user.sub;
data.createdFullName = request.user.name;
data.lastUpdateUserId = request.user.sub;
data.lastUpdateFullName = request.user.name;
data.kpiUserDevelopmentId = kpiUserDevelopment.id;
2024-08-22 14:23:50 +07:00
await this.developmentProjectRepository.save(data, { data: request });
setLogDataDiff(request, { before: null, after: data });
2024-07-17 17:15:39 +07:00
}),
);
}
2024-05-09 11:06:41 +07:00
return new HttpSuccess(kpiUserDevelopment.id);
}
/**
* API
*
* @summary - #
*
*/
@Delete("{id}")
2024-08-09 16:28:52 +07:00
async deleteKpiUserDevelopment(@Path() id: string, @Request() request: RequestWithUser) {
await new permission().PermissionDelete(request, "SYS_KPI_LIST");
2024-05-09 11:06:41 +07:00
const delKpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
where: { id },
2024-07-19 12:05:38 +07:00
relations: ["developmentProjects"],
2024-05-09 11:06:41 +07:00
});
if (!delKpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลพัฒนาตนเองนี้");
2024-05-08 17:54:53 +07:00
}
2024-08-22 14:23:50 +07:00
await this.developmentProjectRepository.remove(delKpiUserDevelopment.developmentProjects, {
data: request,
});
await this.kpiUserDevelopmentRepository.remove(delKpiUserDevelopment, { data: request });
2024-05-09 11:06:41 +07:00
return new HttpSuccess();
}
/**
* API
*
* @summary - #
*
* @param {string} id Id
*/
@Get("{id}")
2024-08-22 14:14:24 +07:00
async GetKpiUserDevelopmentDetail(@Request() request: RequestWithUser, @Path() id: string) {
await new permission().PermissionGet(request, "SYS_KPI_LIST");
2024-05-09 11:06:41 +07:00
const getKpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
2024-07-17 14:58:56 +07:00
relations: ["kpiUserEvaluation", "developmentProjects"],
2024-05-09 11:06:41 +07:00
where: { id: id },
});
if (!getKpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลพัฒนาตนเองนี้");
2024-05-08 15:18:17 +07:00
}
2024-05-09 11:06:41 +07:00
const mapKpiUserDevelopment = {
id: getKpiUserDevelopment.id,
evaluationId: getKpiUserDevelopment.kpiUserEvaluation.id,
target: getKpiUserDevelopment.target,
summary: getKpiUserDevelopment.summary,
2024-06-19 10:17:15 +07:00
point: getKpiUserDevelopment.point,
2024-05-09 11:06:41 +07:00
name: getKpiUserDevelopment.name,
achievement10: getKpiUserDevelopment.achievement10,
achievement5: getKpiUserDevelopment.achievement5,
achievement0: getKpiUserDevelopment.achievement0,
isDevelopment70: getKpiUserDevelopment.isDevelopment70,
isDevelopment20: getKpiUserDevelopment.isDevelopment20,
isDevelopment10: getKpiUserDevelopment.isDevelopment10,
2024-07-17 12:47:23 +07:00
reasonDevelopment70: getKpiUserDevelopment.reasonDevelopment70,
reasonDevelopment20: getKpiUserDevelopment.reasonDevelopment20,
reasonDevelopment10: getKpiUserDevelopment.reasonDevelopment10,
selectType: getKpiUserDevelopment.selectType,
selectTypeYear: getKpiUserDevelopment.selectTypeYear,
selectTypeId: getKpiUserDevelopment.selectTypeId,
2024-07-17 15:35:09 +07:00
developmentProjects: getKpiUserDevelopment.developmentProjects.map((x) => x.name).sort(),
2024-05-09 11:06:41 +07:00
};
return new HttpSuccess(mapKpiUserDevelopment);
}
/**
* API
*
* @summary - #
*
*/
@Get()
2024-08-22 14:14:24 +07:00
async GetKpiUserDevelopment(@Request() request: RequestWithUser, @Query("id") id: string) {
await new permission().PermissionGet(request, "SYS_KPI_LIST");
2024-05-09 11:06:41 +07:00
const kpiUserDevelopment = await this.kpiUserDevelopmentRepository.find({
where: {
kpiUserEvaluationId: id,
},
relations: ["kpiUserEvaluation"],
order: { createdAt: "ASC" },
});
const mapKpiUserDevelopment = kpiUserDevelopment.map((item) => ({
id: item.id,
evaluationId: item.kpiUserEvaluation.id,
target: item.target,
summary: item.summary,
2024-06-19 10:17:15 +07:00
point: item.point,
2024-05-09 11:06:41 +07:00
name: item.name,
achievement10: item.achievement10,
achievement5: item.achievement5,
achievement0: item.achievement0,
isDevelopment70: item.isDevelopment70,
isDevelopment20: item.isDevelopment20,
isDevelopment10: item.isDevelopment10,
}));
return new HttpSuccess(mapKpiUserDevelopment);
2024-05-08 15:18:17 +07:00
}
2024-05-09 11:06:41 +07:00
2024-05-09 11:41:26 +07:00
/**
* API
*
* @summary
*
*
*/
@Post("point")
async CreateKpiUserDevelopmentPoint(
@Body() requestBody: KpiUserDevelopmentDataPoint[],
2024-08-09 16:28:52 +07:00
@Request() request: RequestWithUser,
2024-05-09 11:41:26 +07:00
) {
2024-08-09 16:28:52 +07:00
await new permission().PermissionCreate(request, "SYS_KPI_LIST");
2024-05-09 11:41:26 +07:00
for (const item of requestBody) {
const kpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
where: { id: item.id },
});
if (!kpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, `ไม่พบข้อมูลพัฒนาตนเองนี้: ${item.id}`);
}
2024-08-22 14:23:50 +07:00
const before = null;
2024-05-09 11:41:26 +07:00
this.kpiUserDevelopmentRepository.merge(kpiUserDevelopment, item);
kpiUserDevelopment.lastUpdateUserId = request.user.sub;
kpiUserDevelopment.lastUpdateFullName = request.user.name;
2024-08-22 14:23:50 +07:00
await this.kpiUserDevelopmentRepository.save(kpiUserDevelopment, { data: request });
setLogDataDiff(request, { before, after: kpiUserDevelopment });
2024-05-09 11:41:26 +07:00
}
return new HttpSuccess();
}
2024-07-15 15:48:58 +07:00
/**
* API
*
* @summary Admin
*
*/
@Post("admin")
async listKpiDevelopmentByStatusKP7(
2024-08-29 14:44:34 +07:00
@Request() request: RequestWithUser,
2024-07-15 15:48:58 +07:00
@Body()
requestBody: {
page: number;
pageSize: number;
kpiPeriodId?: string;
keyword?: string;
// status?: string | null;
// results?: string | null;
// reqedit?: string | null;
// evaluating?: boolean | null;
},
) {
2024-08-29 14:44:34 +07:00
await new permission().PermissionList(request, "SYS_RESULT");
2024-08-16 12:08:10 +07:00
let conditionFullName =
"CONCAT(kpiUserEvaluation.prefix, kpiUserEvaluation.firstName, ' ', kpiUserEvaluation.lastName) LIKE :keyword";
2024-07-15 15:48:58 +07:00
const [kpiUserDevelopment, total] = await AppDataSource.getRepository(KpiUserDevelopment)
.createQueryBuilder("kpiUserDevelopment")
.leftJoinAndSelect("kpiUserDevelopment.kpiUserEvaluation", "kpiUserEvaluation")
.leftJoinAndSelect("kpiUserEvaluation.kpiPeriod", "kpiPeriod")
.where("kpiUserEvaluation.evaluationStatus = :status", { status: "KP7" })
.andWhere("kpiUserEvaluation.kpiPeriodId = :kpiPeriodId", {
kpiPeriodId: requestBody.kpiPeriodId,
})
.andWhere(
new Brackets((qb) => {
qb.orWhere("kpiUserEvaluation.prefix LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserEvaluation.firstName LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserEvaluation.lastName LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserEvaluation.org LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserEvaluation.position LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserEvaluation.posTypeName LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserEvaluation.posLevelName LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
})
.orWhere("kpiUserDevelopment.name LIKE :keyword", {
keyword: `%${requestBody.keyword}%`,
2024-08-14 11:16:32 +07:00
})
2024-08-16 12:08:10 +07:00
.orWhere(conditionFullName, {
keyword: `%${requestBody.keyword}%`,
});
2024-07-15 15:48:58 +07:00
}),
)
.orderBy("kpiUserDevelopment.createdAt", "ASC")
.skip((requestBody.page - 1) * requestBody.pageSize)
.take(requestBody.pageSize)
.getManyAndCount();
const mapData = kpiUserDevelopment.map((item) => {
const fullNameParts = [
item.kpiUserEvaluation.child4,
item.kpiUserEvaluation.child3,
item.kpiUserEvaluation.child2,
item.kpiUserEvaluation.child1,
item.kpiUserEvaluation.org,
];
const organization = fullNameParts
.filter((part) => part !== undefined && part !== null)
.join("/");
return {
id: item.id,
durationKPI: item.kpiUserEvaluation.kpiPeriod.durationKPI,
developmentName: item.name,
prefix: item.kpiUserEvaluation.prefix ? item.kpiUserEvaluation.prefix : null,
firstname: item.kpiUserEvaluation.firstName ? item.kpiUserEvaluation.firstName : null,
lastname: item.kpiUserEvaluation.lastName ? item.kpiUserEvaluation.lastName : null,
kpiPeriodId: item.kpiUserEvaluation.kpiPeriodId ? item.kpiUserEvaluation.kpiPeriodId : null,
root: item.kpiUserEvaluation.org ? item.kpiUserEvaluation.org : null,
position: item.kpiUserEvaluation.position ? item.kpiUserEvaluation.position : null,
posTypeName: item.kpiUserEvaluation.posTypeName ? item.kpiUserEvaluation.posTypeName : null,
posLevelName: item.kpiUserEvaluation.posLevelName
? item.kpiUserEvaluation.posLevelName
: null,
organization: organization ? organization : null,
};
});
return new HttpSuccess({ data: mapData, total });
}
/**
* API Admin
*
* @summary - Admin #
*
*/
@Get("admin/detail/{id}")
2024-08-22 14:14:24 +07:00
async GetKpiDevelopmentStatusKP7ById(
@Request() request: RequestWithUser,
@Path("id") id: string,
) {
await new permission().PermissionGet(request, "SYS_RESULT");
2024-07-15 15:48:58 +07:00
const kpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
relations: [
"kpiUserEvaluation",
"kpiUserEvaluation.kpiPeriod",
2024-07-17 15:33:05 +07:00
"developmentProjects",
// "kpiUserEvaluation.kpiUserCapacitys",
// "kpiUserEvaluation.kpiUserCapacitys.kpiCapacity",
2024-07-15 15:48:58 +07:00
],
where: {
id: id,
},
});
2024-07-17 15:33:05 +07:00
if (!kpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลพัฒนาตนเองนี้");
}
2024-07-15 15:48:58 +07:00
const formattedData = {
2024-07-17 15:33:05 +07:00
id: kpiUserDevelopment.id,
evaluationId: kpiUserDevelopment.kpiUserEvaluation.id,
target: kpiUserDevelopment.target,
summary: kpiUserDevelopment.summary,
point: kpiUserDevelopment.point,
name: kpiUserDevelopment.name,
achievement10: kpiUserDevelopment.achievement10,
achievement5: kpiUserDevelopment.achievement5,
achievement0: kpiUserDevelopment.achievement0,
isDevelopment70: kpiUserDevelopment.isDevelopment70,
isDevelopment20: kpiUserDevelopment.isDevelopment20,
isDevelopment10: kpiUserDevelopment.isDevelopment10,
// capacity:
// kpiUserDevelopment?.kpiUserEvaluation.kpiUserCapacitys.map((kpiUserCapacity) => ({
// capacityPoint: kpiUserCapacity.point,
// capacityName: kpiUserCapacity.kpiCapacity.name,
// })) ?? [],
2024-07-17 15:35:09 +07:00
developmentProjects: kpiUserDevelopment.developmentProjects.map((x) => x.name).sort(),
2024-07-15 15:48:58 +07:00
};
return new HttpSuccess(formattedData);
}
2024-08-28 10:16:23 +07:00
/**
* API
*
* @summary - #
*
* @param {string} id Id
*/
@Get("registry/{type}/{id}")
async GetKpiUserDevelopmentDetailRegistryOfficer(@Request() request: RequestWithUser, @Path() id: string, @Path() type: string) {
const getKpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
relations: ["kpiUserEvaluation", "developmentProjects"],
where: { id: id },
});
if (!getKpiUserDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลพัฒนาตนเองนี้");
}
2024-08-28 15:22:47 +07:00
if(type.trim().toLocaleUpperCase() == "OFFICER"){
2024-08-28 10:16:23 +07:00
await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", getKpiUserDevelopment.kpiUserEvaluation.profileId);
2024-08-28 15:22:47 +07:00
}else if(type.trim().toLocaleUpperCase() == "EMPLOYEE"){
2024-08-28 10:16:23 +07:00
await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_EMP", getKpiUserDevelopment.kpiUserEvaluation.profileId);
2024-08-28 15:22:47 +07:00
}else if(type.trim().toLocaleUpperCase() == "TEMP"){
2024-08-28 10:16:23 +07:00
await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_TEMP", getKpiUserDevelopment.kpiUserEvaluation.profileId);
2024-08-28 17:40:28 +07:00
}else if(type.trim().toLocaleUpperCase() == "USER"){
2024-08-28 10:16:23 +07:00
}else{
2024-08-28 15:23:25 +07:00
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่สามารถเข้าถึงข้อมูลนี้ได้");
2024-08-28 10:16:23 +07:00
}
const mapKpiUserDevelopment = {
id: getKpiUserDevelopment.id,
evaluationId: getKpiUserDevelopment.kpiUserEvaluation.id,
target: getKpiUserDevelopment.target,
summary: getKpiUserDevelopment.summary,
point: getKpiUserDevelopment.point,
name: getKpiUserDevelopment.name,
achievement10: getKpiUserDevelopment.achievement10,
achievement5: getKpiUserDevelopment.achievement5,
achievement0: getKpiUserDevelopment.achievement0,
isDevelopment70: getKpiUserDevelopment.isDevelopment70,
isDevelopment20: getKpiUserDevelopment.isDevelopment20,
isDevelopment10: getKpiUserDevelopment.isDevelopment10,
reasonDevelopment70: getKpiUserDevelopment.reasonDevelopment70,
reasonDevelopment20: getKpiUserDevelopment.reasonDevelopment20,
reasonDevelopment10: getKpiUserDevelopment.reasonDevelopment10,
selectType: getKpiUserDevelopment.selectType,
selectTypeYear: getKpiUserDevelopment.selectTypeYear,
selectTypeId: getKpiUserDevelopment.selectTypeId,
developmentProjects: getKpiUserDevelopment.developmentProjects.map((x) => x.name).sort(),
};
return new HttpSuccess(mapKpiUserDevelopment);
}
2024-05-09 11:06:41 +07:00
}