no message
This commit is contained in:
parent
c239ddc846
commit
15565e9e6a
4 changed files with 41 additions and 31 deletions
|
|
@ -1,5 +1,17 @@
|
|||
import { Controller, Request, Get, Post, Put, Delete, Patch, Route, Security, Tags, Path } from "tsoa";
|
||||
import axios from 'axios';
|
||||
import {
|
||||
Controller,
|
||||
Request,
|
||||
Get,
|
||||
Post,
|
||||
Put,
|
||||
Delete,
|
||||
Patch,
|
||||
Route,
|
||||
Security,
|
||||
Tags,
|
||||
Path,
|
||||
} from "tsoa";
|
||||
import axios from "axios";
|
||||
import CallAPI from "../interfaces/call-api";
|
||||
|
||||
@Route("/hello")
|
||||
|
|
@ -18,10 +30,8 @@ export class AppController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("CallOrg")
|
||||
public async CallOrg(
|
||||
@Request() request: any,
|
||||
) {
|
||||
const req = await new CallAPI().GetData(request, 'org/profile/salary/gen');
|
||||
public async CallOrg(@Request() request: any) {
|
||||
const req = await new CallAPI().GetData(request, "/org/profile/salary/gen");
|
||||
return req;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6264,7 +6264,7 @@ export class ReportController extends Controller {
|
|||
});
|
||||
if (salary != null) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile/salary", {
|
||||
.PostData(request, "/org/profile/salary", {
|
||||
profileId: salary.profileId,
|
||||
date: new Date(),
|
||||
amount: salary.positionSalaryAmount,
|
||||
|
|
@ -6312,7 +6312,7 @@ export class ReportController extends Controller {
|
|||
});
|
||||
if (salary != null) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile/salary", {
|
||||
.PostData(request, "/org/profile/salary", {
|
||||
profileId: salary.profileId,
|
||||
date: new Date(),
|
||||
amount: salary.positionSalaryAmount,
|
||||
|
|
@ -6360,7 +6360,7 @@ export class ReportController extends Controller {
|
|||
});
|
||||
if (salary != null) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile/salary", {
|
||||
.PostData(request, "/org/profile/salary", {
|
||||
profileId: salary.profileId,
|
||||
date: new Date(),
|
||||
amount: salary.positionSalaryAmount,
|
||||
|
|
@ -6408,7 +6408,7 @@ export class ReportController extends Controller {
|
|||
});
|
||||
if (salary != null) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile/salary", {
|
||||
.PostData(request, "/org/profile/salary", {
|
||||
profileId: salary.profileId,
|
||||
date: new Date(),
|
||||
amount: salary.positionSalaryAmount,
|
||||
|
|
@ -6456,7 +6456,7 @@ export class ReportController extends Controller {
|
|||
});
|
||||
if (salary != null) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile-employee/salary", {
|
||||
.PostData(request, "/org/profile-employee/salary", {
|
||||
profileEmployeeId: salary.profileId,
|
||||
date: new Date(),
|
||||
amount: salary.positionSalaryAmount,
|
||||
|
|
|
|||
|
|
@ -1608,8 +1608,8 @@ export class SalaryPeriodController extends Controller {
|
|||
await this.salaryProfileEmployeeRepository.remove(salaryProfileEmployee);
|
||||
await this.salaryOrgEmployeeRepository.remove(salaryOrgEmployee);
|
||||
|
||||
let orgs = await new CallAPI().GetData(request, "org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "org/unauthorize/revision/latest");
|
||||
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "/org/unauthorize/revision/latest");
|
||||
|
||||
salaryPeriod.revisionId = revisionId;
|
||||
await this.salaryPeriodRepository.save(salaryPeriod);
|
||||
|
|
@ -1717,8 +1717,8 @@ export class SalaryPeriodController extends Controller {
|
|||
await this.salaryProfileEmployeeRepository.remove(salaryProfileEmployee);
|
||||
await this.salaryOrgEmployeeRepository.remove(salaryOrgEmployee);
|
||||
|
||||
let orgs = await new CallAPI().GetData(request, "org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "org/unauthorize/revision/latest");
|
||||
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "/org/unauthorize/revision/latest");
|
||||
|
||||
chk_SalaryPeriod.revisionId = revisionId;
|
||||
await this.salaryPeriodRepository.save(chk_SalaryPeriod);
|
||||
|
|
@ -1968,9 +1968,9 @@ export class SalaryPeriodController extends Controller {
|
|||
});
|
||||
await this.salaryProfileEmployeeRepository.remove(salaryProfileEmployee);
|
||||
await this.salaryOrgEmployeeRepository.remove(salaryOrgEmployee);
|
||||
let orgs = await new CallAPI().GetData(request, "org/unauthorize/active/root/id");
|
||||
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
|
||||
let total = 1000;
|
||||
let _orgProfiles = await new CallAPI().PostData(request, "org/unauthorize/salary/gen", {
|
||||
let _orgProfiles = await new CallAPI().PostData(request, "/org/unauthorize/salary/gen", {
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
keyword: "",
|
||||
|
|
@ -1983,7 +1983,7 @@ export class SalaryPeriodController extends Controller {
|
|||
const page = Math.ceil(total / 1000);
|
||||
for (let index = 2; index <= page; index++) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/unauthorize/salary/gen", {
|
||||
.PostData(request, "/org/unauthorize/salary/gen", {
|
||||
page: index,
|
||||
pageSize: 1000,
|
||||
keyword: "",
|
||||
|
|
@ -1999,7 +1999,7 @@ export class SalaryPeriodController extends Controller {
|
|||
let orgProfileEmployees: any;
|
||||
let _orgProfileEmployees = await new CallAPI().PostData(
|
||||
request,
|
||||
"org/unauthorize/salary/employee/gen",
|
||||
"/org/unauthorize/salary/employee/gen",
|
||||
{
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
|
|
@ -2014,7 +2014,7 @@ export class SalaryPeriodController extends Controller {
|
|||
const page = Math.ceil(total / 1000);
|
||||
for (let index = 2; index <= page; index++) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/unauthorize/salary/employee/gen", {
|
||||
.PostData(request, "/org/unauthorize/salary/employee/gen", {
|
||||
page: index,
|
||||
pageSize: 1000,
|
||||
keyword: "",
|
||||
|
|
@ -2026,7 +2026,7 @@ export class SalaryPeriodController extends Controller {
|
|||
});
|
||||
}
|
||||
}
|
||||
let revisionId = await new CallAPI().GetData(request, "org/unauthorize/revision/latest");
|
||||
let revisionId = await new CallAPI().GetData(request, "/org/unauthorize/revision/latest");
|
||||
|
||||
salaryPeriod.revisionId = revisionId;
|
||||
await this.salaryPeriodRepository.save(salaryPeriod);
|
||||
|
|
@ -2461,9 +2461,9 @@ export class SalaryPeriodController extends Controller {
|
|||
await this.salaryProfileEmployeeRepository.remove(salaryProfileEmployee);
|
||||
await this.salaryOrgEmployeeRepository.remove(salaryOrgEmployee);
|
||||
|
||||
let orgs = await new CallAPI().GetData(request, "org/unauthorize/active/root/id");
|
||||
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
|
||||
let total = 1000;
|
||||
let _orgProfiles = await new CallAPI().PostData(request, "org/unauthorize/salary/gen", {
|
||||
let _orgProfiles = await new CallAPI().PostData(request, "/org/unauthorize/salary/gen", {
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
keyword: "",
|
||||
|
|
@ -2476,7 +2476,7 @@ export class SalaryPeriodController extends Controller {
|
|||
const page = Math.ceil(total / 1000);
|
||||
for (let index = 2; index <= page; index++) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/unauthorize/profile/salary/gen", {
|
||||
.PostData(request, "/org/unauthorize/profile/salary/gen", {
|
||||
page: index,
|
||||
pageSize: 1000,
|
||||
keyword: "",
|
||||
|
|
@ -2491,7 +2491,7 @@ export class SalaryPeriodController extends Controller {
|
|||
total = 1000;
|
||||
let _orgProfileEmployees = await new CallAPI().PostData(
|
||||
request,
|
||||
"org/unauthorize/profile/salary/employee/gen",
|
||||
"/org/unauthorize/profile/salary/employee/gen",
|
||||
{
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
|
|
@ -2506,7 +2506,7 @@ export class SalaryPeriodController extends Controller {
|
|||
const page = Math.ceil(total / 1000);
|
||||
for (let index = 2; index <= page; index++) {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/unauthorize/profile/salary/employee/gen", {
|
||||
.PostData(request, "/org/unauthorize/profile/salary/employee/gen", {
|
||||
page: index,
|
||||
pageSize: 1000,
|
||||
keyword: "",
|
||||
|
|
@ -2518,7 +2518,7 @@ export class SalaryPeriodController extends Controller {
|
|||
});
|
||||
}
|
||||
}
|
||||
let revisionId = await new CallAPI().GetData(request, "org/unauthorize/revision/latest");
|
||||
let revisionId = await new CallAPI().GetData(request, "/org/unauthorize/revision/latest");
|
||||
|
||||
salaryPeriod.revisionId = revisionId;
|
||||
await this.salaryPeriodRepository.save(salaryPeriod);
|
||||
|
|
|
|||
|
|
@ -2135,8 +2135,8 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
await this.salaryOrgRepository.remove(salaryOrg);
|
||||
await this.salaryProfileRepository.remove(salaryProfile);
|
||||
|
||||
let orgs = await new CallAPI().GetData(request, "org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "org/unauthorize/revision/latest");
|
||||
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "/org/unauthorize/revision/latest");
|
||||
|
||||
salaryPeriod.revisionId = revisionId;
|
||||
await this.salaryPeriodRepository.save(salaryPeriod);
|
||||
|
|
@ -2217,8 +2217,8 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
await this.salaryOrgRepository.remove(salaryOrg);
|
||||
await this.salaryProfileRepository.remove(salaryProfile);
|
||||
|
||||
let orgs = await new CallAPI().GetData(request, "org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "org/unauthorize/revision/latest");
|
||||
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
|
||||
let revisionId = await new CallAPI().GetData(request, "/org/unauthorize/revision/latest");
|
||||
|
||||
chk_SalaryPeriod.revisionId = revisionId;
|
||||
await this.salaryPeriodRepository.save(chk_SalaryPeriod);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue