|
@@ -8,6 +8,7 @@ import api.common.pojo.param.scene.*;
|
|
|
import api.common.pojo.po.scene.*;
|
|
|
import api.common.pojo.po.system.SceneImportPO;
|
|
|
import api.common.util.*;
|
|
|
+import com.alibaba.druid.util.StringUtils;
|
|
|
import com.css.simulation.resource.server.infra.util.AuthUtil;
|
|
|
import com.css.simulation.resource.server.infra.feign.service.FileDownService;
|
|
|
import com.css.simulation.resource.server.infra.db.mysql.mapper.ScenePackageMapper;
|
|
@@ -328,6 +329,7 @@ public class SceneStandardsService {
|
|
|
MI.setObjectName(filePath);
|
|
|
List<String> listScene = fileDownService.listDeepOne(MI).getInfo();
|
|
|
log.info("importMinio() 共需要上传 " + listScene.size() + " 个标准法规场景");
|
|
|
+ String taskId = api.common.util.StringUtil.getRandomUUID();
|
|
|
for (String scenePath : listScene) {
|
|
|
try {
|
|
|
MI.setObjectName(scenePath);
|
|
@@ -414,6 +416,28 @@ public class SceneStandardsService {
|
|
|
});
|
|
|
}
|
|
|
successNum = successNum + 1;
|
|
|
+
|
|
|
+ // 计算复杂度
|
|
|
+ if (!StringUtils.isEmpty(parms.getSceneEvaluationRuleId())) {
|
|
|
+ String tempSceneId = scenes.get(0).getRegulationsId();
|
|
|
+ SceneEvaluationComputeParam sceneEvaluationComputeParam = new SceneEvaluationComputeParam();
|
|
|
+ sceneEvaluationComputeParam.setSceneId(isupdate.equals("0") ? tempSceneId : standardsRegulationsPO.getRegulationsId());
|
|
|
+ sceneEvaluationComputeParam.setSceneXOSCPath(standardsRegulationsPO.getXmlAddress());
|
|
|
+ sceneEvaluationComputeParam.setSceneXODRPath(standardsRegulationsPO.getXodrAddress());
|
|
|
+ sceneEvaluationComputeParam.setSceneType(DictConstants.SCENE_STANDARD);
|
|
|
+ sceneEvaluationComputeParam.setTaskId(taskId);
|
|
|
+ sceneEvaluationComputeParam.setComputeType(DictConstants.COMPLEXITY);
|
|
|
+ try {
|
|
|
+ boolean sceneEvaluationResult = sceneEvaluationRuleService.computeSceneReference(parms, sceneEvaluationComputeParam);
|
|
|
+ if (isupdate.equals("0") && sceneEvaluationResult) {
|
|
|
+ sceneEvaluationRuleService.copySceneComplexityResult(taskId, tempSceneId, scenes.stream().map(StandardsRegulationsPO::getRegulationsId).filter(sceneId -> !StringUtils.equals(tempSceneId, sceneId)).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("计算复杂度失败", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
errorMessage = e.getMessage();
|
|
|
e.printStackTrace();
|