แก้ tree org
This commit is contained in:
parent
7f21756928
commit
5ca15d5433
3 changed files with 55 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ export class OrgChild1Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found. orgChild1Rank");
|
||||
}
|
||||
|
||||
if (rootIdExits.orgRootRankSub != "DISTRICT") {
|
||||
if (rootIdExits.orgRootRankSub != "DISTRICT" && rootIdExits.orgRootRankSub != "OFFICE") {
|
||||
const chkCode = await this.child1Repository.findOne({
|
||||
where: {
|
||||
orgRevisionId: rootIdExits.orgRevisionId,
|
||||
|
|
@ -223,7 +223,7 @@ export class OrgChild1Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found.");
|
||||
}
|
||||
|
||||
if (rootIdExits.orgRootRankSub != "DISTRICT") {
|
||||
if (rootIdExits.orgRootRankSub != "DISTRICT" && rootIdExits.orgRootRankSub != "OFFICE") {
|
||||
const chkCode = await this.child1Repository.findOne({
|
||||
where: {
|
||||
id: Not(id),
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ export class OrgRootController extends Controller {
|
|||
this.orgRootRepository.merge(orgRoot, requestBody);
|
||||
await this.orgRootRepository.save(orgRoot);
|
||||
|
||||
if (orgRoot.orgRootRankSub == "DISTRICT") {
|
||||
if (orgRoot.orgRootRankSub == "DISTRICT" || orgRoot.orgRootRankSub == "OFFICE") {
|
||||
const up_Child1 = await this.child1Repository.find({
|
||||
where: {
|
||||
orgRevisionId: orgRoot.orgRevisionId,
|
||||
|
|
|
|||
52
src/migration/1718866177977-update_table_org2006.ts
Normal file
52
src/migration/1718866177977-update_table_org2006.ts
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue