fix
This commit is contained in:
parent
80e6b61175
commit
bcca1f205a
1 changed files with 3 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ import HttpError from "../interfaces/http-error";
|
||||||
import { ProfileSalaryHistory } from "../entities/ProfileSalaryHistory";
|
import { ProfileSalaryHistory } from "../entities/ProfileSalaryHistory";
|
||||||
import { RequestWithUser } from "../middlewares/user";
|
import { RequestWithUser } from "../middlewares/user";
|
||||||
import { ProfileEmployee } from "../entities/ProfileEmployee";
|
import { ProfileEmployee } from "../entities/ProfileEmployee";
|
||||||
|
import { Profile } from "../entities/Profile";
|
||||||
import { In, LessThan, MoreThan } from "typeorm";
|
import { In, LessThan, MoreThan } from "typeorm";
|
||||||
import permission from "../interfaces/permission";
|
import permission from "../interfaces/permission";
|
||||||
import { setLogDataDiff } from "../interfaces/utils";
|
import { setLogDataDiff } from "../interfaces/utils";
|
||||||
|
|
@ -32,6 +33,7 @@ import { Command } from "../entities/Command";
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
export class ProfileSalaryEmployeeController extends Controller {
|
export class ProfileSalaryEmployeeController extends Controller {
|
||||||
private profileRepo = AppDataSource.getRepository(ProfileEmployee);
|
private profileRepo = AppDataSource.getRepository(ProfileEmployee);
|
||||||
|
private profileGovementRepo = AppDataSource.getRepository(Profile);
|
||||||
private salaryRepo = AppDataSource.getRepository(ProfileSalary);
|
private salaryRepo = AppDataSource.getRepository(ProfileSalary);
|
||||||
private salaryHistoryRepo = AppDataSource.getRepository(ProfileSalaryHistory);
|
private salaryHistoryRepo = AppDataSource.getRepository(ProfileSalaryHistory);
|
||||||
private commandRepository = AppDataSource.getRepository(Command);
|
private commandRepository = AppDataSource.getRepository(Command);
|
||||||
|
|
@ -363,7 +365,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
if (_command?.isBangkok == "OFFICE") _posNumCodeSit = "สำนักปลัดกรุงเทพมหานคร"
|
if (_command?.isBangkok == "OFFICE") _posNumCodeSit = "สำนักปลัดกรุงเทพมหานคร"
|
||||||
else if (_command?.isBangkok == "BANGKOK") _posNumCodeSit = "กรุงเทพมหานคร"
|
else if (_command?.isBangkok == "BANGKOK") _posNumCodeSit = "กรุงเทพมหานคร"
|
||||||
else {
|
else {
|
||||||
let _profileAdmin = await this.profileRepo.findOne({
|
let _profileAdmin = await this.profileGovementRepo.findOne({
|
||||||
where: { keycloak: _command?.createdUserId.toString()},
|
where: { keycloak: _command?.createdUserId.toString()},
|
||||||
relations: ["current_holders", "current_holders.orgRoot",]
|
relations: ["current_holders", "current_holders.orgRoot",]
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue