|
@@ -191,8 +191,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
request.setRelationTo(relationTo);
|
|
|
}else if(StrUtil.isEmpty(request.getBuildingId()) && StrUtil.isEmpty(request.getFloorId())){
|
|
|
}
|
|
|
-
|
|
|
- AdmResponse response = doQuery(AdmContextUtil.toDmpContext(), request, AdmSpace.class);
|
|
|
+ AdmResponse response = query(request);
|
|
|
//空间需要补充分类名称属性
|
|
|
ensureSpecialValues(context, (List<AdmSpace>) response.getContent());
|
|
|
return response;
|
|
@@ -238,7 +237,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
AdmQueryCriteria request = new AdmQueryCriteria();
|
|
|
request.setName(AdmSpace.OBJ_TYPE);
|
|
|
request.resetRelationCond(false, "ArchSubset", "Sh2Sp", spaceType, shaftId, true);
|
|
|
- AdmResponse rs = doQuery(context, request, AdmSpace.class);
|
|
|
+ AdmResponse rs = query(request);
|
|
|
return (List<AdmSpace>) rs.getContent();
|
|
|
}
|
|
|
|
|
@@ -247,7 +246,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
AdmQueryCriteria request = new AdmQueryCriteria();
|
|
|
request.setName(AdmSpace.OBJ_TYPE);
|
|
|
request.resetRelationCond(false, "ArchSubset", "Bd2Sp", spaceType, buildingId, true);
|
|
|
- AdmResponse rs = doQuery(context, request, AdmSpace.class);
|
|
|
+ AdmResponse rs = query(request);
|
|
|
return (List<AdmSpace>) rs.getContent();
|
|
|
}
|
|
|
|
|
@@ -329,6 +328,48 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
spaceCriteria.setCascade(CollUtil.newArrayList(floorCriteria));
|
|
|
return super.doQuery(AdmContextUtil.toDmpContext(), spaceCriteria, AdmSpace.class);
|
|
|
}
|
|
|
+ /***
|
|
|
+ * Description: 根据查询条件查询空间统计数据
|
|
|
+ * @param request : 请求参数
|
|
|
+ * @return : com.persagy.proxy.adm.request.AdmResponse
|
|
|
+ * @author : lijie
|
|
|
+ * @date :2021/10/28 21:07
|
|
|
+ * Update By lijie 2021/10/28 21:07
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public AdmResponse query(AdmQueryCriteria request) {
|
|
|
+ InstanceUrlParam context = AdmContextUtil.toDmpContext();
|
|
|
+ AdmResponse response = super.doQuery(AdmContextUtil.toDmpContext(), request, AdmSpace.class);
|
|
|
+ // 系统需要补充分类名称属性
|
|
|
+ ensureSpecialValues(context, (List<AdmSpace>) response.getContent());
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ /***
|
|
|
+ * Description: 子类重写,以便处理带buildingId
|
|
|
+ * @param dmpRequest : 中台查询参数
|
|
|
+ * @return : void
|
|
|
+ * @author : lijie
|
|
|
+ * @date :2021/10/28 20:25
|
|
|
+ * Update By lijie 2021/10/28 20:25
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ protected void processDmpCriteria(QueryCriteria dmpRequest) {
|
|
|
+ ObjectNode criteria = dmpRequest.getCriteria();
|
|
|
+ if (null==criteria){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (criteria.has("floorId")){
|
|
|
+ // 有建筑id过滤
|
|
|
+ ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
|
|
|
+ ObjectNode relationTo = objectMapper.createObjectNode();
|
|
|
+ relationTo.put("graphCode", GraphCodeEnum.ArchSubset.name());
|
|
|
+ relationTo.put("relCode", RelCodeEnum.Fl2Sp.name());
|
|
|
+ relationTo.set("objFrom",criteria.get("floorId"));
|
|
|
+ criteria.set("relationTo",relationTo);
|
|
|
+ criteria.remove("floorId");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/***
|
|
|
* Description: 获得多建筑楼层下的空间的查询条件
|