sort by root

This commit is contained in:
moss 2025-05-01 16:31:25 +07:00
parent 85377ca291
commit ec571dec54

View file

@ -3651,7 +3651,7 @@ export class ReportController extends Controller {
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: {
type: In(["HAFT", "FULL", "FULLHAFT"]),
isNext: false,
isNext: true,
salaryOrg: {
snapshot: "SNAP2",
rootId: rootId,
@ -7295,7 +7295,7 @@ export class ReportController extends Controller {
.addOrderBy("salaryProfile.child4Order", "ASC")
.addOrderBy("salaryProfile.posMasterNo", "ASC")
.getMany();
const _salaryRank = salaryRank.map((item) => ({
id: item.id,
posMasterNo: `${item.orgShortName} ${item.posMasterNo}`,
@ -7683,6 +7683,7 @@ export class ReportController extends Controller {
// }),
// )
.andWhere("salaryProfileEmployee.status37 = :status", { status: "PENDING" })
.andWhere("salaryProfileEmployee.rootId = :rootId", { rootId: body.rootId })
.select([
"salaryProfileEmployee.id",
"salaryProfileEmployee.orgShortName",
@ -8828,7 +8829,10 @@ export class ReportController extends Controller {
commandNo: v.commandNo,
commandYear: v.commandYear,
commandId: v.commandId,
salaryLevel: salary.salaryLevel && salary.salaryLevelNew ? salary.salaryLevelNew : salary.salaryLevel,
salaryLevel:
salary.salaryLevel && salary.salaryLevelNew
? salary.salaryLevelNew
: salary.salaryLevel,
group: salary.group && salary.groupNew ? salary.groupNew : salary.group,
})
.then(async () => {
@ -8916,7 +8920,10 @@ export class ReportController extends Controller {
commandNo: v.commandNo,
commandYear: v.commandYear,
commandId: v.commandId,
salaryLevel: salary.salaryLevel && salary.salaryLevelNew ? salary.salaryLevelNew : salary.salaryLevel,
salaryLevel:
salary.salaryLevel && salary.salaryLevelNew
? salary.salaryLevelNew
: salary.salaryLevel,
group: salary.group && salary.groupNew ? salary.groupNew : salary.group,
})
.then(async () => {