no message
This commit is contained in:
parent
2529d7d43f
commit
eeede05a30
1 changed files with 10 additions and 4 deletions
|
|
@ -1348,8 +1348,12 @@ export class SalaryPeriodController extends Controller {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Get("active")
|
@Get("active")
|
||||||
async GetListsSalaryPeriodActive() {
|
async GetListsSalaryPeriodActive(
|
||||||
const salaryPeriod = await AppDataSource.getRepository(SalaryPeriod)
|
@Query("page") page: number = 1,
|
||||||
|
@Query("pageSize") pageSize: number = 10,
|
||||||
|
@Query("keyword") keyword?: string,
|
||||||
|
) {
|
||||||
|
const [salaryPeriod, total] = await AppDataSource.getRepository(SalaryPeriod)
|
||||||
.createQueryBuilder("salaryPeriod")
|
.createQueryBuilder("salaryPeriod")
|
||||||
.where({ isActive: true })
|
.where({ isActive: true })
|
||||||
.select([
|
.select([
|
||||||
|
|
@ -1363,9 +1367,11 @@ export class SalaryPeriodController extends Controller {
|
||||||
"salaryPeriod.revisionId",
|
"salaryPeriod.revisionId",
|
||||||
])
|
])
|
||||||
.orderBy("salaryPeriod.effectiveDate", "DESC")
|
.orderBy("salaryPeriod.effectiveDate", "DESC")
|
||||||
.getMany();
|
.skip((page - 1) * pageSize)
|
||||||
|
.take(pageSize)
|
||||||
|
.getManyAndCount();
|
||||||
|
|
||||||
return new HttpSuccess(salaryPeriod);
|
return new HttpSuccess({ data: salaryPeriod, total });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue