search profilesalay temp

This commit is contained in:
mamoss 2025-03-20 18:44:41 +07:00
parent 8c30dc56f4
commit b8bea7c8ef

View file

@ -87,7 +87,9 @@ export class ProfileSalaryTempController extends Controller {
orgRevisionId: findRevision.id,
})
.andWhere(
statusCheckEdit != undefined && statusCheckEdit != null && statusCheckEdit.toUpperCase() != "ALL"
statusCheckEdit != undefined &&
statusCheckEdit != null &&
statusCheckEdit.toUpperCase() != "ALL"
? "profile.statusCheckEdit = :statusCheckEdit"
: "1=1",
{
@ -273,7 +275,7 @@ export class ProfileSalaryTempController extends Controller {
orgRevisionId: root == null ? null : root.orgRevisionId,
org: `${_child4}${_child3}${_child2}${_child1}${root?.orgRootName ?? ""}`,
statusCheckEdit: _data.statusCheckEdit,
type: "OFFICER"
type: "OFFICER",
};
}),
);
@ -310,7 +312,7 @@ export class ProfileSalaryTempController extends Controller {
})
.andWhere(
statusCheckEdit != undefined && statusCheckEdit != null
? "profile.statusCheckEdit = :statusCheckEdit"
? "profileEmployee.statusCheckEdit = :statusCheckEdit"
: "1=1",
{
statusCheckEdit: statusCheckEdit?.trim()?.toUpperCase() ?? null,
@ -540,7 +542,7 @@ export class ProfileSalaryTempController extends Controller {
child4ShortName: _data.child4ShortNameTemp ? _data.child4ShortNameTemp : null,
org: `${_child4}${_child3}${_child2}${_child1}${root?.orgRootName ?? ""}`,
statusCheckEdit: _data.statusCheckEdit,
type: "EMPLOYEE"
type: "EMPLOYEE",
};
}),
);
@ -641,7 +643,7 @@ export class ProfileSalaryTempController extends Controller {
if (type.toLocaleUpperCase() == "OFFICER") {
const salary = await this.salaryRepo.find({
where: { profileId: profileId },
order: { order: "ASC" }
order: { order: "ASC" },
});
if (salary.length <= 0) {
let salaryOld = await this.salaryOldRepo.find({
@ -673,7 +675,7 @@ export class ProfileSalaryTempController extends Controller {
} else {
const salary = await this.salaryRepo.find({
where: { profileEmployeeId: profileId },
order: { order: "ASC" }
order: { order: "ASC" },
});
if (salary.length <= 0) {
let salaryOld = await this.salaryOldRepo.find({
@ -751,8 +753,6 @@ export class ProfileSalaryTempController extends Controller {
}
}
/**
* API
*