fix
This commit is contained in:
parent
86e32d4e39
commit
91f4c59e35
1 changed files with 22 additions and 17 deletions
|
|
@ -29,6 +29,7 @@ import { ProfileEmployee } from "../entities/ProfileEmployee";
|
|||
import permission from "../interfaces/permission";
|
||||
import { OrgRevision } from "../entities/OrgRevision";
|
||||
import Extension from "../interfaces/extension";
|
||||
import { log } from "console";
|
||||
@Route("api/v1/org/profile/salaryTemp")
|
||||
@Tags("ProfileSalaryTemp")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -272,6 +273,7 @@ export class ProfileSalaryTempController extends Controller {
|
|||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||
orgRevisionId: root == null ? null : root.orgRevisionId,
|
||||
org: `${_child4}${_child3}${_child2}${_child1}${root?.orgRootName ?? ""}`,
|
||||
statusCheckEdit: _data.statusCheckEdit,
|
||||
type: "OFFICER"
|
||||
};
|
||||
}),
|
||||
|
|
@ -538,6 +540,7 @@ export class ProfileSalaryTempController extends Controller {
|
|||
child4Id: _data.child4IdTemp ? _data.child4IdTemp : null,
|
||||
child4ShortName: _data.child4ShortNameTemp ? _data.child4ShortNameTemp : null,
|
||||
org: `${_child4}${_child3}${_child2}${_child1}${root?.orgRootName ?? ""}`,
|
||||
statusCheckEdit: _data.statusCheckEdit,
|
||||
type: "EMPLOYEE"
|
||||
};
|
||||
}),
|
||||
|
|
@ -606,6 +609,24 @@ export class ProfileSalaryTempController extends Controller {
|
|||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* API Get ตำแหน่งเงินเดือน
|
||||
*
|
||||
* @summary API Get ตำแหน่งเงินเดือน
|
||||
*
|
||||
*/
|
||||
@Get("get/{salaryId}")
|
||||
public async getSalary(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||
const salary = await this.salaryRepo.findOne({
|
||||
where: { id: salaryId },
|
||||
relations: ["profileSalary"],
|
||||
});
|
||||
if (!salary) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
}
|
||||
return new HttpSuccess({ salaryNew: salary, salaryOld: salary.profileSalary });
|
||||
}
|
||||
|
||||
/**
|
||||
* API List ตำแหน่งเงินเดือน
|
||||
*
|
||||
|
|
@ -725,23 +746,7 @@ export class ProfileSalaryTempController extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API Get ตำแหน่งเงินเดือน
|
||||
*
|
||||
* @summary API Get ตำแหน่งเงินเดือน
|
||||
*
|
||||
*/
|
||||
@Get("get/{salaryId}")
|
||||
public async getSalary(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||
const salary = await this.salaryRepo.findOne({
|
||||
where: { id: salaryId },
|
||||
relations: ["profileSalary"],
|
||||
});
|
||||
if (!salary) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
}
|
||||
return new HttpSuccess({ salaryNew: salary, salaryOld: salary.profileSalary });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* API สร้างตำแหน่งเงินเดือน
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue