【生成实训删除组织筛选】

This commit is contained in:
weizhihong 2023-04-13 18:28:16 +08:00
parent 2de8ff955b
commit 81cfda9d20
2 changed files with 0 additions and 11 deletions

View File

@ -235,7 +235,6 @@ public class Training2RuleService {
mapRuleIdMap.forEach((k, v) -> {
// 地图信息
MapInfo mapInfo = mapInfoDAO.selectByPrimaryKey(k);
String projectCode = StringUtils.isEmpty(mapInfo.getProjectCode()) ? Project.DEFAULT.name() : mapInfo.getProjectCode();
// 规则列表
RtsTraining2RuleExample rtsTraining2RuleExample = new RtsTraining2RuleExample();
rtsTraining2RuleExample.createCriteria().andIdIn(v).andLineCodeEqualTo(mapInfo.getLineCode());
@ -254,10 +253,6 @@ public class Training2RuleService {
List<Long> delTrainingIdList = publishedTraining2DAO.selectTrainingIdByRuleNameAndMapId(ruleNameMapList, k);
try {
Simulation simulation = simulationService.createSimulationPojo(entities.get(0).getId(), loginUserInfoVO, false);
if (!Objects.equals(projectCode, simulation.getProjectVO().getValue())) {
ProjectVO projectVO = projectService.queryLoginProjectByCode(mapInfo.getProjectCode()); // 纠正仿真的默认项目信息
simulation.setProjectVO(projectVO);
}
errorMsgList.addAll(generateTraining(simulation, ruleList, delTrainingIdList, delPublishTrainingByIds));
} catch (Exception e) {
log.error("创建仿真失败", e);
@ -284,11 +279,6 @@ public class Training2RuleService {
if (!CollectionUtils.isEmpty(entities) && !CollectionUtils.isEmpty(lineCodeRuleMap.get(mapInfo.getLineCode()))) {
try {
Simulation simulation = simulationService.createSimulationPojo(entities.get(0).getId(), loginUserInfoVO, false);
String projectCode = StringUtils.isEmpty(mapInfo.getProjectCode()) ? Project.DEFAULT.name() : mapInfo.getProjectCode();
if (!Objects.equals(projectCode, simulation.getProjectVO().getValue())) {
ProjectVO projectVO = projectService.queryLoginProjectByCode(mapInfo.getProjectCode()); // 纠正仿真的默认项目信息
simulation.setProjectVO(projectVO);
}
if (CollectionUtils.isEmpty(deleteTrainingIdMap)) {
errorMsgList.addAll(generateTraining(simulation, lineCodeRuleMap.get(mapInfo.getLineCode()), null, delPublishTrainingByMapId));
} else {

View File

@ -110,7 +110,6 @@ public class Training2Rule {
if (name != null) {
copyTraining2.setName(PropertyValueRule.resolveContentFormat(name, simulation, mapElement));
}
copyTraining2.setOrgId(simulation.getProjectVO().getDefaultOrg());
if (locationRule != null) {
copyTraining2.setMapLocationJson(locationRule.doHandle(simulation, mapElement));
}