no message

This commit is contained in:
kittapath 2025-01-08 16:46:22 +07:00
parent e3275e0b79
commit eac620fb15

View file

@ -1307,25 +1307,26 @@ export class ProfileController extends Controller {
if (!posMaster) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลการครองตำแหน่ง");
let condition: any = {
orgRootId: posMaster.orgRootId || "",
orgRootId: posMaster.orgRootId,
id: Not(posMaster.current_holderId || ""),
};
let conditionNow: any = {
orgRootId: posMaster.orgRootId || "",
orgChild1Id: posMaster.orgChild1Id || "",
orgChild2Id: posMaster.orgChild2Id || "",
orgChild3Id: posMaster.orgChild3Id || "",
orgChild4Id: posMaster.orgChild4Id || "",
id: Not(posMaster.current_holderId || ""),
orgRootId: posMaster.orgRootId,
orgChild1Id: posMaster.orgChild1Id,
orgChild2Id: posMaster.orgChild2Id,
orgChild3Id: posMaster.orgChild3Id,
orgChild4Id: posMaster.orgChild4Id,
id: Not(posMaster.current_holderId),
};
if (posMaster.orgChild2Id == null) {
condition.orgChild1Id = "";
if (posMaster.orgChild1Id == null) {
} else if (posMaster.orgChild2Id == null) {
condition.orgChild1Id = null;
} else if (posMaster.orgChild3Id == null) {
condition.orgChild2Id = "";
condition.orgChild2Id = null;
} else if (posMaster.orgChild4Id == null) {
condition.orgChild3Id = "";
condition.orgChild3Id = null;
} else {
condition.orgChild4Id = "";
condition.orgChild4Id = null;
}
if (body.isDirector == true) {
condition.isDirector = true;
@ -1422,25 +1423,26 @@ export class ProfileController extends Controller {
if (!posMaster) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลการครองตำแหน่ง");
let condition: any = {
orgRootId: posMaster.orgRootId || "",
orgRootId: posMaster.orgRootId,
id: Not(posMaster.current_holderId || ""),
};
let conditionNow: any = {
orgRootId: posMaster.orgRootId || "",
orgChild1Id: posMaster.orgChild1Id || "",
orgChild2Id: posMaster.orgChild2Id || "",
orgChild3Id: posMaster.orgChild3Id || "",
orgChild4Id: posMaster.orgChild4Id || "",
id: Not(posMaster.current_holderId || ""),
orgRootId: posMaster.orgRootId,
orgChild1Id: posMaster.orgChild1Id,
orgChild2Id: posMaster.orgChild2Id,
orgChild3Id: posMaster.orgChild3Id,
orgChild4Id: posMaster.orgChild4Id,
id: Not(posMaster.current_holderId),
};
if (posMaster.orgChild2Id == null) {
condition.orgChild1Id = "";
if (posMaster.orgChild1Id == null) {
} else if (posMaster.orgChild2Id == null) {
condition.orgChild1Id = null;
} else if (posMaster.orgChild3Id == null) {
condition.orgChild2Id = "";
condition.orgChild2Id = null;
} else if (posMaster.orgChild4Id == null) {
condition.orgChild3Id = "";
condition.orgChild3Id = null;
} else {
condition.orgChild4Id = "";
condition.orgChild4Id = null;
}
if (body.isDirector == true) {
condition.isDirector = true;
@ -1512,25 +1514,26 @@ export class ProfileController extends Controller {
if (!posMaster) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลการครองตำแหน่ง");
let condition: any = {
orgRootId: posMaster.orgRootId || "",
orgRootId: posMaster.orgRootId,
id: Not(posMaster.current_holderId || ""),
};
let conditionNow: any = {
orgRootId: posMaster.orgRootId || "",
orgChild1Id: posMaster.orgChild1Id || "",
orgChild2Id: posMaster.orgChild2Id || "",
orgChild3Id: posMaster.orgChild3Id || "",
orgChild4Id: posMaster.orgChild4Id || "",
id: Not(posMaster.current_holderId || ""),
orgRootId: posMaster.orgRootId,
orgChild1Id: posMaster.orgChild1Id,
orgChild2Id: posMaster.orgChild2Id,
orgChild3Id: posMaster.orgChild3Id,
orgChild4Id: posMaster.orgChild4Id,
id: Not(posMaster.current_holderId),
};
if (posMaster.orgChild2Id == null) {
condition.orgChild1Id = "";
if (posMaster.orgChild1Id == null) {
} else if (posMaster.orgChild2Id == null) {
condition.orgChild1Id = null;
} else if (posMaster.orgChild3Id == null) {
condition.orgChild2Id = "";
condition.orgChild2Id = null;
} else if (posMaster.orgChild4Id == null) {
condition.orgChild3Id = "";
condition.orgChild3Id = null;
} else {
condition.orgChild4Id = "";
condition.orgChild4Id = null;
}
if (body.isDirector == true) {
condition.isDirector = true;