ค้นหาคนเกษียญ
This commit is contained in:
parent
b8e4e8270b
commit
a8b77ec2fb
1 changed files with 6 additions and 2 deletions
|
|
@ -440,7 +440,8 @@ export class SalaryPeriodController extends Controller {
|
|||
@Put("org/{id}")
|
||||
async GetListsSalaryProfile(
|
||||
@Path() id: string,
|
||||
@Body() body: { page: number; pageSize: number; keyword?: string; type: string },
|
||||
@Body()
|
||||
body: { page: number; pageSize: number; keyword?: string; type?: any; isRetire?: boolean },
|
||||
) {
|
||||
const salaryOrg = await this.salaryOrgRepository.findOne({
|
||||
where: {
|
||||
|
|
@ -452,11 +453,14 @@ export class SalaryPeriodController extends Controller {
|
|||
}
|
||||
const [salaryProfile, total] = await AppDataSource.getRepository(SalaryProfile)
|
||||
.createQueryBuilder("profile")
|
||||
.orWhere(
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.andWhere(body.type != null && body.type != "" ? "profile.type LIKE :type" : "1=1", {
|
||||
type: `%${body.type.toUpperCase()}%`,
|
||||
})
|
||||
.andWhere(body.isRetire != null ? "profile.isRetire = :isRetire" : "1=1", {
|
||||
isRetire: `${body.isRetire}`,
|
||||
})
|
||||
.andWhere({
|
||||
salaryOrgId: salaryOrg.id,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue