This commit is contained in:
parent
7029b18a97
commit
0a3deb4293
1 changed files with 191 additions and 191 deletions
|
|
@ -801,8 +801,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: [commandRecive.refId],
|
refIds: [commandRecive.refId],
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
const commandId = commandRecive.commandId;
|
const commandId = commandRecive.commandId;
|
||||||
await this.commandReciveRepository.delete(commandRecive.id);
|
await this.commandReciveRepository.delete(commandRecive.id);
|
||||||
|
|
@ -845,8 +845,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: [commandRecive.refId],
|
refIds: [commandRecive.refId],
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
const commandId = commandRecive.commandId;
|
const commandId = commandRecive.commandId;
|
||||||
await this.commandReciveRepository.delete(commandRecive.id);
|
await this.commandReciveRepository.delete(commandRecive.id);
|
||||||
|
|
@ -889,8 +889,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: [commandRecive.refId],
|
refIds: [commandRecive.refId],
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
const commandId = commandRecive.commandId;
|
const commandId = commandRecive.commandId;
|
||||||
await this.commandReciveRepository.delete(commandRecive.id);
|
await this.commandReciveRepository.delete(commandRecive.id);
|
||||||
|
|
@ -1174,8 +1174,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: command.commandRecives.map((x) => x.refId),
|
refIds: command.commandRecives.map((x) => x.refId),
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
await this.commandReciveRepository.delete({ commandId: command.id });
|
await this.commandReciveRepository.delete({ commandId: command.id });
|
||||||
command.status = "CANCEL";
|
command.status = "CANCEL";
|
||||||
|
|
@ -1240,8 +1240,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: command.commandRecives.map((x) => x.refId),
|
refIds: command.commandRecives.map((x) => x.refId),
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
await this.commandSendCCRepository.delete({ commandSendId: In(commandSend.map((x) => x.id)) });
|
await this.commandSendCCRepository.delete({ commandSendId: In(commandSend.map((x) => x.id)) });
|
||||||
await this.commandReciveRepository.delete({ commandId: command.id });
|
await this.commandReciveRepository.delete({ commandId: command.id });
|
||||||
|
|
@ -1429,8 +1429,8 @@ export class CommandController extends Controller {
|
||||||
refIds: command.commandRecives.filter((x) => x.refId != null).map((x) => x.refId),
|
refIds: command.commandRecives.filter((x) => x.refId != null).map((x) => x.refId),
|
||||||
status: "WAITING",
|
status: "WAITING",
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
await this.commandRepository.save(command);
|
await this.commandRepository.save(command);
|
||||||
} else {
|
} else {
|
||||||
const path = commandTypePath(command.commandType.code);
|
const path = commandTypePath(command.commandType.code);
|
||||||
|
|
@ -1567,7 +1567,7 @@ export class CommandController extends Controller {
|
||||||
);
|
);
|
||||||
await this.profileRepository.save(profiles);
|
await this.profileRepository.save(profiles);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
type = "EMPLOYEE";
|
type = "EMPLOYEE";
|
||||||
try {
|
try {
|
||||||
|
|
@ -1599,7 +1599,7 @@ export class CommandController extends Controller {
|
||||||
);
|
);
|
||||||
await this.profileEmployeeRepository.save(profiles);
|
await this.profileEmployeeRepository.save(profiles);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
@ -1663,7 +1663,7 @@ export class CommandController extends Controller {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
type = "EMPLOYEE";
|
type = "EMPLOYEE";
|
||||||
try {
|
try {
|
||||||
|
|
@ -1718,7 +1718,7 @@ export class CommandController extends Controller {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
@ -1931,7 +1931,7 @@ export class CommandController extends Controller {
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
res = x;
|
res = x;
|
||||||
})
|
})
|
||||||
.catch((x) => {});
|
.catch((x) => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
let _command;
|
let _command;
|
||||||
|
|
@ -2285,7 +2285,7 @@ export class CommandController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
_command = res;
|
_command = res;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
let issue =
|
let issue =
|
||||||
command.isBangkok == "OFFICE"
|
command.isBangkok == "OFFICE"
|
||||||
|
|
@ -2656,8 +2656,8 @@ export class CommandController extends Controller {
|
||||||
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
||||||
status: "REPORT",
|
status: "REPORT",
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
let order =
|
let order =
|
||||||
command.commandRecives == null || command.commandRecives.length <= 0
|
command.commandRecives == null || command.commandRecives.length <= 0
|
||||||
? 0
|
? 0
|
||||||
|
|
@ -3978,7 +3978,7 @@ export class CommandController extends Controller {
|
||||||
// relations: ["roleKeycloaks"],
|
// relations: ["roleKeycloaks"],
|
||||||
relations: {
|
relations: {
|
||||||
roleKeycloaks: true,
|
roleKeycloaks: true,
|
||||||
posType: true ,
|
posType: true,
|
||||||
posLevel: true
|
posLevel: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -4059,7 +4059,7 @@ export class CommandController extends Controller {
|
||||||
current_holderId: profile.id,
|
current_holderId: profile.id,
|
||||||
orgRevisionId: curRevision.id,
|
orgRevisionId: curRevision.id,
|
||||||
},
|
},
|
||||||
relations:{
|
relations: {
|
||||||
orgRoot: true,
|
orgRoot: true,
|
||||||
orgChild1: true,
|
orgChild1: true,
|
||||||
orgChild2: true,
|
orgChild2: true,
|
||||||
|
|
@ -4377,7 +4377,7 @@ export class CommandController extends Controller {
|
||||||
// relations: ["roleKeycloaks"],
|
// relations: ["roleKeycloaks"],
|
||||||
relations: {
|
relations: {
|
||||||
roleKeycloaks: true,
|
roleKeycloaks: true,
|
||||||
posType: true ,
|
posType: true,
|
||||||
posLevel: true
|
posLevel: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -4459,7 +4459,7 @@ export class CommandController extends Controller {
|
||||||
current_holderId: profile.id,
|
current_holderId: profile.id,
|
||||||
orgRevisionId: curRevision.id,
|
orgRevisionId: curRevision.id,
|
||||||
},
|
},
|
||||||
relations:{
|
relations: {
|
||||||
orgRoot: true,
|
orgRoot: true,
|
||||||
orgChild1: true,
|
orgChild1: true,
|
||||||
orgChild2: true,
|
orgChild2: true,
|
||||||
|
|
@ -5030,8 +5030,8 @@ export class CommandController extends Controller {
|
||||||
let orgChild3Ref = null;
|
let orgChild3Ref = null;
|
||||||
let orgChild4Ref = null;
|
let orgChild4Ref = null;
|
||||||
let profile;
|
let profile;
|
||||||
let isEmployee:boolean = false;
|
let isEmployee: boolean = false;
|
||||||
let retireTypeName:string = "";
|
let retireTypeName: string = "";
|
||||||
// ขรก.
|
// ขรก.
|
||||||
if (item.profileType && item.profileType.trim().toUpperCase() == "OFFICER") {
|
if (item.profileType && item.profileType.trim().toUpperCase() == "OFFICER") {
|
||||||
profile = await this.profileRepository.findOne({
|
profile = await this.profileRepository.findOne({
|
||||||
|
|
@ -5814,8 +5814,8 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const leaveType = await this.leaveType.findOne({
|
const leaveType = await this.leaveType.findOne({
|
||||||
select:{ id: true, limit: true, code: true },
|
select: { id: true, limit: true, code: true },
|
||||||
where:{ code: "LV-005" }
|
where: { code: "LV-005" }
|
||||||
});
|
});
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
body.data.map(async (item) => {
|
body.data.map(async (item) => {
|
||||||
|
|
@ -6899,7 +6899,7 @@ export class CommandController extends Controller {
|
||||||
profile.posLevelId = positionNew.posLevelId;
|
profile.posLevelId = positionNew.posLevelId;
|
||||||
profile.posTypeId = positionNew.posTypeId;
|
profile.posTypeId = positionNew.posTypeId;
|
||||||
profile.position = positionNew.positionName;
|
profile.position = positionNew.positionName;
|
||||||
profile.dateStart = new Date();
|
// profile.dateStart = new Date();
|
||||||
await this.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: profile });
|
setLogDataDiff(req, { before, after: profile });
|
||||||
await this.positionRepository.save(positionNew, { data: req });
|
await this.positionRepository.save(positionNew, { data: req });
|
||||||
|
|
@ -6979,8 +6979,8 @@ export class CommandController extends Controller {
|
||||||
prefix: avatar,
|
prefix: avatar,
|
||||||
fileName: fileName,
|
fileName: fileName,
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -8091,7 +8091,7 @@ export class CommandController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
_command = res;
|
_command = res;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
let issue =
|
let issue =
|
||||||
command.isBangkok == "OFFICE"
|
command.isBangkok == "OFFICE"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue