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