Commit d1d684ee by 王力

Merge branch 'dev_layer0727' into 'develop'

修改

See merge request !290
2 parents 259641ea c2c9a063
......@@ -112,10 +112,22 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
@Override
public Result<?> businessServiceBlockAdd(String layerId, String teamId) throws BusinessException {
MapLayerCustomize layer = mapLayerCustomizeMPDao.getByLayerId(layerId);
if (layer == null) {
throw new BusinessException("图层标签不存在");
String layerName;
// 获取layerName
MapLayer layer1 = mapLayerMPDao.getByLayerId(layerId);
if(layer1 == null) {
MapLayerCustomize layer2 = mapLayerCustomizeMPDao.getByLayerId(layerId);
if (layer2 == null) {
throw new BusinessException("图层标签不存在");
} else {
layerName = layer2.getLayer();
}
} else {
layerName = layer1.getLayer();
}
OrgTeam team = orgTeamMPDao.getByTeamId(teamId);
if (team == null) {
throw new BusinessException("关联小队不存在");
......@@ -128,7 +140,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
block.setGroupId(team.getGroupId());
block.setTeamId(teamId);
block.setLayer(layerId);
block.setLayer(layer.getLayer());
block.setLayer(layerName);
block.setStatus(1);
mapBlockInfoMPDao.insert(block);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!