เพิ่มtableลูกจ้าง
This commit is contained in:
parent
912a8237e6
commit
21c044223c
11 changed files with 1490 additions and 15 deletions
|
|
@ -170,6 +170,7 @@ export class EmployeePosTypeController extends Controller {
|
|||
id: empPosLevel.id,
|
||||
posLevelName: empPosLevel.posLevelName,
|
||||
posLevelRank: empPosLevel.posLevelRank,
|
||||
posLevelAuthority: empPosLevel.posLevelAuthority,
|
||||
})),
|
||||
};
|
||||
|
||||
|
|
@ -198,6 +199,7 @@ export class EmployeePosTypeController extends Controller {
|
|||
id: empPosLevel.id,
|
||||
posLevelName: empPosLevel.posLevelName,
|
||||
posLevelRank: empPosLevel.posLevelRank,
|
||||
posLevelAuthority: empPosLevel.posLevelAuthority,
|
||||
})),
|
||||
}));
|
||||
return new HttpSuccess(mapEmpPosType);
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ import { EmployeePosType } from "../entities/EmployeePosType";
|
|||
import { EmployeePosLevel } from "../entities/EmployeePosLevel";
|
||||
import { CreateEmployeePosMaster, EmployeePosMaster } from "../entities/EmployeePosMaster";
|
||||
import { EmployeePosition } from "../entities/EmployeePosition";
|
||||
import { Profile } from "../entities/Profile";
|
||||
import { OrgRevision } from "../entities/OrgRevision";
|
||||
import { OrgRoot } from "../entities/OrgRoot";
|
||||
import { OrgChild1 } from "../entities/OrgChild1";
|
||||
import { OrgChild2 } from "../entities/OrgChild2";
|
||||
import { OrgChild3 } from "../entities/OrgChild3";
|
||||
import { OrgChild4 } from "../entities/OrgChild4";
|
||||
import { ProfileEmployee } from "../entities/ProfileEmployee";
|
||||
|
||||
@Route("api/v1/org/employee/pos")
|
||||
@Tags("Employee")
|
||||
|
|
@ -50,7 +50,7 @@ export class EmployeePositionController extends Controller {
|
|||
private employeePosLevelRepository = AppDataSource.getRepository(EmployeePosLevel);
|
||||
private employeePosMasterRepository = AppDataSource.getRepository(EmployeePosMaster);
|
||||
private employeePositionRepository = AppDataSource.getRepository(EmployeePosition);
|
||||
private profileRepository = AppDataSource.getRepository(Profile);
|
||||
private profileRepository = AppDataSource.getRepository(ProfileEmployee);
|
||||
private orgRevisionRepository = AppDataSource.getRepository(OrgRevision);
|
||||
private orgRootRepository = AppDataSource.getRepository(OrgRoot);
|
||||
private child1Repository = AppDataSource.getRepository(OrgChild1);
|
||||
|
|
@ -227,7 +227,7 @@ export class EmployeePositionController extends Controller {
|
|||
@Get("position/{id}")
|
||||
async detailPosition(@Path() id: string) {
|
||||
const posMaster = await this.employeePosMasterRepository.findOne({
|
||||
where: { id:id },
|
||||
where: { id: id },
|
||||
});
|
||||
if (!posMaster) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
@ -2015,6 +2015,7 @@ export class EmployeePositionController extends Controller {
|
|||
await this.employeePosMasterRepository.update(id, {
|
||||
isSit: false,
|
||||
next_holderId: null,
|
||||
current_holderId: null,
|
||||
});
|
||||
|
||||
dataMaster.positions.forEach(async (position) => {
|
||||
|
|
|
|||
1208
src/controllers/ProfileEmployeeController.ts
Normal file
1208
src/controllers/ProfileEmployeeController.ts
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue