no message
This commit is contained in:
parent
a0486a10b9
commit
70481502f3
3 changed files with 21 additions and 21 deletions
|
|
@ -57,7 +57,7 @@ export class EmployeePosLevelController extends Controller {
|
||||||
where: { id: requestBody.employeePosTypeId }
|
where: { id: requestBody.employeePosTypeId }
|
||||||
});
|
});
|
||||||
if (!EmpPosType) {
|
if (!EmpPosType) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทกลุ่มงานลูกจ้างประจำนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const chkEmpPosLevelName = await this.employeePosLevelRepository.findOne({
|
const chkEmpPosLevelName = await this.employeePosLevelRepository.findOne({
|
||||||
|
|
@ -102,7 +102,7 @@ export class EmployeePosLevelController extends Controller {
|
||||||
where: { id: requestBody.employeePosTypeId }
|
where: { id: requestBody.employeePosTypeId }
|
||||||
});
|
});
|
||||||
if (!EmpPosType) {
|
if (!EmpPosType) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทกลุ่มงานลูกจ้างประจำนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const chkEmpPosLevel = await this.employeePosLevelRepository.findOne({
|
const chkEmpPosLevel = await this.employeePosLevelRepository.findOne({
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@ export class EmployeePosTypeController extends Controller {
|
||||||
private employeePosLevelRepository = AppDataSource.getRepository(EmployeePosLevel);
|
private employeePosLevelRepository = AppDataSource.getRepository(EmployeePosLevel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API เพิ่มประเภทกลุ่มงานลูกจ้างประจำ
|
* API เพิ่มกลุ่มงานลูกจ้างประจำ
|
||||||
*
|
*
|
||||||
* @summary ORG_ - เพิ่มประเภทกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
* @summary ORG_ - เพิ่มกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Post()
|
@Post()
|
||||||
|
|
@ -61,7 +61,7 @@ export class EmployeePosTypeController extends Controller {
|
||||||
if (chkEmpPosTypeName) {
|
if (chkEmpPosTypeName) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
"ชื่อประเภทกลุ่มงานลูกจ้างประจำนี้มีอยู่ในระบบแล้ว",
|
"ชื่อกลุ่มงานลูกจ้างประจำนี้มีอยู่ในระบบแล้ว",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
EmpPosType.createdUserId = request.user.sub;
|
EmpPosType.createdUserId = request.user.sub;
|
||||||
|
|
@ -73,11 +73,11 @@ export class EmployeePosTypeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API แก้ไขประเภทกลุ่มงานลูกจ้างประจำ
|
* API แก้ไขกลุ่มงานลูกจ้างประจำ
|
||||||
*
|
*
|
||||||
* @summary ORG_ - แก้ไขประเภทกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
* @summary ORG_ - แก้ไขกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
||||||
*
|
*
|
||||||
* @param {string} id Id ประเภทกลุ่มงานลูกจ้างประจำ
|
* @param {string} id Id กลุ่มงานลูกจ้างประจำ
|
||||||
*/
|
*/
|
||||||
@Put("{id}")
|
@Put("{id}")
|
||||||
async EditEmpType(
|
async EditEmpType(
|
||||||
|
|
@ -87,7 +87,7 @@ export class EmployeePosTypeController extends Controller {
|
||||||
) {
|
) {
|
||||||
const EmpPosType = await this.employeePosTypeRepository.findOne({ where: { id } });
|
const EmpPosType = await this.employeePosTypeRepository.findOne({ where: { id } });
|
||||||
if (!EmpPosType) {
|
if (!EmpPosType) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทกลุ่มงานลูกจ้างประจำนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||||
}
|
}
|
||||||
const chkEmpPosType = await this.employeePosTypeRepository.findOne({
|
const chkEmpPosType = await this.employeePosTypeRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -98,7 +98,7 @@ export class EmployeePosTypeController extends Controller {
|
||||||
if (chkEmpPosType) {
|
if (chkEmpPosType) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
"ชื่อประเภทกลุ่มงานลูกจ้างประจำนี้มีอยู่ในระบบแล้ว",
|
"ชื่อกลุ่มงานลูกจ้างประจำนี้มีอยู่ในระบบแล้ว",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
EmpPosType.lastUpdateUserId = request.user.sub;
|
EmpPosType.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -109,17 +109,17 @@ export class EmployeePosTypeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API ลบประเภทกลุ่มงานลูกจ้างประจำ
|
* API ลบกลุ่มงานลูกจ้างประจำ
|
||||||
*
|
*
|
||||||
* @summary ORG_ - ลบประเภทกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
* @summary ORG_ - ลบกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
||||||
*
|
*
|
||||||
* @param {string} id Id ประเภทกลุ่มงานลูกจ้างประจำ
|
* @param {string} id Id กลุ่มงานลูกจ้างประจำ
|
||||||
*/
|
*/
|
||||||
@Delete("{id}")
|
@Delete("{id}")
|
||||||
async deleteType(@Path() id: string) {
|
async deleteType(@Path() id: string) {
|
||||||
const delEmpPosType = await this.employeePosTypeRepository.findOne({ where: { id } });
|
const delEmpPosType = await this.employeePosTypeRepository.findOne({ where: { id } });
|
||||||
if (!delEmpPosType) {
|
if (!delEmpPosType) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทกลุ่มงานลูกจ้างประจำนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||||
}
|
}
|
||||||
//ตารางระดับชั้นงาน
|
//ตารางระดับชั้นงาน
|
||||||
const EmpPosLevel = await this.employeePosLevelRepository.find({
|
const EmpPosLevel = await this.employeePosLevelRepository.find({
|
||||||
|
|
@ -147,11 +147,11 @@ export class EmployeePosTypeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API รายละเอียดประเภทกลุ่มงานลูกจ้างประจำ
|
* API รายละเอียดกลุ่มงานลูกจ้างประจำ
|
||||||
*
|
*
|
||||||
* @summary ORG_ - รายละเอียดประเภทกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
* @summary ORG_ - รายละเอียดกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
||||||
*
|
*
|
||||||
* @param {string} id Id ประเภทกลุ่มงานลูกจ้างประจำ
|
* @param {string} id Id กลุ่มงานลูกจ้างประจำ
|
||||||
*/
|
*/
|
||||||
@Get("{id}")
|
@Get("{id}")
|
||||||
async GetEmpTypeById(@Path() id: string) {
|
async GetEmpTypeById(@Path() id: string) {
|
||||||
|
|
@ -161,7 +161,7 @@ export class EmployeePosTypeController extends Controller {
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
});
|
});
|
||||||
if (!getEmpPosType) {
|
if (!getEmpPosType) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทกลุ่มงานลูกจ้างประจำนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapGetEmpPosType = {
|
const mapGetEmpPosType = {
|
||||||
|
|
@ -179,9 +179,9 @@ export class EmployeePosTypeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API รายการประเภทกลุ่มงานลูกจ้างประจำ
|
* API รายการกลุ่มงานลูกจ้างประจำ
|
||||||
*
|
*
|
||||||
* @summary ORG_ - รายการประเภทกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
* @summary ORG_ - รายการกลุ่มงานลูกจ้างประจำ (ADMIN) #
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Get()
|
@Get()
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
"name": "Employee", "description": "ตำแหน่งลูกจ้างประจำ"
|
"name": "Employee", "description": "ตำแหน่งลูกจ้างประจำ"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EmployeePosType", "description": "ประเภทกลุ่มงานลูกจ้างประจำ"
|
"name": "EmployeePosType", "description": "กลุ่มงานลูกจ้างประจำ"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EmployeePosLevel", "description": "ระดับชั้นงานลูกจ้างประจำ"
|
"name": "EmployeePosLevel", "description": "ระดับชั้นงานลูกจ้างประจำ"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue