ตามอัพเดทชื่อย่อ,รหัส ภายใต้Child1
This commit is contained in:
parent
c76473527f
commit
1b63147bce
1 changed files with 46 additions and 0 deletions
|
|
@ -219,6 +219,52 @@ export class OrgChild1Controller {
|
|||
child1.orgRootId = String(rootIdExits?.id);
|
||||
this.child1Repository.merge(child1, requestBody);
|
||||
await this.child1Repository.save(child1);
|
||||
|
||||
const up_Child2 = await this.child2Repository.find({
|
||||
where: {
|
||||
orgRevisionId: rootIdExits.orgRevisionId,
|
||||
orgRootId: requestBody.orgRootId,
|
||||
orgChild1Id: child1.id,
|
||||
}
|
||||
});
|
||||
if(up_Child2.length > 0){
|
||||
for (const _child2 of up_Child2) {
|
||||
_child2.orgChild2ShortName = String(requestBody.orgChild1ShortName)
|
||||
_child2.orgChild2Code = String(requestBody.orgChild1Code);
|
||||
}
|
||||
await this.child2Repository.save(up_Child2);
|
||||
}
|
||||
|
||||
const up_Child3 = await this.child3Repository.find({
|
||||
where: {
|
||||
orgRevisionId: rootIdExits.orgRevisionId,
|
||||
orgRootId: requestBody.orgRootId,
|
||||
orgChild1Id: child1.id,
|
||||
}
|
||||
});
|
||||
if(up_Child3.length > 0){
|
||||
for (const _child3 of up_Child3) {
|
||||
_child3.orgChild3ShortName = String(requestBody.orgChild1ShortName)
|
||||
_child3.orgChild3Code = String(requestBody.orgChild1Code);
|
||||
}
|
||||
await this.child3Repository.save(up_Child3);
|
||||
}
|
||||
|
||||
const up_Child4 = await this.child4Repository.find({
|
||||
where: {
|
||||
orgRevisionId: rootIdExits.orgRevisionId,
|
||||
orgRootId: requestBody.orgRootId,
|
||||
orgChild1Id: child1.id,
|
||||
}
|
||||
});
|
||||
if(up_Child4.length > 0){
|
||||
for (const _child4 of up_Child4) {
|
||||
_child4.orgChild4ShortName = String(requestBody.orgChild1ShortName)
|
||||
_child4.orgChild4Code = String(requestBody.orgChild1Code);
|
||||
}
|
||||
await this.child4Repository.save(up_Child4);
|
||||
}
|
||||
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue