rez_core 5.0.90 → 5.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/meta/repository/entity-master.repository.d.ts +3 -1
- package/dist/module/meta/repository/entity-master.repository.js +10 -6
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/repository/entity-master.repository.ts +9 -8
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { Repository } from 'typeorm';
|
|
|
5
5
|
import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
|
|
6
6
|
import { EntityRelation } from '../entity/entity-relation.entity';
|
|
7
7
|
import { AttributeMaster } from '../entity/attribute-master.entity';
|
|
8
|
+
import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
|
|
8
9
|
|
|
9
10
|
@Injectable()
|
|
10
11
|
export class EntityMasterRepository {
|
|
@@ -16,20 +17,20 @@ export class EntityMasterRepository {
|
|
|
16
17
|
@InjectRepository(EntityRelation)
|
|
17
18
|
private readonly entityRelationRepo: Repository<EntityRelation>,
|
|
18
19
|
@InjectRepository(AttributeMaster)
|
|
19
|
-
private readonly attributeMasterRepository: Repository<AttributeMaster
|
|
20
|
+
private readonly attributeMasterRepository: Repository<AttributeMaster>,
|
|
21
|
+
private readonly reflectionHelper: ReflectionHelper,
|
|
20
22
|
) {
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
async getEntityById(id: number): Promise<EntityMaster | null> {
|
|
24
26
|
let data = await this.entityMasterRepository.findOne({ where: { id } });
|
|
25
27
|
if (data) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
data.status = listMasterData?.[0].name;
|
|
28
|
+
const listMasterItemsRepo = this.reflectionHelper.getRepoService('ListMasterItems');
|
|
29
|
+
let listMasterItemsata = await listMasterItemsRepo.findOne({
|
|
30
|
+
where: { id: data.status }
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
data.status = listMasterItemsata?.name;
|
|
33
34
|
}
|
|
34
35
|
return data;
|
|
35
36
|
}
|