(1)修复特定服务新增时无法选择上级节点的bug
(2)特定服务加入验证,当前节点的配置类型应当与上级配置一致
This commit is contained in:
@@ -129,6 +129,10 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
SpecificServiceCfg parent = new SpecificServiceCfg();
|
||||
parent.setSpecServiceId(0);
|
||||
specificServiceCfg.setParent(parent);
|
||||
specificServiceCfg.setParentType(0);
|
||||
}
|
||||
if(specificServiceCfg!=null&&specificServiceCfg.getParent().getSpecServiceId()!=null){//获取父配置的id
|
||||
specificServiceCfg.setParentType(specificServiceCfgService.getParentType(specificServiceCfg.getParent().getSpecServiceId()));
|
||||
}
|
||||
model.addAttribute("specificServiceCfg", specificServiceCfg);
|
||||
if (doAction != null && doAction.equals("0")) {
|
||||
@@ -195,6 +199,7 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
Map<String, Object> map2 = Maps.newHashMap();
|
||||
map2.put("id", 0);
|
||||
map2.put("pId", 0);
|
||||
map2.put("type",0);
|
||||
map2.put("name","root_node");
|
||||
//map2.put("placeholder","0");
|
||||
mapList.add(map2);
|
||||
@@ -203,13 +208,15 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
SpecificServiceCfg specificServiceCfg = list.get(i);
|
||||
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
|
||||
if(specificServiceCfg.getIsValid().equals(0)||
|
||||
(!isLeafShow && specificServiceCfg.getIsLeaf().equals(1))||specificServiceCfg.getCfgType().intValue()!=cfgType){
|
||||
(!isLeafShow && specificServiceCfg.getIsLeaf().equals(1))||
|
||||
(cfgType.intValue()!=0&&specificServiceCfg.getCfgType().intValue()!=cfgType)){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
map.put("id", specificServiceCfg.getSpecServiceId());
|
||||
map.put("pId", specificServiceCfg.getParent().getSpecServiceId());
|
||||
map.put("name",specificServiceCfg.getSpecServiceName());
|
||||
map.put("type",specificServiceCfg.getCfgType());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
@@ -230,6 +237,7 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
map.put("code", specificServiceCfg.getSpecServiceCode());
|
||||
map.put("pId", specificServiceCfg.getParent().getSpecServiceId());
|
||||
map.put("name",specificServiceCfg.getSpecServiceName());
|
||||
map.put("type",specificServiceCfg.getCfgType());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user