Co-authored-by: harid <harid_pr61@live.rmutl.com>
This commit is contained in:
parent
5138a01461
commit
05c38b8d8e
2 changed files with 28 additions and 13 deletions
|
|
@ -7365,40 +7365,45 @@ export class ProfileController extends Controller {
|
|||
nodeDnaId: null,
|
||||
type: profile.employeeClass,
|
||||
salary: profile.amount,
|
||||
posNo:
|
||||
root?.orgRootShortName && posMaster?.posMasterNo
|
||||
? `${root?.orgRootShortName} ${posMaster?.posMasterNo}`
|
||||
: "",
|
||||
posNo: null
|
||||
// root?.orgRootShortName && posMaster?.posMasterNo
|
||||
// ? `${root?.orgRootShortName} ${posMaster?.posMasterNo}`
|
||||
// : "",
|
||||
};
|
||||
if (_profile.child4Id != null) {
|
||||
_profile.node = 4;
|
||||
_profile.nodeId = _profile.child4Id;
|
||||
_profile.nodeDnaId = _profile.child4DnaId;
|
||||
_profile.nodeShortName = _profile.child4ShortName;
|
||||
_profile.posNo = `${_profile.child4ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.child3Id != null) {
|
||||
_profile.node = 3;
|
||||
_profile.nodeId = _profile.child3Id;
|
||||
_profile.nodeDnaId = _profile.child3DnaId;
|
||||
_profile.nodeShortName = _profile.child3ShortName;
|
||||
_profile.posNo = `${_profile.child3ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.child2Id != null) {
|
||||
_profile.node = 2;
|
||||
_profile.nodeId = _profile.child2Id;
|
||||
_profile.nodeDnaId = _profile.child2DnaId;
|
||||
_profile.nodeShortName = _profile.child2ShortName;
|
||||
_profile.posNo = `${_profile.child2ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.child1Id != null) {
|
||||
_profile.node = 1;
|
||||
_profile.nodeId = _profile.child1Id;
|
||||
_profile.nodeDnaId = _profile.child1DnaId;
|
||||
_profile.nodeShortName = _profile.child1ShortName;
|
||||
_profile.posNo = `${_profile.child1ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.rootId != null) {
|
||||
_profile.node = 0;
|
||||
_profile.nodeId = _profile.rootId;
|
||||
_profile.nodeDnaId = _profile.rootDnaId;
|
||||
_profile.nodeShortName = _profile.rootShortName;
|
||||
_profile.posNo = `${_profile.rootShortName} ${_profile.posMasterNo}`;
|
||||
}
|
||||
return new HttpSuccess(_profile);
|
||||
}
|
||||
|
||||
// ขรก.
|
||||
let orgRevisionPublish: any = await this.orgRevisionRepo
|
||||
.createQueryBuilder("orgRevision")
|
||||
.where("orgRevision.orgRevisionIsDraft = false")
|
||||
|
|
@ -7529,10 +7534,10 @@ export class ProfileController extends Controller {
|
|||
nodeDnaId: null,
|
||||
salary: profile ? profile.amount : null,
|
||||
amountSpecial: profile ? profile.amountSpecial : null,
|
||||
posNo:
|
||||
root?.orgRootShortName && posMaster?.posMasterNo
|
||||
? `${root?.orgRootShortName} ${posMaster?.posMasterNo}`
|
||||
: "",
|
||||
posNo: null
|
||||
// root?.orgRootShortName && posMaster?.posMasterNo
|
||||
// ? `${root?.orgRootShortName} ${posMaster?.posMasterNo}`
|
||||
// : "",
|
||||
};
|
||||
|
||||
if (_profile.child4Id != null) {
|
||||
|
|
@ -7540,26 +7545,31 @@ export class ProfileController extends Controller {
|
|||
_profile.nodeId = _profile.child4Id;
|
||||
_profile.nodeDnaId = _profile.child4DnaId;
|
||||
_profile.nodeShortName = _profile.child4ShortName;
|
||||
_profile.posNo = `${_profile.child4ShortName} ${posMaster?.posMasterNo}`;
|
||||
} else if (_profile.child3Id != null) {
|
||||
_profile.node = 3;
|
||||
_profile.nodeId = _profile.child3Id;
|
||||
_profile.nodeDnaId = _profile.child3DnaId;
|
||||
_profile.nodeShortName = _profile.child3ShortName;
|
||||
_profile.posNo = `${_profile.child3ShortName} ${posMaster?.posMasterNo}`;
|
||||
} else if (_profile.child2Id != null) {
|
||||
_profile.node = 2;
|
||||
_profile.nodeId = _profile.child2Id;
|
||||
_profile.nodeDnaId = _profile.child2DnaId;
|
||||
_profile.nodeShortName = _profile.child2ShortName;
|
||||
_profile.posNo = `${_profile.child2ShortName} ${posMaster?.posMasterNo}`;
|
||||
} else if (_profile.child1Id != null) {
|
||||
_profile.node = 1;
|
||||
_profile.nodeId = _profile.child1Id;
|
||||
_profile.nodeDnaId = _profile.child1DnaId;
|
||||
_profile.nodeShortName = _profile.child1ShortName;
|
||||
_profile.posNo = `${_profile.child1ShortName} ${posMaster?.posMasterNo}`;
|
||||
} else if (_profile.rootId != null) {
|
||||
_profile.node = 0;
|
||||
_profile.nodeId = _profile.rootId;
|
||||
_profile.nodeDnaId = _profile.rootDnaId;
|
||||
_profile.nodeShortName = _profile.rootShortName;
|
||||
_profile.posNo = `${_profile.rootShortName} ${posMaster?.posMasterNo}`;
|
||||
}
|
||||
return new HttpSuccess(_profile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3588,36 +3588,41 @@ export class ProfileEmployeeController extends Controller {
|
|||
nodeDnaId: null,
|
||||
salary: profile ? profile.amount : null,
|
||||
amountSpecial: profile ? profile.amountSpecial : null,
|
||||
posNo:
|
||||
root?.orgRootShortName && posMaster?.posMasterNo
|
||||
? `${root?.orgRootShortName} ${posMaster?.posMasterNo}`
|
||||
: "",
|
||||
posNo: null
|
||||
// root?.orgRootShortName && posMaster?.posMasterNo
|
||||
// ? `${root?.orgRootShortName} ${posMaster?.posMasterNo}`
|
||||
// : "",
|
||||
};
|
||||
if (_profile.child4Id != null) {
|
||||
_profile.node = 4;
|
||||
_profile.nodeId = _profile.child4Id;
|
||||
_profile.nodeDnaId = _profile.child4DnaId;
|
||||
_profile.nodeShortName = _profile.child4ShortName;
|
||||
_profile.posNo = `${_profile.child4ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.child3Id != null) {
|
||||
_profile.node = 3;
|
||||
_profile.nodeId = _profile.child3Id;
|
||||
_profile.nodeDnaId = _profile.child3DnaId;
|
||||
_profile.nodeShortName = _profile.child3ShortName;
|
||||
_profile.posNo = `${_profile.child3ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.child2Id != null) {
|
||||
_profile.node = 2;
|
||||
_profile.nodeId = _profile.child2Id;
|
||||
_profile.nodeDnaId = _profile.child2DnaId;
|
||||
_profile.nodeShortName = _profile.child2ShortName;
|
||||
_profile.posNo = `${_profile.child2ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.child1Id != null) {
|
||||
_profile.node = 1;
|
||||
_profile.nodeId = _profile.child1Id;
|
||||
_profile.nodeDnaId = _profile.child1DnaId;
|
||||
_profile.nodeShortName = _profile.child1ShortName;
|
||||
_profile.posNo = `${_profile.child1ShortName} ${_profile.posMasterNo}`;
|
||||
} else if (_profile.rootId != null) {
|
||||
_profile.node = 0;
|
||||
_profile.nodeId = _profile.rootId;
|
||||
_profile.nodeDnaId = _profile.rootDnaId;
|
||||
_profile.nodeShortName = _profile.rootShortName;
|
||||
_profile.posNo = `${_profile.rootShortName} ${_profile.posMasterNo}`;
|
||||
}
|
||||
return new HttpSuccess(_profile);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue