|
@@ -22,6 +22,7 @@ import com.persagy.dmp.digital.client.DigitalObjectFacade;
|
|
|
import com.persagy.dmp.digital.entity.ObjectRelation;
|
|
|
import com.persagy.dmp.simple.client.DigitalObjectSimpleFacade;
|
|
|
import com.persagy.proxy.adm.constant.AdmCommonConstant;
|
|
|
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
|
|
|
import com.persagy.proxy.adm.constant.GraphCodeEnum;
|
|
|
import com.persagy.proxy.adm.constant.RelCodeEnum;
|
|
|
import com.persagy.proxy.adm.request.AdmDCSQueryRequest;
|
|
@@ -32,16 +33,14 @@ import com.persagy.proxy.adm.service.impl.AbstractAdmBaseServiceImpl;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
|
import com.persagy.proxy.adm.utils.AdmEntityTransferUtil;
|
|
|
import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
|
|
|
+import com.persagy.proxy.calculation.service.AdmRelCalService;
|
|
|
import com.persagy.proxy.common.client.DmpRwdClient;
|
|
|
import com.persagy.proxy.common.entity.DmpResult;
|
|
|
import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
|
import com.persagy.proxy.common.entity.RelationDTO;
|
|
|
-import com.persagy.proxy.dictionary.model.AdmDict;
|
|
|
-import com.persagy.proxy.dictionary.model.AdmObjectType;
|
|
|
import com.persagy.proxy.object.model.AdmEquipment;
|
|
|
import com.persagy.proxy.object.model.AdmSpace;
|
|
|
import com.persagy.proxy.object.model.AdmSystem;
|
|
|
-import com.persagy.proxy.object.model.AdmSystemCategory;
|
|
|
import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
|
import com.persagy.proxy.object.service.IAdmSpaceService;
|
|
|
import com.persagy.proxy.object.service.IAdmSystemService;
|
|
@@ -75,6 +74,8 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
private IAdmSystemService systemService;
|
|
|
@Autowired
|
|
|
private IRelationReportService relationReportService;
|
|
|
+ @Autowired
|
|
|
+ private AdmRelCalService admRelCalService;
|
|
|
|
|
|
@Override
|
|
|
public AdmResponse doQuery(InstanceUrlParam context, AdmQueryCriteria request, Class<AdmSpace> clazz) {
|
|
@@ -101,8 +102,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
//添加绑定关系
|
|
|
processRelations(vosR);
|
|
|
//处理关系标记
|
|
|
- //TODO 处理关系标记
|
|
|
- //processRelationType();
|
|
|
+ processRelationType(vosR);
|
|
|
return vosR;
|
|
|
}
|
|
|
|
|
@@ -329,6 +329,38 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 更新轮廓线
|
|
|
+ * @param vos
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public AdmResponse updateOutLine(List<AdmSpace> vos) {
|
|
|
+ InstanceUrlParam context = AdmContextUtil.toDmpContext();
|
|
|
+ vos = super.doUpdate(context, AdmSpace.class, vos);
|
|
|
+ processRelationType(vos);
|
|
|
+ return AdmResponse.success(vos);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 触发关系计算
|
|
|
+ * @param vos
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void processRelationType(List<AdmSpace> vos) {
|
|
|
+ admRelCalService.calcRelation(AdmContextUtil.toDmpContext(),
|
|
|
+ CollUtil.newArrayList(
|
|
|
+ AdmRelationTypeEnum.SP2SP_SPACENEIGHBORHOOD_5,
|
|
|
+ AdmRelationTypeEnum.SP2SP_TRAFFICNETWORK_3,
|
|
|
+ AdmRelationTypeEnum.SP2SP_CONVECTIONNETWORK_1,
|
|
|
+ AdmRelationTypeEnum.SP2SP_RADIATIONNETWORK_1),null);
|
|
|
+
|
|
|
+ vos.forEach(admSpace -> {
|
|
|
+ admRelCalService.calcRelation(AdmContextUtil.toDmpContext(),
|
|
|
+ CollUtil.newArrayList(AdmRelationTypeEnum.EQ2SP_IN),admSpace.getClassCode());
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/***
|
|
|
* Description: 根据查询条件查询空间统计数据,定制接口,后续可优化口
|
|
|
* @param request : 请求参数
|