no message
This commit is contained in:
parent
b93fb6c1e5
commit
6bca6c5ba5
3 changed files with 40 additions and 1 deletions
|
|
@ -776,7 +776,11 @@ export class SalaryPeriodController extends Controller {
|
|||
await this.salaryProfileRepository.remove(salaryProfile);
|
||||
|
||||
let orgs = await new CallAPI().GetData(request, "org/active/root/id");
|
||||
let orgProfiles = await new CallAPI().GetData(request, "org/profile/salary/gen");
|
||||
let orgProfiles = await new CallAPI().PostData(request, "org/profile/salary/gen", {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
keyword: "",
|
||||
});
|
||||
let revisionId = await new CallAPI().GetData(request, "org/revision/latest");
|
||||
|
||||
salaryPeriod.revisionId = revisionId;
|
||||
|
|
|
|||
|
|
@ -309,6 +309,9 @@ export class CreateSalaryProfile {
|
|||
@Column()
|
||||
posLevel: string;
|
||||
|
||||
@Column()
|
||||
posExecutive: string;
|
||||
|
||||
@Column()
|
||||
amount: number;
|
||||
|
||||
|
|
@ -341,4 +344,19 @@ export class CreateSalaryProfile {
|
|||
|
||||
@Column()
|
||||
child4: string;
|
||||
|
||||
@Column()
|
||||
isResult: boolean;
|
||||
|
||||
@Column()
|
||||
isDuration: boolean;
|
||||
|
||||
@Column()
|
||||
isPunish: boolean;
|
||||
|
||||
@Column()
|
||||
isRetired: boolean;
|
||||
|
||||
@Column()
|
||||
isRetired2: boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,23 @@ class CallAPI {
|
|||
throw error;
|
||||
}
|
||||
}
|
||||
//Post
|
||||
public async PostData(request: any, @Path() path: any, sendData: any) {
|
||||
const token = request.headers.authorization;
|
||||
const url = process.env.ORG_API + path;
|
||||
try {
|
||||
const response = await axios.post(url, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
json: sendData,
|
||||
});
|
||||
return response.data.result;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default CallAPI;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue