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