add createdAt, lastUpdatedAt, lastUpdateFullName #805
This commit is contained in:
parent
6f1e2339f5
commit
416cd49a27
5 changed files with 137 additions and 22 deletions
|
|
@ -567,7 +567,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posDictName: Like(`%${keyword}%`) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -575,7 +578,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posDictField: Like(`%${keyword}%`) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictField: "ASC" },
|
||||
order: {
|
||||
posDictField: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -588,7 +594,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posTypeId: In(findTypes.map((x) => x.id)) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -601,7 +610,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posLevelId: In(findLevel.map((x) => x.id)) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -614,7 +626,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posExecutiveId: In(findExecutive.map((x) => x.id)) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -622,7 +637,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posDictExecutiveField: Like(`%${keyword}%`) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -630,7 +648,10 @@ export class PositionController extends Controller {
|
|||
findPosDict = await this.posDictRepository.find({
|
||||
where: { posDictArea: Like(`%${keyword}%`) },
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
@ -664,14 +685,20 @@ export class PositionController extends Controller {
|
|||
{ posDictArea: Like(`%${keyword}%`) },
|
||||
],
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
findPosDict = await this.posDictRepository.find({
|
||||
relations: ["posType", "posLevel", "posExecutive"],
|
||||
order: { posDictName: "ASC" },
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
|
@ -692,6 +719,9 @@ export class PositionController extends Controller {
|
|||
positionArea: item.posDictArea,
|
||||
isSpecial: item.isSpecial,
|
||||
positionIsSelected: false,
|
||||
createdAt: item.createdAt,
|
||||
lastUpdatedAt: item.lastUpdatedAt,
|
||||
lastUpdateFullName: item.lastUpdateFullName,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
|
@ -1447,6 +1477,7 @@ export class PositionController extends Controller {
|
|||
.leftJoinAndSelect("posMaster.next_holder", "next_holder")
|
||||
.leftJoinAndSelect("posMaster.orgRevision", "orgRevision")
|
||||
.leftJoinAndSelect("posMaster.posMasterAssigns", "posMasterAssigns")
|
||||
// .leftJoinAndSelect("posMaster.authRole", "authRole")
|
||||
.leftJoinAndSelect("posMasterAssigns.assign", "assign")
|
||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue