沿程配置表代码提交,修改了图例数据管理删除菜单的时候也删除图层菜单
This commit is contained in:
parent
09b02e791e
commit
e1072ac2e8
@ -99,4 +99,10 @@ public class SdHbrvDic implements Serializable {
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deleteTime;
|
||||
|
||||
/**
|
||||
* 基地名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String basename;
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.yfd.platform.qgc_base.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.qgc_base.domain.SdHbrvDic;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -27,4 +29,16 @@ public interface SdHbrvDicMapper extends BaseMapper<SdHbrvDic> {
|
||||
* 查询所有启用的流域
|
||||
*/
|
||||
List<SdHbrvDic> selectEnabledList();
|
||||
|
||||
@Select("SELECT\n" +
|
||||
" shd.*,\n" +
|
||||
" sh.BASENAME\n" +
|
||||
"FROM\n" +
|
||||
" SD_HBRV_DIC shd\n" +
|
||||
" LEFT JOIN SD_HYDROBASE sh ON sh.BASEID = shd.BASEID\n" +
|
||||
"WHERE\n" +
|
||||
" 1 = 1 \n" +
|
||||
" AND shd.IS_DELETED = 0 \n" +
|
||||
" AND sh.IS_DELETED = 0")
|
||||
List<SdHbrvDic> getWbsbList(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
@ -62,4 +62,5 @@ public interface ISdHbrvDicService extends IService<SdHbrvDic> {
|
||||
|
||||
List<HbrvWbsVo> getHbrvdList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
List<SdHbrvDic> getWbsbList(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
|
||||
@ -52,6 +52,7 @@ public class SdHbrvDicServiceImpl extends ServiceImpl<SdHbrvDicMapper, SdHbrvDic
|
||||
@Resource
|
||||
private IAdminAuthService adminAuthService;
|
||||
|
||||
@Resource
|
||||
private SdHbrvDicMapper hbrvDicMapper;
|
||||
|
||||
|
||||
@ -294,4 +295,10 @@ public class SdHbrvDicServiceImpl extends ServiceImpl<SdHbrvDicMapper, SdHbrvDic
|
||||
vo.setBaseName(baseName);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SdHbrvDic> getWbsbList(DataSourceRequest dataSourceRequest) {
|
||||
List<SdHbrvDic> sdHbrvDics = hbrvDicMapper.getWbsbList(dataSourceRequest);
|
||||
return sdHbrvDics;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,11 @@ import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.common.exception.BizException;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_base.service.ISdHbrvDicService;
|
||||
import com.yfd.platform.qgc_env.wt.service.SdWtMonitorService;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongB;
|
||||
import com.yfd.platform.qgc_lygk.along.service.IMsAlongBService;
|
||||
import com.yfd.platform.qgc_sys.mapcfg.service.IMapmoduleBService;
|
||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -32,6 +35,12 @@ public class MsAlongBController {
|
||||
|
||||
@Resource
|
||||
private IMsAlongBService msAlongBService;
|
||||
|
||||
@Resource
|
||||
private SdWtMonitorService sdWtMonitorService;
|
||||
|
||||
@Resource
|
||||
private ISdHbrvDicService hbrvDicService;
|
||||
/**
|
||||
* 条件过滤数据列表
|
||||
*/
|
||||
@ -61,10 +70,16 @@ public class MsAlongBController {
|
||||
return ResponseResult.success("保存成功.");
|
||||
}
|
||||
|
||||
// @Operation(summary = "沿程配置删除")
|
||||
// @PostMapping("/delete")
|
||||
// public ResponseResult deleteData(@RequestBody List<String> ids) {
|
||||
// mapmoduleBService.delelteByIds(ids);
|
||||
// return ResponseResult.success("删除成功.");
|
||||
// }
|
||||
@PostMapping("/wbsb/GetKendoList")
|
||||
@Operation(summary = "查询水电基地流域字典列表")
|
||||
public ResponseResult getWbsbList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(hbrvDicService.getWbsbList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@Operation(summary = "沿程配置删除")
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult deleteData(@RequestBody List<String> ids) {
|
||||
msAlongBService.delelteByIds(ids);
|
||||
return ResponseResult.success("删除成功.");
|
||||
}
|
||||
}
|
||||
@ -51,4 +51,14 @@ public class MsAlongDetBController {
|
||||
msAlongDetBService.saveOrUpdate(msAlongDetB);
|
||||
return ResponseResult.success("保存成功.");
|
||||
}
|
||||
|
||||
/**
|
||||
* 条件过滤数据列表定制
|
||||
*/
|
||||
@Operation(summary = "条件过滤数据列表定制")
|
||||
@PostMapping("/GetKendoListCust")
|
||||
public ResponseResult getKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<MsAlongDetB> result = msAlongDetBService.getKendoList(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,8 @@ import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongB;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 沿程配置表 Service 接口
|
||||
*
|
||||
@ -19,6 +21,8 @@ public interface IMsAlongBService extends IService<MsAlongB> {
|
||||
*/
|
||||
DataSourceResult<MsAlongB> getKendoList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
void delelteByIds(List<String> ids);
|
||||
|
||||
// /**
|
||||
// * 保存或更新沿程配置
|
||||
// *
|
||||
|
||||
@ -13,6 +13,7 @@ import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -52,6 +53,13 @@ public class MsAlongBServiceImpl extends ServiceImpl<MsAlongBMapper, MsAlongB> i
|
||||
return dataSourceResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delelteByIds(List<String> ids) {
|
||||
for (String id : ids) {
|
||||
this.delelteByIds(Collections.singletonList(id));
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean saveOrUpdate(MsAlongB msAlongB) {
|
||||
// super.saveOrUpdate(msAlongB);
|
||||
|
||||
@ -109,6 +109,27 @@ public interface MsMapmoduleBMapper extends BaseMapper<MsMapmoduleB> {
|
||||
+ "</choose>"
|
||||
+ "ORDER BY BMM.ORDER_INDEX, BML.ORDER_INDEX"
|
||||
+ "</script>")
|
||||
List<MapLegendVo> getModuleMapLegendList(@Param("moduleId") String moduleId);
|
||||
List<MapLegendVo> getModuleMapLegendListData(@Param("moduleId") String moduleId);
|
||||
|
||||
@Select("SELECT *\n" +
|
||||
"FROM MS_MAPMODULE_B\n" +
|
||||
"WHERE MODULE_ID = (\n" +
|
||||
" SELECT msdmb.MODULE_ID\n" +
|
||||
" FROM MS_MAPMODULE_B msdmb\n" +
|
||||
" LEFT JOIN MS_MAPLEGEND_B mslmb ON msdmb.RES_ID = mslmb.ID\n" +
|
||||
" LEFT JOIN MS_MAPLAYER_B msmab ON msmab.CODE = mslmb.LAYER_CODE\n" +
|
||||
" WHERE msdmb.ID = #{id}\n" +
|
||||
" AND msdmb.IS_DELETED = 0\n" +
|
||||
")\n" +
|
||||
"AND RES_TYPE = 'layer'\n" +
|
||||
"AND RES_ID = (\n" +
|
||||
" SELECT msmab.id\n" +
|
||||
" FROM MS_MAPMODULE_B msdmb\n" +
|
||||
" LEFT JOIN MS_MAPLEGEND_B mslmb ON msdmb.RES_ID = mslmb.ID\n" +
|
||||
" LEFT JOIN MS_MAPLAYER_B msmab ON msmab.CODE = mslmb.LAYER_CODE\n" +
|
||||
" WHERE msdmb.ID = #{id}\n" +
|
||||
" AND msdmb.IS_DELETED = 0\n" +
|
||||
")\n" +
|
||||
"AND IS_DELETED = 0")
|
||||
MsMapmoduleB selectLayerById(@Param("id") String id);
|
||||
}
|
||||
@ -148,7 +148,7 @@ public class MapLegendBizServiceImpl implements IMapLegendBizService {
|
||||
public List<MapLegendVo> getModuleMapLegendList(String moduleId) {
|
||||
List<MapLegendVo> list = new ArrayList<>();
|
||||
// 通过 JOIN 查询 MS_MAPLEGEND_B 和 MS_MAPMODULE_B(单参数版本)
|
||||
List<MapLegendVo> bbiMapLegendList = msMapmoduleBMapper.getModuleMapLegendList(moduleId);
|
||||
List<MapLegendVo> bbiMapLegendList = msMapmoduleBMapper.getModuleMapLegendListData(moduleId);
|
||||
|
||||
if (bbiMapLegendList == null || bbiMapLegendList.isEmpty()) {
|
||||
return list;
|
||||
|
||||
@ -59,10 +59,12 @@ public class MapmoduleBServiceImpl extends ServiceImpl<MsMapmoduleBMapper, MsMap
|
||||
|
||||
@Override
|
||||
public void delelteByIds(List<String> ids) {
|
||||
if (ids != null) {
|
||||
for (String id : ids) {
|
||||
this.baseMapper.deleteById(id);
|
||||
MsMapmoduleB msMapmoduleB = baseMapper.selectLayerById(id);
|
||||
if (msMapmoduleB != null && msMapmoduleB.getId() != null){
|
||||
this.baseMapper.deleteById(msMapmoduleB.getId());
|
||||
}
|
||||
this.baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user