Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-03-18 17:54:27 +07:00
commit e64dbf20ce
27 changed files with 270 additions and 422 deletions

View file

@ -269,6 +269,7 @@ export class EmployeePositionController extends Controller {
findData = await this.employeePosDictRepository.find({
where: { posDictName: Like(`%${keyword}%`) },
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
break;
@ -280,6 +281,7 @@ export class EmployeePositionController extends Controller {
findData = await this.employeePosDictRepository.find({
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
break;
@ -291,11 +293,13 @@ export class EmployeePositionController extends Controller {
findData = await this.employeePosDictRepository.find({
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
} else {
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
findData = await this.employeePosDictRepository.find({
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
}
break;
@ -303,6 +307,7 @@ export class EmployeePositionController extends Controller {
default:
findData = await this.employeePosDictRepository.find({
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
break;
}

View file

@ -159,7 +159,8 @@ export class PositionController extends Controller {
requestBody: CreatePosDictExe,
@Request() request: { user: Record<string, any> },
) {
let posDict: any;
// let posDict: PosDict;
let posDict: any = new PosDict();
posDict.posDictName = requestBody.posDictName;
posDict.posDictField = requestBody.posDictField;
posDict.posTypeId = requestBody.posTypeId;
@ -182,7 +183,7 @@ export class PositionController extends Controller {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosLevelId");
}
let posExecutive: any = null;
let posExecutive: any = new PosExecutive();
if (requestBody.posExecutive != null && requestBody.posExecutive != "") {
const checkName = await this.posExecutiveRepository.findOne({
where: { posExecutiveName: requestBody.posExecutive },
@ -192,8 +193,11 @@ export class PositionController extends Controller {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ชื่อนี้มีอยู่ในระบบแล้ว");
}
posExecutive.posExecutiveName = requestBody.posExecutive;
const checkPriority = await this.posExecutiveRepository.findOne({
select: ["posExecutivePriority"],
where: {
posExecutivePriority: Not(IsNull()),
},
order: { posExecutivePriority: "DESC" },
});
if (checkPriority == null) {

View file

@ -70,6 +70,7 @@ export class ProfileEducationsController extends Controller {
educationLevelId: "string",
positionPath: "string",
positionPathId: "string",
note: "string",
isDate: true,
isEducation: true,
},
@ -113,6 +114,7 @@ export class ProfileEducationsController extends Controller {
educationLevelId: "string",
positionPath: "string",
positionPathId: "string",
note: "string",
isDate: true,
isEducation: true,
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
@ -142,6 +144,7 @@ export class ProfileEducationsController extends Controller {
educationLevelId: "string",
positionPath: "string",
positionPathId: "string",
note: "string",
isDate: true,
isEducation: true,
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",

View file

@ -77,6 +77,7 @@ export class ProfileHonorController extends Controller {
issuer: "issuer",
refCommandDate: "2024-03-12T10:10:31.000Z",
refCommandNo: "refCommandNo",
isDate: true,
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
},
{
@ -93,6 +94,7 @@ export class ProfileHonorController extends Controller {
issuer: "string",
refCommandDate: "2024-03-12T10:09:47.000Z",
refCommandNo: "string",
isDate: true,
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
},
],

View file

@ -61,6 +61,7 @@ export class ProfileInsigniaController extends Controller {
volumeNo: "string",
refCommandDate: "2024-03-12T10:05:02.000Z",
refCommandNo: "string",
note: "string",
},
],
})
@ -96,6 +97,7 @@ export class ProfileInsigniaController extends Controller {
volumeNo: "volumeNo",
refCommandDate: "2024-03-12T10:05:44.000Z",
refCommandNo: "refCommandNo",
note: "string",
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
},
{
@ -120,6 +122,7 @@ export class ProfileInsigniaController extends Controller {
volumeNo: "string",
refCommandDate: "2024-03-12T10:05:02.000Z",
refCommandNo: "string",
note: "string",
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
},
],

View file

@ -91,6 +91,7 @@ export class ProfileTrainingController extends Controller {
duration: "string",
name: "string",
yearly: 0,
isDate: true,
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
},
{
@ -112,6 +113,7 @@ export class ProfileTrainingController extends Controller {
duration: "string",
name: "name",
yearly: 0,
isDate: true,
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
},
],