This commit is contained in:
moss 2025-04-21 16:04:50 +07:00
parent 2f0d86ed58
commit 87670fb5b4
2 changed files with 67 additions and 36 deletions

View file

@ -69,56 +69,64 @@ export class SalaryPeriodEmployeeController extends Controller {
}
const data = {
group1id:
salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
)?.id,
group1IsClose:
salaryPeriod.salaryOrgs && salaryPeriod.salaryOrgs.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgs && salaryPeriod.salaryOrgs.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
)?.isClose,
group2id:
salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
)?.id,
group2IsClose:
salaryPeriod.salaryOrgs &&salaryPeriod.salaryOrgs.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgs && salaryPeriod.salaryOrgs.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
@ -128,7 +136,6 @@ export class SalaryPeriodEmployeeController extends Controller {
period: salaryPeriod.period,
};
return new HttpSuccess(data);
}