(1)ip,字符串,增强字符串mapper.xml里的get方法删除多余参数,只保留cfgId以及compileId。

(2)系统字典表更新方法查询多域增强字符串配置的匹配区域。mysql这里查询好像自动大小写忽略,待测试。
(3)多域界面提交。界面展示采用查一张主表再查其他表的方式展示,非所有表都有的字段只能查主表的,这里界面查询条件已做限制;另外表单提交未做验证;多个同类型(字符串,增强字符串)的表现在界面无法区分,后面会将界面展示意义不明的字段调整展示名称。
This commit is contained in:
wangxin
2018-03-29 14:56:27 +08:00
parent c0e0dd3b7a
commit 3d5f9d6878
21 changed files with 1894 additions and 448 deletions

View File

@@ -22,6 +22,7 @@ import com.nis.domain.BaseEntity;
* @version V1.0
*/
public class BaseCfg<T> extends BaseEntity<T> {
protected String showName;//表在界面上展示的名称
protected String seltype;//选中类型,页面搜索用
protected String tableName;
/**
@@ -663,5 +664,4 @@ public class BaseCfg<T> extends BaseEntity<T> {
public void setCompileId(Integer compileId) {
this.compileId = compileId;
}
}

View File

@@ -24,7 +24,6 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
*
* @since 1.0.0
*/
private static final long serialVersionUID = -1939538118388300002L;
/**
* ip类型

View File

@@ -33,6 +33,7 @@ public class BaseStringCfg extends BaseCfg<BaseStringCfg> {
@Expose
@SerializedName("keywords")
protected String cfgKeywords;
protected String cfgKeywordsShowName;
/**
* cfgKeywords
* @return cfgKeywords
@@ -116,5 +117,19 @@ public class BaseStringCfg extends BaseCfg<BaseStringCfg> {
super.initDefaultValue();
this.isHexbin = 0;
}
/**
* cfgKeywordsShowName
* @return cfgKeywordsShowName
*/
public String getCfgKeywordsShowName() {
return cfgKeywordsShowName;
}
/**
* @param cfgKeywordsShowName the cfgKeywordsShowName to set
*/
public void setCfgKeywordsShowName(String cfgKeywordsShowName) {
this.cfgKeywordsShowName = cfgKeywordsShowName;
}
}

View File

@@ -8,6 +8,8 @@
*/
package com.nis.domain.configuration;
import org.apache.commons.lang3.StringUtils;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

View File

@@ -0,0 +1,104 @@
/**
*@Title: ToMaatResult.java
*@Package com.nis.domain.maat
*@Description TODO
*@author dell
*@date 2018年3月27日 下午5:10:01
*@version 版本号
*/
package com.nis.domain.maat;
import java.io.Serializable;
/**
* @ClassName: ToMaatResult.java
* @Description: TODO
* @author (dell)
* @date 2018年3月27日 下午5:10:01
* @version V1.0
*/
public class ToMaatResult implements Serializable{
/**
* @Fields serialVersionUID:TODO用一句话描述这个变量表示什么
*
* @since 1.0.0
*/
private static final long serialVersionUID = 4244178887886507606L;
private Integer status;
private Integer businessCode;
private String reason;
private String msg;
private String fromuri;
/**
* status
* @return status
*/
public Integer getStatus() {
return status;
}
/**
* @param status the status to set
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* businessCode
* @return businessCode
*/
public Integer getBusinessCode() {
return businessCode;
}
/**
* @param businessCode the businessCode to set
*/
public void setBusinessCode(Integer businessCode) {
this.businessCode = businessCode;
}
/**
* reason
* @return reason
*/
public String getReason() {
return reason;
}
/**
* @param reason the reason to set
*/
public void setReason(String reason) {
this.reason = reason;
}
/**
* msg
* @return msg
*/
public String getMsg() {
return msg;
}
/**
* @param msg the msg to set
*/
public void setMsg(String msg) {
this.msg = msg;
}
/**
* fromuri
* @return fromuri
*/
public String getFromuri() {
return fromuri;
}
/**
* @param fromuri the fromuri to set
*/
public void setFromuri(String fromuri) {
this.fromuri = fromuri;
}
}

