fix
This commit is contained in:
parent
bd17564ab7
commit
0e8ca0b1d8
1 changed files with 6 additions and 13 deletions
|
|
@ -621,16 +621,17 @@ export class PositionController extends Controller {
|
|||
posMaster.orgRevisionId = orgRoot.orgRevisionId;
|
||||
SName = orgRoot.orgRootShortName;
|
||||
}
|
||||
|
||||
// let fullPosMasterNo = String((requestBody.posMasterNoPrefix).trim() + (requestBody.posMasterNo) + (requestBody.posMasterNoSuffix).trim());
|
||||
// let searchShortName = `CONCAT(posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
|
||||
const chk_SName0 = await this.posMasterRepository.findOne({
|
||||
where: {
|
||||
orgRevisionId: posMaster.orgRevisionId,
|
||||
orgRoot: { orgRootShortName: SName },
|
||||
orgChild1Id: IsNull(),
|
||||
posMasterNo: requestBody.posMasterNo,
|
||||
},
|
||||
relations: ["orgRoot"],
|
||||
});
|
||||
|
||||
if (chk_SName0 != null) {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.INTERNAL_SERVER_ERROR,
|
||||
|
|
@ -700,14 +701,6 @@ 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,
|
||||
// "ไม่สามารถใส่ข้อมูลซ้ำกันได้",
|
||||
// );
|
||||
// }
|
||||
|
||||
|
||||
posMaster.createdUserId = request.user.sub;
|
||||
|
|
@ -1394,9 +1387,9 @@ export class PositionController extends Controller {
|
|||
orgChild2Id: posMaster.orgChild2Id,
|
||||
orgChild3Id: posMaster.orgChild3Id,
|
||||
orgChild4Id: posMaster.orgChild4Id,
|
||||
posMasterNoPrefix: posMaster.posMasterNoPrefix,
|
||||
posMasterNo: posMaster.posMasterNo,
|
||||
posMasterNoSuffix: posMaster.posMasterNoSuffix,
|
||||
posMasterNoPrefix: posMaster.posMasterNoPrefix ? posMaster.posMasterNoPrefix : null,
|
||||
posMasterNo: posMaster.posMasterNo ? posMaster.posMasterNo : null,
|
||||
posMasterNoSuffix: posMaster.posMasterNoSuffix ? posMaster.posMasterNoSuffix : null,
|
||||
reason: posMaster.reason,
|
||||
fullNameCurrentHolder:
|
||||
posMaster.current_holder == null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue