add field org_053

This commit is contained in:
AdisakKanthawilang 2024-02-06 11:30:41 +07:00
parent cea12a540f
commit 31a7357c19
3 changed files with 16 additions and 14 deletions

View file

@ -712,7 +712,7 @@ export class PositionController extends Controller {
const [posMaster, total] = await this.posMasterRepository.findAndCount({
where: keywordConditions,
order: { posMasterOrder: "ASC" },
relations: ["orgRoot", "orgChild1", "orgChild2", "orgChild3", "orgChild4"],
relations: ["orgRoot", "orgChild1", "orgChild2", "orgChild3", "orgChild4" ,"current_holder" ,"next_holder"],
skip: (body.page - 1) * body.pageSize,
take: body.pageSize,
});
@ -736,6 +736,8 @@ export class PositionController extends Controller {
posMasterNoPrefix: posMaster.posMasterNoPrefix,
posMasterNo: posMaster.posMasterNo,
posMasterNoSuffix: posMaster.posMasterNoSuffix,
fullNameNextHolder: posMaster.current_holder.prefix+posMaster.current_holder.firstName+" "+posMaster.current_holder.lastName,
fullNameCurrentHolder: posMaster.next_holder.prefix+posMaster.next_holder.firstName+" "+posMaster.next_holder.lastName,
orgShortname:
body.type === 0
? posMaster.orgRoot.orgRootShortName