View File

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import com.nis.domain.Page;
import com.nis.domain.ServiceConfigInfo;
import com.nis.domain.basics.ServiceDictInfo;
import com.nis.domain.basics.SysDictInfo;
import com.nis.domain.configuration.BaseCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.BaseStringCfg;
@@ -85,18 +86,18 @@ public class MultipleCfgController extends BaseController{
List<ServiceConfigInfo> serviceConfigInfos=serviceConfigInfoService.findList(serviceId);
List<MultipleCfg> resultList=new ArrayList<MultipleCfg>();
resultPage.setList(resultList);
List<? extends BaseCfg> mainList=null;
//查询主表将主表中的数据set到结果中
for(ServiceConfigInfo info:serviceConfigInfos){
int type=info.getTableType();
String tableName=info.getTableName();
if(mainTable.equals(tableName)){
model.addAttribute("mainTableType", String.valueOf(info.getTableType()));
cfg.setMainTableType(String.valueOf(type));
if(Constants.TABLE_TYPE_COMPLEX==type){//增强字符串类型
ComplexkeywordCfg _cfg=cfg.getComplexCfg()==null?new ComplexkeywordCfg():cfg.getComplexCfg();
_cfg.setTableName(mainTable);
this.setProperties(cfg, null, null, null, _cfg);
this.setProperties(cfg,_cfg);
Page<ComplexkeywordCfg> mainPage=complexStringCfgService.findPage(new Page<ComplexkeywordCfg>(request,response,"r"), _cfg);
setPageProps(mainPage,resultPage);
mainList=mainPage.getList();//主表结果
@@ -120,7 +121,7 @@ public class MultipleCfgController extends BaseController{
}else if(Constants.TABLE_TYPE_STRING==type){//字符串类型
BaseStringCfg _cfg=cfg.getStringCfg()==null?new BaseStringCfg():cfg.getStringCfg();
_cfg.setTableName(mainTable);
this.setProperties(cfg, null, _cfg, null,null);
this.setProperties(cfg,_cfg);
Page<BaseStringCfg> mainPage=stringCfgService.findPage(new Page<BaseStringCfg>(request,response,"r"), _cfg);
mainList=mainPage.getList();//主表结果
setPageProps(mainPage,resultPage);
@@ -143,7 +144,7 @@ public class MultipleCfgController extends BaseController{
}else if(Constants.TABLE_TYPE_IP==type){//字符串类型
BaseIpCfg _cfg=cfg.getIpCfg()==null?new BaseIpCfg():cfg.getIpCfg();
_cfg.setTableName(mainTable);
this.setProperties(cfg, _cfg,null,null,null);
this.setProperties(cfg, _cfg);
Page<BaseIpCfg> mainPage=ipCfgService.findPage(new Page<BaseIpCfg>(request,response,"r"), _cfg);
mainList=mainPage.getList();//主表结果
setPageProps(mainPage,resultPage);
@@ -166,7 +167,7 @@ public class MultipleCfgController extends BaseController{
}else if(Constants.TABLE_TYPE_NUMBER==type){
NumBoundaryCfg _cfg=cfg.getNumCfg()==null?new NumBoundaryCfg():cfg.getNumCfg();
_cfg.setTableName(mainTable);
this.setProperties(cfg, null,null,_cfg,null);
this.setProperties(cfg,_cfg);
Page<NumBoundaryCfg> mainPage=numCfgService.findPage(new Page<NumBoundaryCfg>(request,response,"r"), _cfg);
mainList=mainPage.getList();//主表结果
setPageProps(mainPage,resultPage);
@@ -214,7 +215,7 @@ public class MultipleCfgController extends BaseController{
if(Constants.TABLE_TYPE_COMPLEX==type){//增强字符串类型
ComplexkeywordCfg _cfg=cfg.getComplexCfg()==null?new ComplexkeywordCfg():cfg.getComplexCfg();
_cfg.setTableName(info.getTableName());
this.setProperties(cfg, null, null, null, _cfg);
this.setProperties(cfg,_cfg);
List<ComplexkeywordCfg> list=complexStringCfgService
.findPage(page, _cfg)
.getList();
@@ -246,7 +247,7 @@ public class MultipleCfgController extends BaseController{
}else if(Constants.TABLE_TYPE_STRING==type){//字符串类型
BaseStringCfg _cfg=cfg.getStringCfg()==null?new BaseStringCfg():cfg.getStringCfg();
_cfg.setTableName(info.getTableName());
this.setProperties(cfg, null, _cfg, null,null);
this.setProperties(cfg,_cfg);
List<BaseStringCfg> list=stringCfgService
.findPage(page, _cfg)
.getList();
@@ -279,7 +280,7 @@ public class MultipleCfgController extends BaseController{
tableBean.setCanEmpty(true);
BaseIpCfg _cfg=cfg.getIpCfg()==null?new BaseIpCfg():cfg.getIpCfg();
_cfg.setTableName(info.getTableName());
this.setProperties(cfg, _cfg,null,null,null);
this.setProperties(cfg, _cfg);
List<BaseIpCfg> list=ipCfgService
.findPage(page, _cfg)
.getList();
@@ -311,7 +312,7 @@ public class MultipleCfgController extends BaseController{
}else if(Constants.TABLE_TYPE_NUMBER==type){
NumBoundaryCfg _cfg=cfg.getNumCfg()==null?new NumBoundaryCfg():cfg.getNumCfg();
_cfg.setTableName(info.getTableName());
this.setProperties(cfg, null,null,_cfg,null);
this.setProperties(cfg,_cfg);
List<NumBoundaryCfg> list=numCfgService
.findPage(page, _cfg)
.getList();
@@ -435,7 +436,8 @@ public class MultipleCfgController extends BaseController{
Map<String,ComplexkeywordCfg> map=cfg.getComplexCfg();
map.put(tableName,complexCfg);
}
List<SysDictInfo> districts=sysDictInfoService.getDistrictDict(tableName);
model.addAttribute("districts", districts);
}
}
cfg.setAction(action);
@@ -501,6 +503,21 @@ public class MultipleCfgController extends BaseController{
if(mainTable.equals(info.getTableName())){
this.setPropertiesToMultipleCfg(resultCfg, resultIpCfg,"update");
}
}else{
resultIpCfg=(BaseIpCfg)this.getClassBean(info.getTableName(), true);
resultIpCfg.initDefaultValue();
resultIpCfg.setCompileId(compileId);
if(resultCfg.getIpCfg()==null){
Map<String,BaseIpCfg> map=new HashMap<String,BaseIpCfg>();
map.put(info.getTableName(), resultIpCfg);
resultCfg.setIpCfg(map);
}else{
Map<String,BaseIpCfg> map=resultCfg.getIpCfg();
map.put(info.getTableName(), resultIpCfg);
}
if(mainTable.equals(info.getTableName())){
this.setPropertiesToMultipleCfg(resultCfg, resultIpCfg,"update");
}
}
}else if(Constants.TABLE_TYPE_STRING==type){
BaseStringCfg searchStringCfg=new BaseStringCfg();
@@ -709,7 +726,7 @@ public class MultipleCfgController extends BaseController{
ipCfg.getValue().setIsValid(Constants.VALID_NO);
ipCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
ipCfg.getValue().setCompileId(compileId);
setProperties(cfg,ipCfg.getValue(),null,null,null);
setProperties(cfg,ipCfg.getValue());
if(ipCfg.getValue().getCfgId()==null){
ipCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
ipCfg.getValue().setCreateTime(date);
@@ -728,7 +745,7 @@ public class MultipleCfgController extends BaseController{
stringCfg.getValue().setIsValid(Constants.VALID_NO);
stringCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
stringCfg.getValue().setCompileId(compileId);
setProperties(cfg,null,stringCfg.getValue(),null,null);
setProperties(cfg,stringCfg.getValue());
if(stringCfg.getValue().getCfgId()==null){
stringCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
stringCfg.getValue().setCreateTime(date);
@@ -747,7 +764,7 @@ public class MultipleCfgController extends BaseController{
numCfg.getValue().setIsValid(Constants.VALID_NO);
numCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
numCfg.getValue().setCompileId(compileId);
setProperties(cfg,null,null,numCfg.getValue(),null);
setProperties(cfg,numCfg.getValue());
if(numCfg.getValue().getCfgId()==null){
numCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
numCfg.getValue().setCreateTime(date);
@@ -757,7 +774,6 @@ public class MultipleCfgController extends BaseController{
}
}
}
}
}else if(Constants.TABLE_TYPE_COMPLEX==info.getTableType()){
if(cfg.getComplexCfg()!=null){
@@ -767,7 +783,7 @@ public class MultipleCfgController extends BaseController{
complexCfg.getValue().setIsValid(Constants.VALID_NO);
complexCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
complexCfg.getValue().setCompileId(compileId);
setProperties(cfg,null,null,null,complexCfg.getValue());
setProperties(cfg,complexCfg.getValue());
if(complexCfg.getValue().getCfgId()==null){
complexCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
complexCfg.getValue().setCreateTime(date);
@@ -808,28 +824,46 @@ public class MultipleCfgController extends BaseController{
public String auditCfg(String cfgName,MultipleCfg cfg,Model model) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("audit", Constants.AUDIT_PAGE);
model.addAttribute("cfgType", "multiple");
model.addAttribute("serviceId", cfg.getServiceId());
model.addAttribute("action", cfg.getAction());
model.addAttribute("mainTable", cfg.getMainTable());
int compileId=cfg.getCompileId().intValue();
int audit=cfg.getIsAudit();
try{
MultipleCfg resultCfg=new MultipleCfg();
MultipleCfg searchCfg=new MultipleCfg();
searchCfg.setIsAudit(cfg.getIsAudit());
List<ServiceConfigInfo> serviceConfigInfos=serviceConfigInfoService.findList(cfg.getServiceId());
Date date=new Date();
for(ServiceConfigInfo info:serviceConfigInfos){
int type=info.getTableType();
String tableName=info.getTableName();
if(cfg.getMainTable().equals(tableName)){
model.addAttribute("mainTableType", String.valueOf(type));
}
if(Constants.TABLE_TYPE_IP==type){
BaseIpCfg searchIpCfg=new BaseIpCfg();
searchIpCfg.setTableName(tableName);
searchIpCfg.setCompileId(compileId);
//根据表名编译ID查询唯一结果
BaseIpCfg resultIpCfg=ipCfgService.get(searchIpCfg);
searchIpCfg.setAuditorId(searchIpCfg.getCurrentUser().getId());
searchIpCfg.setAuditTime(date);
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过设置有效标志为0
searchIpCfg.setIsValid(Constants.VALID_NO);
if(resultIpCfg!=null){
resultIpCfg.setIsValid(Constants.VALID_NO);
resultIpCfg.setMaatTable(info.getMaatTable());
}
}else if(audit==Constants.AUDIT_YES){//审核通过设置有效标志为1
searchIpCfg.setIsValid(Constants.VALID_YES);
if(resultIpCfg!=null){
resultIpCfg.setIsValid(Constants.VALID_YES);
resultIpCfg.setMaatTable(info.getMaatTable());
}
}
//更新gwall库表数据
if(searchCfg.getIpCfg()==null){
Map<String,BaseIpCfg> map=new HashMap<String,BaseIpCfg>();
map.put(tableName, searchIpCfg);
@@ -838,17 +872,40 @@ public class MultipleCfgController extends BaseController{
Map<String,BaseIpCfg> map=searchCfg.getIpCfg();
map.put(tableName, searchIpCfg);
}
//传入maat数据
if(resultIpCfg!=null){
if(resultCfg.getIpCfg()==null){
Map<String,BaseIpCfg> map=new HashMap<String,BaseIpCfg>();
map.put(tableName, resultIpCfg);
resultCfg.setIpCfg(map);
}else{
Map<String,BaseIpCfg> map=resultCfg.getIpCfg();
map.put(tableName, resultIpCfg);
}
}
}else if(Constants.TABLE_TYPE_STRING==type){
BaseStringCfg searchStringCfg=new BaseStringCfg();
searchStringCfg.setTableName(tableName);
searchStringCfg.setCompileId(compileId);
//根据表名编译ID查询唯一结果
BaseStringCfg resultStringCfg=stringCfgService.get(searchStringCfg);
searchStringCfg.setAuditorId(searchStringCfg.getCurrentUser().getId());
searchStringCfg.setAuditTime(date);
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过设置有效标志为0
searchStringCfg.setIsValid(Constants.VALID_NO);
if(resultStringCfg!=null){
resultStringCfg.setIsValid(Constants.VALID_NO);
resultStringCfg.setMaatTable(info.getMaatTable());
}
}else if(audit==Constants.AUDIT_YES){//审核通过设置有效标志为1
searchStringCfg.setIsValid(Constants.VALID_YES);
if(resultStringCfg!=null){
resultStringCfg.setIsValid(Constants.VALID_YES);
resultStringCfg.setMaatTable(info.getMaatTable());
}
}
//更新gwall库表数据
if(searchCfg.getStringCfg()==null){
Map<String,BaseStringCfg> map=new HashMap<String,BaseStringCfg>();
map.put(tableName, searchStringCfg);
@@ -857,17 +914,38 @@ public class MultipleCfgController extends BaseController{
Map<String,BaseStringCfg> map=searchCfg.getStringCfg();
map.put(tableName, searchStringCfg);
}
//传入maat数据
if(resultStringCfg!=null){
if(resultCfg.getStringCfg()==null){
Map<String,BaseStringCfg> map=new HashMap<String,BaseStringCfg>();
map.put(tableName, resultStringCfg);
resultCfg.setStringCfg(map);
}else{
Map<String,BaseStringCfg> map=resultCfg.getStringCfg();
map.put(tableName, resultStringCfg);
}
}
}else if(Constants.TABLE_TYPE_NUMBER==type){
NumBoundaryCfg searchNumCfg=new NumBoundaryCfg();
searchNumCfg.setTableName(tableName);
searchNumCfg.setCompileId(compileId);
NumBoundaryCfg resultNumCfg=numCfgService.get(searchNumCfg);
searchNumCfg.setAuditorId(searchNumCfg.getCurrentUser().getId());
searchNumCfg.setAuditTime(date);
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过设置有效标志为0
searchNumCfg.setIsValid(Constants.VALID_NO);
if(resultNumCfg!=null){
resultNumCfg.setIsValid(Constants.VALID_NO);
resultNumCfg.setMaatTable(info.getMaatTable());
}
}else if(audit==Constants.AUDIT_YES){//审核通过设置有效标志为1
searchNumCfg.setIsValid(Constants.VALID_YES);
if(resultNumCfg!=null){
resultNumCfg.setIsValid(Constants.VALID_YES);
resultNumCfg.setMaatTable(info.getMaatTable());
}
}
//更新gwall库表数据
if(searchCfg.getNumCfg()==null){
Map<String,NumBoundaryCfg> map=new HashMap<String,NumBoundaryCfg>();
map.put(tableName, searchNumCfg);
@@ -876,17 +954,38 @@ public class MultipleCfgController extends BaseController{
Map<String,NumBoundaryCfg> map=searchCfg.getNumCfg();
map.put(tableName, searchNumCfg);
}
//传入maat数据
if(resultNumCfg!=null){
if(resultCfg.getNumCfg()==null){
Map<String,NumBoundaryCfg> map=new HashMap<String,NumBoundaryCfg>();
map.put(tableName, resultNumCfg);
resultCfg.setNumCfg(map);
}else{
Map<String,NumBoundaryCfg> map=resultCfg.getNumCfg();
map.put(tableName, resultNumCfg);
}
}
}else if(Constants.TABLE_TYPE_COMPLEX==type){
ComplexkeywordCfg searchComplexCfg=new ComplexkeywordCfg();
searchComplexCfg.setTableName(tableName);
searchComplexCfg.setCompileId(compileId);
ComplexkeywordCfg resultComplexCfg=complexStringCfgService.get(searchComplexCfg);
searchComplexCfg.setAuditorId(searchComplexCfg.getCurrentUser().getId());
searchComplexCfg.setAuditTime(date);
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过设置有效标志为0
searchComplexCfg.setIsValid(Constants.VALID_NO);
if(resultComplexCfg!=null){
resultComplexCfg.setIsValid(Constants.VALID_NO);
resultComplexCfg.setMaatTable(info.getMaatTable());
}
}else if(audit==Constants.AUDIT_YES){//审核通过设置有效标志为1
searchComplexCfg.setIsValid(Constants.VALID_YES);
if(resultComplexCfg!=null){
resultComplexCfg.setIsValid(Constants.VALID_YES);
resultComplexCfg.setMaatTable(info.getMaatTable());
}
}
//更新gwall库表数据
if(searchCfg.getComplexCfg()==null){
Map<String,ComplexkeywordCfg> map=new HashMap<String,ComplexkeywordCfg>();
map.put(tableName, searchComplexCfg);
@@ -895,11 +994,30 @@ public class MultipleCfgController extends BaseController{
Map<String,ComplexkeywordCfg> map=searchCfg.getComplexCfg();
map.put(tableName, searchComplexCfg);
}
//传入maat数据
if(resultComplexCfg!=null){
if(resultCfg.getComplexCfg()==null){
Map<String,ComplexkeywordCfg> map=new HashMap<String,ComplexkeywordCfg>();
map.put(tableName, resultComplexCfg);
resultCfg.setComplexCfg(map);
}else{
Map<String,ComplexkeywordCfg> map=resultCfg.getComplexCfg();
map.put(tableName, resultComplexCfg);
}
}
}
}
multipleCfgService.auditCfg(searchCfg);
return "redirect:" + adminPath + "/cfg/multiple/list";
int result=multipleCfgService.auditCfg(resultCfg,searchCfg);
if(result==0){
addMessage(model,"审核失败");
}else{
addMessage(model,"审核成功,正在为您跳转页面...");
}
}catch (Exception e) {
logger.error("审核失败",e);
addMessage(model,"审核失败");
}
return "/cfg/resultPage";
}
/**
*
@@ -942,7 +1060,8 @@ public class MultipleCfgController extends BaseController{
Field[] fieldArray=cfg.getClass().getDeclaredFields();
for(Field field:fieldArray){
field.setAccessible(true);
if(field.get(cfg)!=null&&!"serialVersionUID".equals(field.getName())){
if(field.get(cfg)!=null&&!"serialVersionUID".equals(field.getName())
&&!field.getName().endsWith("ShowName")&&!field.getName().endsWith("cfgDesc")){
return false;
}
}
@@ -965,6 +1084,7 @@ public class MultipleCfgController extends BaseController{
resultCfg.setIsValid(_cfg.getIsValid());
resultCfg.setRequestId(_cfg.getRequestId());
resultCfg.setServiceId(_cfg.getServiceId());
resultCfg.setRequestName(_cfg.getRequestName());
if("select".equals(option)){//列表时设置以下属性
resultCfg.setCreatorId(_cfg.getCreatorId());
resultCfg.setCreatorName(_cfg.getCreatorName());
@@ -977,126 +1097,51 @@ public class MultipleCfgController extends BaseController{
resultCfg.setAuditTime(_cfg.getAuditTime());
}
}
protected void setProperties(MultipleSearchCfg source,BaseIpCfg ipCfg,BaseStringCfg stringCfg,NumBoundaryCfg numCfg,ComplexkeywordCfg complexCfg){
if(ipCfg!=null){
ipCfg.setAction(source.getAction());
ipCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
ipCfg.setAttribute(source.getAttribute());
ipCfg.setClassify(source.getClassify());
ipCfg.setLable(source.getLable());
ipCfg.setIsAreaEffective(source.getIsAreaEffective());
ipCfg.setRequestId(source.getRequestId());
ipCfg.setServiceId(source.getServiceId());
ipCfg.setCreatorId(source.getCreatorId());
ipCfg.setCreatorName(source.getCreatorName());
ipCfg.setCreateTime(source.getCreateTime());
ipCfg.setEditorId(source.getEditorId());
ipCfg.setEditorName(source.getEditorName());
ipCfg.setEditTime(source.getEditTime());
ipCfg.setAuditorId(source.getAuditorId());
ipCfg.setAuditorName(source.getAuditorName());
ipCfg.setAuditTime(source.getAuditTime());
@SuppressWarnings("rawtypes")
protected void setProperties(MultipleSearchCfg source,BaseCfg cfg){
if(cfg!=null){
cfg.setIsValid(source.getIsValid());
cfg.setIsAudit(source.getIsAudit());
cfg.setAction(source.getAction());
cfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
cfg.setAttribute(source.getAttribute());
cfg.setClassify(source.getClassify());
cfg.setLable(source.getLable());
cfg.setIsAreaEffective(source.getIsAreaEffective());
cfg.setRequestId(source.getRequestId());
cfg.setServiceId(source.getServiceId());
cfg.setCreatorId(source.getCreatorId());
cfg.setCreatorName(source.getCreatorName());
cfg.setCreateTime(source.getCreateTime());
cfg.setEditorId(source.getEditorId());
cfg.setEditorName(source.getEditorName());
cfg.setEditTime(source.getEditTime());
cfg.setAuditorId(source.getAuditorId());
cfg.setAuditorName(source.getAuditorName());
cfg.setAuditTime(source.getAuditTime());
cfg.setSeltype(source.getSeltype());
cfg.setSearch_create_time_start(source.getSearch_create_time_start());
cfg.setSearch_create_time_end(source.getSearch_create_time_end());
cfg.setSearch_edit_time_start(source.getSearch_edit_time_start());
cfg.setSearch_edit_time_end(source.getSearch_edit_time_end());
cfg.setSearch_audit_time_start(source.getSearch_audit_time_start());
cfg.setSearch_audit_time_end(source.getSearch_audit_time_end());
}
if(stringCfg!=null){
stringCfg.setAction(source.getAction());
stringCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
stringCfg.setAttribute(source.getAttribute());
stringCfg.setClassify(source.getClassify());
stringCfg.setLable(source.getLable());
stringCfg.setIsAreaEffective(source.getIsAreaEffective());
stringCfg.setRequestId(source.getRequestId());
stringCfg.setServiceId(source.getServiceId());
stringCfg.setCreatorId(source.getCreatorId());
stringCfg.setCreatorName(source.getCreatorName());
stringCfg.setCreateTime(source.getCreateTime());
stringCfg.setEditorId(source.getEditorId());
stringCfg.setEditorName(source.getEditorName());
stringCfg.setEditTime(source.getEditTime());
stringCfg.setAuditorId(source.getAuditorId());
stringCfg.setAuditorName(source.getAuditorName());
stringCfg.setAuditTime(source.getAuditTime());
}
if(numCfg!=null){
numCfg.setAction(source.getAction());
numCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
numCfg.setAttribute(source.getAttribute());
numCfg.setClassify(source.getClassify());
numCfg.setLable(source.getLable());
numCfg.setIsAreaEffective(source.getIsAreaEffective());
numCfg.setRequestId(source.getRequestId());
numCfg.setServiceId(source.getServiceId());
numCfg.setCreatorId(source.getCreatorId());
numCfg.setCreatorName(source.getCreatorName());
numCfg.setCreateTime(source.getCreateTime());
numCfg.setEditorId(source.getEditorId());
numCfg.setEditorName(source.getEditorName());
numCfg.setEditTime(source.getEditTime());
numCfg.setAuditorId(source.getAuditorId());
numCfg.setAuditorName(source.getAuditorName());
numCfg.setAuditTime(source.getAuditTime());
}
if(complexCfg!=null){
complexCfg.setAction(source.getAction());
complexCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
complexCfg.setAttribute(source.getAttribute());
complexCfg.setClassify(source.getClassify());
complexCfg.setLable(source.getLable());
complexCfg.setIsAreaEffective(source.getIsAreaEffective());
complexCfg.setRequestId(source.getRequestId());
complexCfg.setServiceId(source.getServiceId());
complexCfg.setCreatorId(source.getCreatorId());
complexCfg.setCreatorName(source.getCreatorName());
complexCfg.setCreateTime(source.getCreateTime());
complexCfg.setEditorId(source.getEditorId());
complexCfg.setEditorName(source.getEditorName());
complexCfg.setEditTime(source.getEditTime());
complexCfg.setAuditorId(source.getAuditorId());
complexCfg.setAuditorName(source.getAuditorName());
complexCfg.setAuditTime(source.getAuditTime());
}
}
protected void setProperties(MultipleCfg source,BaseIpCfg ipCfg,BaseStringCfg stringCfg,NumBoundaryCfg numCfg,ComplexkeywordCfg complexCfg){
if(ipCfg!=null){
ipCfg.setAction(source.getAction());
ipCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
ipCfg.setAttribute(source.getAttribute());
ipCfg.setClassify(source.getClassify());
ipCfg.setLable(source.getLable());
ipCfg.setIsAreaEffective(source.getIsAreaEffective());
ipCfg.setRequestId(source.getRequestId());
ipCfg.setServiceId(source.getServiceId());
}
if(stringCfg!=null){
stringCfg.setAction(source.getAction());
stringCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
stringCfg.setAttribute(source.getAttribute());
stringCfg.setClassify(source.getClassify());
stringCfg.setLable(source.getLable());
stringCfg.setIsAreaEffective(source.getIsAreaEffective());
stringCfg.setRequestId(source.getRequestId());
stringCfg.setServiceId(source.getServiceId());
}
if(numCfg!=null){
numCfg.setAction(source.getAction());
numCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
numCfg.setAttribute(source.getAttribute());
numCfg.setClassify(source.getClassify());
numCfg.setLable(source.getLable());
numCfg.setIsAreaEffective(source.getIsAreaEffective());
numCfg.setRequestId(source.getRequestId());
numCfg.setServiceId(source.getServiceId());
}
if(complexCfg!=null){
complexCfg.setAction(source.getAction());
complexCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
complexCfg.setAttribute(source.getAttribute());
complexCfg.setClassify(source.getClassify());
complexCfg.setLable(source.getLable());
complexCfg.setIsAreaEffective(source.getIsAreaEffective());
complexCfg.setRequestId(source.getRequestId());
complexCfg.setServiceId(source.getServiceId());
}
protected void setProperties(MultipleCfg source,BaseCfg cfg){
if(cfg!=null){
cfg.setAction(source.getAction());
cfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
cfg.setAttribute(source.getAttribute());
cfg.setClassify(source.getClassify());
cfg.setLable(source.getLable());
cfg.setIsAreaEffective(source.getIsAreaEffective());
cfg.setRequestId(source.getRequestId());
cfg.setServiceId(source.getServiceId());
}
}
@SuppressWarnings("rawtypes")
protected void setPageProps(Page source,Page target){
target.setCount(source.getCount());
target.setPageNo(source.getPageNo());

View File

@@ -86,6 +86,16 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
* @param sysDictInfo
*/
void updateLevelNo(SysDictInfo sysDictInfo);
/**
* getDistrictDict(这里用一句话描述这个方法的作用)
* (这里描述这个方法适用条件 可选)
* @param sysDictInfo
* @return
*List<SysDictInfo>
* @exception
* @since 1.0.0
*/
List<SysDictInfo> getDistrictDict(String itemCode);

View File

@@ -327,5 +327,11 @@
s.level_no = #{levelNo}
WHERE s.sys_dict_id = #{sysDictId}
</update>
<!-- 获取增强字符串配置district -->
<select id="getDistrictDict" resultType="com.nis.domain.basics.SysDictInfo" >
SELECT
<include refid="sysDictInfoColumns"/>
FROM sys_dict_info s
WHERE s.is_valid = 1 AND item_type = 3 AND item_code like concat(#{itemCode,jdbcType=VARCHAR},'%')
</select>
</mapper>

View File

@@ -94,75 +94,10 @@
<if test="cfgId != null">
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null">
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
</if>
<if test="district != null">
AND DISTRICT=#{district,jdbcType=VARCHAR}
</if>
<if test="keywords != null">
AND KEYWORDS=#{keywords,jdbcType=VARCHAR}
</if>
<if test="action != null">
AND ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isAudit != null">
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorId != null">
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
</if>
<if test="createTime != null">
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorId != null">
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
</if>
<if test="editTime != null">
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorId != null">
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
</if>
<if test="auditTime != null">
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null">
AND classify=#{classify,jdbcType=VARCHAR}
</if>
<if test="attribute != null">
AND attribute=#{attribute,jdbcType=VARCHAR}
</if>
<if test="lable != null">
AND lable=#{lable,jdbcType=VARCHAR}
</if>
<if test="exprType != null">
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
</if>
<if test="matchMethod != null">
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
</if>
<if test="isHexbin != null">
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
</if>
<if test="areaEffectiveIds != null">
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
</if>
AND IS_VALID!=-1
</trim>
</select>
<select id="findList" resultMap="ComplexStringMapWithUser">

View File

@@ -155,96 +155,10 @@
<if test="cfgId != null">
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null">
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
</if>
<if test="ipType != null">
AND IP_TYPE=#{ipType,jdbcType=INTEGER}
</if>
<if test="srcIp != null">
AND SRC_IP=#{srcIp,jdbcType=VARCHAR}
</if>
<if test="srcIpMask != null">
AND SRC_IP_MASK=#{srcIpMask,jdbcType=VARCHAR}
</if>
<if test="srcPort != null">
AND SRC_PORT=#{srcPort,jdbcType=VARCHAR}
</if>
<if test="srcPortMask != null">
AND SRC_PORT_MASK=#{srcPortMask,jdbcType=VARCHAR}
</if>
<if test="dstIp != null">
AND DST_IP=#{dstIp,jdbcType=VARCHAR}
</if>
<if test="dstIpMask != null">
AND DST_IP_MASK=#{dstIpMask,jdbcType=VARCHAR}
</if>
<if test="dstPort != null">
AND DST_PORT=#{dstPort,jdbcType=VARCHAR}
</if>
<if test="dstPortMask != null">
AND DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR}
</if>
<if test="direction != null">
AND DIRECTION=#{direction,jdbcType=INTEGER}
</if>
<if test="protocol != null">
AND PROTOCOL=#{protocol,jdbcType=INTEGER}
</if>
<if test="protocolId != null">
AND PROTOCOL_ID=#{protocolId,jdbcType=INTEGER}
</if>
<if test="action != null">
AND ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isAudit != null">
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorId != null">
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
</if>
<if test="createTime != null">
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorId != null">
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
</if>
<if test="editTime != null">
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorId != null">
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
</if>
<if test="auditTime != null">
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null">
AND classify=#{classify,jdbcType=VARCHAR}
</if>
<if test="attribute != null">
AND attribute=#{attribute,jdbcType=VARCHAR}
</if>
<if test="lable != null">
AND lable=#{lable,jdbcType=VARCHAR}
</if>
<if test="areaEffectiveIds != null">
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
</if>
AND IS_VALID!=-1
</trim>
</select>
<select id="findList" resultMap="BaseIpMapWithUser">

View File

@@ -94,78 +94,10 @@
<if test="cfgId != null">
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null">
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
</if>
<if test="lowBounadry != null">
AND LOW_BOUNADRY=#{lowBounadry,jdbcType=BIGINT}
</if>
<if test="upBounadry != null">
AND UP_BOUNADRY=#{upBounadry,jdbcType=BIGINT}
</if>
<if test="cfgKeywords != null">
AND CFG_KEYWORDS=#{cfgKeywords,jdbcType=VARCHAR}
</if>
<if test="action != null">
AND ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isAudit != null">
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorId != null">
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
</if>
<if test="createTime != null">
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorId != null">
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
</if>
<if test="editTime != null">
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorId != null">
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
</if>
<if test="auditTime != null">
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null">
AND classify=#{classify,jdbcType=VARCHAR}
</if>
<if test="attribute != null">
AND attribute=#{attribute,jdbcType=VARCHAR}
</if>
<if test="lable != null">
AND lable=#{lable,jdbcType=VARCHAR}
</if>
<if test="exprType != null">
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
</if>
<if test="matchMethod != null">
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
</if>
<if test="isHexbin != null">
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
</if>
<if test="areaEffectiveIds != null">
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
</if>
AND IS_VALID!=-1
</trim>
</select>
<select id="findList" resultMap="NumMapWithUser">

View File

@@ -115,72 +115,10 @@
<if test="cfgId != null">
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null">
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
</if>
<if test="cfgKeywords != null">
AND CFG_KEYWORDS=#{cfgKeywords,jdbcType=VARCHAR}
</if>
<if test="action != null">
AND ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isAudit != null">
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorId != null">
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
</if>
<if test="createTime != null">
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorId != null">
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
</if>
<if test="editTime != null">
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorId != null">
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
</if>
<if test="auditTime != null">
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null">
AND classify=#{classify,jdbcType=VARCHAR}
</if>
<if test="attribute != null">
AND attribute=#{attribute,jdbcType=VARCHAR}
</if>
<if test="lable != null">
AND lable=#{lable,jdbcType=VARCHAR}
</if>
<if test="exprType != null">
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
</if>
<if test="matchMethod != null">
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
</if>
<if test="isHexbin != null">
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
</if>
<if test="areaEffectiveIds != null">
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
</if>
AND IS_VALID!=-1
</trim>
</select>

View File

@@ -274,7 +274,9 @@ public class SysDictInfoService extends BaseService{
}
public List<SysDictInfo> getDistrictDict(String tableName){
return sysDictInfoDao.getDistrictDict(tableName);
}

View File

@@ -1,16 +1,21 @@
package com.nis.web.service.configuration;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.nis.domain.Page;
import com.nis.domain.configuration.BaseCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.domain.configuration.MultipleCfg;
import com.nis.domain.configuration.MultipleSearchCfg;
import com.nis.domain.configuration.NumBoundaryCfg;
import com.nis.util.Constants;
import com.nis.web.dao.configuration.ComplexStringCfgDao;
import com.nis.web.dao.configuration.IpCfgDao;
import com.nis.web.dao.configuration.MultipleCfgDao;
@@ -76,7 +81,12 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
if(cfg==null) return 0;
if(cfg.getIpCfg()!=null){
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
ipCfgDao.updateByPrimaryKeySelective(_cfg);
if(_cfg.getCfgId()==null){//修改配置时用户可能希望新增IP配置此时新增的IP配置无配置ID
ipCfgDao.insert(_cfg);
}else{
ipCfgDao.updateByPrimaryKeySelective(_cfg);
}
}
}
if(cfg.getStringCfg()!=null){
@@ -128,32 +138,85 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
* @param cfg
* @return
*int
* @throws Exception
* @exception
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int auditCfg(MultipleCfg cfg){
public int auditCfg(MultipleCfg sendCfg,MultipleCfg cfg) throws Exception{
if(cfg==null) return 0;
if(cfg.getIpCfg()!=null){
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
ipCfgDao.audit(_cfg);
}
}
if(cfg.getStringCfg()!=null){
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
stringCfgDao.audit(_cfg);
}
}
if(cfg.getNumCfg()!=null){
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
numCfgDao.audit(_cfg);
}
}
if(cfg.getComplexCfg()!=null){
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
complexStringCfgDao.audit(_cfg);
if(Constants.AUDIT_YES==cfg.getIsAudit()||Constants.AUDIT_NOT_YES==cfg.getIsAudit()){
List<BaseCfg> cfgs=new ArrayList<BaseCfg>();
if(sendCfg.getIpCfg()!=null){
for(BaseIpCfg _cfg:sendCfg.getIpCfg().values()){
cfgs.add(_cfg);
}
}
if(sendCfg.getStringCfg()!=null){
for(BaseStringCfg _cfg:sendCfg.getStringCfg().values()){
cfgs.add(_cfg);
}
}
if(sendCfg.getNumCfg()!=null){
for(NumBoundaryCfg _cfg:sendCfg.getNumCfg().values()){
cfgs.add(_cfg);
}
}
if(sendCfg.getComplexCfg()!=null){
for(ComplexkeywordCfg _cfg:sendCfg.getComplexCfg().values()){
cfgs.add(_cfg);
}
}
BaseCfg[] cfgArray=new BaseCfg[cfgs.size()];
cfgs.toArray(cfgArray);
if(this.sendToMaatConvertor(cfg.getIsAudit(), null, cfgArray)){
if(cfg.getIpCfg()!=null){
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
ipCfgDao.audit(_cfg);
}
}
if(cfg.getStringCfg()!=null){
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
stringCfgDao.audit(_cfg);
}
}
if(cfg.getNumCfg()!=null){
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
numCfgDao.audit(_cfg);
}
}
if(cfg.getComplexCfg()!=null){
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
complexStringCfgDao.audit(_cfg);
}
}
}else{
return 0;
}
}else{
if(cfg.getIpCfg()!=null){
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
ipCfgDao.audit(_cfg);
}
}
if(cfg.getStringCfg()!=null){
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
stringCfgDao.audit(_cfg);
}
}
if(cfg.getNumCfg()!=null){
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
numCfgDao.audit(_cfg);
}
}
if(cfg.getComplexCfg()!=null){
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
complexStringCfgDao.audit(_cfg);
}
}
}
return 1;
}

View File

@@ -0,0 +1,150 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section"><spring:message code="basic_config"/></h3>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="1"
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
><spring:message code="yes"/>
</label>
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="0"
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
><spring:message code="no"/>
</label>
</div>
<div for="isAreaEffective"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><spring:message code="area_effect_id"/></label>
<div class="col-md-6">
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.ipCfg.areaEffectiveIds}">
</div>
<div for="areaEffectiveIds"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="letter"/></label>
<div class="col-md-6">
<select name="requestId" title=<spring:message code="select"/> data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control">
<c:forEach items="${requestInfos}" var="requestInfo">
<option value="${requestInfo.id}"
<c:if test="${requestInfo.isValid==0 or requestInfo.isAudit==3}">disabled="disabled"</c:if>
<c:if test="${requestInfo.id==_cfg.requestId}">selected</c:if>>${requestInfo.requestTitle}</option>
</c:forEach>
</select>
</div>
<div for="requestId"></div>
</div>
</div>
<!--/span-->
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="type"/></label>
<div class="col-md-6">
<select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${fls}" var="fl">
<c:choose>
<c:when test="${_cfg.classify==null or _cfg.classify==''}">
<option value="${fl.serviceDictId}">${fl.itemValue}</option>
</c:when>
<c:when test="${fn:contains(_cfg.classify,',')}">
<option value="${fl.serviceDictId}"
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
</c:forEach>
>${fl.itemValue}</option>
</c:when>
<c:otherwise>
<option value="${fl.serviceDictId}"
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
>${fl.itemValue}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</div>
<!--/span-->
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="attribute"/></label>
<div class="col-md-6">
<select name="attribute" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${xzs}" var="xz">
<c:choose>
<c:when test="${_cfg.attribute==null or _cfg.attribute==''}">
<option value="${xz.serviceDictId}">${xz.itemValue}</option>
</c:when>
<c:otherwise>
<c:forEach items="${fn:split(_cfg.attribute,',')}" var="_attribute">
<option value="${xz.serviceDictId}"
<c:if test="${xz.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(xz.serviceDictId) eq _attribute}">selected</c:if>
>${xz.itemValue}</option>
</c:forEach>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="label"/></label>
<div class="col-md-6">
<select name="lable" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${lables}" var="lable">
<c:choose>
<c:when test="${_cfg.lable==null or _cfg.lable==''}">
<option value="${lable.serviceDictId}">${lable.itemValue}</option>
</c:when>
<c:otherwise>
<c:forEach items="${fn:split(_cfg.lable,',')}" var="_lable">
<option value="${lable.serviceDictId}"
<c:if test="${lable.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(lable.serviceDictId) eq _lable}">selected</c:if>
>${lable.itemValue}</option>
</c:forEach>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">生效范围</label>
<div class="col-md-6">
<select class="form-control">
<option>Country 1</option>
<option>Country 2</option>
</select>
</div>
</div>
</div>
</div> -->

View File

@@ -0,0 +1,164 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section">增强字符串<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".complexCfg" title="add"></span></small></h3>
<div class="row complexCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<input name="complexCfg[${mainTable}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[mainTable].cfgDesc}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<input name="complexCfg[${otherTable.tableName}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[otherTable.tableName].cfgDesc}"/>
</c:when>
</c:choose>
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<select name="complexCfg[${mainTable}].district" class="district selectpicker select2 form-control">
<option value=""><spring:message code='select'/></option>
<c:forEach items="${districts}" var="district">
<option value="${district.itemValue}">${district.itemValue}</option>
</c:forEach>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<select name="complexCfg[${otherTable.tableName}].district" class="district selectpicker select2 form-control">
<option value=""><spring:message code='select'/></option>
<c:forEach items="${districts}" var="district">
<option value="${district.itemValue}">${district.itemValue}</option>
</c:forEach>
</select>
</c:when>
</c:choose>
<input type="hidden" name="" placeholder="请输入自定义域" class="otherValue form-control" value="${_cfg.complexCfg[mainTable].district}"/>
</div>
<div for="district"></div>
</div>
</div>
</div>
<div class="row complexCfg collapse">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<input name="complexCfg[${mainTable}].keywords" type="text" class="form-control" value="${_cfg.complexCfg[mainTable].keywords}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<input name="complexCfg[${otherTable.tableName}].keywords" type="text" class="form-control" value="${_cfg.complexCfg[otherTable.tableName].keywords}"/>
</c:when>
</c:choose>
</div>
<div for="keywords"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<label class="radio-inline">
<input type="radio" name="complexCfg[${mainTable}].exprType" value="1"
<c:if test="${_cfg.complexCfg[mainTable].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="complexCfg[${mainTable}].exprType" value="0"
<c:if test="${_cfg.complexCfg[mainTable].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<label class="radio-inline">
<input type="radio" name="complexCfg[${otherTable.tableName}].exprType" value="1"
<c:if test="${_cfg.complexCfg[otherTable.tableName].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="complexCfg[${otherTable.tableName}].exprType" value="0"
<c:if test="${_cfg.complexCfg[otherTable.tableName].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
</c:choose>
</div>
<div for="isAreaEffective"></div>
</div>
</div>
</div>
<div class="row complexCfg collapse">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<select name="complexCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<select name="complexCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
<div for="matchMethod"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<select name="complexCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<select name="complexCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
</div>
</div>
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<input name="complexCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.complexCfg[mainTable].cfgId}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<input name="complexCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.complexCfg[otherTable.tableName].cfgId}"/>
</c:when>
</c:choose>
</div>
<!--/row-->

View File

@@ -0,0 +1,249 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<style>
.ipCfg-hide{
display:none;
}
</style>
<h3 class="form-section">IP<spring:message code="block_config"/><small><span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span></small></h3>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].cfgDesc" value="${_cfg.ipCfg[mainTable].cfgDesc}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].cfgDesc" value="${_cfg.ipCfg[otherTable.tableName].cfgDesc}">
</c:when>
</c:choose>
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<select name="ipCfg[${mainTable}].ipType" class="ipType selectpicker show-tick form-control">
<option value="" ><spring:message code="select"/></option>
<option value="4" <c:if test="${_cfg.ipCfg[mainTable].ipType==4}">selected</c:if> >V4</option>
<option value="6" <c:if test="${_cfg.ipCfg[mainTable].ipType==6}">selected</c:if>>V6</option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<select name="ipCfg[${otherTable.tableName}].ipType" class="ipType selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="4" <c:if test="${_cfg.ipCfg[otherTable.tableName].ipType==4}">selected</c:if> >V4</option>
<option value="6" <c:if test="${_cfg.ipCfg[otherTable.tableName].ipType==6}">selected</c:if>>V6</option>
</select>
</c:when>
</c:choose>
</div>
<div for="ipType"></div>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcIp" value="${_cfg.ipCfg[mainTable].srcIp}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcIp" value="${_cfg.ipCfg[otherTable.tableName].srcIp}">
</c:when>
</c:choose>
</div>
<div for="srcIp"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_address_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcIpMask" value="${_cfg.ipCfg[mainTable].srcIpMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcIpMask" value="${_cfg.ipCfg[otherTable.tableName].srcIpMask}">
</c:when>
</c:choose>
</div>
<div for="srcIpMask"></div>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcPort" value="${_cfg.ipCfg[mainTable].srcPort}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcPort" value="${_cfg.ipCfg[otherTable.tableName].srcPort}">
</c:when>
</c:choose>
</div>
<div for="srcPort"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcPortMask" value="${_cfg.ipCfg[mainTable].srcPortMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcPortMask" value="${_cfg.ipCfg[otherTable.tableName].srcPortMask}">
</c:when>
</c:choose>
</div>
<div for="srcPortMask"></div>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstIp" value="${_cfg.ipCfg[mainTable].dstIp}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstIp" value="${_cfg.ipCfg[otherTable.tableName].dstIp}">
</c:when>
</c:choose>
</div>
<div for="dstIp"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_address_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstIpMask" value="${_cfg.ipCfg[mainTable].dstIpMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstIpMask" value="${_cfg.ipCfg[otherTable.tableName].dstIpMask}">
</c:when>
</c:choose>
</div>
<div for="dstIpMask"></div>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstPort" value="${_cfg.ipCfg[mainTable].dstPort}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstPort" value="${_cfg.ipCfg[otherTable.tableName].dstPort}">
</c:when>
</c:choose>
</div>
<div for="dstPort"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstPortMask" value="${_cfg.ipCfg[mainTable].dstPortMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstPortMask" value="${_cfg.ipCfg[otherTable.tableName].dstPortMask}">
</c:when>
</c:choose>
</div>
<div for="dstPortMask"></div>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<select name="ipCfg[${mainTable}].direction" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].direction==0}">selected</c:if>>0</option>
<option value="1" <c:if test="${_cfg.ipCfg[mainTable].direction==1}">selected</c:if>>1</option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<select name="ipCfg[${otherTable.tableName}].direction" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==0}">selected</c:if>>0</option>
<option value="1" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==1}">selected</c:if>>1</option>
</select>
</c:when>
</c:choose>
<%-- <input class="form-control" type="text" name="direction" value="${_cfg.ipCfg.direction}"> --%>
</div>
<div for="direction"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<select name="ipCfg[${mainTable}].protocol" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value=""><spring:message code="select"/></option>
<option value="6" <c:if test="${_cfg.ipCfg[mainTable].protocol==6}">selected</c:if>>TCP</option>
<option value="17" <c:if test="${_cfg.ipCfg[mainTable].protocol==17}">selected</c:if>>UDP</option>
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<select name="ipCfg[${otherTable.tableName}].protocol" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="6" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==6}">selected</c:if>>TCP</option>
<option value="17" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==17}">selected</c:if>>UDP</option>
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
</select>
</c:when>
</c:choose>
</div>
<div for="protocol"></div>
</div>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input type="hidden" name="ipCfg[${mainTable}].protocolId" value="${_cfg.ipCfg[mainTable].protocolId}">
<input name="ipCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.ipCfg[mainTable].cfgId}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input type="hidden" name="ipCfg[${otherTable.tableName}].protocolId" value="${_cfg.ipCfg[otherTable.tableName].protocolId}">
<input name="ipCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.ipCfg[otherTable.tableName].cfgId}"/>
</c:when>
</c:choose>
</div>

View File

@@ -0,0 +1,139 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section">字符串<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".stringCfg" title="add"></span></small></h3>
<div class="row stringCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<input class="form-control" type="text" name="stringCfg[${mainTable}].cfgDesc" value="${_cfg.stringCfg[mainTable].cfgDesc}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<input class="form-control" type="text" name="stringCfg[${otherTable.tableName}].cfgDesc" value="${_cfg.stringCfg[otherTable.tableName].cfgDesc}">
</c:when>
</c:choose>
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<input class="form-control" type="text" name="stringCfg[${mainTable}].cfgKeywords" value="${_cfg.stringCfg[mainTable].cfgKeywords}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<input class="form-control" type="text" name="stringCfg[${otherTable.tableName}].cfgKeywords" value="${_cfg.stringCfg[otherTable.tableName].cfgKeywords}">
</c:when>
</c:choose>
</div>
<div for="cfgKeywords"></div>
</div>
</div>
</div>
<div class="row stringCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<label class="radio-inline">
<input type="radio" name="stringCfg[${mainTable}].exprType" value="1"
<c:if test="${_cfg.stringCfg[mainTable].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="stringCfg[${mainTable}].exprType" value="0"
<c:if test="${_cfg.stringCfg[mainTable].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<label class="radio-inline">
<input type="radio" name="stringCfg[${otherTable.tableName}].exprType" value="1"
<c:if test="${_cfg.stringCfg[otherTable.tableName].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="stringCfg[${otherTable.tableName}].exprType" value="0"
<c:if test="${_cfg.stringCfg[otherTable.tableName].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
</c:choose>
</div>
<div for="exprType"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<select name="stringCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control">
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<select name="stringCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control">
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
<div for="matchMethod"></div>
</div>
</div>
</div>
<div class="row stringCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<select name="stringCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<select name="stringCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
<div for="isHexbin"></div>
</div>
</div>
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<input name="stringCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.stringCfg[mainTable].cfgId}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<input name="stringCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.stringCfg[otherTable.tableName].cfgId}"/>
</c:when>
</c:choose>
</div>
<!--/row-->

