feat: 图层逻辑优化
This commit is contained in:
parent
ef7048e9ff
commit
2494af0a4f
@ -49,6 +49,9 @@ public class MapLegendVo {
|
||||
@Schema(description = "是否默认勾选;0=否;1=是")
|
||||
private Integer checked;
|
||||
|
||||
@Schema(description = "0=否;1=是")
|
||||
private Integer enable;
|
||||
|
||||
@Schema(description = "是否可勾选;0=否;1=是")
|
||||
private Integer canBeChecked;
|
||||
|
||||
|
||||
@ -8,7 +8,11 @@ import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.common.exception.BizException;
|
||||
import com.yfd.platform.qgc_sys.mapLayer.domain.MsMaplegendB;
|
||||
import com.yfd.platform.qgc_sys.mapLayer.domain.MsMaplayerB;
|
||||
import com.yfd.platform.qgc_sys.mapLayer.domain.MsMapmoduleB;
|
||||
import com.yfd.platform.qgc_sys.mapLayer.mapper.MsMaplayerBMapper;
|
||||
import com.yfd.platform.qgc_sys.mapLayer.service.IMapLegendService;
|
||||
import com.yfd.platform.qgc_sys.mapcfg.service.IMapmoduleBService;
|
||||
import com.yfd.platform.qgc_sys.mapcfg.entity.MapmoduleVo;
|
||||
import com.yfd.platform.system.domain.SysMenu;
|
||||
@ -39,6 +43,11 @@ public class MapmoduleBController {
|
||||
@Resource
|
||||
private SysMenuMapper sysMenuMapper;
|
||||
|
||||
@Resource
|
||||
private IMapLegendService mapLegendService;
|
||||
|
||||
@Resource
|
||||
private MsMaplayerBMapper msMaplayerBMapper;
|
||||
/**
|
||||
* 条件过滤数据列表(Kendo UI 数据源)
|
||||
*/
|
||||
@ -136,6 +145,43 @@ public class MapmoduleBController {
|
||||
if (StrUtil.isBlank(mapmoduleB.getResId())) {
|
||||
throw new BizException("资源(resId)不能为空.");
|
||||
}
|
||||
|
||||
if ("legend".equals(mapmoduleB.getResType())) {
|
||||
MsMaplegendB maplegendB = mapLegendService.getById(mapmoduleB.getResId());
|
||||
if (maplegendB != null && StrUtil.isNotBlank(maplegendB.getLayerCode())) {
|
||||
LambdaQueryWrapper<MsMaplayerB> layerWrapper = new LambdaQueryWrapper<>();
|
||||
layerWrapper.eq(MsMaplayerB::getCode, maplegendB.getLayerCode());
|
||||
layerWrapper.eq(MsMaplayerB::getIsDeleted, 0);
|
||||
MsMaplayerB layer = msMaplayerBMapper.selectOne(layerWrapper);
|
||||
if (layer != null) {
|
||||
LambdaQueryWrapper<MsMapmoduleB> moduleWrapper = new LambdaQueryWrapper<>();
|
||||
moduleWrapper.eq(MsMapmoduleB::getModuleId, mapmoduleB.getModuleId());
|
||||
moduleWrapper.eq(MsMapmoduleB::getSystemId, mapmoduleB.getSystemId());
|
||||
moduleWrapper.eq(MsMapmoduleB::getResType, "layer");
|
||||
moduleWrapper.eq(MsMapmoduleB::getResId, layer.getId());
|
||||
moduleWrapper.eq(MsMapmoduleB::getIsDeleted, 0);
|
||||
MsMapmoduleB existingLayerModule = mapmoduleBService.getOne(moduleWrapper);
|
||||
|
||||
if (existingLayerModule == null) {
|
||||
MsMapmoduleB layerModule = new MsMapmoduleB();
|
||||
layerModule.setModuleId(mapmoduleB.getModuleId());
|
||||
layerModule.setSystemId(mapmoduleB.getSystemId());
|
||||
layerModule.setResType("layer");
|
||||
layerModule.setResId(layer.getId());
|
||||
layerModule.setChildNode(mapmoduleB.getChildNode());
|
||||
layerModule.setMultiSelect(mapmoduleB.getMultiSelect());
|
||||
layerModule.setCanBeChecked(mapmoduleB.getCanBeChecked());
|
||||
layerModule.setChecked(mapmoduleB.getChecked());
|
||||
layerModule.setDescription(mapmoduleB.getDescription());
|
||||
layerModule.setEnable(mapmoduleB.getEnable());
|
||||
layerModule.setOrderIndex(mapmoduleB.getOrderIndex());
|
||||
layerModule.setFilterContent(mapmoduleB.getFilterContent());
|
||||
mapmoduleBService.saveOrUpdate(layerModule);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ResponseResult.successData(mapmoduleBService.saveOrUpdate(mapmoduleB));
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,18 @@ spring:
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:localhost}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
timeout: 10000ms
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 2
|
||||
max-wait: 10000ms
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 300MB
|
||||
|
||||
@ -109,6 +109,18 @@ spring:
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:localhost}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
timeout: 10000ms
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 2
|
||||
max-wait: 10000ms
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 300MB
|
||||
|
||||
Loading…
Reference in New Issue
Block a user