This commit is contained in:
AdisakKanthawilang 2024-04-25 09:21:46 +07:00
parent 2784054e2f
commit fc90dff9ee

View file

@ -701,13 +701,13 @@ export class PositionController extends Controller {
);
}
let fullPosMasterNo = String((requestBody.posMasterNoPrefix).trim() + (requestBody.posMasterNo) + (requestBody.posMasterNoSuffix).trim());
if (fullPosMasterNo === String(requestBody.posMasterNo)) {
throw new HttpError(
HttpStatusCode.INTERNAL_SERVER_ERROR,
"ไม่สามารถใส่ข้อมูลซ้ำกันได้",
);
}
// let fullPosMasterNo = String((requestBody.posMasterNoPrefix).trim() + (requestBody.posMasterNo) + (requestBody.posMasterNoSuffix).trim());
// if (fullPosMasterNo === String(requestBody.posMasterNo)) {
// throw new HttpError(
// HttpStatusCode.INTERNAL_SERVER_ERROR,
// "ไม่สามารถใส่ข้อมูลซ้ำกันได้",
// );
// }
posMaster.createdUserId = request.user.sub;
@ -929,13 +929,14 @@ export class PositionController extends Controller {
}
}
let fullPosMasterNo = String((requestBody.posMasterNoPrefix).trim() + (requestBody.posMasterNo) + (requestBody.posMasterNoSuffix).trim());
if (fullPosMasterNo === String(requestBody.posMasterNo)) {
throw new HttpError(
HttpStatusCode.INTERNAL_SERVER_ERROR,
"ไม่สามารถเพิ่มข้อมูลชื่อตำแหน่งซ้ำกันได้",
);
}
// let fullPosMasterNo = String((requestBody.posMasterNoPrefix).trim() + (requestBody.posMasterNo) + (requestBody.posMasterNoSuffix).trim());
// if (fullPosMasterNo === String(requestBody.posMasterNo)) {
// throw new HttpError(
// HttpStatusCode.INTERNAL_SERVER_ERROR,
// "ไม่สามารถเพิ่มข้อมูลชื่อตำแหน่งซ้ำกันได้",
// );
// }
// const chk_SName0 = await this.posMasterRepository.findOne({
// where: {
// orgRevisionId: posMaster.orgRevisionId,