View File

@@ -302,10 +302,7 @@
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>

View File

@@ -0,0 +1,218 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
$("[name^='ipCfg']").attr("disabled",true);
//$("[name^='stringCfg']").attr("disabled",true);
//$("[name^='complexCfg']").attr("disabled",true);
//$("[name^='numCfg']").attr("disabled",true);
$(".glyphicon").on("click",function(){
var className=$(this).attr("data-target");
if($(this).hasClass("glyphicon-chevron-down")){
$(this).removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
}else if($(this).hasClass("glyphicon-chevron-up")){
$(this).removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down");
}else if($(this).hasClass("glyphicon-plus")){
var targetName=className.substring(1,className.length);
$(this).attr("title","remove");
$(this).removeClass("glyphicon-plus").addClass("glyphicon-remove");
$("[name^='"+targetName+"']").removeAttr("disabled");
//解决select插件disbale后无法恢复
$(".bootstrap-select").removeClass("disabled");
$(".bootstrap-select button").removeClass("disabled");
}else if($(this).hasClass("glyphicon-remove")){
var targetName=className.substring(1,className.length);
$(this).attr("title","add");
$(this).removeClass("glyphicon-remove").addClass("glyphicon-plus");
$("[name^='"+targetName+"']").attr("disabled",true);
}
});
$(".district").on("change",function(){
var val=$(this).val().toLowerCase();
if("others"==val){
$(this).parent("div").siblings(".otherValue").prop("type","text");
}else{
$(this).parent("div").siblings(".otherValue").prop("type","hidden").attr("value","");
}
});
$(".otherValue").on("change",function(){
var val=$(this).val();
if($(this).is(":visible")){
$(this).prev("div").find("option").each(function(){
if("others"==$(this).text().toLowerCase()){
$(this).prop("value",val);
if($(this).prop("selected")){
$(this).parent("select.selectpicker").selectpicker('val',val);
}
}
});
}
});
$(".ipType").on("change",function(){
var mainTableType="${mainTableType}";
var otherTables='${_cfg.otherTables}';
var tableName=$(this).attr("name").replace(".ipType","");
var type=$(this).val();
if(4==type){
if(!$("input[name='"+tableName+".srcIpMask']").val()){
$("input[name='"+tableName+".srcIpMask']").val("255.255.255.255");
}else if($("input[name='"+tableName+"srcIpMask']").val()=="FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"){
$("input[name='"+tableName+".srcIpMask']").val("255.255.255.255");
}
if(!$("input[name='"+tableName+".dstIpMask']").val()){
$("input[name='"+tableName+".dstIpMask']").val("255.255.255.255");
}else if($("input[name='"+tableName+".dstIpMask']").val()=="FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"){
$("input[name='"+tableName+".dstIpMask']").val("255.255.255.255");
}
if(!$("input[name='"+tableName+".srcIp']").val()){
$("input[name='"+tableName+".srcIp']").val("0.0.0.0");
}else if($("input[name='"+tableName+".srcIp']").val()=="::"){
$("input[name='"+tableName+".srcIp']").val("0.0.0.0");
}
if(!$("input[name='"+tableName+".dstIp']").val()){
$("input[name='"+tableName+".dstIp']").val("0.0.0.0");
}else if($("input[name='"+tableName+".dstIp']").val()=="::"){
$("input[name='"+tableName+".dstIp']").val("0.0.0.0");
}
}
if(6==type){
if(!$("input[name='"+tableName+".srcIpMask']").val()){
$("input[name='"+tableName+".srcIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}else if($("input[name='"+tableName+".srcIpMask']").val()=="255.255.255.255"){
$("input[name='"+tableName+".srcIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}
if(!$("input[name='"+tableName+".dstIpMask']").val()){
$("input[name='"+tableName+".dstIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}else if($("input[name='"+tableName+".dstIpMask']").val()=="255.255.255.255"){
$("input[name='"+tableName+".dstIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}
if(!$("input[name='"+tableName+".srcIp']").val()){
$("input[name='"+tableName+".srcIp']").val("::");
}else if($("input[name='"+tableName+".srcIp']").val()=="0.0.0.0"){
$("input[name='"+tableName+".srcIp']").val("::");
}
if(!$("input[name='"+tableName+".dstIp']").val()){
$("input[name='"+tableName+".dstIp']").val("::");
}else if($("input[name='"+tableName+".dstIp']").val()=="0.0.0.0"){
$("input[name='"+tableName+".dstIp']").val("::");
}
}
});
$("#cancel").on("click",function(){
window.history.back();
});
$("#cfgFrom").validate({
rules: {
'isAreaEffective':{
required:true
},
'requestId': {
required: true
}
},
messages: {
'isAreaEffective':{
required:'<spring:message code="required"/>'
},
'requestId': {
required: '<spring:message code="required"/>'
}
},
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
form.submit();
},
errorContainer: "#messageBox"
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>
<c:if test="${empty _cfg.compileId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.compileId}"><spring:message code="edit"></spring:message></c:if>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/cfg/multiple/saveOrUpdateCfg" method="post" class="form-horizontal">
<input type="hidden" name="operator" value="${operator}">
<input type="hidden" name="mainTable" value="${_cfg.mainTable}">
<input type="hidden" name="mainTableType" value="${_cfg.mainTableType}">
<input type="hidden" name="audit" value="${audit}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="cfgName" value="${cfgName}">
<input type="hidden" name="action" value="${_cfg.action}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<div class="form-body">
<c:choose>
<c:when test="${_cfg.mainTableType eq '4'}">
<%@include file="/WEB-INF/include/form/multiple/complexInfo.jsp" %>
</c:when>
<c:when test="${_cfg.mainTableType eq '3'}">
</c:when>
<c:when test="${_cfg.mainTableType eq '2'}">
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
</c:when>
<c:when test="${_cfg.mainTableType eq '1'}">
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
</c:when>
</c:choose>
<c:forEach items="${_cfg.otherTables}" var="otherTable">
<c:choose>
<c:when test="${otherTable.tableType eq '4'}">
<%@include file="/WEB-INF/include/form/multiple/complexInfo.jsp" %>
</c:when>
<c:when test="${otherTable.tableType eq '3'}">
</c:when>
<c:when test="${otherTable.tableType eq '2'}">
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
</c:when>
<c:when test="${otherTable.tableType eq '1'}">
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
</c:when>
</c:choose>
</c:forEach>
<%@include file="/WEB-INF/include/form/multiple/basicInfo.jsp" %>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
</div>
</div>
</div>
<div class="col-md-6"> </div>
</div>
</div>
</form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,564 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script>
$(document).ready(function() {
//搜索框提示语初始化
if("${cfg.stringCfg.cfgKeywords}"){
$("#intype").val("${cfg.stringCfg.cfgKeywords}");
}else if("${cfg.stringCfg.cfgDesc}"){
$("#intype").val("${cfg.stringCfg.cfgDesc}");
}else if("${cfg.complexCfg.cfgDesc}"){
$("#intype").val("${cfg.complexCfg.cfgDesc}");
}else if("${cfg.complexCfg.district}"){
$("#seltype").val("${cfg.complexCfg.district}");
}else if("${cfg.complexCfg.keywords}"){
$("#intype").val("${cfg.complexCfg.keywords}");
}else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
}
$("#seltype").change(function(){
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
//reset
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
$(this).selectpicker('val',$(this).find('option:first').val());
$(this).find("option").attr("selected",false);
$(this).find("option:first").attr("selected",true);
});
$(".Wdate").attr("value",'');
$("#keywords").attr("value",'');
$("#searchForm")[0].reset();
});
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<c:if test="${audit==0}">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/cfg/multiple/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}'"><spring:message code="add"></spring:message></button>
</c:if>
</div>
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/multiple/list" method="post" class="form-search">
<input id="mainTable" name="mainTable" type="hidden" value="${mainTable}"/>
<input id="mainTableType" name="mainTableType" type="hidden" value="${mainTableType}"/>
<input id="cfgType" name="cfgType" type="hidden" value="${cfgType}"/>
<input id="cfgName" name="cfgName" type="hidden" value="${cfgName}"/>
<input id="action" name="action" type="hidden" value="${action}"/>
<input id="serviceId" name="serviceId" type="hidden" value="${serviceId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="state"/></form:option>
<form:option value="0"><spring:message code="created"></spring:message></form:option>
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
</form:select>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<form:select path="seltype" class="selectpicker select2 input-small" >
<c:if test="${mainTableType eq '2'}">
<form:option value="stringCfg.cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="stringCfg.cfgKeywords"><spring:message code="key_word"></spring:message></form:option>
</c:if>
<c:if test="${mainTableType eq '4'}">
<form:option value="complexCfg.cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="complexCfg.district"><spring:message code="match_area"></spring:message></form:option>
<form:option value="complexCfg.keywords"><spring:message code="key_word"></spring:message></form:option>
</c:if>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
</div>
</div>
<div class="pull-left">
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
<%-- <button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button> --%>
<%-- <div class="pull-left">
<c:set var="sortI18n"><spring:message code="sort"/></c:set>
<select name="orderBy" class="selectpicker select2 input-small" title="${sortI18n}">
<option value="${mainTable}.create_time asc" <c:if test="${fn:contains(page.orderBy,'create_time asc') }">selected</c:if> ><spring:message code="createTime_asc"/></option>
<option value="${mainTable}.create_time desc" <c:if test="${fn:contains(page.orderBy , 'create_time desc') }">selected</c:if> ><spring:message code="createTime_desc"/></option>
<option value="${mainTable}.edit_time asc" <c:if test="${fn:contains(page.orderBy , 'edit_time asc') }">selected</c:if> ><spring:message code="editTime_asc"/></option>
<option value="${mainTable}.edit_time desc" <c:if test="${fn:contains(page.orderBy , 'edit_time desc') }">selected</c:if> ><spring:message code="editTime_desc"/></option>
<option value="${mainTable}.audit_time asc" <c:if test="${fn:contains(page.orderBy , 'audit_time asc') }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
<option value="${mainTable}.audit_time desc" <c:if test="${fn:contains(page.orderBy , 'audit_time desc') }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
</select>
</div> --%>
</div>
<!-- 搜索内容与操作按钮栏 -->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<c:choose>
<c:when test="${action==5}">
</c:when>
<c:when test="${action==8}">
</c:when>
<c:otherwise>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='request_number'/></label>
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${requestInfos}" var="requestInfo" >
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='type'/></label>
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${fls}" var="fl" >
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='attribute'/></label>
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${xzs}" var="xz" >
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='label'/></label>
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${lables}" var="lable" >
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
</c:otherwise>
</c:choose>
</div>
<div class="row">
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="config_time"/></label>
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="edit_time"/></label>
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="audit_time"/></label>
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<%-- <th><spring:message code="seq"/></th> --%>
<%--遍历主表属性 --%>
<c:choose>
<%--增强字符串 --%>
<c:when test="${mainTableType eq '4'}">
<th>增强字符串<spring:message code="config_describe"/></th>
<th><spring:message code="match_area"/></th>
<th><spring:message code="key_word"/></th>
</c:when>
<%--数值 --%>
<c:when test="${mainTableType eq '3'}">
</c:when>
<%--字符串 --%>
<c:when test="${mainTableType eq '2'}">
<th>字符串<spring:message code="config_describe"/></th>
<th><spring:message code="key_word"/></th>
</c:when>
<%--IP --%>
<c:when test="${mainTableType eq '1'}">
<th>ip<spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th>
<th><spring:message code="client_port_mask"/></th>
<th><spring:message code="server_ip"/></th>
<th><spring:message code="server_address_mask"/></th>
<th><spring:message code="server_port"/></th>
<th><spring:message code="server_port_mask"/></th>
<th><spring:message code="direction"/></th>
<th><spring:message code="protocol"/></th>
</c:when>
</c:choose>
<%--遍历主表属性 --%>
<%--遍历子表属性 --%>
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
<c:if test="${other.tableType eq '4'}">
<th>增强字符串<spring:message code="config_describe"/></th>
<th><spring:message code="match_area"/></th>
<th><spring:message code="key_word"/></th>
</c:if>
<c:if test="${other.tableType eq '3'}">
</c:if>
<c:if test="${other.tableType eq'2'}">
<th>字符串<spring:message code="config_describe"/></th>
<th><spring:message code="key_word"/></th>
</c:if>
<c:if test="${other.tableType eq '1'}">
<th>ip<spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th>
<th><spring:message code="client_port_mask"/></th>
<th><spring:message code="server_ip"/></th>
<th><spring:message code="server_address_mask"/></th>
<th><spring:message code="server_port"/></th>
<th><spring:message code="server_port_mask"/></th>
<th><spring:message code="direction"/></th>
<th><spring:message code="protocol"/></th>
</c:if>
</c:forEach>
<%--遍历子表属性 --%>
<th><spring:message code="block_type"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="whether_area_block"/></th>
<th><spring:message code="type"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></th>
<th><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
<th><spring:message code="operation"></spring:message></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list }" var="bean" varStatus="status" step="1">
<tr>
<%-- <td>${status.index+1 }</td> --%>
<%--遍历主表值 --%>
<c:choose>
<%--增强字符串 --%>
<c:when test="${mainTableType eq '4'}">
<td>${bean.complexCfg[mainTable].cfgDesc }</td>
<td>${bean.complexCfg[mainTable].district }</td>
<td>${bean.complexCfg[mainTable].keywords }</td>
</c:when>
<%--数值 --%>
<c:when test="${mainTableType eq '3'}">
</c:when>
<%--字符串 --%>
<c:when test="${mainTableType eq '2'}">
<td>${bean.stringCfg[mainTable].cfgDesc }</td>
<td>${bean.stringCfg[mainTable].cfgKeywords }</td>
</c:when>
<%--IP --%>
<c:when test="${mainTableType eq '1'}">
<td>${bean.ipCfg[mainTable].cfgDesc }</td>
<td>V${bean.ipCfg[mainTable].ipType }</td>
<td>${bean.ipCfg[mainTable].srcIp }</td>
<td>${bean.ipCfg[mainTable].srcIpMask }</td>
<td>${bean.ipCfg[mainTable].srcPort }</td>
<td>${bean.ipCfg[mainTable].srcPortMask }</td>
<td>${bean.ipCfg[mainTable].dstIp }</td>
<td>${bean.ipCfg[mainTable].dstIpMask }</td>
<td>${bean.ipCfg[mainTable].dstPort }</td>
<td>${bean.ipCfg[mainTable].dstPortMask }</td>
<td>
<c:if test="${bean.ipCfg[mainTable].direction==0}"><spring:message code="twoway"/></c:if>
<c:if test="${bean.ipCfg[mainTable].direction==1}"><spring:message code="oneway"/></c:if>
</td>
<td>
<c:if test="${bean.ipCfg[mainTable].protocol==6}"><spring:message code="TCP"/></c:if>
<c:if test="${bean.ipCfg[mainTable].protocol==17}"><spring:message code="UDP"/></c:if>
<c:if test="${bean.ipCfg[mainTable].protocol==0}"><spring:message code="arbitrary"/></c:if>
</td>
</c:when>
</c:choose>
<%--遍历主表值 --%>
<%--遍历子表值 --%>
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
<c:if test="${other.tableType eq '4'}">
<c:choose>
<c:when test="${bean.complexCfg[other.tableName]!=null}">
<td>${bean.complexCfg[other.tableName].cfgDesc }</td>
<td>${bean.complexCfg[other.tableName].district }</td>
<td>${bean.complexCfg[other.tableName].keywords }</td>
</c:when>
<c:otherwise><td></td><td></td><td></td></c:otherwise>
</c:choose>
</c:if>
<c:if test="${other.tableType eq '3'}">
<c:choose>
<c:when test="${bean.numCfg[other.tableName]!=null}">
</c:when>
<c:otherwise></c:otherwise>
</c:choose>
</c:if>
<c:if test="${other.tableType eq '2'}">
<c:choose>
<c:when test="${bean.stringCfg[other.tableName]!=null}">
<td>${bean.stringCfg[other.tableName].cfgDesc }</td>
<td>${bean.stringCfg[other.tableName].cfgKeywords }</td>
</c:when>
<c:otherwise><td></td><td></td></c:otherwise>
</c:choose>
</c:if>
<c:if test="${other.tableType eq '1'}">
<c:choose>
<c:when test="${bean.ipCfg[other.tableName]!=null}">
<td>${bean.ipCfg[other.tableName].cfgDesc }</td>
<td>V${bean.ipCfg[other.tableName].ipType }</td>
<td>${bean.ipCfg[other.tableName].srcIp }</td>
<td>${bean.ipCfg[other.tableName].srcIpMask }</td>
<td>${bean.ipCfg[other.tableName].srcPort }</td>
<td>${bean.ipCfg[other.tableName].srcPortMask }</td>
<td>${bean.ipCfg[other.tableName].dstIp }</td>
<td>${bean.ipCfg[other.tableName].dstIpMask }</td>
<td>${bean.ipCfg[other.tableName].dstPort }</td>
<td>${bean.ipCfg[other.tableName].dstPortMask }</td>
<td>
<c:if test="${bean.ipCfg[other.tableName].direction==0}"><spring:message code="twoway"/></c:if>
<c:if test="${bean.ipCfg[other.tableName].direction==1}"><spring:message code="oneway"/></c:if>
</td>
<td>
<c:if test="${bean.ipCfg[other.tableName].protocol==6}"><spring:message code="TCP"/></c:if>
<c:if test="${bean.ipCfg[other.tableName].protocol==17}"><spring:message code="UDP"/></c:if>
<c:if test="${bean.ipCfg[other.tableName].protocol==0}"><spring:message code="arbitrary"/></c:if>
</td>
</c:when>
<c:otherwise>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td></td><td></td>
</c:otherwise>
</c:choose>
</c:if>
</c:forEach>
<%--遍历子表值 --%>
<td>
<c:if test="${1 eq bean.action }"><spring:message code="block"/></c:if>
<c:if test="${2 eq bean.action }"><spring:message code="monitor"/></c:if>
<c:if test="${5 eq bean.action }"><spring:message code="block_white_list"/></c:if>
<c:if test="${6 eq bean.action }"><spring:message code="monitor_white_list"/></c:if>
<c:if test="${7 eq bean.action }"><spring:message code="block_monitor_white_list"/></c:if>
<c:if test="${8 eq bean.action }"><spring:message code="grey_list"/></c:if>
</td>
<%-- <td>${cfg.serviceId }</td> --%>
<td>${bean.requestName }</td>
<%-- <td>${cfg.compileId }</td> --%>
<td>
<c:if test="${bean.isAreaEffective==0}"><spring:message code="no"/></c:if>
<c:if test="${bean.isAreaEffective==1}"><spring:message code="yes"/></c:if>
</td>
<td>
<c:forEach items="${fn:split(bean.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(bean.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(bean.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
<td>
<c:if test="${bean.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${bean.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${bean.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<c:choose>
<c:when test="${bean.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${bean.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${bean.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${bean.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
</c:choose>
</td>
<td>${bean.creatorName }</td>
<td><fmt:formatDate value="${bean.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${bean.editorName }</td>
<td><fmt:formatDate value="${bean.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${bean.auditorName }</td>
<td><fmt:formatDate value="${bean.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<c:if test="${audit==0}">
<c:choose>
<c:when test="${bean.isAudit eq '2'}">
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="edit"></spring:message></a></li>
</c:when>
<c:when test="${bean.isAudit eq '0'}">
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="edit"></spring:message></a></li>
<li><a href="${ctx}/cfg/multiple/deleteCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="delete"></spring:message></a></li>
</c:when>
</c:choose>
</c:if>
<c:if test="${audit==1}">
<c:choose>
<c:when test="${bean.isAudit eq '1'}">
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=3&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure', this.href)"><spring:message code="cancel"></spring:message></a></li>
</c:when>
<c:when test="${bean.isAudit eq '0'}">
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=1&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=2&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure', this.href)"><spring:message code="unapproved"></spring:message></a></li>
</c:when>
</c:choose>
</c:if>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
<style>
.input-medium {
width: 200px !important;
}
.Wdate {
border: #c2cad8 1px solid;
height: 26px;
}
.dropdown-menu {
min-width: 50px;
}
</style>
</body>
</html>