|
@@ -9,6 +9,7 @@ import com.persagy.dmp.digital.client.DigitalObjectClient;
|
|
|
import com.persagy.dmp.digital.client.DigitalRelationCaclClient;
|
|
|
import com.persagy.dmp.digital.entity.ObjectDigital;
|
|
|
import com.persagy.dmp.digital.entity.ObjectRelation;
|
|
|
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
|
|
|
import com.persagy.proxy.adm.constant.AdmObjectInfoConstant;
|
|
|
import com.persagy.proxy.adm.constant.BusinessErrorRwdCode;
|
|
|
import com.persagy.proxy.calculation.model.AdmManualRelCalRequest;
|
|
@@ -80,11 +81,11 @@ public class AdmManualRelCalServiceImpl implements AdmManualRelCalService {
|
|
|
// sh2bd_ArchForArch,sh2fl_ArchForArch,sh2sh_ArchForArch,sh2sp_ArchForArch,sp2bd_ArchForArch,sp2fl_ArchForArch,
|
|
|
// sp2sh_ArchForArch,sp2sp_ArchForArch
|
|
|
// 校验关系类型是否存在
|
|
|
- Map<String, AdmRelationTypeEnum> relationTypeMap = AdmRelationTypeEnum.getRelationTypeMap();
|
|
|
- if (relationTypeMap.containsKey(request.getRelType())){
|
|
|
+ Map<String, AdmRelationTypeEnum> relationTypeMap = AdmCommonConstant.RELATION_TYPE_MAP;
|
|
|
+ AdmRelationTypeEnum relationTypeEnum = relationTypeMap.get(request.getRelType());
|
|
|
+ if (relationTypeEnum == null){
|
|
|
return AdmCreateResponse.failure("不存在的关系类型");
|
|
|
}
|
|
|
- AdmRelationTypeEnum relationTypeEnum = relationTypeMap.get(request.getRelType());
|
|
|
// type为cadId直接提示从对象不存在CADID编码并且errorType=2
|
|
|
if (AdmObjectInfoConstant.CADID.equals(request.getType()) && relationTypeEnum.getHasCheckCadId()){
|
|
|
return AdmCreateResponse.failure("从对象不存在CADID编码","2");
|