เก็บประวัติ
This commit is contained in:
parent
a1c8874925
commit
16622b4768
4 changed files with 28 additions and 12 deletions
|
|
@ -3171,7 +3171,6 @@ export class CommandController extends Controller {
|
|||
await CreatePosMasterHistoryOfficer(posMasterOld.id, req);
|
||||
}
|
||||
await this.posMasterRepository.save(posMaster);
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
|
||||
const positionNew = await this.positionRepository.findOne({
|
||||
where: {
|
||||
|
|
@ -3189,6 +3188,7 @@ export class CommandController extends Controller {
|
|||
await this.profileRepository.save(profile);
|
||||
await this.positionRepository.save(positionNew);
|
||||
}
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
@ -3363,7 +3363,6 @@ export class CommandController extends Controller {
|
|||
await CreatePosMasterHistoryEmployee(posMasterOld.id, req);
|
||||
}
|
||||
await this.employeePosMasterRepository.save(posMaster);
|
||||
await CreatePosMasterHistoryEmployee(posMaster.id, req);
|
||||
const positionNew = await this.employeePositionRepository.findOne({
|
||||
where: {
|
||||
id: item.positionId,
|
||||
|
|
@ -3382,6 +3381,7 @@ export class CommandController extends Controller {
|
|||
await this.profileEmployeeRepository.save(profile);
|
||||
await this.employeePositionRepository.save(positionNew);
|
||||
}
|
||||
await CreatePosMasterHistoryEmployee(posMaster.id, req);
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
@ -3592,7 +3592,6 @@ export class CommandController extends Controller {
|
|||
posMaster.conditionReason = _null;
|
||||
posMaster.isCondition = false;
|
||||
await this.posMasterRepository.save(posMaster);
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
const positionNew = await this.positionRepository.findOne({
|
||||
where: {
|
||||
posMasterId: posMaster.id,
|
||||
|
|
@ -3602,6 +3601,7 @@ export class CommandController extends Controller {
|
|||
positionNew.positionIsSelected = true;
|
||||
await this.positionRepository.save(positionNew, { data: req });
|
||||
}
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
}
|
||||
const newMapProfileSalary = {
|
||||
profileId: profile.id,
|
||||
|
|
@ -6055,7 +6055,6 @@ export class CommandController extends Controller {
|
|||
await CreatePosMasterHistoryOfficer(posMasterOld.id, req);
|
||||
}
|
||||
await this.posMasterRepository.save(posMaster);
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
|
||||
const positionNew = await this.positionRepository.findOne({
|
||||
where: {
|
||||
|
|
@ -6073,6 +6072,7 @@ export class CommandController extends Controller {
|
|||
setLogDataDiff(req, { before, after: profile });
|
||||
await this.positionRepository.save(positionNew, { data: req });
|
||||
}
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
}
|
||||
// Insignia
|
||||
if (_oldInsigniaIds.length > 0) {
|
||||
|
|
@ -6470,6 +6470,12 @@ export class CommandController extends Controller {
|
|||
}));
|
||||
await this.employeePositionRepository.save(clearTempPosition);
|
||||
}
|
||||
await Promise.all(
|
||||
clsTempPosmaster.map(
|
||||
async (posMasterTemp) =>
|
||||
await CreatePosMasterHistoryEmployeeTemp(posMasterTemp.id, req),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const positionNew = await this.employeePositionRepository.findOne({
|
||||
|
|
@ -6569,6 +6575,7 @@ export class CommandController extends Controller {
|
|||
});
|
||||
await this.profileEmployeeRepository.save(profile);
|
||||
await this.employeePositionRepository.save(positionNew);
|
||||
await CreatePosMasterHistoryEmployee(posMaster.id, req);
|
||||
//ลบออกคนออกจากโครงสร้างลูกจ้างชั่วคราว
|
||||
const posMasterTemp = await this.employeeTempPosMasterRepository.findOne({
|
||||
where: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue