no message
This commit is contained in:
parent
927d9563f6
commit
ce8bb41bda
7 changed files with 238 additions and 43 deletions
|
|
@ -247,7 +247,8 @@ export class SalaryController extends Controller {
|
|||
endDate: "datetime", //วันที่สิ้นสุดบังคับใช้
|
||||
detail: "string", //คำอธิบาย
|
||||
})
|
||||
async GetSalaryById(@Path() id: string) {
|
||||
async GetSalaryById(@Request() request: RequestWithUser, @Path() id: string) {
|
||||
await new permission().PermissionGet(request, "SYS_SALARY_CHART_OFFICER");
|
||||
const salary = await this.salaryRepository.findOne({
|
||||
relations: ["posType_", "posLevel_"],
|
||||
where: { id: id },
|
||||
|
|
@ -280,10 +281,12 @@ export class SalaryController extends Controller {
|
|||
*/
|
||||
@Get()
|
||||
async listSalary(
|
||||
@Request() request: RequestWithUser,
|
||||
@Query("page") page: number = 1,
|
||||
@Query("pageSize") pageSize: number = 10,
|
||||
@Query("keyword") keyword?: string,
|
||||
) {
|
||||
await new permission().PermissionList(request, "SYS_SALARY_CHART_OFFICER");
|
||||
const [salary, total] = await AppDataSource.getRepository(Salarys)
|
||||
.createQueryBuilder("salary")
|
||||
.leftJoinAndSelect("salary.posType_", "posType_")
|
||||
|
|
@ -327,10 +330,7 @@ export class SalaryController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Post("copy")
|
||||
async copySalary(
|
||||
@Body() body: { id: string },
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
async copySalary(@Body() body: { id: string }, @Request() request: RequestWithUser) {
|
||||
await new permission().PermissionCreate(request, "SYS_SALARY_CHART_OFFICER");
|
||||
const salary = await this.salaryRepository.findOne({
|
||||
relations: ["posLevel_", "posType_", "salaryRanks_"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue