import ตำแหน่ง
This commit is contained in:
parent
1e1bd56db6
commit
20ff14def9
3 changed files with 13 additions and 6 deletions
|
|
@ -1009,7 +1009,7 @@ export class OrgRootController extends Controller {
|
||||||
relations: ["positions", "positions.posLevel", "positions.posType"],
|
relations: ["positions", "positions.posLevel", "positions.posType"],
|
||||||
});
|
});
|
||||||
for (const item of employeePosMaster) {
|
for (const item of employeePosMaster) {
|
||||||
if (item.next_holderId != null && status == "NOW") {
|
if (item.next_holderId != null) {
|
||||||
const profile = await repoProfileEmployee.findOne({
|
const profile = await repoProfileEmployee.findOne({
|
||||||
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
||||||
});
|
});
|
||||||
|
|
@ -1031,7 +1031,7 @@ export class OrgRootController extends Controller {
|
||||||
relations: ["positions", "positions.posLevel", "positions.posType"],
|
relations: ["positions", "positions.posLevel", "positions.posType"],
|
||||||
});
|
});
|
||||||
for (const item of employeeTempPosMaster) {
|
for (const item of employeeTempPosMaster) {
|
||||||
if (item.next_holderId != null && status == "NOW") {
|
if (item.next_holderId != null) {
|
||||||
const profile = await repoProfileEmployee.findOne({
|
const profile = await repoProfileEmployee.findOne({
|
||||||
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,13 @@ export class OFFICER {
|
||||||
})
|
})
|
||||||
DEPARTMENT_NAME: string;
|
DEPARTMENT_NAME: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "text",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
DEPARTMENT_CODE: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "text",
|
type: "text",
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
for (const item of posMaster) {
|
for (const item of posMaster) {
|
||||||
if (item.next_holderId != null && status == "NOW") {
|
if (item.next_holderId != null) {
|
||||||
const profile = await repoProfile.findOne({
|
const profile = await repoProfile.findOne({
|
||||||
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
||||||
});
|
});
|
||||||
|
|
@ -208,7 +208,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
item.lastUpdatedAt = lastUpdatedAt;
|
item.lastUpdatedAt = lastUpdatedAt;
|
||||||
await repoPosmaster.save(item).catch((e) => console.log(e));
|
await repoPosmaster.save(item).catch((e) => console.log(e));
|
||||||
}
|
}
|
||||||
if (orgRevisionPublish != null && orgRevisionDraft !=null) {
|
if (orgRevisionPublish != null && orgRevisionDraft != null) {
|
||||||
//new main revision
|
//new main revision
|
||||||
const before = null;
|
const before = null;
|
||||||
|
|
||||||
|
|
@ -1005,7 +1005,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
relations: ["positions", "positions.posLevel", "positions.posType"],
|
relations: ["positions", "positions.posLevel", "positions.posType"],
|
||||||
});
|
});
|
||||||
for (const item of employeePosMaster) {
|
for (const item of employeePosMaster) {
|
||||||
if (item.next_holderId != null && status == "NOW") {
|
if (item.next_holderId != null) {
|
||||||
const profile = await repoProfileEmployee.findOne({
|
const profile = await repoProfileEmployee.findOne({
|
||||||
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
||||||
});
|
});
|
||||||
|
|
@ -1030,7 +1030,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
relations: ["positions", "positions.posLevel", "positions.posType"],
|
relations: ["positions", "positions.posLevel", "positions.posType"],
|
||||||
});
|
});
|
||||||
for (const item of employeeTempPosMaster) {
|
for (const item of employeeTempPosMaster) {
|
||||||
if (item.next_holderId != null && status == "NOW") {
|
if (item.next_holderId != null) {
|
||||||
const profile = await repoProfileEmployee.findOne({
|
const profile = await repoProfileEmployee.findOne({
|
||||||
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
where: { id: item.next_holderId == null ? "" : item.next_holderId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue