เก็บประวัติ isupload
This commit is contained in:
parent
d249e94cb5
commit
7eea4cd33c
24 changed files with 146 additions and 135 deletions
|
|
@ -164,12 +164,12 @@ export class ProfileAbilityController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.profileAbilityRepo.save(record, { data: req });
|
||||||
this.profileAbilityRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.profileAbilityHistoryRepo.save(history, { data: req }),
|
this.profileAbilityHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,12 +173,12 @@ export class ProfileAbilityEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.profileAbilityRepo.save(record, { data: req });
|
||||||
this.profileAbilityRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.profileAbilityHistoryRepo.save(history, { data: req }),
|
this.profileAbilityHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -163,12 +163,12 @@ export class ProfileAbilityEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.profileAbilityRepo.save(record, { data: req });
|
||||||
this.profileAbilityRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.profileAbilityHistoryRepo.save(history, { data: req }),
|
this.profileAbilityHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,12 +165,12 @@ export class ProfileAssistanceController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.profileAssistanceRepo.save(record, { data: req });
|
||||||
this.profileAssistanceRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.profileAssistanceHistoryRepo.save(history, { data: req }),
|
this.profileAssistanceHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,12 +173,12 @@ export class ProfileAssistanceEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.profileAssistanceRepo.save(record, { data: req });
|
||||||
this.profileAssistanceRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.profileAssistanceHistoryRepo.save(history, { data: req }),
|
this.profileAssistanceHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -163,12 +163,12 @@ export class ProfileAssistanceEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.profileAssistanceRepo.save(record, { data: req });
|
||||||
this.profileAssistanceRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.profileAssistanceHistoryRepo.save(history, { data: req }),
|
this.profileAssistanceHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,12 +156,12 @@ export class ProfileCertificateController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.certificateRepo.save(record, { data: req });
|
||||||
this.certificateRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.certificateHistoryRepo.save(history, { data: req }),
|
this.certificateHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,12 +164,12 @@ export class ProfileCertificateEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.certificateRepo.save(record, { data: req });
|
||||||
this.certificateRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.certificateHistoryRepo.save(history, { data: req }),
|
this.certificateHistoryRepo.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -152,12 +152,12 @@ export class ProfileCertificateEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.certificateRepo.save(record, { data: req });
|
||||||
this.certificateRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.certificateHistoryRepo.save(history, { data: req }),
|
this.certificateHistoryRepo.save(history, { data: req });
|
||||||
setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -163,12 +163,14 @@ export class ProfileDisciplineController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
// await Promise.all(
|
||||||
this.disciplineRepository.save(record, { data: req }),
|
this.disciplineRepository.save(record, { data: req });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
this.disciplineHistoryRepository.save(history, { data: req }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
setLogDataDiff(req, { before, after: history }),
|
this.disciplineHistoryRepository.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
// );
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,12 +169,12 @@ export class ProfileDisciplineEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.disciplineRepository.save(record, { data: req });
|
||||||
this.disciplineRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.disciplineHistoryRepository.save(history, { data: req }),
|
this.disciplineHistoryRepository.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,12 +159,12 @@ export class ProfileDisciplineEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.disciplineRepository.save(record, { data: req });
|
||||||
this.disciplineRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.disciplineHistoryRepository.save(history, { data: req }),
|
this.disciplineHistoryRepository.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,12 +140,12 @@ export class ProfileDutyController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.dutyRepository.save(record, { data: req });
|
||||||
this.dutyRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.dutyHistoryRepository.save(history, { data: req }),
|
this.dutyHistoryRepository.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,12 +149,12 @@ export class ProfileDutyEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.dutyRepository.save(record, { data: req });
|
||||||
this.dutyRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.dutyHistoryRepository.save(history, { data: req }),
|
this.dutyHistoryRepository.save(history, { data: req });
|
||||||
setLogDataDiff(req, { before, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,12 +138,12 @@ export class ProfileDutyEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.dutyRepository.save(record, { data: req });
|
||||||
this.dutyRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.dutyHistoryRepository.save(history, { data: req }),
|
this.dutyHistoryRepository.save(history, { data: req });
|
||||||
// setLogDataDiff(req, { before: before_null, after: history }),
|
// setLogDataDiff(req, { before, after: history });
|
||||||
]);
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,11 +166,12 @@ export class ProfileHonorController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.honorRepo.save(record, { data: req });
|
||||||
this.honorRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.honorHistoryRepo.save(history, { data: req }),
|
this.honorHistoryRepo.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,11 +178,12 @@ export class ProfileHonorEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.honorRepo.save(record, { data: req });
|
||||||
this.honorRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.honorHistoryRepo.save(history, { data: req }),
|
this.honorHistoryRepo.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,11 +166,12 @@ export class ProfileHonorEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.honorRepo.save(record, { data: req });
|
||||||
this.honorRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.honorHistoryRepo.save(history, { data: req }),
|
this.honorHistoryRepo.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -186,11 +186,12 @@ export class ProfileInsigniaController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.insigniaRepo.save(record, { data: req });
|
||||||
this.insigniaRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.insigniaHistoryRepo.save(history, { data: req }),
|
this.insigniaHistoryRepo.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -197,11 +197,12 @@ export class ProfileInsigniaEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.insigniaRepo.save(record, { data: req });
|
||||||
this.insigniaRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.insigniaHistoryRepo.save(history, { data: req }),
|
this.insigniaHistoryRepo.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -186,11 +186,12 @@ export class ProfileInsigniaEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.insigniaRepo.save(record, { data: req });
|
||||||
this.insigniaRepo.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.insigniaHistoryRepo.save(history, { data: req }),
|
this.insigniaHistoryRepo.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,11 +130,12 @@ export class ProfileNopaidController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.nopaidRepository.save(record, { data: req });
|
||||||
this.nopaidRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.nopaidHistoryRepository.save(history, { data: req }),
|
this.nopaidHistoryRepository.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,11 +137,12 @@ export class ProfileNopaidEmployeeController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.nopaidRepository.save(record, { data: req });
|
||||||
this.nopaidRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.nopaidHistoryRepository.save(history, { data: req }),
|
this.nopaidHistoryRepository.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -134,11 +134,12 @@ export class ProfileNopaidEmployeeTempController extends Controller {
|
||||||
history.createdAt = new Date();
|
history.createdAt = new Date();
|
||||||
history.lastUpdatedAt = new Date();
|
history.lastUpdatedAt = new Date();
|
||||||
|
|
||||||
await Promise.all([
|
this.nopaidRepository.save(record, { data: req });
|
||||||
this.nopaidRepository.save(record, { data: req }),
|
setLogDataDiff(req, { before, after: record });
|
||||||
setLogDataDiff(req, { before, after: record }),
|
if (!(Object.keys(body).length === 1 && body.isUpload)) {
|
||||||
this.nopaidHistoryRepository.save(history, { data: req }),
|
this.nopaidHistoryRepository.save(history, { data: req });
|
||||||
]);
|
// setLogDataDiff(req, { before, after: history });
|
||||||
|
}
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue