|
@@ -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;
|
|
@@ -47,6 +48,7 @@ import com.persagy.proxy.report.service.IRelationReportService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -101,7 +103,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
//添加绑定关系
|
|
|
processRelations(vosR);
|
|
|
//处理关系标记
|
|
|
- processRelationType(vosR);
|
|
|
+ SpringHelper.getBean(IAdmSpaceService.class).processRelationType(context,vosR);
|
|
|
return vosR;
|
|
|
}
|
|
|
|
|
@@ -337,7 +339,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
public AdmResponse updateOutLine(List<AdmSpace> vos) {
|
|
|
InstanceUrlParam context = AdmContextUtil.toDmpContext();
|
|
|
vos = super.doUpdate(context, AdmSpace.class, vos);
|
|
|
- processRelationType(vos);
|
|
|
+ SpringHelper.getBean(IAdmSpaceService.class).processRelationType(context,vos);
|
|
|
return AdmResponse.success(vos);
|
|
|
}
|
|
|
|
|
@@ -345,9 +347,10 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
* 触发关系计算
|
|
|
* @param vos
|
|
|
*/
|
|
|
+ @Async
|
|
|
@Override
|
|
|
- public void processRelationType(List<AdmSpace> vos) {
|
|
|
- /* admRelCalService.calcRelation(AdmContextUtil.toDmpContext(),
|
|
|
+ public void processRelationType(InstanceUrlParam context,List<AdmSpace> vos) {
|
|
|
+ admRelCalService.calcRelation(context,
|
|
|
CollUtil.newArrayList(
|
|
|
AdmRelationTypeEnum.SP2SP_SPACENEIGHBORHOOD_5,
|
|
|
AdmRelationTypeEnum.SP2SP_TRAFFICNETWORK_3,
|
|
@@ -355,9 +358,9 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
|
|
|
AdmRelationTypeEnum.SP2SP_RADIATIONNETWORK_1),null);
|
|
|
|
|
|
vos.forEach(admSpace -> {
|
|
|
- admRelCalService.calcRelation(AdmContextUtil.toDmpContext(),
|
|
|
+ admRelCalService.calcRelation(context,
|
|
|
CollUtil.newArrayList(AdmRelationTypeEnum.EQ2SP_IN),admSpace.getClassCode());
|
|
|
- });*/
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/***
|