add api บรรจุสอบ

This commit is contained in:
kittapath 2024-10-28 14:18:06 +07:00
parent 5207572da1
commit ec052d8997
2 changed files with 54 additions and 1 deletions

View file

@ -3198,7 +3198,8 @@ export class PositionController extends Controller {
},
) {
let typeCondition: any = {};
let conditionA = "positions.posTypeId LIKE :posType AND positions.posLevelId LIKE :posLevel";
let conditionA =
"positions.posTypeId LIKE :posType AND positions.posLevelId LIKE :posLevel AND positions.positionName LIKE :position";
let posType = await this.posTypeRepository.findOne({
where: { id: String(body.posType) },
@ -3305,6 +3306,7 @@ export class PositionController extends Controller {
qb.andWhere(typeCondition).andWhere(conditionA == null ? "1=1" : conditionA, {
posType: posType == null ? `%%` : `${posType.id}`,
posLevel: posLevel == null ? `%%` : `${posLevel.id}`,
position: body.position == null ? `%%` : `${body.position}`,
});
}),
)