|
@@ -310,10 +310,6 @@ public class AdmRelCalController {
|
|
|
}
|
|
|
/***
|
|
|
* Description: 添加关系(图类型关系为ThroughRelationship)
|
|
|
- * @param relType : 关系类型
|
|
|
- * @param objectTypeStr : 参与计算的业务空间(为空表示所有业务空间类型),以英文逗号隔开 HeatingZone,CleanZone,
|
|
|
- * DomesticWaterSupplyZone,NetworkZone,TenantZone,AirConditioningZone,FunctionZone,
|
|
|
- * FireZone,SecurityZone,GeneralZone,PowerSupplyZone,LightingZone
|
|
|
* fl2fl:楼层贯通关系
|
|
|
* sh2sh:竖井贯通关系
|
|
|
* @return : com.persagy.proxy.adm.request.AdmCreateResponse
|
|
@@ -322,14 +318,17 @@ public class AdmRelCalController {
|
|
|
* Update By lijie 2021/8/31 12:10
|
|
|
*/
|
|
|
@PostMapping(value = {"fl2fl","sh2sh"})
|
|
|
- public AdmResponse throughRelationshipCalcRelation( @PathVariable("relType") String relType,
|
|
|
- @QueryParam("projectId") String projectId,
|
|
|
- @QueryParam("objectTypes") String objectTypeStr,
|
|
|
- @QueryParam("relationType") String relationTypeStr) throws Exception {
|
|
|
+ public AdmResponse throughRelationshipCalcRelation(@RequestParam("projectId") String projectId,
|
|
|
+ @RequestParam("groupCode") String groupCode,
|
|
|
+ @RequestParam("appId") String appId,
|
|
|
+ @RequestParam("userId") String userId,
|
|
|
+ HttpServletRequest request) throws Exception {
|
|
|
// 资产暂时未引入,直接返回成功
|
|
|
// 组装上下文条件
|
|
|
- InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
- // admRelCalService.calcRelation(context,relType,objectTypeStr,relationTypeStr);
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(StrUtil.isNotBlank(groupCode)?groupCode:this.groupCode,
|
|
|
+ null, projectId, StrUtil.isNotBlank(appId)?appId:AdmCommonConstant.APP_ID,
|
|
|
+ StrUtil.isNotBlank(userId)?userId:AdmCommonConstant.USER_ID);
|
|
|
+ admRelCalService.calcRelation(context,CollUtil.newArrayList(getAdmRelationTypeEnum(request)),null);
|
|
|
return AdmResponse.success(new ArrayList<>());
|
|
|
}
|
|
|
|
|
@@ -384,7 +383,7 @@ public class AdmRelCalController {
|
|
|
*/
|
|
|
private String getSuffixRequestUrl(HttpServletRequest request) {
|
|
|
String requestURI = request.getRequestURI();
|
|
|
- return requestURI.substring(requestURI.lastIndexOf("/"));
|
|
|
+ return requestURI.substring(requestURI.lastIndexOf("/")+1);
|
|
|
}
|
|
|
|
|
|
|