分类性质标签、地域运营商作用域:融合自定义显示,添加排序,优化代码,
特定服务器管理:修正列表分页显示,条件查询,添加自定义显示,添加排序,新增修改页面添加表单校验, 协议ip配置:修正条件查询,添加自定义显示,添加排序,新增修改页面添加表单校验(ipV4\ipV6地址及掩码校验,端口校验)
This commit is contained in:
@@ -60,15 +60,24 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
searchType = "specServiceName";
|
||||
searchContent = specificServiceCfg.getSpecServiceName();
|
||||
}
|
||||
if(!StringUtils.isBlank(specificServiceCfg.getSpecServiceDesc())){
|
||||
searchType = "specServiceDesc";
|
||||
searchContent = specificServiceCfg.getSpecServiceDesc();
|
||||
}
|
||||
if(specificServiceCfg.getGroupId()!=null){
|
||||
searchType = "groupId";
|
||||
searchContent = specificServiceCfg.getGroupId().toString();
|
||||
}
|
||||
model.addAttribute("searchType", searchType);
|
||||
model.addAttribute("searchContent", searchContent);
|
||||
|
||||
|
||||
Page<SpecificServiceCfg> pageCondition = new Page<SpecificServiceCfg>(request, response);
|
||||
// 取出所有符合条件的数据
|
||||
List<SpecificServiceCfg> allList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg);
|
||||
List<SpecificServiceCfg> allList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,pageCondition.getOrderBy());
|
||||
model.addAttribute("showTotalCount", allList.size());
|
||||
// 取出所有符合条件的顶层分页
|
||||
Page<SpecificServiceCfg> page = specificServiceCfgService
|
||||
.findTopPage(new Page<SpecificServiceCfg>(request, response), specificServiceCfg);
|
||||
.findTopPage(pageCondition, specificServiceCfg);
|
||||
// 植入序号
|
||||
for (int i = 0; i < page.getList().size(); i++) {
|
||||
page.getList().get(i).setShowSequence("" + (i + 1 + ((page.getPageNo() - 1) * page.getPageSize())));
|
||||
@@ -83,12 +92,13 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
}
|
||||
for (int i = allList.size() - 1; i >= 0; i--) {
|
||||
SpecificServiceCfg ss = allList.get(i);
|
||||
if ((ss != null && intList.contains(ss.getSpecServiceId())) || (ss != null && ss.getSpecServiceId() == 0)) {
|
||||
if ((ss != null && intList.contains(ss.getSpecServiceId())) || (ss != null && ss.getParent().getSpecServiceId() == 0)) {
|
||||
allList.remove(ss);
|
||||
}
|
||||
}
|
||||
|
||||
allList.addAll(page.getList());
|
||||
|
||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||
SpecificServiceCfg.sortList(list, allList, 0, true);
|
||||
//处理下级序号
|
||||
@@ -192,11 +202,11 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
map2.put("name","根节点");
|
||||
//map2.put("placeholder","0");
|
||||
mapList.add(map2);
|
||||
List<SpecificServiceCfg> list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg());
|
||||
List<SpecificServiceCfg> list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(),"");
|
||||
for (int i=0; i<list.size(); i++){
|
||||
SpecificServiceCfg specificServiceCfg = list.get(i);
|
||||
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
|
||||
if(specificServiceCfg.getIsValid()==0){
|
||||
if(specificServiceCfg.getIsValid().equals(0)&&specificServiceCfg.getIsLeaf().equals(1)){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
@@ -218,10 +228,10 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "isIdRepeat")
|
||||
public boolean isIdRepeat(String specServiceId,String oldId){
|
||||
System.out.println(specServiceId +"--"+specServiceId);
|
||||
System.out.println(oldId.trim().equals(specServiceId));
|
||||
if(oldId.trim().equals(specServiceId)){
|
||||
return true;
|
||||
if(oldId!=null){
|
||||
if(oldId.trim().equals(specServiceId)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(specServiceId!=null){
|
||||
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
||||
@@ -269,7 +279,7 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
return true;
|
||||
}
|
||||
List<SpecificServiceCfg> list = specificServiceCfgService.getChildrenById(parent);
|
||||
if(list==null||list.size()>0){
|
||||
if(list==null||list.size()==0){
|
||||
return true;
|
||||
}else{
|
||||
if(newIsLeaf==0){
|
||||
|
||||
Reference in New Issue
Block a user