|
@@ -1,18 +1,18 @@
|
|
package com.persagy.proxy.adm.controller;
|
|
package com.persagy.proxy.adm.controller;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
+import com.persagy.dmp.common.exception.BusinessException;
|
|
import com.persagy.proxy.adm.constant.AdmCommonConstant;
|
|
import com.persagy.proxy.adm.constant.AdmCommonConstant;
|
|
-import com.persagy.proxy.adm.model.AdmMepSourceTypeEntity;
|
|
|
|
-import com.persagy.proxy.adm.request.AdmCreateRequest;
|
|
|
|
|
|
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
|
|
|
|
+import com.persagy.proxy.adm.constant.BusinessErrorRwdCode;
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
import com.persagy.proxy.adm.service.AdmCalcSpecialService;
|
|
import com.persagy.proxy.adm.service.AdmCalcSpecialService;
|
|
-import com.persagy.proxy.adm.service.AdmMepSystemCalcService;
|
|
|
|
import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import javax.ws.rs.QueryParam;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/***
|
|
/***
|
|
* Description: 机电管网系统关系计算
|
|
* Description: 机电管网系统关系计算
|
|
@@ -49,7 +49,11 @@ public class AdmCalcSpecialController {
|
|
InstanceUrlParam context = new InstanceUrlParam(StrUtil.isNotBlank(groupCode)?groupCode:this.groupCode,
|
|
InstanceUrlParam context = new InstanceUrlParam(StrUtil.isNotBlank(groupCode)?groupCode:this.groupCode,
|
|
null, projectId, StrUtil.isNotBlank(appId)?appId:AdmCommonConstant.APP_ID,
|
|
null, projectId, StrUtil.isNotBlank(appId)?appId:AdmCommonConstant.APP_ID,
|
|
StrUtil.isNotBlank(userId)?userId:AdmCommonConstant.USER_ID);
|
|
StrUtil.isNotBlank(userId)?userId:AdmCommonConstant.USER_ID);
|
|
- return admCalcSpecialService.sysBolck(context, relationType);
|
|
|
|
|
|
+ Map<String, AdmRelationTypeEnum> relationTypeMap = AdmRelationTypeEnum.getRelationTypeMap();
|
|
|
|
+ if (!relationTypeMap.containsKey(relationType)){
|
|
|
|
+ throw new BusinessException(BusinessErrorRwdCode.A7201.getCode(),BusinessErrorRwdCode.A7201.getDesc());
|
|
|
|
+ }
|
|
|
|
+ return admCalcSpecialService.sysBlock(context, relationTypeMap.get(relationType));
|
|
}
|
|
}
|
|
/***
|
|
/***
|
|
* Description: 管网计算
|
|
* Description: 管网计算
|