position add dna
This commit is contained in:
parent
c9312e1652
commit
70b9180d28
1 changed files with 16 additions and 4 deletions
|
|
@ -1153,7 +1153,7 @@ export class ProfileController extends Controller {
|
|||
where: { keycloak: request.user.sub },
|
||||
});
|
||||
const posMaster = await this.posMasterRepo.findOne({
|
||||
where: {
|
||||
where: {
|
||||
current_holderId: profile?.id,
|
||||
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
||||
},
|
||||
|
|
@ -1872,9 +1872,9 @@ export class ProfileController extends Controller {
|
|||
});
|
||||
|
||||
const posMaster = await this.posMasterRepo.findOne({
|
||||
where: {
|
||||
where: {
|
||||
current_holderId: profile?.id,
|
||||
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
||||
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
||||
},
|
||||
});
|
||||
if (!posMaster) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลการครองตำแหน่ง");
|
||||
|
|
@ -4752,7 +4752,7 @@ export class ProfileController extends Controller {
|
|||
: isRetire == true && retireType != undefined && retireType != null
|
||||
? `profile.dateLeave IS NOT NULL AND profile.leaveType = '${retireType}'`
|
||||
: `profile.dateLeave IS NOT NULL`
|
||||
: "1=1"
|
||||
: "1=1",
|
||||
)
|
||||
.andWhere(nodeCondition, {
|
||||
nodeId: nodeId,
|
||||
|
|
@ -5351,6 +5351,7 @@ export class ProfileController extends Controller {
|
|||
child4ShortName: child4 == null ? null : child4.orgChild4ShortName,
|
||||
node: null,
|
||||
nodeId: null,
|
||||
nodeDnaId: null,
|
||||
type: profile.employeeClass,
|
||||
salary: profile.amount,
|
||||
posNo:
|
||||
|
|
@ -5361,22 +5362,27 @@ export class ProfileController extends Controller {
|
|||
if (_profile.child4Id != null) {
|
||||
_profile.node = 4;
|
||||
_profile.nodeId = _profile.child4Id;
|
||||
_profile.nodeDnaId = _profile.child4DnaId;
|
||||
_profile.nodeShortName = _profile.child4ShortName;
|
||||
} else if (_profile.child3Id != null) {
|
||||
_profile.node = 3;
|
||||
_profile.nodeId = _profile.child3Id;
|
||||
_profile.nodeDnaId = _profile.child3DnaId;
|
||||
_profile.nodeShortName = _profile.child3ShortName;
|
||||
} else if (_profile.child2Id != null) {
|
||||
_profile.node = 2;
|
||||
_profile.nodeId = _profile.child2Id;
|
||||
_profile.nodeDnaId = _profile.child2DnaId;
|
||||
_profile.nodeShortName = _profile.child2ShortName;
|
||||
} else if (_profile.child1Id != null) {
|
||||
_profile.node = 1;
|
||||
_profile.nodeId = _profile.child1Id;
|
||||
_profile.nodeDnaId = _profile.child1DnaId;
|
||||
_profile.nodeShortName = _profile.child1ShortName;
|
||||
} else if (_profile.rootId != null) {
|
||||
_profile.node = 0;
|
||||
_profile.nodeId = _profile.rootId;
|
||||
_profile.nodeDnaId = _profile.rootDnaId;
|
||||
_profile.nodeShortName = _profile.rootShortName;
|
||||
}
|
||||
return new HttpSuccess(_profile);
|
||||
|
|
@ -5502,6 +5508,7 @@ export class ProfileController extends Controller {
|
|||
child4ShortName: child4 == null ? null : child4.orgChild4ShortName,
|
||||
node: null,
|
||||
nodeId: null,
|
||||
nodeDnaId: null,
|
||||
salary: profile ? profile.amount : null,
|
||||
amountSpecial: profile ? profile.amountSpecial : null,
|
||||
posNo:
|
||||
|
|
@ -5513,22 +5520,27 @@ export class ProfileController extends Controller {
|
|||
if (_profile.child4Id != null) {
|
||||
_profile.node = 4;
|
||||
_profile.nodeId = _profile.child4Id;
|
||||
_profile.nodeDnaId = _profile.child4DnaId;
|
||||
_profile.nodeShortName = _profile.child4ShortName;
|
||||
} else if (_profile.child3Id != null) {
|
||||
_profile.node = 3;
|
||||
_profile.nodeId = _profile.child3Id;
|
||||
_profile.nodeDnaId = _profile.child3DnaId;
|
||||
_profile.nodeShortName = _profile.child3ShortName;
|
||||
} else if (_profile.child2Id != null) {
|
||||
_profile.node = 2;
|
||||
_profile.nodeId = _profile.child2Id;
|
||||
_profile.nodeDnaId = _profile.child2DnaId;
|
||||
_profile.nodeShortName = _profile.child2ShortName;
|
||||
} else if (_profile.child1Id != null) {
|
||||
_profile.node = 1;
|
||||
_profile.nodeId = _profile.child1Id;
|
||||
_profile.nodeDnaId = _profile.child1DnaId;
|
||||
_profile.nodeShortName = _profile.child1ShortName;
|
||||
} else if (_profile.rootId != null) {
|
||||
_profile.node = 0;
|
||||
_profile.nodeId = _profile.rootId;
|
||||
_profile.nodeDnaId = _profile.rootDnaId;
|
||||
_profile.nodeShortName = _profile.rootShortName;
|
||||
}
|
||||
return new HttpSuccess(_profile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue