(1)复用类型Ip导入验证修复

(2)隧道类配置IP导入模板修改
(3)IP拦截配置导入模板修改
(4)IPSCIP配置导入验证逻辑修改,当action为drop的时候,输入50或者51,监测的时候为0
(5)IP拦截配置导入模板修改
This commit is contained in:
wangxin
2018-07-31 12:18:34 +08:00
parent 1a94c225bc
commit 8b3efbcfbf
14 changed files with 205 additions and 83 deletions

View File

@@ -676,7 +676,7 @@ public class BaseController {
params.put("searchCfgId", entry.getCfgId());
}
}
public void checkIpCfg(int functionId ,List<IpCfgTemplate> list) throws ServiceException{
public void checkIpCfg(int action,int functionId ,List<IpCfgTemplate> list) throws ServiceException{
Properties prop=this.getMsgProp();
List<SysDataDictionaryItem> ipTypeList = DictUtils.getDictList("IP_TYPE");
List<SysDataDictionaryItem> ipPatternList = DictUtils.getDictList("IP_PATTERN");
@@ -872,15 +872,21 @@ public class BaseController {
}else{
if(specialItem!=null&&("ipsec".equals(specialItem)||"tunnel".equals(specialItem))){
if("ipsec".equals(specialItem)){
boolean has=false;
for(SysDataDictionaryItem protocolItem:ipsecProrocolList){
if(Integer.parseInt(protocolItem.getItemCode())==protocol.intValue()){
has=true;
break;
if(action==Constants.DROP_ACTION.intValue()) {
boolean has=false;
for(SysDataDictionaryItem protocolItem:ipsecProrocolList){
if(Integer.parseInt(protocolItem.getItemCode())==protocol.intValue()){
has=true;
break;
}
}
if(!has){
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("protocol"))+";");
}
}else {
if(protocol!=0) {
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("protocol"))+";");
}
}
if(!has){
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("protocol"))+";");
}
}else if("tunnel".equals(specialItem)){
for(SysDataDictionaryItem protocolItem:tunnelProrocolList){
@@ -1001,7 +1007,7 @@ public class BaseController {
}else {
boolean has=false;
for(SysDataDictionaryItem irTypeItem:irTypeList){
if(Integer.parseInt(irTypeItem.getItemCode())==protocol.intValue()){
if(Integer.parseInt(irTypeItem.getItemCode())==irType.intValue()){
has=true;
break;
}