fix bug
This commit is contained in:
parent
f5c5d21a3e
commit
e601dfccab
3 changed files with 34 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ export class OrgRootController extends Controller {
|
|||
}
|
||||
|
||||
const chkCode = await this.orgRootRepository.findOne({
|
||||
where: { orgRootCode: requestBody.orgRootCode },
|
||||
where: { orgRevisionId: requestBody.orgRevisionId , orgRootCode: requestBody.orgRootCode },
|
||||
});
|
||||
if (chkCode != null) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "รหัสหน่วยงานนี้มีอยู่ในระบบแล้ว");
|
||||
|
|
@ -176,7 +176,7 @@ export class OrgRootController extends Controller {
|
|||
}
|
||||
|
||||
const chkCode = await this.orgRootRepository.findOne({
|
||||
where: { orgRootCode: requestBody.orgRootCode },
|
||||
where: { orgRevisionId: requestBody.orgRevisionId , orgRootCode: requestBody.orgRootCode },
|
||||
});
|
||||
if (chkCode?.id != id && chkCode != null) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "รหัสหน่วยงานนี้มีอยู่ในระบบแล้ว");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue