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"], relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: { where: {
type: In(["HAFT", "FULL", "FULLHAFT"]), type: In(["HAFT", "FULL", "FULLHAFT"]),
isNext: false, isNext: true,
salaryOrg: { salaryOrg: {
snapshot: "SNAP2", snapshot: "SNAP2",
rootId: rootId, rootId: rootId,
@ -7683,6 +7683,7 @@ export class ReportController extends Controller {
// }), // }),
// ) // )
.andWhere("salaryProfileEmployee.status37 = :status", { status: "PENDING" }) .andWhere("salaryProfileEmployee.status37 = :status", { status: "PENDING" })
.andWhere("salaryProfileEmployee.rootId = :rootId", { rootId: body.rootId })
.select([ .select([
"salaryProfileEmployee.id", "salaryProfileEmployee.id",
"salaryProfileEmployee.orgShortName", "salaryProfileEmployee.orgShortName",
@ -8828,7 +8829,10 @@ export class ReportController extends Controller {
commandNo: v.commandNo, commandNo: v.commandNo,
commandYear: v.commandYear, commandYear: v.commandYear,
commandId: v.commandId, 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, group: salary.group && salary.groupNew ? salary.groupNew : salary.group,
}) })
.then(async () => { .then(async () => {
@ -8916,7 +8920,10 @@ export class ReportController extends Controller {
commandNo: v.commandNo, commandNo: v.commandNo,
commandYear: v.commandYear, commandYear: v.commandYear,
commandId: v.commandId, 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, group: salary.group && salary.groupNew ? salary.groupNew : salary.group,
}) })
.then(async () => { .then(async () => {