|
@@ -216,7 +216,7 @@ public class RelationReportService implements IRelationReportService {
|
|
|
ObjectNode objectNode = this.getRelationProjectCal(groupCode, projectId, relationTypeEnum.getGraphCode(),
|
|
|
relationTypeEnum.getRelCode(), null);
|
|
|
Map<String, AdmRelationTypeEnum> graphRelTypeMap = AdmCommonConstant.GRAPH_RELATION_TYPE_MAP;
|
|
|
- Map<String, RelationDefine> relationDefineMap = queryAllRelationDefineMap(groupCode, projectId);
|
|
|
+ Map<String, RelationDefine> relationDefineMap = this.queryAllRelationDefineMap(groupCode, projectId);
|
|
|
if (objectNode != null) {
|
|
|
return this.fillRelationProjectCal(objectNode, relationTypeEnum.getGraphCode(), relationTypeEnum.getRelCode(), graphRelTypeMap, relationDefineMap, groupCode, projectId);
|
|
|
}
|
|
@@ -803,13 +803,13 @@ public class RelationReportService implements IRelationReportService {
|
|
|
CommonResult<List<ObjectTypeDefine>> queryPrototype = DigitalDefineFacade.queryPrototype(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, classCriteria);
|
|
|
Long count = queryPrototype.getCount();
|
|
|
List<ObjectTypeDefine> infos = queryPrototype.getData();
|
|
|
- if (CollectionUtil.isEmpty(infos)) {
|
|
|
+ if (count == null || CollectionUtil.isEmpty(infos)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
all.addAll(infos);
|
|
|
|
|
|
- if (count == null || count < 500) {
|
|
|
+ if (count < 500) {
|
|
|
return;
|
|
|
} else if ((infos.size()*classCriteria.getPage()) > count) {
|
|
|
return;
|
|
@@ -828,13 +828,23 @@ public class RelationReportService implements IRelationReportService {
|
|
|
* @param projectId
|
|
|
*/
|
|
|
private void queryPageObjects(List<ObjectNode> all, QueryCriteria objectCriteria, String groupCode, String projectId) {
|
|
|
- List<ObjectNode> objectNodes = DigitalObjectFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, objectCriteria);
|
|
|
- if (CollectionUtil.isEmpty(objectNodes)) {
|
|
|
+ CommonResult<List<ObjectNode>> queryPrototype = DigitalObjectFacade.queryPrototype(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, objectCriteria);
|
|
|
+ Long count = queryPrototype.getCount();
|
|
|
+ List<ObjectNode> infos = queryPrototype.getData();
|
|
|
+ if (count == null || CollectionUtil.isEmpty(infos)) {
|
|
|
return;
|
|
|
}
|
|
|
- all.addAll(objectNodes);
|
|
|
- objectCriteria.setPage((objectCriteria.getPage() + 1));
|
|
|
- this.queryPageObjects(all, objectCriteria, groupCode, projectId);
|
|
|
+
|
|
|
+ all.addAll(infos);
|
|
|
+
|
|
|
+ if (count < 500) {
|
|
|
+ return;
|
|
|
+ } else if ((infos.size()*objectCriteria.getPage()) > count) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ objectCriteria.setPage((objectCriteria.getPage() + 1));
|
|
|
+ this.queryPageObjects(all, objectCriteria, groupCode, projectId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -846,13 +856,23 @@ public class RelationReportService implements IRelationReportService {
|
|
|
* @param projectId
|
|
|
*/
|
|
|
private void queryPageRelations(List<ObjectRelation> all, QueryCriteria queryCriteria, String groupCode, String projectId) {
|
|
|
- List<ObjectRelation> objectRelations = DigitalRelationFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
|
|
|
- if (CollectionUtil.isEmpty(objectRelations)) {
|
|
|
+ CommonResult<List<ObjectRelation>> queryPrototype = DigitalRelationFacade.queryPrototype(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
|
|
|
+ Long count = queryPrototype.getCount();
|
|
|
+ List<ObjectRelation> infos = queryPrototype.getData();
|
|
|
+ if (count == null || CollectionUtil.isEmpty(infos)) {
|
|
|
return;
|
|
|
}
|
|
|
- all.addAll(objectRelations);
|
|
|
- queryCriteria.setPage((queryCriteria.getPage() + 1));
|
|
|
- this.queryPageRelations(all, queryCriteria, groupCode, projectId);
|
|
|
+
|
|
|
+ all.addAll(infos);
|
|
|
+
|
|
|
+ if (count < 500) {
|
|
|
+ return;
|
|
|
+ } else if ((infos.size()*queryCriteria.getPage()) > count) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ queryCriteria.setPage((queryCriteria.getPage() + 1));
|
|
|
+ this.queryPageRelations(all, queryCriteria, groupCode, projectId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -867,13 +887,13 @@ public class RelationReportService implements IRelationReportService {
|
|
|
CommonResult<List<ObjectInfoDefine>> queryPrototype = DigitalObjectInfoFacade.queryPrototype(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
|
|
|
Long count = queryPrototype.getCount();
|
|
|
List<ObjectInfoDefine> infos = queryPrototype.getData();
|
|
|
- if (CollectionUtil.isEmpty(infos)) {
|
|
|
+ if (count == null || CollectionUtil.isEmpty(infos)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
all.addAll(infos);
|
|
|
|
|
|
- if (count == null || count < 500) {
|
|
|
+ if (count < 500) {
|
|
|
return;
|
|
|
} else if ((infos.size()*queryCriteria.getPage()) > count) {
|
|
|
return;
|