แก้snapshot
This commit is contained in:
parent
2d68472500
commit
80daf64940
2 changed files with 14 additions and 3 deletions
|
|
@ -332,6 +332,7 @@ export class SalaryPeriodController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -608,6 +609,7 @@ export class SalaryPeriodController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -725,6 +727,7 @@ export class SalaryPeriodController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -1032,6 +1035,7 @@ export class SalaryPeriodController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -1460,6 +1464,7 @@ export class SalaryPeriodController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -2086,7 +2091,7 @@ export class SalaryPeriodController extends Controller {
|
|||
|
||||
if (salaryOrgNew != null) {
|
||||
let salaryProfileNew = Object.assign(new SalaryProfile(), profile);
|
||||
delete profile.id;
|
||||
delete salaryProfileNew.id;
|
||||
salaryProfileNew.salaryOrgId = salaryOrgNew.id;
|
||||
salaryProfileNew.revisionId = salaryPeriod.revisionId;
|
||||
salaryProfileNew.createdUserId = request.user.sub;
|
||||
|
|
@ -2131,6 +2136,7 @@ export class SalaryPeriodController extends Controller {
|
|||
|
||||
if (salaryOrgNew != null) {
|
||||
let salaryProfileNew = Object.assign(new SalaryProfileEmployee(), profile);
|
||||
delete salaryProfileNew.id;
|
||||
salaryProfileNew.salaryOrgId = salaryOrgNew.id;
|
||||
salaryProfileNew.revisionId = salaryPeriod.revisionId;
|
||||
salaryProfileNew.createdUserId = request.user.sub;
|
||||
|
|
@ -2368,8 +2374,6 @@ export class SalaryPeriodController extends Controller {
|
|||
const current = new Date();
|
||||
let salaryPeriod: any;
|
||||
let request: any;
|
||||
// request = express.request;
|
||||
// console.log("request: ", request);
|
||||
if (current.getDate() == 1 && current.getMonth() == 2) {
|
||||
salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||
where: {
|
||||
|
|
@ -2577,6 +2581,7 @@ export class SalaryPeriodController extends Controller {
|
|||
|
||||
if (salaryOrgNew != null) {
|
||||
let salaryProfileNew = Object.assign(new SalaryProfile(), profile);
|
||||
delete salaryProfileNew.id;
|
||||
salaryProfileNew.salaryOrgId = salaryOrgNew.id;
|
||||
salaryProfileNew.revisionId = salaryPeriod.revisionId;
|
||||
salaryProfileNew.createdUserId = request.user.sub;
|
||||
|
|
@ -2621,6 +2626,7 @@ export class SalaryPeriodController extends Controller {
|
|||
|
||||
if (salaryOrgNew != null) {
|
||||
let salaryProfileNew = Object.assign(new SalaryProfileEmployee(), profile);
|
||||
delete salaryProfileNew.id;
|
||||
salaryProfileNew.salaryOrgId = salaryOrgNew.id;
|
||||
salaryProfileNew.revisionId = salaryPeriod.revisionId;
|
||||
salaryProfileNew.createdUserId = request.user.sub;
|
||||
|
|
|
|||
|
|
@ -294,6 +294,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -742,6 +743,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -860,6 +862,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -1342,6 +1345,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
@ -1995,6 +1999,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
where: {
|
||||
id: _salaryProfile.salaryOrg.id,
|
||||
},
|
||||
relations: { salaryProfiles: true },
|
||||
});
|
||||
if (salaryOrg != null) {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue