add dna profile

This commit is contained in:
kittapath 2025-02-03 15:40:44 +07:00
parent 70b9180d28
commit f4e8ec277e
2 changed files with 13 additions and 1 deletions

View file

@ -6272,22 +6272,28 @@ export class ProfileController extends Controller {
? null
: position.posExecutive.posExecutiveName,
rootId: root == null ? null : root.id,
rootDnaId: root == null ? null : root.ancestorDNA,
root: root == null ? null : root.orgRootName,
rootShortName: root == null ? null : root.orgRootShortName,
child1Id: child1 == null ? null : child1.id,
child1DnaId: child1 == null ? null : child1.ancestorDNA,
child1: child1 == null ? null : child1.orgChild1Name,
child1ShortName: child1 == null ? null : child1.orgChild1ShortName,
child2Id: child2 == null ? null : child2.id,
child2DnaId: child2 == null ? null : child2.ancestorDNA,
child2: child2 == null ? null : child2.orgChild2Name,
child2ShortName: child2 == null ? null : child2.orgChild2ShortName,
child3Id: child3 == null ? null : child3.id,
child3DnaId: child3 == null ? null : child3.ancestorDNA,
child3: child3 == null ? null : child3.orgChild3Name,
child3ShortName: child3 == null ? null : child3.orgChild3ShortName,
child4Id: child4 == null ? null : child4.id,
child4DnaId: child4 == null ? null : child4.ancestorDNA,
child4: child4 == null ? null : child4.orgChild4Name,
child4ShortName: child4 == null ? null : child4.orgChild4ShortName,
node: null,
nodeId: null,
nodeDnaId: null,
posNo: shortName,
isPosmasterAct: data.length > 0,
posmasterAct: data,
@ -6301,22 +6307,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);

View file

@ -1626,7 +1626,7 @@ export class ProfileEmployeeController extends Controller {
: isRetire == true && retireType != undefined && retireType != null
? `profileEmployee.dateLeave IS NOT NULL AND profileEmployee.leaveType = '${retireType}'`
: `profileEmployee.dateLeave IS NOT NULL`
: "1=1"
: "1=1",
)
.andWhere("profileEmployee.employeeClass LIKE :type", {
type: "PERM",
@ -2258,6 +2258,7 @@ export class ProfileEmployeeController 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: