This commit is contained in:
Bright 2024-04-19 13:39:25 +07:00
parent 00a69ebd31
commit 8593edfc43

View file

@ -226,11 +226,11 @@ export class kpiCapacityController extends Controller {
keyword == undefined
? "1=1"
: [
{ "kpiCapacity.name": Like(`%${keyword}%`) },
{ "kpiCapacity.description": Like(`%${keyword}%`) },
{ name: Like(`%${keyword}%`) },
{ description: Like(`%${keyword}%`) },
],
)
.andWhere(type == undefined ? "1=1" : { "kpiCapacity.type": type })
.andWhere(type == undefined ? "1=1" : { type: type })
.orderBy("kpiCapacityDetail.level", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)