แก้รอบเงินเดือนเดือนลูกจ้าง
This commit is contained in:
parent
a2d109ab6a
commit
dba2e15403
2 changed files with 31 additions and 19 deletions
|
|
@ -762,7 +762,7 @@ export class SalaryPeriodController extends Controller {
|
|||
pageSize: number;
|
||||
keyword?: string;
|
||||
type?: any;
|
||||
isRetire?: boolean | null;
|
||||
isRetire?: string | null;
|
||||
},
|
||||
) {
|
||||
const salaryOrg = await this.salaryOrgRepository.findOne({
|
||||
|
|
@ -780,7 +780,13 @@ export class SalaryPeriodController extends Controller {
|
|||
qb.andWhere(body.type != null && body.type != "" ? `profile.type LIKE :type` : "1=1", {
|
||||
type: body.type == null ? "" : `${body.type.toUpperCase()}`,
|
||||
})
|
||||
.andWhere(body.isRetire != null ? `profile.isRetired = ${body.isRetire}` : "1=1")
|
||||
.andWhere(
|
||||
body.isRetire != null
|
||||
? body.isRetire == "1"
|
||||
? `profile.isRetired = true`
|
||||
: `profile.isRetired = false`
|
||||
: "1=1",
|
||||
)
|
||||
.andWhere({
|
||||
salaryOrgId: salaryOrg.id,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue