เช็ค ประเมินผล #814
This commit is contained in:
parent
4721e9aeed
commit
0cfdc07253
2 changed files with 8 additions and 5 deletions
|
|
@ -243,8 +243,9 @@ export class kpiPeriodController extends Controller {
|
|||
year !== 0 && year != null && year != undefined ? "kpiPeriod.year = :year" : "1=1",
|
||||
{ year: year },
|
||||
)
|
||||
.orderBy("kpiPeriod.startDate", "ASC")
|
||||
.addOrderBy("kpiPeriod.year", "ASC")
|
||||
.orderBy("kpiPeriod.year", "DESC")
|
||||
.addOrderBy("kpiPeriod.durationKPI", "DESC")
|
||||
.addOrderBy("kpiPeriod.startDate", "DESC")
|
||||
.skip((page - 1) * pageSize)
|
||||
.take(pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
@ -296,8 +297,8 @@ export class kpiPeriodController extends Controller {
|
|||
year !== 0 && year != null && year != undefined ? "kpiPeriod.year = :year" : "1=1",
|
||||
{ year: year },
|
||||
)
|
||||
.orderBy("kpiPeriod.startDate", "ASC")
|
||||
.addOrderBy("kpiPeriod.year", "ASC")
|
||||
.orderBy("kpiPeriod.year", "DESC")
|
||||
.addOrderBy("kpiPeriod.createdAt", "DESC")
|
||||
.skip((page - 1) * pageSize)
|
||||
.take(pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
"CONCAT(kpiUserEvaluation.prefix, kpiUserEvaluation.firstName, ' ', kpiUserEvaluation.lastName) LIKE :keyword";
|
||||
const [kpiUserEvaluation, total] = await AppDataSource.getRepository(KpiUserEvaluation)
|
||||
.createQueryBuilder("kpiUserEvaluation")
|
||||
.leftJoinAndSelect("kpiUserEvaluation.kpiPeriod", "kpiPeriod")
|
||||
.andWhere(
|
||||
requestBody.kpiPeriodId ? "kpiUserEvaluation.kpiPeriodId LIKE :kpiPeriodId" : "1=1",
|
||||
{
|
||||
|
|
@ -450,7 +451,8 @@ export class KpiUserEvaluationController extends Controller {
|
|||
});
|
||||
}),
|
||||
)
|
||||
.orderBy("kpiUserEvaluation.createdAt", "ASC")
|
||||
.orderBy("kpiPeriod.year", "DESC")
|
||||
.addOrderBy("kpiUserEvaluation.createdAt", "DESC")
|
||||
.skip((requestBody.page - 1) * requestBody.pageSize)
|
||||
.take(requestBody.pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue