fix sort
This commit is contained in:
parent
a4f9676297
commit
6ff799e31b
1 changed files with 4 additions and 8 deletions
|
|
@ -147,7 +147,7 @@ export class Salary extends Controller {
|
|||
},
|
||||
});
|
||||
|
||||
if (chk_3fields != null && requestBody.isActive) {
|
||||
if (chk_3fields != null && requestBody.isActive) {
|
||||
chk_3fields.isActive = false;
|
||||
chk_3fields.lastUpdateUserId = request.user.sub;
|
||||
chk_3fields.lastUpdateFullName = request.user.name;
|
||||
|
|
@ -273,12 +273,12 @@ export class Salary extends Controller {
|
|||
relations: ["posLevel_", "posType_"],
|
||||
order: {
|
||||
// startDate: "DESC",
|
||||
isActive: "ASC",
|
||||
isActive: "DESC",
|
||||
posType_: {
|
||||
posTypeRank: "ASC"
|
||||
posTypeRank: "DESC"
|
||||
},
|
||||
posLevel_: {
|
||||
posLevelRank: "ASC"
|
||||
posLevelRank: "DESC"
|
||||
},
|
||||
},
|
||||
...(keyword ? {} : { skip: (page - 1) * pageSize, take: pageSize }),
|
||||
|
|
@ -343,7 +343,6 @@ export class Salary extends Controller {
|
|||
@Body() body: { id: string },
|
||||
@Request() request: { user: Record<string, any> },
|
||||
) {
|
||||
// try {
|
||||
const salary = await this.salaryRepository.findOne({
|
||||
relations: ["posLevel_", "posType_", "salaryRanks_"],
|
||||
where: { id: body.id },
|
||||
|
|
@ -369,8 +368,5 @@ export class Salary extends Controller {
|
|||
);
|
||||
|
||||
return new HttpSuccess({ id: newSalary.id });
|
||||
// } catch (error: any) {
|
||||
// throw new Error(error);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue