【地图删除操作,清理运行方向草稿数据】
This commit is contained in:
parent
1c10b6abcc
commit
cd66dc8056
@ -101,9 +101,6 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDraftMapStationDirectionService draftMapStationDirectionLabelService;
|
private IDraftMapStationDirectionService draftMapStationDirectionLabelService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DraftMapStationDirectionDAO draftMapStationDirectionDAO;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DraftMapVO> list(AccountVO accountVO) {
|
public List<DraftMapVO> list(AccountVO accountVO) {
|
||||||
DraftMapExample example = new DraftMapExample();
|
DraftMapExample example = new DraftMapExample();
|
||||||
@ -408,6 +405,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
dataExample.createCriteria().andMapIdEqualTo(id);
|
dataExample.createCriteria().andMapIdEqualTo(id);
|
||||||
draftMap3dDataDAO.deleteByExample(dataExample);
|
draftMap3dDataDAO.deleteByExample(dataExample);
|
||||||
draftMapDAO.deleteByPrimaryKey(id);
|
draftMapDAO.deleteByPrimaryKey(id);
|
||||||
|
draftMapStationDirectionLabelService.deleteDraftStationDirection(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -599,11 +597,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 车站 方向的逻辑数据数据
|
// 车站 方向的逻辑数据数据
|
||||||
if (!CollectionUtils.isEmpty(logicDataVO.getDraftMapStationDirectionList())) {
|
this.draftMapStationDirectionLabelService.insertList(logicDataVO.getDraftMapStationDirectionList(), id);
|
||||||
List<DraftMapStationDirection> stationDirectionList = logicDataVO.getDraftMapStationDirectionList();
|
|
||||||
stationDirectionList.forEach(stationDirection -> stationDirection.setMapId(id));
|
|
||||||
draftMapStationDirectionDAO.insertList(stationDirectionList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteMapLogicData(Long id) {
|
private void deleteMapLogicData(Long id) {
|
||||||
|
@ -75,4 +75,20 @@ public class DraftMapStationDirectionServiceImpl implements IDraftMapStationDire
|
|||||||
list.forEach(DraftMapStationDirection::generateSectionList);
|
list.forEach(DraftMapStationDirection::generateSectionList);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteDraftStationDirection(Long mapId) {
|
||||||
|
DraftMapStationDirectionExample draftMapStationDirectionExample = new DraftMapStationDirectionExample();
|
||||||
|
DraftMapStationDirectionExample.Criteria criteria = draftMapStationDirectionExample.createCriteria();
|
||||||
|
criteria.andMapIdEqualTo(mapId);
|
||||||
|
draftMapStationDirectionDAO.deleteByExample(draftMapStationDirectionExample);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertList(List<DraftMapStationDirection> stationDirectionList, Long mapId) {
|
||||||
|
if (!CollectionUtils.isEmpty(stationDirectionList)) {
|
||||||
|
stationDirectionList.forEach(stationDirection -> stationDirection.setMapId(mapId));
|
||||||
|
draftMapStationDirectionDAO.insertList(stationDirectionList);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,4 +51,19 @@ public interface IDraftMapStationDirectionService {
|
|||||||
* @return 关系列表
|
* @return 关系列表
|
||||||
*/
|
*/
|
||||||
List<DraftMapStationDirection> queryAllStationLabelByMapId(Long mapId);
|
List<DraftMapStationDirection> queryAllStationLabelByMapId(Long mapId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据地图ID删除车站运行方向的草稿数据
|
||||||
|
*
|
||||||
|
* @param mapId 地图ID
|
||||||
|
*/
|
||||||
|
void deleteDraftStationDirection(Long mapId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入运行方向逻辑数据
|
||||||
|
*
|
||||||
|
* @param stationDirectionList 逻辑数据列表
|
||||||
|
* @param mapId 地图ID
|
||||||
|
*/
|
||||||
|
void insertList(List<DraftMapStationDirection> stationDirectionList, Long mapId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user