配置界面的Cfg Id检索条件 增加范围和in的检索方式的功能修改
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -24,7 +23,6 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.dao.configuration.IpMultiplexDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -39,29 +37,6 @@ public class IpMultiplexService extends BaseService{
|
||||
private IpMultiplexDao ipMultiplexDao;
|
||||
|
||||
public Page<IpReusePolicyCfg> findPage(Page<IpReusePolicyCfg> page, IpReusePolicyCfg entity) {
|
||||
//配置ID 查询条件 查询范围的处理
|
||||
String compileIdNew =entity.getCompileIdNew();
|
||||
if(!StringUtil.isEmpty(compileIdNew)){
|
||||
if(compileIdNew.indexOf("-")!=-1){//包含
|
||||
String[] split = compileIdNew.split("-");
|
||||
if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){
|
||||
entity.setCompileIdStart(Integer.parseInt(split[0]));
|
||||
entity.setCompileIdEnd(Integer.parseInt(split[1]));
|
||||
}else{
|
||||
entity.setCompileIdStart(Integer.parseInt(split[1]));
|
||||
entity.setCompileIdEnd(Integer.parseInt(split[0]));
|
||||
}
|
||||
}else if(compileIdNew.indexOf(",")!=-1){
|
||||
String[] split = compileIdNew.split(",");
|
||||
List<String> idList=new ArrayList<String>();
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
idList.add(split[i]);
|
||||
}
|
||||
entity.setCompileIdNewList(idList);
|
||||
}else{
|
||||
entity.setCompileId(Integer.parseInt(compileIdNew));
|
||||
}
|
||||
}
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<IpReusePolicyCfg> list=ipMultiplexDao.findPage(entity);
|
||||
@@ -308,29 +283,6 @@ public class IpMultiplexService extends BaseService{
|
||||
}
|
||||
|
||||
public Page<BaseIpCfg> findPageDnat(Page<BaseIpCfg> page, IpReuseDnatPolicyCfg entity) {
|
||||
//配置ID 查询条件 查询范围的处理
|
||||
String compileIdNew =entity.getCompileIdNew();
|
||||
if(!StringUtil.isEmpty(compileIdNew)){
|
||||
if(compileIdNew.indexOf("-")!=-1){//包含
|
||||
String[] split = compileIdNew.split("-");
|
||||
if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){
|
||||
entity.setCompileIdStart(Integer.parseInt(split[0]));
|
||||
entity.setCompileIdEnd(Integer.parseInt(split[1]));
|
||||
}else{
|
||||
entity.setCompileIdStart(Integer.parseInt(split[1]));
|
||||
entity.setCompileIdEnd(Integer.parseInt(split[0]));
|
||||
}
|
||||
}else if(compileIdNew.indexOf(",")!=-1){
|
||||
String[] split = compileIdNew.split(",");
|
||||
List<String> idList=new ArrayList<String>();
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
idList.add(split[i]);
|
||||
}
|
||||
entity.setCompileIdNewList(idList);
|
||||
}else{
|
||||
entity.setCompileId(Integer.parseInt(compileIdNew));
|
||||
}
|
||||
}
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<BaseIpCfg> list=ipMultiplexDao.findPageDnat(entity);
|
||||
|
||||
Reference in New Issue
Block a user