Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
3
.tern-project
Normal file
3
.tern-project
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
@@ -260,9 +260,9 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
||||
@Override
|
||||
public void initDefaultValue(){
|
||||
super.initDefaultValue();
|
||||
this.srcIp ="0.0.0.0";
|
||||
// this.srcIp ="0.0.0.0";
|
||||
this.srcPortMask = "65535" ;
|
||||
this.dstIp = "0.0.0.0" ;
|
||||
// this.dstIp = "0.0.0.0" ;
|
||||
this.dstPortMask = "65535";
|
||||
this.direction = 0;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package com.nis.domain.configuration;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
|
||||
protected String tableName;
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -35,7 +35,7 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
/**
|
||||
* 编译id
|
||||
*/
|
||||
protected Integer compileId;
|
||||
protected Long compileId;
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@@ -81,13 +81,13 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
* @return compileId
|
||||
*/
|
||||
|
||||
public Integer getCompileId() {
|
||||
public Long getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
/**
|
||||
* @param compileId the compileId to set
|
||||
*/
|
||||
public void setCompileId(Integer compileId) {
|
||||
public void setCompileId(Long compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
/**
|
||||
@@ -97,10 +97,7 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
*/
|
||||
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
return this.exprType;
|
||||
}
|
||||
/**
|
||||
* @param exprType the exprType to set
|
||||
@@ -115,10 +112,7 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
*/
|
||||
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 3;
|
||||
else
|
||||
return this.matchMethod;
|
||||
return this.matchMethod;
|
||||
}
|
||||
/**
|
||||
* @param matchMethod the matchMethod to set
|
||||
@@ -144,10 +138,26 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
protected void initDefaultValue() {
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.isHexbin = 0 ;
|
||||
this.matchMethod=3;
|
||||
}
|
||||
/**
|
||||
* tableName
|
||||
* @return tableName
|
||||
*/
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
/**
|
||||
* @param tableName the tableName to set
|
||||
*/
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: DnsDomainConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DnsDomainCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="dns_domain_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -27,41 +24,16 @@ public class DnsDomainCfg extends ComplexkeywordCfg {
|
||||
|
||||
private static final long serialVersionUID = -2761078174512000577L;
|
||||
|
||||
/**
|
||||
* district
|
||||
* @return district
|
||||
*/
|
||||
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(district))
|
||||
return "QNAME";
|
||||
else
|
||||
return district;
|
||||
}
|
||||
/**
|
||||
* @param district the district to set
|
||||
*/
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
this.district="QNAME";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ package com.nis.domain.configuration;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class HttpReqHeadCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="http_req_head_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -25,23 +24,15 @@ public class HttpReqHeadCfg extends ComplexkeywordCfg {
|
||||
|
||||
private static final long serialVersionUID = 8231984530204284334L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ package com.nis.domain.configuration;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class HttpResHeadCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="http_res_head_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -24,24 +23,17 @@ public class HttpResHeadCfg extends ComplexkeywordCfg {
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 1306491838846197119L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.exprType=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: MailAttachContentConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailAttachContentCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="mail_attach_content_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -27,33 +24,16 @@ public class MailAttachContentCfg extends ComplexkeywordCfg {
|
||||
|
||||
private static final long serialVersionUID = -5535627006599408223L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "AttachContent";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="AttachContent";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: MailAttachNameConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailAttachNameCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="mail_attach_name_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -27,33 +24,16 @@ public class MailAttachNameCfg extends ComplexkeywordCfg {
|
||||
|
||||
private static final long serialVersionUID = 9067647371707152226L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "AttachName";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="AttachName";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: MailContentConfig.java
|
||||
* @Description: TODO
|
||||
@@ -27,33 +25,16 @@ public class MailContentCfg extends ComplexkeywordCfg{
|
||||
|
||||
private static final long serialVersionUID = -4257845942210782532L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "Content";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="Content";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: MailFromConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailFromCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="mail_from_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -28,33 +25,16 @@ public class MailFromCfg extends ComplexkeywordCfg {
|
||||
private static final long serialVersionUID = 7605303118334439422L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "From";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 0;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="From";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: MailSubjectConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailSubjectCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="mail_subject_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -27,23 +24,16 @@ public class MailSubjectCfg extends ComplexkeywordCfg {
|
||||
|
||||
private static final long serialVersionUID = -547690498444330212L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "Subject";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 3;
|
||||
else
|
||||
return this.exprType;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="Subject";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: MailToConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailToCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="mail_to_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -28,33 +25,16 @@ public class MailToCfg extends ComplexkeywordCfg {
|
||||
private static final long serialVersionUID = -7755270610917876826L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "To";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 3;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="To";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,16 +44,101 @@ public class NumBoundaryCfg extends BaseCfg<NumBoundaryCfg> {
|
||||
* 数值上界
|
||||
*/
|
||||
protected Integer isHexbin ;
|
||||
protected Long compileId;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
protected void initDefaultValue() {
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType = 3;
|
||||
this.matchMethod = 0;
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
/**
|
||||
* lowBounadry
|
||||
* @return lowBounadry
|
||||
*/
|
||||
|
||||
public Long getLowBounadry() {
|
||||
return lowBounadry;
|
||||
}
|
||||
/**
|
||||
* @param lowBounadry the lowBounadry to set
|
||||
*/
|
||||
public void setLowBounadry(Long lowBounadry) {
|
||||
this.lowBounadry = lowBounadry;
|
||||
}
|
||||
/**
|
||||
* upBoundary
|
||||
* @return upBoundary
|
||||
*/
|
||||
|
||||
public Long getUpBoundary() {
|
||||
return upBoundary;
|
||||
}
|
||||
/**
|
||||
* @param upBoundary the upBoundary to set
|
||||
*/
|
||||
public void setUpBoundary(Long upBoundary) {
|
||||
this.upBoundary = upBoundary;
|
||||
}
|
||||
/**
|
||||
* exprType
|
||||
* @return exprType
|
||||
*/
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
/**
|
||||
* @param exprType the exprType to set
|
||||
*/
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
/**
|
||||
* matchMethod
|
||||
* @return matchMethod
|
||||
*/
|
||||
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
/**
|
||||
* @param matchMethod the matchMethod to set
|
||||
*/
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
/**
|
||||
* isHexbin
|
||||
* @return isHexbin
|
||||
*/
|
||||
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
/**
|
||||
* @param isHexbin the isHexbin to set
|
||||
*/
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
/**
|
||||
* compileId
|
||||
* @return compileId
|
||||
*/
|
||||
|
||||
public Long getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
/**
|
||||
* @param compileId the compileId to set
|
||||
*/
|
||||
public void setCompileId(Long compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -128,19 +128,19 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
this.endDate = endDate;
|
||||
}
|
||||
@JsonIgnore
|
||||
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Long parentId, boolean cascade){
|
||||
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Integer parentId, boolean cascade){
|
||||
for (int i=0; i<sourcelist.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = sourcelist.get(i);
|
||||
if (serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getId()!=null
|
||||
&& serviceDictInfo.getParent().getId().equals(parentId)){
|
||||
if (serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getServiceDictId()!=null
|
||||
&& serviceDictInfo.getParent().getServiceDictId().equals(parentId)){
|
||||
list.add(serviceDictInfo);
|
||||
if (cascade){
|
||||
// 判断是否还有子节点, 有则继续获取子节点
|
||||
for (int j=0; j<sourcelist.size(); j++){
|
||||
ServiceDictInfo child = sourcelist.get(j);
|
||||
if (child.getParent()!=null && child.getParent().getId()!=null
|
||||
&& child.getParent().getId().equals(serviceDictInfo.getId())){
|
||||
sortList(list, sourcelist, serviceDictInfo.getId(), true);
|
||||
if (child.getParent()!=null && child.getParent().getServiceDictId()!=null
|
||||
&& child.getParent().getServiceDictId().equals(serviceDictInfo.getServiceDictId())){
|
||||
sortList(list, sourcelist, serviceDictInfo.getServiceDictId(), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -148,4 +148,31 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public static void checkList(List<ServiceDictInfo> list,List<ServiceDictInfo> parentList, List<ServiceDictInfo> sourcelist, boolean cascade){
|
||||
for(ServiceDictInfo serviceUp:parentList){
|
||||
list.add(serviceUp);
|
||||
//判断是否有子节点,有则继续获取子节点
|
||||
sortList(list, sourcelist, serviceUp.getServiceDictId(), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//顶层的数量
|
||||
|
||||
public static Integer topCount(List<ServiceDictInfo> list,Integer parentId){
|
||||
Integer count = 0;
|
||||
List<ServiceDictInfo> listTemp = new ArrayList<ServiceDictInfo>();
|
||||
for(ServiceDictInfo serviceDictInfo:list){
|
||||
if(serviceDictInfo.getParent()!=null&&serviceDictInfo.getParent().getServiceDictId()!=null&&serviceDictInfo.getParent().getServiceDictId()==parentId){
|
||||
listTemp.add(serviceDictInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return listTemp.size();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -57,4 +57,17 @@ public class SipOriginalCfg extends ComplexkeywordCfg {
|
||||
else
|
||||
return this.matchMethod;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="ORIGINAL_CALL";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: SipTerminalConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class SipTerminalCfg extends ComplexkeywordCfg{
|
||||
public static final String tableName="sip_terminal_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -28,33 +25,16 @@ public class SipTerminalCfg extends ComplexkeywordCfg{
|
||||
private static final long serialVersionUID = 7164399463108973251L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "TERMINAL_CALL";
|
||||
else
|
||||
return this.district;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 3;
|
||||
else
|
||||
return this.matchMethod;
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="TERMINAL_CALL";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: SslCertConfig.java
|
||||
* @Description: TODO
|
||||
@@ -28,34 +26,16 @@ public class SslCertCfg extends ComplexkeywordCfg{
|
||||
private static final long serialVersionUID = -6121146112218278084L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "CERT";
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
else
|
||||
return super.getDistrict();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 3;
|
||||
else
|
||||
return this.matchMethod;
|
||||
super.initDefaultValue();
|
||||
this.district="CERT";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* @ClassName: SslSniConfig.java
|
||||
* @Description: TODO
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.lang.StringUtils;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class SslSniCfg extends ComplexkeywordCfg {
|
||||
public static final String tableName="ssl_sni_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -27,34 +24,16 @@ public class SslSniCfg extends ComplexkeywordCfg {
|
||||
|
||||
private static final long serialVersionUID = -6648964841408445457L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getDistrict()
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public String getDistrict() {
|
||||
if(StringUtils.isBlank(this.district))
|
||||
return "SNI";
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
else
|
||||
return super.getDistrict();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseStringConfig#getExprType()
|
||||
*/
|
||||
@Override
|
||||
public Integer getExprType() {
|
||||
if(this.exprType==null)
|
||||
return 0;
|
||||
else
|
||||
return this.exprType;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.restful.BaseEnhancedStringConfig#getMatchMethod()
|
||||
*/
|
||||
@Override
|
||||
public Integer getMatchMethod() {
|
||||
if(this.matchMethod==null)
|
||||
return 3;
|
||||
else
|
||||
return this.matchMethod;
|
||||
super.initDefaultValue();
|
||||
this.district="SNI";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.web.service.ArchiveServcie;
|
||||
@@ -28,13 +27,16 @@ import com.nis.web.service.RoleService;
|
||||
import com.nis.web.service.SystemService;
|
||||
import com.nis.web.service.UserService;
|
||||
import com.nis.web.service.configuration.AppCfgService;
|
||||
import com.nis.web.service.configuration.ComplexStringCfgService;
|
||||
import com.nis.web.service.configuration.FtpCfgService;
|
||||
import com.nis.web.service.configuration.IpCfgService;
|
||||
import com.nis.web.service.configuration.MailCfgService;
|
||||
import com.nis.web.service.configuration.MediaCfgService;
|
||||
import com.nis.web.service.configuration.NumCfgService;
|
||||
import com.nis.web.service.configuration.RequestInfoService;
|
||||
import com.nis.web.service.configuration.ServiceDictInfoService;
|
||||
import com.nis.web.service.configuration.SslCfgService;
|
||||
import com.nis.web.service.configuration.StringCfgService;
|
||||
import com.nis.web.service.configuration.SysDictInfoService;
|
||||
import com.nis.web.service.configuration.TunnelCfgService;
|
||||
import com.nis.web.service.configuration.WebCfgService;
|
||||
@@ -110,6 +112,12 @@ public class BaseController {
|
||||
|
||||
@Autowired
|
||||
protected RequestInfoService requestInfoService;
|
||||
@Autowired
|
||||
protected StringCfgService stringCfgService;
|
||||
@Autowired
|
||||
protected NumCfgService numCfgService;
|
||||
@Autowired
|
||||
protected ComplexStringCfgService complexStringCfgService;
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* 增强字符串相关配置控制类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/complex")
|
||||
public class ComplexStringCfgController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"list"})
|
||||
public String cfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")ComplexkeywordCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(cfg!=null){
|
||||
Integer serviceId=cfg.getServiceId();
|
||||
logger.info("servcice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
cfg.setTableName(tableName);
|
||||
Page<ComplexkeywordCfg> searchPage=new Page<ComplexkeywordCfg>(request, response, 1);
|
||||
if(pageNo!=null) searchPage.setPageNo(pageNo);
|
||||
if(pageSize!=null) searchPage.setPageSize(pageSize);
|
||||
if(cfg.getPage()!=null){
|
||||
if(!StringUtils.isBlank(cfg.getPage().getOrderBy()));
|
||||
searchPage.setOrderBy(cfg.getPage().getOrderBy());
|
||||
}
|
||||
Page<ComplexkeywordCfg> page = complexStringCfgService.findPage(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "/cfg/complexCfgList";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
public String cfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
logger.info("sercice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
String className=complexStringCfgService.getClassName(tableName);
|
||||
logger.info("class name is "+className);
|
||||
String packageName=ComplexkeywordCfg.class.getPackage().getName();
|
||||
try {
|
||||
//通过反射获得ComplexkeywordCfg的子类的实例,并调用子类的initDefaultValue初始化默认值
|
||||
Class clazz=Class.forName(packageName+"."+className);
|
||||
ComplexkeywordCfg cfg=(ComplexkeywordCfg)clazz.newInstance();
|
||||
cfg.setTableName(tableName);
|
||||
cfg.initDefaultValue();
|
||||
cfg.setAction(action);
|
||||
cfg.setServiceId(serviceId);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
|
||||
// TODO Auto-generated catch block
|
||||
logger.error("打开新增IP窗口失败",e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
|
||||
return "/cfg/complexCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"updateForm"})
|
||||
public String updateStringCfgForm(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("tableName", tableName);
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
ComplexkeywordCfg searchBean=new ComplexkeywordCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setTableName(tableName);
|
||||
ComplexkeywordCfg cfg=complexStringCfgService.getStringCfgById(searchBean);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}else if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
ComplexkeywordCfg searchBean=new ComplexkeywordCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setTableName(tableName);
|
||||
ComplexkeywordCfg cfg=complexStringCfgService.getStringCfgById(searchBean);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的表名");
|
||||
}
|
||||
|
||||
return "/cfg/complexCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* addStringCfg(新增IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"saveOrUpdateCfg"})
|
||||
public String saveOrUpdateStringCfg(String cfgName,Model model, ComplexkeywordCfg cfg) {
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("cfgType","complex");
|
||||
logger.info("saveOrUpdateStringCfg loaded");
|
||||
if(cfg==null){
|
||||
logger.error("无法保存空的配置!");
|
||||
addMessage(model,"保存失败!");
|
||||
}else if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
int serviceId=cfg.getServiceId();
|
||||
long compileId=getCompileId(cfg);
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
cfg.setCompileId(compileId);
|
||||
if(cfg.getCfgId()==null){
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
complexStringCfgService.addStringCfg(cfg);
|
||||
}else{
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
complexStringCfgService.updateStringCfg(cfg);
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",cfg.getAction());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}else if(cfg.getServiceId()!=null){
|
||||
int serviceId=cfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
long compileId=getCompileId(cfg);
|
||||
cfg.setTableName(tableName);
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
cfg.setCompileId(compileId);
|
||||
if(cfg.getCfgId()==null){
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
complexStringCfgService.addStringCfg(cfg);
|
||||
}else{
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
complexStringCfgService.updateStringCfg(cfg);
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",cfg.getAction());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
addMessage(model,"保存失败!");
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(审核IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditStringCfg(String cfgName,ComplexkeywordCfg cfg,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(cfg==null){
|
||||
logger.error("无法审核空的配置!");
|
||||
}else if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
int audit=complexStringCfgService.getIsAudit(cfg);
|
||||
if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
}else{
|
||||
cfg.setAuditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setAuditTime(new Date());
|
||||
|
||||
if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
}else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=complexStringCfgService.auditStringCfg(cfg);
|
||||
}
|
||||
|
||||
}else if(cfg.getServiceId()!=null){
|
||||
int serviceId=cfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
cfg.setTableName(tableName);
|
||||
int audit=complexStringCfgService.getIsAudit(cfg);
|
||||
if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
}else{
|
||||
cfg.setAuditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setAuditTime(new Date());
|
||||
|
||||
if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
}else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=complexStringCfgService.auditStringCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/complex/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName"+cfgName;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(删除IP配置,逻辑删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteStringCfg(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("cfgType","complex");
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
int audit=complexStringCfgService.getIsAudit(tableName,cfgId);
|
||||
//未审核时可删除
|
||||
if(audit!=Constants.AUDIT_YES){
|
||||
ComplexkeywordCfg cfg=new ComplexkeywordCfg();
|
||||
cfg.setCfgId(cfgId);
|
||||
cfg.setTableName(tableName);
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=complexStringCfgService.deleteStringCfg(cfg);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
}
|
||||
|
||||
}else if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
ComplexkeywordCfg cfg=new ComplexkeywordCfg();
|
||||
cfg.setCfgId(cfgId);
|
||||
cfg.setTableName(tableName);
|
||||
int audit=complexStringCfgService.getIsAudit(cfg);
|
||||
//未审核时可删除
|
||||
if(audit!=Constants.AUDIT_YES){
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=complexStringCfgService.deleteStringCfg(cfg);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "/cfg/resultPage";
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getCompileId(获取编译ID)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*long
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected long getCompileId(BaseCfg cfg){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -41,12 +41,14 @@ public class IpCfgController extends BaseController{
|
||||
return "/cfg/ipWhiteForm";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"ipCfgList"})
|
||||
@RequestMapping(value = {"list"})
|
||||
public String ipCfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(ipCfg!=null){
|
||||
Integer serviceId=ipCfg.getServiceId();
|
||||
logger.info("servcice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
@@ -62,9 +64,8 @@ public class IpCfgController extends BaseController{
|
||||
}
|
||||
Page<BaseIpCfg> page = ipCfgService.findPage(searchPage, ipCfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", ipCfg.getAction());
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
@@ -84,8 +85,11 @@ public class IpCfgController extends BaseController{
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"ipCfgForm"})
|
||||
@RequestMapping(value = {"form"})
|
||||
public String ipCfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
logger.info("sercice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
@@ -104,8 +108,8 @@ public class IpCfgController extends BaseController{
|
||||
ipcfg.initDefaultValue();
|
||||
ipcfg.setAction(action);
|
||||
ipcfg.setServiceId(serviceId);
|
||||
model.addAttribute("_ipCfg", ipcfg);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("_cfg", ipcfg);
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
@@ -127,16 +131,19 @@ public class IpCfgController extends BaseController{
|
||||
|
||||
return "/cfg/ipCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"updateIpCfgForm"})
|
||||
@RequestMapping(value = {"updateForm"})
|
||||
public String updateIpCfgForm(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
BaseIpCfg searchBean=new BaseIpCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setTableName(tableName);
|
||||
BaseIpCfg ipCfg=ipCfgService.getIpCfgById(searchBean);
|
||||
model.addAttribute("_ipCfg", ipCfg);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("_cfg", ipCfg);
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
@@ -155,8 +162,8 @@ public class IpCfgController extends BaseController{
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setTableName(tableName);
|
||||
BaseIpCfg ipCfg=ipCfgService.getIpCfgById(searchBean);
|
||||
model.addAttribute("_ipCfg", ipCfg);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("_cfg", ipCfg);
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
@@ -184,8 +191,10 @@ public class IpCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"saveOrUpdateIpCfg"})
|
||||
@RequestMapping(value = {"saveOrUpdateCfg"})
|
||||
public String saveOrUpdateIpCfg(String cfgName,Model model, BaseIpCfg ipCfg) {
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("cfgType", "ip");
|
||||
logger.info("saveOrUpdateIpCfg loaded");
|
||||
if(ipCfg==null){
|
||||
logger.error("无法保存空的配置!");
|
||||
@@ -193,21 +202,25 @@ public class IpCfgController extends BaseController{
|
||||
}else if(!StringUtils.isBlank(ipCfg.getTableName())){
|
||||
int serviceId=ipCfg.getServiceId();
|
||||
long compileId=getCompileId(ipCfg);
|
||||
ipCfg.setCreatorId(ipCfg.getCurrentUser().getId());
|
||||
ipCfg.setCreateTime(new Date());
|
||||
ipCfg.setIsValid(Constants.VALID_NO);
|
||||
ipCfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
ipCfg.setCompileId(compileId);
|
||||
if(ipCfg.getCfgId()==null)
|
||||
if(ipCfg.getCfgId()==null){
|
||||
ipCfg.setCreatorId(ipCfg.getCurrentUser().getId());
|
||||
ipCfg.setCreateTime(new Date());
|
||||
ipCfgService.addIpCfg(ipCfg);
|
||||
else
|
||||
}else{
|
||||
ipCfg.setEditorId(ipCfg.getCurrentUser().getId());
|
||||
ipCfg.setEditTime(new Date());
|
||||
ipCfgService.updateIpCfg(ipCfg);
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",ipCfg.getAction());
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("tableName", ipCfg.getTableName());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}else if(ipCfg.getServiceId()!=null){
|
||||
int serviceId=ipCfg.getServiceId();
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
@@ -219,13 +232,17 @@ public class IpCfgController extends BaseController{
|
||||
ipCfg.setIsValid(Constants.VALID_NO);
|
||||
ipCfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
ipCfg.setCompileId(compileId);
|
||||
if(ipCfg.getCfgId()==null)
|
||||
if(ipCfg.getCfgId()==null){
|
||||
ipCfg.setCreatorId(ipCfg.getCurrentUser().getId());
|
||||
ipCfg.setCreateTime(new Date());
|
||||
ipCfgService.addIpCfg(ipCfg);
|
||||
else
|
||||
}else{
|
||||
ipCfg.setEditorId(ipCfg.getCurrentUser().getId());
|
||||
ipCfg.setEditTime(new Date());
|
||||
ipCfgService.updateIpCfg(ipCfg);
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
}
|
||||
model.addAttribute("action",ipCfg.getAction());
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("tableName", ipCfg.getTableName());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}
|
||||
}
|
||||
@@ -236,52 +253,6 @@ public class IpCfgController extends BaseController{
|
||||
return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+ipCfg.getServiceId()+"&action="+ipCfg.getAction()+"&cfgName="+cfgName);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* updateIpCfg(更新IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
// @RequestMapping(value = {"updateIpCfg"})
|
||||
// public String updateIpCfg(@ModelAttribute("ipCfg") BaseIpCfg ipCfg) {
|
||||
// if(ipCfg==null){
|
||||
// logger.error("无法修改空的配置!");
|
||||
// }else if(!StringUtils.isBlank(ipCfg.getTableName())){
|
||||
// int audit=ipCfgService.getIsAudit(ipCfg);
|
||||
// //审核未通过方可修改
|
||||
// if(audit==Constants.AUDIT_NO){
|
||||
// ipCfg.setEditorId(ipCfg.getCurrentUser().getId());
|
||||
// ipCfg.setEditTime(new Date());
|
||||
// int result=ipCfgService.updateIpCfg(ipCfg);
|
||||
// }else{
|
||||
// logger.warn("审核未通过配置方可修改!");
|
||||
// }
|
||||
// }else if(ipCfg.getServiceId()!=null){
|
||||
// int serviceId=ipCfg.getServiceId();
|
||||
// ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
// if(serviceConfigInfo!=null){
|
||||
// String tableName=serviceConfigInfo.getTableName();
|
||||
// if(!StringUtils.isBlank(tableName)){
|
||||
// ipCfg.setTableName(tableName);
|
||||
// int audit=ipCfgService.getIsAudit(ipCfg);
|
||||
// //审核未通过方可修改
|
||||
// if(audit==Constants.AUDIT_NO){
|
||||
// ipCfg.setEditorId(ipCfg.getCurrentUser().getId());
|
||||
// ipCfg.setEditTime(new Date());
|
||||
// int result=ipCfgService.updateIpCfg(ipCfg);
|
||||
// }else{
|
||||
// logger.warn("审核未通过配置方可修改!");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// logger.error("无法确定IP配置的表名!");
|
||||
// }
|
||||
// return "/cfg/resultPage";
|
||||
// }
|
||||
/**
|
||||
*
|
||||
* auditIpCfg(审核IP配置)
|
||||
@@ -291,8 +262,9 @@ public class IpCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditIpCfg"})
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditIpCfg(String cfgName,BaseIpCfg ipCfg,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(ipCfg==null){
|
||||
logger.error("无法审核空的配置!");
|
||||
}else if(!StringUtils.isBlank(ipCfg.getTableName())){
|
||||
@@ -310,7 +282,6 @@ public class IpCfgController extends BaseController{
|
||||
}
|
||||
int result=ipCfgService.auditIpCfg(ipCfg);
|
||||
}
|
||||
|
||||
}else if(ipCfg.getServiceId()!=null){
|
||||
int serviceId=ipCfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
@@ -331,13 +302,14 @@ public class IpCfgController extends BaseController{
|
||||
ipCfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=ipCfgService.auditIpCfg(ipCfg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/ip/ipCfgList?serviceId="+ipCfg.getServiceId()+"&action="+ipCfg.getAction()+"&cfgName"+cfgName;
|
||||
return "redirect:" + adminPath + "/cfg/ip/list?serviceId="+ipCfg.getServiceId()+"&action="+ipCfg.getAction()+"&cfgName"+cfgName;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -348,8 +320,12 @@ public class IpCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteIpCfg"})
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteIpCfg(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("cfgType", "ip");
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
int audit=ipCfgService.getIsAudit(tableName,cfgId);
|
||||
//未审核时可删除
|
||||
@@ -361,9 +337,7 @@ public class IpCfgController extends BaseController{
|
||||
ipCfg.setEditTime(new Date());
|
||||
ipCfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=ipCfgService.deleteIpCfg(ipCfg);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("tableName", tableName);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
@@ -384,9 +358,7 @@ public class IpCfgController extends BaseController{
|
||||
ipCfg.setEditTime(new Date());
|
||||
ipCfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=ipCfgService.deleteIpCfg(ipCfg);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("tableName", tableName);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* 字符串相关配置控制类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/num")
|
||||
public class NumCfgController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"list"})
|
||||
public String cfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")NumBoundaryCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(cfg!=null){
|
||||
Integer serviceId=cfg.getServiceId();
|
||||
logger.info("servcice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
Page<NumBoundaryCfg> searchPage=new Page<NumBoundaryCfg>(request, response, 1);
|
||||
if(pageNo!=null) searchPage.setPageNo(pageNo);
|
||||
if(pageSize!=null) searchPage.setPageSize(pageSize);
|
||||
if(cfg.getPage()!=null){
|
||||
if(!StringUtils.isBlank(cfg.getPage().getOrderBy()));
|
||||
searchPage.setOrderBy(cfg.getPage().getOrderBy());
|
||||
}
|
||||
Page<NumBoundaryCfg> page = numCfgService.findPage(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "/cfg/numCfgList";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
public String cfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
logger.info("sercice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
NumBoundaryCfg cfg=new NumBoundaryCfg();
|
||||
cfg.initDefaultValue();
|
||||
cfg.setAction(action);
|
||||
cfg.setServiceId(serviceId);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
|
||||
return "/cfg/numCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"updateForm"})
|
||||
public String updateStringCfgForm(int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
NumBoundaryCfg searchBean=new NumBoundaryCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
NumBoundaryCfg cfg=numCfgService.getNumCfgById(searchBean);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的表名");
|
||||
}
|
||||
|
||||
return "/cfg/numCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* addStringCfg(新增IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"saveOrUpdateCfg"})
|
||||
public String saveOrUpdateStringCfg(String cfgName,Model model, NumBoundaryCfg cfg) {
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("cfgType","num");
|
||||
logger.info("saveOrUpdateStringCfg loaded");
|
||||
if(cfg==null){
|
||||
logger.error("无法保存空的配置!");
|
||||
addMessage(model,"保存失败!");
|
||||
}else if(cfg.getServiceId()!=null){
|
||||
int serviceId=cfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
long compileId=getCompileId(cfg);
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
cfg.setCompileId(compileId);
|
||||
if(cfg.getCfgId()==null){
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
numCfgService.addNumCfg(cfg);
|
||||
}else{
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
numCfgService.updateNumCfg(cfg);
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",cfg.getAction());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}
|
||||
}else{
|
||||
addMessage(model,"保存失败!");
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(审核IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditStringCfg(String cfgName,NumBoundaryCfg cfg,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(cfg==null){
|
||||
logger.error("无法审核空的配置!");
|
||||
}else if(cfg.getServiceId()!=null){
|
||||
int serviceId=cfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
int audit=numCfgService.getIsAudit(cfg);
|
||||
if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
}else{
|
||||
cfg.setAuditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setAuditTime(new Date());
|
||||
|
||||
if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
}else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=numCfgService.auditNumCfg(cfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/num/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName"+cfgName;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(删除IP配置,逻辑删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteStringCfg(int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("cfgType","num");
|
||||
if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
NumBoundaryCfg cfg=new NumBoundaryCfg();
|
||||
cfg.setCfgId(cfgId);
|
||||
int audit=numCfgService.getIsAudit(cfg);
|
||||
//未审核时可删除
|
||||
if(audit!=Constants.AUDIT_YES){
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=numCfgService.deleteNumCfg(cfg);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "/cfg/resultPage";
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getCompileId(获取编译ID)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*long
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected long getCompileId(BaseCfg cfg){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.service.configuration.RequestInfoService;
|
||||
@@ -58,18 +59,22 @@ public class RequestInfoController extends BaseController{
|
||||
try {
|
||||
if(requestInfo.getId()!=null){
|
||||
// 保存用户信息
|
||||
logger.info(requestInfo.getId()+"修改成功");
|
||||
requestInfoService.saveOrUpdate(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
}else{
|
||||
if (!"true".equals(checkRequestNumber(requestInfo.getRequestNumber()))){
|
||||
logger.info(requestInfo.getRequestNumber()+"重复数据");
|
||||
addMessage(model, "error");
|
||||
return form(requestInfo, model);
|
||||
}
|
||||
// 保存用户信息
|
||||
requestInfoService.saveOrUpdate(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
logger.info(requestInfo.getId()+"保存成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
addMessage(model, "error");
|
||||
}
|
||||
@@ -95,8 +100,9 @@ public class RequestInfoController extends BaseController{
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "requestExamine")
|
||||
public String requestExamine(RequestInfo requestInfo, Model model){
|
||||
public String requestExamine(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.requestExamine(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
@@ -107,8 +113,9 @@ public class RequestInfoController extends BaseController{
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "requestCancelExamine")
|
||||
public String requestCancelExamine(RequestInfo requestInfo, Model model){
|
||||
public String requestCancelExamine(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.requestCancelExamine(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
@@ -119,8 +126,9 @@ public class RequestInfoController extends BaseController{
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
public String delete(RequestInfo requestInfo, Model model){
|
||||
public String delete(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.delete(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryName;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
@@ -58,7 +56,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表
|
||||
* 查询业务辅助表-业务字典信息列表(无条件分页查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
@@ -68,13 +66,66 @@ public class ServiceDictInfoController extends BaseController {
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
//查出顶层分页数据
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
//查出所有数据
|
||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictList();
|
||||
//处理数据,保留顶层中的所有下层数据
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
boolean flag = false;
|
||||
for(int i=allList.size()-1;i>=0;i--){
|
||||
ServiceDictInfo temp = allList.get(i);
|
||||
if(temp.getParent()!=null&&temp.getParent().getServiceDictId()!=null&&temp.getParent().getServiceDictId()==0){
|
||||
for(ServiceDictInfo topTemp:page.getList()){
|
||||
if(temp.getServiceDictId()==topTemp.getServiceDictId()){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
allList.remove(temp);
|
||||
flag=false;
|
||||
}else{
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
ServiceDictInfo.sortList(list,allList,0,true);
|
||||
//ServiceDictInfo.sortList(list, allList, 0, true);
|
||||
model.addAttribute("list", list);
|
||||
return "/cfg/serviceDictList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表(含条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"searchList"})
|
||||
public String searchList(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
|
||||
&&serviceDictInfo.getItemCode()==null
|
||||
&&serviceDictInfo.getItemType()==null
|
||||
&&serviceDictInfo.getBeginDate()==null
|
||||
&&serviceDictInfo.getEditTime()==null){
|
||||
|
||||
return "redirect:"+ adminPath + "/configuration/serviceDictInfo/list";
|
||||
}
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictSearchList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
return "/cfg/serviceDictInfoSearchList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 进入添加或修改页面
|
||||
* @param serviceDictInfo
|
||||
@@ -86,6 +137,13 @@ public class ServiceDictInfoController extends BaseController {
|
||||
if(doAction!=null&&doAction.equals("0")){
|
||||
return "/cfg/serviceDictInfo";
|
||||
}
|
||||
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getId() == null) {
|
||||
ServiceDictInfo parent = new ServiceDictInfo();
|
||||
parent.setServiceDictId(0);
|
||||
serviceDictInfo.setParent(parent);
|
||||
}
|
||||
model.addAttribute("serviceDictInfo", serviceDictInfo);
|
||||
|
||||
return "/cfg/serviceDictForm";
|
||||
}
|
||||
/**
|
||||
@@ -106,13 +164,17 @@ public class ServiceDictInfoController extends BaseController {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "保存配置失败!");
|
||||
}
|
||||
if(serviceDictInfo.getItemType()==3){
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/markList";
|
||||
}else{
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/list";
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/list";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* 删除(删除时删除所有下级菜单)
|
||||
* @param serviceDictInfo
|
||||
* @param model
|
||||
* @return
|
||||
@@ -142,11 +204,12 @@ public class ServiceDictInfoController extends BaseController {
|
||||
@RequestMapping(value = "treeData")
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response) {
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
List<ServiceDictInfo> list = serviceDictInfoService.findAllDict();
|
||||
//找出所有的非叶子配置
|
||||
List<ServiceDictInfo> list = serviceDictInfoService.findAllNoLeafDictList();
|
||||
for (int i=0; i<list.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = list.get(i);
|
||||
if (StringUtils.isBlank(extId) || (extId !=null && !extId.equals(serviceDictInfo.getServiceDictId().toString()))) {
|
||||
if(isShowHide != null && isShowHide.equals("0") && serviceDictInfo.getIsValid().equals(0)){
|
||||
if(serviceDictInfo.getIsValid().equals(0)){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
@@ -178,12 +241,19 @@ public class ServiceDictInfoController extends BaseController {
|
||||
if(doAction!=null&&doAction.equals("0")){
|
||||
return "/cfg/serviceDictMarkInfo";
|
||||
}
|
||||
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getId() == null) {
|
||||
ServiceDictInfo parent = new ServiceDictInfo();
|
||||
parent.setServiceDictId(0);
|
||||
serviceDictInfo.setParent(parent);
|
||||
}
|
||||
model.addAttribute("serviceDictInfo", serviceDictInfo);
|
||||
|
||||
return "/cfg/serviceDictMarkForm";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表
|
||||
* 查询标签列表(无条件分页查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
@@ -191,15 +261,67 @@ public class ServiceDictInfoController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"markList"})
|
||||
@RequestMapping(value = {"markList", ""})
|
||||
public String markList(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
//查出顶层分页数据
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictMarkList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
//查出所有数据
|
||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictMarkList();
|
||||
//处理数据,保留顶层中的所有下层数据
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
boolean flag = false;
|
||||
for(int i=allList.size()-1;i>=0;i--){
|
||||
ServiceDictInfo temp = allList.get(i);
|
||||
if(temp.getParent()!=null&&temp.getParent().getServiceDictId()!=null&&temp.getParent().getServiceDictId()==0){
|
||||
for(ServiceDictInfo topTemp:page.getList()){
|
||||
if(temp.getServiceDictId()==topTemp.getServiceDictId()){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
allList.remove(temp);
|
||||
flag=false;
|
||||
}else{
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictMarkList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
ServiceDictInfo.sortList(list,allList,0,true);
|
||||
//ServiceDictInfo.sortList(list, allList, 0, true);
|
||||
model.addAttribute("list", list);
|
||||
return "/cfg/serviceDictMarkList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表(含条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"searchMarkList"})
|
||||
public String searchMarkList(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
|
||||
&&serviceDictInfo.getItemCode()==null
|
||||
&&serviceDictInfo.getItemType()==null
|
||||
&&serviceDictInfo.getBeginDate()==null
|
||||
&&serviceDictInfo.getEditTime()==null){
|
||||
|
||||
return "redirect:"+ adminPath + "/configuration/serviceDictInfo/markList";
|
||||
}
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictSearchMarkList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
return "/cfg/serviceDictInfoSearchMarkList";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
@@ -242,4 +364,34 @@ public class ServiceDictInfoController extends BaseController {
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/markList";
|
||||
}
|
||||
|
||||
/**
|
||||
* isShowHide是否显示隐藏菜单
|
||||
* @param extId
|
||||
* @param isShowHidden
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "treeMarkData")
|
||||
public List<Map<String, Object>> treeMarkData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response) {
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
//找出所有的非叶子配置
|
||||
List<ServiceDictInfo> list = serviceDictInfoService.findAllNoLeafDictMarkList();
|
||||
for (int i=0; i<list.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = list.get(i);
|
||||
if (StringUtils.isBlank(extId) || (extId !=null && !extId.equals(serviceDictInfo.getServiceDictId().toString()))) {
|
||||
if(serviceDictInfo.getIsValid().equals(0)){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
map.put("id", serviceDictInfo.getServiceDictId());
|
||||
map.put("pId", serviceDictInfo.getParent().getServiceDictId());
|
||||
map.put("name",serviceDictInfo.getItemValue());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* 字符串相关配置控制类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/string")
|
||||
public class StringCfgController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"list"})
|
||||
public String stringCfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")BaseStringCfg stringCfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(stringCfg!=null){
|
||||
Integer serviceId=stringCfg.getServiceId();
|
||||
logger.info("servcice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
stringCfg.setTableName(tableName);
|
||||
Page<BaseStringCfg> searchPage=new Page<BaseStringCfg>(request, response, 1);
|
||||
if(pageNo!=null) searchPage.setPageNo(pageNo);
|
||||
if(pageSize!=null) searchPage.setPageSize(pageSize);
|
||||
if(stringCfg.getPage()!=null){
|
||||
if(!StringUtils.isBlank(stringCfg.getPage().getOrderBy()));
|
||||
searchPage.setOrderBy(stringCfg.getPage().getOrderBy());
|
||||
}
|
||||
Page<BaseStringCfg> page = stringCfgService.findPage(searchPage, stringCfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", stringCfg.getAction());
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "/cfg/stringCfgList";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
public String stringCfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
logger.info("sercice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
String className=stringCfgService.getClassName(tableName);
|
||||
logger.info("class name is "+className);
|
||||
String packageName=BaseStringCfg.class.getPackage().getName();
|
||||
try {
|
||||
//通过反射获得BaseStringCfg的子类的实例,并调用子类的initDefaultValue初始化默认值
|
||||
Class clazz=Class.forName(packageName+"."+className);
|
||||
BaseStringCfg stringcfg=(BaseStringCfg)clazz.newInstance();
|
||||
stringcfg.setTableName(tableName);
|
||||
stringcfg.initDefaultValue();
|
||||
stringcfg.setAction(action);
|
||||
stringcfg.setServiceId(serviceId);
|
||||
model.addAttribute("_cfg", stringcfg);
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
|
||||
// TODO Auto-generated catch block
|
||||
logger.error("打开新增IP窗口失败",e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
|
||||
return "/cfg/stringCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"updateForm"})
|
||||
public String updateStringCfgForm(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("tableName", tableName);
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
BaseStringCfg searchBean=new BaseStringCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setTableName(tableName);
|
||||
BaseStringCfg stringCfg=stringCfgService.getStringCfgById(searchBean);
|
||||
model.addAttribute("_cfg", stringCfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}else if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
BaseStringCfg searchBean=new BaseStringCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setTableName(tableName);
|
||||
BaseStringCfg stringCfg=stringCfgService.getStringCfgById(searchBean);
|
||||
model.addAttribute("_cfg", stringCfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("未获取到正确的表名");
|
||||
}
|
||||
|
||||
return "/cfg/stringCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* addStringCfg(新增IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"saveOrUpdateCfg"})
|
||||
public String saveOrUpdateStringCfg(String cfgName,Model model, BaseStringCfg stringCfg) {
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("cfgType","string");
|
||||
logger.info("saveOrUpdateStringCfg loaded");
|
||||
if(stringCfg==null){
|
||||
logger.error("无法保存空的配置!");
|
||||
addMessage(model,"保存失败!");
|
||||
}else if(!StringUtils.isBlank(stringCfg.getTableName())){
|
||||
int serviceId=stringCfg.getServiceId();
|
||||
long compileId=getCompileId(stringCfg);
|
||||
stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setCreateTime(new Date());
|
||||
stringCfg.setIsValid(Constants.VALID_NO);
|
||||
stringCfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
stringCfg.setCompileId(compileId);
|
||||
if(stringCfg.getCfgId()==null){
|
||||
stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setCreateTime(new Date());
|
||||
stringCfgService.addStringCfg(stringCfg);
|
||||
}else{
|
||||
stringCfg.setEditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setEditTime(new Date());
|
||||
stringCfgService.updateStringCfg(stringCfg);
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",stringCfg.getAction());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}else if(stringCfg.getServiceId()!=null){
|
||||
int serviceId=stringCfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
long compileId=getCompileId(stringCfg);
|
||||
stringCfg.setTableName(tableName);
|
||||
stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setCreateTime(new Date());
|
||||
stringCfg.setIsValid(Constants.VALID_NO);
|
||||
stringCfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
stringCfg.setCompileId(compileId);
|
||||
if(stringCfg.getCfgId()==null){
|
||||
stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setCreateTime(new Date());
|
||||
stringCfgService.addStringCfg(stringCfg);
|
||||
}else{
|
||||
stringCfg.setEditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setEditTime(new Date());
|
||||
stringCfgService.updateStringCfg(stringCfg);
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",stringCfg.getAction());
|
||||
addMessage(model,"保存成功,正在为您跳转页面...");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
addMessage(model,"保存失败!");
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+stringCfg.getServiceId()+"&action="+stringCfg.getAction()+"&cfgName="+cfgName);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(审核IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditStringCfg(String cfgName,BaseStringCfg stringCfg,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
if(stringCfg==null){
|
||||
logger.error("无法审核空的配置!");
|
||||
}else if(!StringUtils.isBlank(stringCfg.getTableName())){
|
||||
int audit=stringCfgService.getIsAudit(stringCfg);
|
||||
if(audit==Constants.AUDIT_YES&&stringCfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
}else{
|
||||
stringCfg.setAuditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setAuditTime(new Date());
|
||||
|
||||
if(stringCfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
stringCfg.setIsValid(Constants.VALID_NO);
|
||||
}else if(stringCfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
stringCfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=stringCfgService.auditStringCfg(stringCfg);
|
||||
}
|
||||
|
||||
}else if(stringCfg.getServiceId()!=null){
|
||||
int serviceId=stringCfg.getServiceId();
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
String tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
stringCfg.setTableName(tableName);
|
||||
int audit=stringCfgService.getIsAudit(stringCfg);
|
||||
if(audit==Constants.AUDIT_YES&&stringCfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
}else{
|
||||
stringCfg.setAuditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setAuditTime(new Date());
|
||||
|
||||
if(stringCfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
stringCfg.setIsValid(Constants.VALID_NO);
|
||||
}else if(stringCfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
stringCfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=stringCfgService.auditStringCfg(stringCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/string/list?serviceId="+stringCfg.getServiceId()+"&action="+stringCfg.getAction()+"&cfgName"+cfgName;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(删除IP配置,逻辑删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteStringCfg(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("cfgType","string");
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
int audit=stringCfgService.getIsAudit(tableName,cfgId);
|
||||
//未审核时可删除
|
||||
if(audit!=Constants.AUDIT_YES){
|
||||
BaseStringCfg stringCfg=new BaseStringCfg();
|
||||
stringCfg.setCfgId(cfgId);
|
||||
stringCfg.setTableName(tableName);
|
||||
stringCfg.setEditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setEditTime(new Date());
|
||||
stringCfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=stringCfgService.deleteStringCfg(stringCfg);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
}
|
||||
|
||||
}else if(serviceId!=null){
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
tableName=serviceConfigInfo.getTableName();
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
BaseStringCfg stringCfg=new BaseStringCfg();
|
||||
stringCfg.setCfgId(cfgId);
|
||||
stringCfg.setTableName(tableName);
|
||||
int audit=stringCfgService.getIsAudit(stringCfg);
|
||||
//未审核时可删除
|
||||
if(audit!=Constants.AUDIT_YES){
|
||||
stringCfg.setEditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setEditTime(new Date());
|
||||
stringCfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=stringCfgService.deleteStringCfg(stringCfg);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
logger.error("通过审核的配置不能删除!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
logger.error("无法确定IP配置的表名!");
|
||||
}
|
||||
return "/cfg/resultPage";
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getCompileId(获取编译ID)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*long
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected long getCompileId(BaseCfg cfg){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
/**
|
||||
* IP相关配置数据处理类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface ComplexStringCfgDao extends CrudDao<ComplexkeywordCfg>{
|
||||
public ComplexkeywordCfg getById(@Param("tableName")String tableName,@Param("cfgId")Long id) ;
|
||||
public ComplexkeywordCfg get(ComplexkeywordCfg entity) ;
|
||||
public List<ComplexkeywordCfg> findList(ComplexkeywordCfg entity) ;
|
||||
public int insert(ComplexkeywordCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(ComplexkeywordCfg entity) ;
|
||||
public int updateValid(ComplexkeywordCfg entity) ;
|
||||
public int audit(ComplexkeywordCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsValid(ComplexkeywordCfg entity);
|
||||
public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsAudit(ComplexkeywordCfg entity);
|
||||
}
|
||||
@@ -0,0 +1,394 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.ComplexStringCfgDao" >
|
||||
<resultMap id="ComplexStringMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="keywords" property="keywords" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="ComplexStringMapWithUser" type="com.nis.domain.configuration.ComplexkeywordCfg" extends="ComplexStringMap">
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="ComplexkeywordCfg_Column_List_with_id" >
|
||||
CFG_ID, CFG_DESC,DISTRICT, KEYWORDS,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
|
||||
</sql>
|
||||
<sql id="ComplexkeywordCfg_Column_List_with_id_alias" >
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.DISTRICT as district, r.KEYWORDS as keywords, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin,
|
||||
r.AREA_EFFECTIVE_IDS AS areaEffectiveIds
|
||||
</sql>
|
||||
<sql id="ComplexkeywordCfg_Column_List" >
|
||||
CFG_DESC,DISTRICT,KEYWORDS, ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS
|
||||
</sql>
|
||||
<sql id="ComplexkeywordCfg_Value_List" >
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{district,jdbcType=VARCHAR},#{keywords,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</sql>
|
||||
<select id="getById" resultMap="ComplexStringMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id" />
|
||||
FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="get" resultMap="ComplexStringMap" >
|
||||
SELECT
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id" />
|
||||
FROM ${tableName}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<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>
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="ComplexStringMapWithUser">
|
||||
select
|
||||
<!--<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>-->
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id_alias"/>
|
||||
<!-- </otherwise>
|
||||
</choose> -->
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
|
||||
,sdil.item_value as lableName
|
||||
</trim>
|
||||
from ${tableName} r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
|
||||
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
|
||||
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="district != null">
|
||||
AND r.DISTRICT like concat(concat('%',#{district,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
AND r.KEYWORDS like concat(concat('%',#{keywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND r.EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND r.MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND r.IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findAllList" resultMap="ComplexStringMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from ${tableName}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ${tableName} (
|
||||
<include refid="ComplexkeywordCfg_Column_List" />
|
||||
)values (
|
||||
<include refid="ComplexkeywordCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="district != null">
|
||||
district = #{district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
keywords = #{keywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="audit" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_VALID FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="getIsAudit" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_AUDIT FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -93,7 +93,7 @@
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Column_List_with_id_alias" >
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.IP_TYPE as ipType, r.SRC_IP as scrIp, r.SRC_IP_MASK as srcIpMask, r.SRC_PORT as srcPort,
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.IP_TYPE as ipType, r.SRC_IP as srcIp, r.SRC_IP_MASK as srcIpMask, r.SRC_PORT as srcPort,
|
||||
r.SRC_PORT_MASK as srcPortMask ,r.DST_IP as dstIp,r.DST_IP_MASK as dstIpMask, r.DST_PORT as dstPort, r.DST_PORT_MASK as dstPortMask,
|
||||
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||
@@ -244,8 +244,8 @@
|
||||
</trim>
|
||||
from ${tableName} r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user u on r.editor_id=u.id
|
||||
left join sys_user e on r.auditor_id=e.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
|
||||
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
|
||||
|
||||
29
src/main/java/com/nis/web/dao/configuration/NumCfgDao.java
Normal file
29
src/main/java/com/nis/web/dao/configuration/NumCfgDao.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
/**
|
||||
* IP相关配置数据处理类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface NumCfgDao extends CrudDao<NumBoundaryCfg>{
|
||||
public NumBoundaryCfg getById(@Param("cfgId")Long id) ;
|
||||
public NumBoundaryCfg get(NumBoundaryCfg entity) ;
|
||||
public List<NumBoundaryCfg> findList(NumBoundaryCfg entity) ;
|
||||
public int insert(NumBoundaryCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(NumBoundaryCfg entity) ;
|
||||
public int updateValid(NumBoundaryCfg entity) ;
|
||||
public int audit(NumBoundaryCfg entity) ;
|
||||
public int getIsValid(@Param("cfgId")Long id);
|
||||
public int getIsValid(NumBoundaryCfg entity);
|
||||
public int getIsAudit(@Param("cfgId")Long id);
|
||||
public int getIsAudit(NumBoundaryCfg entity);
|
||||
}
|
||||
397
src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml
Normal file
397
src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml
Normal file
@@ -0,0 +1,397 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.NumCfgDao" >
|
||||
<resultMap id="NumMap" type="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="low_bounadry" property="lowBounadry" jdbcType="BIGINT" />
|
||||
<result column="up_boundary" property="upBounadry" jdbcType="BIGINT" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="NumMapWithUser" type="com.nis.domain.configuration.NumBoundaryCfg" extends="NumMap">
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="NumCfg_Column_List_with_id" >
|
||||
CFG_ID, CFG_DESC, LOW_BOUNADRY,UP_BOUNADRY,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
|
||||
</sql>
|
||||
<sql id="NumCfg_Column_List_with_id_alias" >
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.LOW_BOUNADRY as lowBounadry,r.UP_BOUNADRY as upBounadry, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin,
|
||||
r.AREA_EFFECTIVE_IDS AS areaEffectiveIds
|
||||
</sql>
|
||||
<sql id="NumCfg_Column_List" >
|
||||
CFG_DESC, LOW_BOUNADRY,UP_BOUNADRY, ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS
|
||||
</sql>
|
||||
<sql id="NumCfg_Value_List" >
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{lowBounadry,jdbcType=BIGINT},#{upBounadry,jdbcType=BIGINT},#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</sql>
|
||||
<select id="getById" resultMap="NumMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
<include refid="NumCfg_Column_List_with_id" />
|
||||
FROM num_boundary_cfg
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="get" resultMap="NumMap" >
|
||||
SELECT
|
||||
<include refid="NumCfg_Column_List_with_id" />
|
||||
FROM num_boundary_cfg
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<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>
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="NumMapWithUser">
|
||||
select
|
||||
<!--<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>-->
|
||||
<include refid="NumCfg_Column_List_with_id_alias"/>
|
||||
<!-- </otherwise>
|
||||
</choose> -->
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
|
||||
,sdil.item_value as lableName
|
||||
</trim>
|
||||
from num_boundary_cfg r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
|
||||
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
|
||||
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lowBounadry != null">
|
||||
AND r.LOW_BOUNADRY=#{lowBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="upBounadry != null">
|
||||
AND r.UP_BOUNADRY=#{upBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND r.EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND r.MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND r.IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findAllList" resultMap="NumMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="NumCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from num_boundary_cfg
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into num_boundary_cfg (
|
||||
<include refid="NumCfg_Column_List" />
|
||||
)values (
|
||||
<include refid="NumCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
update num_boundary_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lowBounadry != null">
|
||||
low_bounadry = #{lowBounadry,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="upBounadry != null">
|
||||
up_Bounadry = #{upBounadry,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
update NUM_BOUNDARY_CFG set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="audit" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
update NUM_BOUNDARY_CFG set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_VALID FROM NUM_BOUNDARY_CFG
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="getIsAudit" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_AUDIT FROM NUM_BOUNDARY_CFG
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
@@ -12,18 +13,25 @@ import com.nis.web.dao.MyBatisDao;
|
||||
public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
|
||||
/**
|
||||
* 查询分类性质字典列表,
|
||||
* 查询分类性质顶层字典列表(无条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findDictList(ServiceDictInfo serviceDictInfo);
|
||||
|
||||
List<ServiceDictInfo> findTopDictList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询标签字典列表
|
||||
* 查出所有分类性质
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDictList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
List<ServiceDictInfo> findAllNoLeafDictList();
|
||||
/**
|
||||
* 查询分类性质字典列表(含条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findDictMarkList(ServiceDictInfo serviceDictInfo);
|
||||
List<ServiceDictInfo> findDictSearchList(ServiceDictInfo serviceDictInfo);
|
||||
|
||||
|
||||
/**
|
||||
@@ -39,14 +47,40 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
*/
|
||||
ServiceDictInfo getDictById(Integer serviceDictId);
|
||||
|
||||
/**
|
||||
* 查询所有非叶子节点字典配置信息
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDict();
|
||||
|
||||
//标签管理
|
||||
/**
|
||||
* 查询标签顶层字典列表(无条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findTopDictMarkList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查出所有标签
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDictMarkList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询标签字典列表(条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findDictSearchMarkList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllNoLeafDictMarkList();
|
||||
|
||||
|
||||
List<ServiceDictInfo> findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid);
|
||||
List<ServiceDictInfo> findAllItemDict(@Param("itemType")int itemType);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
|
||||
|
||||
|
||||
<!-- 查询分类性质列表 -->
|
||||
<select id="findDictList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type <![CDATA[<>]]> 3
|
||||
<!-- 查询分类性质顶层分页列表 -->
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type <![CDATA[<>]]> 3 AND parent_id = 0
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type like '%${itemType}%'
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
@@ -81,8 +81,110 @@
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询标签列表 -->
|
||||
<select id="findDictMarkList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
|
||||
<!-- 查询标签顶层分页列表 -->
|
||||
<select id="findTopDictMarkList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type = 3 AND parent_id = 0
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 查出所有分类性质 -->
|
||||
<select id="findAllDictList" resultType="serviceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
<include refid="menuJoins"/>
|
||||
WHERE s.is_valid =1 AND s.item_type <![CDATA[<>]]> 3
|
||||
</select>
|
||||
|
||||
<!-- 查出所有标签-->
|
||||
<select id="findAllDictMarkList" resultType="serviceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
<include refid="menuJoins"/>
|
||||
WHERE s.is_valid =1 AND s.item_type = 3
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询所有非叶子配置 -->
|
||||
<select id="findAllNoLeafDictList" resultType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type <![CDATA[<>]]> 3
|
||||
</select>
|
||||
<!-- 查询所有非叶子标签配置 -->
|
||||
<select id="findAllNoLeafDictMarkList" resultType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = 3
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分类性质条件查询 -->
|
||||
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type <![CDATA[<>]]> 3
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type like '%${itemType}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 标签条件查询 -->
|
||||
<select id="findDictSearchMarkList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type=3
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
@@ -91,7 +193,9 @@
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
@@ -133,12 +237,12 @@
|
||||
|
||||
|
||||
<!-- 查询非叶子节点的所有字典信息 -->
|
||||
|
||||
<!--
|
||||
<select id="findAllDict">
|
||||
select
|
||||
<include refid="serviceDictInfoColumns" />
|
||||
from service_dict_info s where s.is_leaf = 0;
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="update">
|
||||
@@ -172,5 +276,15 @@
|
||||
<include refid="serviceDictInfoColumns" />
|
||||
from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType};
|
||||
</select>
|
||||
|
||||
<sql id="menuJoins">
|
||||
LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
/**
|
||||
* IP相关配置数据处理类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public BaseStringCfg getById(@Param("tableName")String tableName,@Param("cfgId")Long id) ;
|
||||
public BaseStringCfg get(BaseStringCfg entity) ;
|
||||
public List<BaseStringCfg> findList(BaseStringCfg entity) ;
|
||||
public int insert(BaseStringCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(BaseStringCfg entity) ;
|
||||
public int updateValid(BaseStringCfg entity) ;
|
||||
public int audit(BaseStringCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsValid(BaseStringCfg entity);
|
||||
public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsAudit(BaseStringCfg entity);
|
||||
}
|
||||
407
src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml
Normal file
407
src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml
Normal file
@@ -0,0 +1,407 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.StringCfgDao" >
|
||||
<resultMap id="BaseStringMap" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseStringMapWithUser" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BaseStringCfg_Column_List_with_id" >
|
||||
CFG_ID, CFG_DESC, CFG_KEYWORDS,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
|
||||
</sql>
|
||||
<sql id="BaseStringCfg_Column_List_with_id_alias" >
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.CFG_KEYWORDS as cfgKeywords, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin,
|
||||
r.AREA_EFFECTIVE_IDS AS areaEffectiveIds
|
||||
</sql>
|
||||
<sql id="BaseStringCfg_Column_List" >
|
||||
CFG_DESC, CFG_KEYWORDS, ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS
|
||||
</sql>
|
||||
<sql id="BaseStringCfg_Value_List" >
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</sql>
|
||||
<select id="getById" resultMap="BaseStringMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
<include refid="BaseStringCfg_Column_List_with_id" />
|
||||
FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="get" resultMap="BaseStringMap" >
|
||||
SELECT
|
||||
<include refid="BaseStringCfg_Column_List_with_id" />
|
||||
FROM ${tableName}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<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>
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="BaseStringMapWithUser">
|
||||
select
|
||||
<!--<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>-->
|
||||
<include refid="BaseStringCfg_Column_List_with_id_alias"/>
|
||||
<!-- </otherwise>
|
||||
</choose> -->
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
|
||||
,sdil.item_value as lableName
|
||||
</trim>
|
||||
from ${tableName} r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
|
||||
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
|
||||
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgKeywords != null">
|
||||
AND r.CFG_KEYWORDS like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND r.EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND r.MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND r.IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findAllList" resultMap="BaseStringMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="BaseStringCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from ${tableName}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ${tableName} (
|
||||
<include refid="BaseStringCfg_Column_List" />
|
||||
)values (
|
||||
<include refid="BaseStringCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null">
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="audit" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_VALID FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="getIsAudit" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_AUDIT FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.web.dao.configuration.ComplexStringCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* String相关配置事务类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,ComplexkeywordCfg> {
|
||||
@Autowired
|
||||
protected ComplexStringCfgDao complexStringCfgDao;
|
||||
/**
|
||||
*
|
||||
* addStringCfg(新增IP类配置)
|
||||
* (继承ComplexkeywordCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int addStringCfg(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.insert(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
cfg.setTableName(tableName);
|
||||
logger.info("save "+tableName);
|
||||
return complexStringCfgDao.insert(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateStringCfg(更新IP类配置)
|
||||
* (继承ComplexkeywordCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int updateStringCfg(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.updateByPrimaryKeySelective(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
cfg.setTableName(tableName);
|
||||
logger.info("update "+tableName);
|
||||
return complexStringCfgDao.updateByPrimaryKeySelective(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(审核IP类配置)
|
||||
* (继承ComplexkeywordCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int auditStringCfg(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.audit(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
cfg.setTableName(tableName);
|
||||
logger.info("aduit "+tableName);
|
||||
return complexStringCfgDao.audit(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteStringCfg(删除IP类配置)
|
||||
* (继承ComplexkeywordCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int deleteStringCfg(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.updateValid(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
cfg.setTableName(tableName);
|
||||
logger.info("delete "+tableName);
|
||||
return complexStringCfgDao.updateValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getStringCfg(根据IP与类名获取IP配置)
|
||||
* (继承ComplexkeywordCfg这个类方可使用)
|
||||
* @param clazz
|
||||
* @param id
|
||||
* @return
|
||||
*ComplexkeywordCfg
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public ComplexkeywordCfg getStringCfgById(Class<?> clazz,long id){
|
||||
String tableName=getTableName(clazz.getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
logger.info("get "+tableName);
|
||||
return complexStringCfgDao.getById(tableName, id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getStringCfg(根据IP与类名获取IP配置)
|
||||
* (继承ComplexkeywordCfg这个类方可使用)
|
||||
* @param clazz
|
||||
* @param id
|
||||
* @return
|
||||
*ComplexkeywordCfg
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public ComplexkeywordCfg getStringCfgById(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.get(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
cfg.setTableName(tableName);
|
||||
logger.info("get "+tableName);
|
||||
return complexStringCfgDao.get(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
public Integer getIsValid(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.getIsValid(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
cfg.setTableName(tableName);
|
||||
return complexStringCfgDao.getIsValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
public Integer getIsValid(String tableName, long id){
|
||||
return complexStringCfgDao.getIsValid(tableName,id);
|
||||
}
|
||||
public Integer getIsAudit(ComplexkeywordCfg cfg){
|
||||
if(!StringUtils.isBlank(cfg.getTableName())){
|
||||
return complexStringCfgDao.getIsAudit(cfg);
|
||||
}else{
|
||||
String tableName=getTableName(cfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
cfg.setTableName(tableName);
|
||||
return complexStringCfgDao.getIsAudit(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
public Integer getIsAudit(String tableName, long id){
|
||||
return complexStringCfgDao.getIsAudit(tableName,id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.web.dao.configuration.NumCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* Num相关配置事务类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class NumCfgService extends CrudService<NumCfgDao,NumBoundaryCfg> {
|
||||
@Autowired
|
||||
protected NumCfgDao numCfgDao;
|
||||
/**
|
||||
*
|
||||
* addNumCfg(新增IP类配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int addNumCfg(NumBoundaryCfg cfg){
|
||||
return numCfgDao.insert(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateNumCfg(更新IP类配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int updateNumCfg(NumBoundaryCfg cfg){
|
||||
return numCfgDao.updateByPrimaryKeySelective(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditNumCfg(审核IP类配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int auditNumCfg(NumBoundaryCfg cfg){
|
||||
return numCfgDao.audit(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteNumCfg(删除IP类配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int deleteNumCfg(NumBoundaryCfg cfg){
|
||||
return numCfgDao.updateValid(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getNumCfg(根据IP与类名获取IP配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param clazz
|
||||
* @param id
|
||||
* @return
|
||||
*NumBoundaryCfg
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public NumBoundaryCfg getNumCfgById(long id){
|
||||
return numCfgDao.getById(id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getNumCfg(根据IP与类名获取IP配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param clazz
|
||||
* @param id
|
||||
* @return
|
||||
*NumBoundaryCfg
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public NumBoundaryCfg getNumCfgById(NumBoundaryCfg cfg){
|
||||
return numCfgDao.get(cfg);
|
||||
}
|
||||
public Integer getIsValid(NumBoundaryCfg cfg){
|
||||
return numCfgDao.getIsValid(cfg);
|
||||
}
|
||||
public Integer getIsValid(long id){
|
||||
return numCfgDao.getIsValid(id);
|
||||
}
|
||||
public Integer getIsAudit(NumBoundaryCfg cfg){
|
||||
return numCfgDao.getIsAudit(cfg);
|
||||
}
|
||||
public Integer getIsAudit(long id){
|
||||
return numCfgDao.getIsAudit(id);
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
@@ -23,40 +24,51 @@ public class ServiceDictInfoService extends BaseService{
|
||||
private ServiceDictInfoDao serviceDictInfoDao;
|
||||
|
||||
/**
|
||||
* 查询分类性质字典分页
|
||||
* 查询分类性质字典分页(无条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
public Page<ServiceDictInfo> findTopDictList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<ServiceDictInfo> sourcelist = serviceDictInfoDao.findDictList(serviceDictInfo);
|
||||
ServiceDictInfo.sortList(list, sourcelist, 0l, true);
|
||||
page.setList(sourcelist);
|
||||
//查出顶层分页查询
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findTopDictList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有有效字典配置
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDictList() {
|
||||
|
||||
return serviceDictInfoDao.findAllDictList(new ServiceDictInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签分页
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllNoLeafDictList() {
|
||||
return serviceDictInfoDao.findAllNoLeafDictList();
|
||||
}
|
||||
/**
|
||||
* 查询分类性质字典分页(含条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
public Page<ServiceDictInfo> findDictSearchList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<ServiceDictInfo> sourcelist = serviceDictInfoDao.findDictMarkList(serviceDictInfo);
|
||||
ServiceDictInfo.sortList(list, sourcelist, 0l, true);
|
||||
page.setList(sourcelist);
|
||||
return page;
|
||||
serviceDictInfo.setPage(page);
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findDictSearchList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询字典详细信息
|
||||
* @param serviceDictId
|
||||
@@ -99,19 +111,82 @@ public class ServiceDictInfoService extends BaseService{
|
||||
* 查询所有非叶子节点字典配置信息
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDict() {
|
||||
/* public List<ServiceDictInfo> findAllDict() {
|
||||
|
||||
return serviceDictInfoDao.findAllDict();
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param serviceDictInfo
|
||||
*/
|
||||
public void deleteDict(ServiceDictInfo serviceDictInfo) {
|
||||
serviceDictInfo.setIsValid(0);
|
||||
serviceDictInfoDao.delete(serviceDictInfo);
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
//找出所有下级
|
||||
//查出所有节点
|
||||
ServiceDictInfo.sortList(list, serviceDictInfoDao.findAllDictList(new ServiceDictInfo()), serviceDictInfo.getServiceDictId(), true);
|
||||
list.add(serviceDictInfo);
|
||||
for(ServiceDictInfo se:list){
|
||||
se.setIsValid(0);
|
||||
serviceDictInfoDao.delete(se);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//标签管理
|
||||
|
||||
/**
|
||||
* 查询标签分页(无条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findTopDictMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
//查出顶层分页查询
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findTopDictMarkList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有有效标签配置
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDictMarkList() {
|
||||
|
||||
return serviceDictInfoDao.findAllDictMarkList(new ServiceDictInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签字典分页(含条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictSearchMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findDictSearchMarkList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllNoLeafDictMarkList() {
|
||||
return serviceDictInfoDao.findAllNoLeafDictMarkList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* findFlDict(查找所有有效的分类)
|
||||
@@ -185,5 +260,10 @@ public class ServiceDictInfoService extends BaseService{
|
||||
public List<ServiceDictInfo> findAllLableDict() {
|
||||
return serviceDictInfoDao.findAllItemDict(Constants.ITEM_TYPE_LABEL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* String相关配置事务类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
@Autowired
|
||||
protected StringCfgDao stringCfgDao;
|
||||
/**
|
||||
*
|
||||
* addStringCfg(新增IP类配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param baseStringCfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int addStringCfg(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.insert(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
logger.info("save "+tableName);
|
||||
return stringCfgDao.insert(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateStringCfg(更新IP类配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param baseStringCfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int updateStringCfg(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.updateByPrimaryKeySelective(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
logger.info("update "+tableName);
|
||||
return stringCfgDao.updateByPrimaryKeySelective(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(审核IP类配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param baseStringCfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int auditStringCfg(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.audit(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
logger.info("aduit "+tableName);
|
||||
return stringCfgDao.audit(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteStringCfg(删除IP类配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param baseStringCfg
|
||||
* @return
|
||||
*int
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public int deleteStringCfg(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.updateValid(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return 0;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
logger.info("delete "+tableName);
|
||||
return stringCfgDao.updateValid(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getStringCfg(根据IP与类名获取IP配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param clazz
|
||||
* @param id
|
||||
* @return
|
||||
*BaseStringCfg
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public BaseStringCfg getStringCfgById(Class<?> clazz,long id){
|
||||
String tableName=getTableName(clazz.getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
logger.info("get "+tableName);
|
||||
return stringCfgDao.getById(tableName, id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getStringCfg(根据IP与类名获取IP配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param clazz
|
||||
* @param id
|
||||
* @return
|
||||
*BaseStringCfg
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public BaseStringCfg getStringCfgById(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.get(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
logger.info("get "+tableName);
|
||||
return stringCfgDao.get(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
public Integer getIsValid(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.getIsValid(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
return stringCfgDao.getIsValid(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
public Integer getIsValid(String tableName, long id){
|
||||
return stringCfgDao.getIsValid(tableName,id);
|
||||
}
|
||||
public Integer getIsAudit(BaseStringCfg baseStringCfg){
|
||||
if(!StringUtils.isBlank(baseStringCfg.getTableName())){
|
||||
return stringCfgDao.getIsAudit(baseStringCfg);
|
||||
}else{
|
||||
String tableName=getTableName(baseStringCfg.getClass().getSimpleName());
|
||||
if(StringUtils.isBlank(tableName))
|
||||
return null;
|
||||
baseStringCfg.setTableName(tableName);
|
||||
return stringCfgDao.getIsAudit(baseStringCfg);
|
||||
}
|
||||
|
||||
}
|
||||
public Integer getIsAudit(String tableName, long id){
|
||||
return stringCfgDao.getIsAudit(tableName,id);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
<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==_ipCfg.requestId}">selected</c:if>>${requestInfo.requestTitle}</option>
|
||||
<c:if test="${requestInfo.id==_cfg.requestId}">selected</c:if>>${requestInfo.requestTitle}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
@@ -26,7 +26,7 @@
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<option value="${fl.item_code}"
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fl.item_code==_ipCfg.classify}">selected</c:if>
|
||||
<c:if test="${fl.item_code==_cfg.classify}">selected</c:if>
|
||||
>${fl.item_value}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
@@ -45,7 +45,7 @@
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<option value="${xz.item_code}"
|
||||
<c:if test="${xz.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${xz.item_code==_ipCfg.attribute}">selected</c:if>
|
||||
<c:if test="${xz.item_code==_cfg.attribute}">selected</c:if>
|
||||
>${xz.item_value}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
@@ -60,7 +60,7 @@
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<option value="${lable.item_code}"
|
||||
<c:if test="${lable.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${lable.item_code==_ipCfg.label}">selected</c:if>
|
||||
<c:if test="${lable.item_code==_cfg.label}">selected</c:if>
|
||||
>${lable.item_value}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
|
||||
121
src/main/webapp/WEB-INF/include/form/complexInfo.jsp
Normal file
121
src/main/webapp/WEB-INF/include/form/complexInfo.jsp
Normal file
@@ -0,0 +1,121 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">管控配置</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">配置描述</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">匹配区域</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="district" value="${_cfg.district}">
|
||||
</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-8">
|
||||
<input class="form-control" type="text" name="keywords" value="${_cfg.keywords}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">管控类型</label>
|
||||
<div class="col-md-8">
|
||||
<select name="action" class="selectpicker select2 form-control" readonly="readonly">
|
||||
<option value="1" <c:if test="${_cfg.action==1}">selected</c:if><c:if test="${_cfg.action!=1}">disabled="disabled"</c:if> >阻断</option>
|
||||
<option value="2" <c:if test="${_cfg.action==2}">selected</c:if><c:if test="${_cfg.action!=2}">disabled="disabled"</c:if> >监测</option>
|
||||
<option value="5" <c:if test="${_cfg.action==5}">selected</c:if><c:if test="${_cfg.action!=5}">disabled="disabled"</c:if> >封堵白名单</option>
|
||||
<option value="6" <c:if test="${_cfg.action==6}">selected</c:if><c:if test="${_cfg.action!=6}">disabled="disabled"</c:if> >监测白名单</option>
|
||||
<option value="7" <c:if test="${_cfg.action==7}">selected</c:if><c:if test="${_cfg.action!=7}">disabled="disabled"</c:if> >封堵监测都白名单</option>
|
||||
<option value="8" <c:if test="${_cfg.action==8}">selected</c:if><c:if test="${_cfg.action!=8}">disabled="disabled"</c:if> >灰名单</option>
|
||||
</select>
|
||||
<input class="form-control" type="hidden" name="action" value="${_cfg.action}">
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">是否区域管控</label>
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
>是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
>否
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
</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-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType " value="1"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>
|
||||
>与表达式
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType" value="0"
|
||||
<c:if test="${_cfg.exprType==0}">checked</c:if>
|
||||
>无表达式
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">匹配方式</label>
|
||||
<div class="col-md-8">
|
||||
<select name="matchMethod" class="selectpicker select2 form-control" title="--请选择--" >
|
||||
<option value="0" <c:if test="${_cfg.matchMethod==0 }">selected</c:if>><spring:message code="子串匹配"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.matchMethod==1 }">selected</c:if>><spring:message code="右匹配"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.matchMethod==2 }">selected</c:if>><spring:message code="左匹配"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.matchMethod==3 }">selected</c:if>><spring:message code="完全匹配"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">是否hex二进制</label>
|
||||
<div class="col-md-8">
|
||||
<select name="isHexbin" class="selectpicker select2 form-control" title="--请选择--" >
|
||||
<option value="0" <c:if test="${_cfg.isHexbin==0 }">selected</c:if>><spring:message code="大小写不敏感,且非HEX"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.isHexbin==1 }">selected</c:if>><spring:message code="HEX格式二进制"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.isHexbin==2 }">selected</c:if>><spring:message code="大小写敏感,且非HEX"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">区域生效id</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">配置描述</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_ipCfg.cfgDesc}">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,10 +15,10 @@
|
||||
<label class="control-label col-md-3">ip类型</label>
|
||||
<div class="col-md-8">
|
||||
<select name="ipType" class="selectpicker show-tick form-control" title="--请选择--">
|
||||
<option value="4" <c:if test="${_ipCfg.ipType==4}">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${_ipCfg.ipType==6}">selected</c:if>>V6</option>
|
||||
<option value="4" <c:if test="${_cfg.ipType==4}">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${_cfg.ipType==6}">selected</c:if>>V6</option>
|
||||
</select>
|
||||
<!-- <input class="form-control" type="text" value="${_ipCfg.ipType}">-->
|
||||
<!-- <input class="form-control" type="text" value="${_cfg.ipType}">-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">源IP地址</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="srcIp" value="${_ipCfg.srcIp}">
|
||||
<input class="form-control" type="text" name="srcIp" value="${_cfg.srcIp}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">源地址掩码</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="srcIpMask" value="${_ipCfg.srcIpMask}">
|
||||
<input class="form-control" type="text" name="srcIpMask" value="${_cfg.srcIpMask}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">源端口</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="srcPort" value="${_ipCfg.srcPort}">
|
||||
<input class="form-control" type="text" name="srcPort" value="${_cfg.srcPort}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">源端口掩码</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="srcPortMask" value="${_ipCfg.srcPortMask}">
|
||||
<input class="form-control" type="text" name="srcPortMask" value="${_cfg.srcPortMask}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">目的IP地址</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="dstIp" value="${_ipCfg.dstIp}">
|
||||
<input class="form-control" type="text" name="dstIp" value="${_cfg.dstIp}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">目的地址掩码</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="dstIpMask" value="${_ipCfg.dstIpMask}">
|
||||
<input class="form-control" type="text" name="dstIpMask" value="${_cfg.dstIpMask}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,7 +82,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">目的端口</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="dstPort" value="${_ipCfg.dstPort}">
|
||||
<input class="form-control" type="text" name="dstPort" value="${_cfg.dstPort}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,7 +90,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">目的端口掩码</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="dstPortMask" value="${_ipCfg.dstPortMask}">
|
||||
<input class="form-control" type="text" name="dstPortMask" value="${_cfg.dstPortMask}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,10 +101,10 @@
|
||||
<label class="control-label col-md-3">方向</label>
|
||||
<div class="col-md-8">
|
||||
<select name="direction" class="selectpicker show-tick form-control" title="--请选择--">
|
||||
<option value="0" <c:if test="${_ipCfg.direction==0}">selected</c:if>>0</option>
|
||||
<option value="1" <c:if test="${_ipCfg.direction==1}">selected</c:if>>1</option>
|
||||
<option value="0" <c:if test="${_cfg.direction==0}">selected</c:if>>0</option>
|
||||
<option value="1" <c:if test="${_cfg.direction==1}">selected</c:if>>1</option>
|
||||
</select>
|
||||
<%-- <input class="form-control" type="text" name="direction" value="${_ipCfg.direction}"> --%>
|
||||
<%-- <input class="form-control" type="text" name="direction" value="${_cfg.direction}"> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,11 +113,11 @@
|
||||
<label class="control-label col-md-3">协议</label>
|
||||
<div class="col-md-8">
|
||||
<select name="protocol" class="selectpicker show-tick form-control" title="--请选择--">
|
||||
<option value="6" <c:if test="${_ipCfg.protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17" <c:if test="${_ipCfg.protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0" <c:if test="${_ipCfg.protocol==0}">selected</c:if>>任意</option>
|
||||
<option value="6" <c:if test="${_cfg.protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17" <c:if test="${_cfg.protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0" <c:if test="${_cfg.protocol==0}">selected</c:if>>任意</option>
|
||||
</select>
|
||||
<%-- <input class="form-control" type="text" name="protocol" value="${_ipCfg.protocol}"> --%>
|
||||
<%-- <input class="form-control" type="text" name="protocol" value="${_cfg.protocol}"> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -127,7 +127,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">协议ID</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="protocolId" value="${_ipCfg.protocolId}" readonly="readonly">
|
||||
<input class="form-control" type="text" name="protocolId" value="${_cfg.protocolId}" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -135,7 +135,15 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">管控类型</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="action" value="${_ipCfg.action}" readonly="readonly">
|
||||
<select name="action" class="selectpicker select2 form-control" readonly="readonly">
|
||||
<option value="1" <c:if test="${_cfg.action==1}">selected</c:if><c:if test="${_cfg.action!=1}">disabled="disabled"</c:if> >阻断</option>
|
||||
<option value="2" <c:if test="${_cfg.action==2}">selected</c:if><c:if test="${_cfg.action!=2}">disabled="disabled"</c:if> >监测</option>
|
||||
<option value="5" <c:if test="${_cfg.action==5}">selected</c:if><c:if test="${_cfg.action!=5}">disabled="disabled"</c:if> >封堵白名单</option>
|
||||
<option value="6" <c:if test="${_cfg.action==6}">selected</c:if><c:if test="${_cfg.action!=6}">disabled="disabled"</c:if> >监测白名单</option>
|
||||
<option value="7" <c:if test="${_cfg.action==7}">selected</c:if><c:if test="${_cfg.action!=7}">disabled="disabled"</c:if> >封堵监测都白名单</option>
|
||||
<option value="8" <c:if test="${_cfg.action==8}">selected</c:if><c:if test="${_cfg.action!=8}">disabled="disabled"</c:if> >灰名单</option>
|
||||
</select>
|
||||
<%-- <input class="form-control" type="hidden" name="action" value="${_cfg.action}"> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,7 +153,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">有效标识</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="isValid" value="${_ipCfg.isValid}">
|
||||
<input class="form-control" type="text" name="isValid" value="${_cfg.isValid}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -155,12 +163,12 @@
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAudit" value="1"
|
||||
<c:if test="${_ipCfg.isAudit==1}"></c:if>
|
||||
<c:if test="${_cfg.isAudit==1}"></c:if>
|
||||
>是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAudit" value="0"
|
||||
<c:if test="${_ipCfg.isAudit==0}"></c:if>
|
||||
<c:if test="${_cfg.isAudit==0}"></c:if>
|
||||
>否
|
||||
</label>
|
||||
</div>
|
||||
@@ -174,15 +182,15 @@
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_ipCfg.isAreaEffective==1}">checked</c:if>
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
>是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_ipCfg.isAreaEffective==0}">checked</c:if>
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
>否
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_ipCfg.isAreaEffective}"> --%>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -190,7 +198,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">区域生效id</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_ipCfg.areaEffectiveIds}">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
112
src/main/webapp/WEB-INF/include/form/stringInfo.jsp
Normal file
112
src/main/webapp/WEB-INF/include/form/stringInfo.jsp
Normal file
@@ -0,0 +1,112 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">管控配置</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">配置描述</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">配置关键词</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="cfgKeywords" value="${_cfg.cfgKeywords}">
|
||||
</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-8">
|
||||
<select name="action" class="selectpicker select2 form-control" readonly="readonly">
|
||||
<option value="1" <c:if test="${_cfg.action==1}">selected</c:if><c:if test="${_cfg.action!=1}">disabled="disabled"</c:if> >阻断</option>
|
||||
<option value="2" <c:if test="${_cfg.action==2}">selected</c:if><c:if test="${_cfg.action!=2}">disabled="disabled"</c:if> >监测</option>
|
||||
<option value="5" <c:if test="${_cfg.action==5}">selected</c:if><c:if test="${_cfg.action!=5}">disabled="disabled"</c:if> >封堵白名单</option>
|
||||
<option value="6" <c:if test="${_cfg.action==6}">selected</c:if><c:if test="${_cfg.action!=6}">disabled="disabled"</c:if> >监测白名单</option>
|
||||
<option value="7" <c:if test="${_cfg.action==7}">selected</c:if><c:if test="${_cfg.action!=7}">disabled="disabled"</c:if> >封堵监测都白名单</option>
|
||||
<option value="8" <c:if test="${_cfg.action==8}">selected</c:if><c:if test="${_cfg.action!=8}">disabled="disabled"</c:if> >灰名单</option>
|
||||
</select>
|
||||
<%-- <input class="form-control" type="hidden" name="action" value="${_cfg.action}"> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">是否区域管控</label>
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
>是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
>否
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
</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-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType " value="1"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>
|
||||
>与表达式
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType" value="0"
|
||||
<c:if test="${_cfg.exprType==0}">checked</c:if>
|
||||
>无表达式
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">匹配方式</label>
|
||||
<div class="col-md-8">
|
||||
<select name="matchMethod" class="selectpicker select2 form-control" title="--请选择--" >
|
||||
<option value="0" <c:if test="${_cfg.matchMethod==0 }">selected</c:if>><spring:message code="子串匹配"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.matchMethod==1 }">selected</c:if>><spring:message code="右匹配"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.matchMethod==2 }">selected</c:if>><spring:message code="左匹配"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.matchMethod==3 }">selected</c:if>><spring:message code="完全匹配"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">是否hex二进制</label>
|
||||
<div class="col-md-8">
|
||||
<select name="isHexbin" class="selectpicker select2 form-control" title="--请选择--" >
|
||||
<option value="0" <c:if test="${_cfg.isHexbin==0 }">selected</c:if>><spring:message code="大小写不敏感,且非HEX"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.isHexbin==1 }">selected</c:if>><spring:message code="HEX格式二进制"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.isHexbin==2 }">selected</c:if>><spring:message code="大小写敏感,且非HEX"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">区域生效id</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
@@ -6,5 +6,5 @@
|
||||
<c:if test="${not empty content}">
|
||||
<c:if test="${not empty type}"><c:set var="ctype" value="${type}"/></c:if><c:if test="${empty type}"><c:set var="ctype" value="${fn:indexOf(content,'失败') eq -1?'success':'error'}"/></c:if>
|
||||
<div id="messageBox" class="alert alert-${ctype}"><button data-dismiss="alert" class="close">×</button>${content}</div>
|
||||
<script type="text/javascript">/* if(!top.$.jBox.tip.mess) */{top.$.jBox.tip.mess=1;top.$.jBox.tip("${content}","${ctype}",{persistent:true,opacity:0});$("#messageBox").show();} </script>
|
||||
<script type="text/javascript">if(!top.$.jBox.tip.mess) {top.$.jBox.tip.mess=1;top.$.jBox.tip("${content}","${ctype}",{persistent:true,opacity:0});$("#messageBox").show();}</script>
|
||||
</c:if>
|
||||
102
src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp
Normal file
102
src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp
Normal file
@@ -0,0 +1,102 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#save").on("click",function(){
|
||||
$("#cfgFrom").attr("action","${ctx}/cfg/complex/saveOrUpdateCfg");
|
||||
$("#save").submit();
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</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><spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</div>
|
||||
<!-- <div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
|
||||
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="#" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/complexInfo.jsp" %>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<input type="hidden" name="action" value="${_cfg.action}">
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">IP地址</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">配置名称</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<%@include file="/WEB-INF/include/form/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">保存</button>
|
||||
<button id="cancel" type="button" class="btn default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
212
src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp
Normal file
212
src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp
Normal file
@@ -0,0 +1,212 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#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">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/complex/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/complex/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'">新增<spring:message code="${cfgName}"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<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-cogs"></i><spring:message code="${cfgName}"></spring:message>详情
|
||||
</div>
|
||||
<div class="tools">
|
||||
<!-- <a href="javascript:;" class="collapse" data-original-title=""
|
||||
title=""> </a> <a href="#portlet-config" data-toggle="modal"
|
||||
class="config" data-original-title="" title=""> </a> <a
|
||||
href="javascript:;" class="reload" data-original-title=""
|
||||
title=""> </a> <a href="javascript:;" class="remove"
|
||||
data-original-title="" title=""> </a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/complex/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<spring:message code="state"/> : <form:select path="isAudit" class="selectpicker select2" title="--请选择--" >
|
||||
<form:option value=""></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="取消审核通过"></spring:message></form:option>
|
||||
</form:select>
|
||||
<spring:message code="函号"/> :
|
||||
<form:select path="requestId" class="selectpicker select2" title="--请选择--" data-live-search="true" data-live-search-placeholder="搜索">
|
||||
<form:option value=""></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>
|
||||
<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>
|
||||
<spring:message code="排序"/> :
|
||||
<form:select path="page.orderBy" class="selectpicker select2" title="--请选择--">
|
||||
<form:option value=""></form:option>
|
||||
<form:option value="createTime asc">按创建时间顺序</form:option>
|
||||
<form:option value="createTime desc">按创建时间倒序</form:option>
|
||||
<form:option value="editTime asc">按修改时间顺序</form:option>
|
||||
<form:option value="editTime desc">按修改时间倒序</form:option>
|
||||
<form:option value="auditTime asc">按审核时间顺序</form:option>
|
||||
<form:option value="auditTime desc">按审核时间倒序</form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>配置ID</th>
|
||||
<th>配置描述</th>
|
||||
<th>匹配区域</th>
|
||||
<th>关键字</th>
|
||||
<th>管控类型</th>
|
||||
<th>业务id</th>
|
||||
<th>来函</th>
|
||||
<th>编译id</th>
|
||||
<th>是否区域管控</th>
|
||||
<th>分类</th>
|
||||
<th>性质</th>
|
||||
<th>标签</th>
|
||||
<th>区域生效id</th>
|
||||
<th>有效标识</th>
|
||||
<th>是否审核</th>
|
||||
<th>创建人员</th>
|
||||
<th>配置时间</th>
|
||||
<th>修改人员</th>
|
||||
<th>修改时间</th>
|
||||
<th>审核人员</th>
|
||||
<th>审核时间</th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg">
|
||||
<tr>
|
||||
<td>${cfg.cfgId }</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.district }</td>
|
||||
<td>${cfg.keywords }</td>
|
||||
<td>
|
||||
<c:if test="${1 eq cfg.action }">阻断</c:if>
|
||||
<c:if test="${2 eq cfg.action }">监测</c:if>
|
||||
<c:if test="${5 eq cfg.action }">封堵白名单</c:if>
|
||||
<c:if test="${6 eq cfg.action }">监测白名单</c:if>
|
||||
<c:if test="${7 eq cfg.action }">封堵监测白名单</c:if>
|
||||
<c:if test="${8 eq cfg.action }">灰名单</c:if>
|
||||
</td>
|
||||
<td>${cfg.serviceId }</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>${cfg.compileId }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}">否</c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">是</c:if>
|
||||
</td>
|
||||
<td>${cfg.classifyName }</td>
|
||||
<td>${cfg.attributeName }</td>
|
||||
<td>${cfg.lableName }</td>
|
||||
<td>${cfg.areaEffectiveIds }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}">否</c:if>
|
||||
<c:if test="${cfg.isValid==1}">是</c:if>
|
||||
<c:if test="${cfg.isValid==-1}">已删除</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="取消审核通过"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.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:choose>
|
||||
<c:when test="${cfg.isAudit eq '1'}">
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '0'}">
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}">
|
||||
<li><a href="${ctx}/cfg/complex/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="修改配置"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</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>
|
||||
@@ -8,9 +8,12 @@
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#save").on("click",function(){
|
||||
$("#ipCfgFrom").attr("action","${ctx}/cfg/ip/saveOrUpdateIpCfg");
|
||||
$("#ipCfgFrom").attr("action","${ctx}/cfg/ip/saveOrUpdateCfg");
|
||||
$("#save").submit();
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$("select[name='ipType']").on("change",function(){
|
||||
var type=$(this).val();
|
||||
if(4==type){
|
||||
@@ -47,8 +50,8 @@ $(function(){
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _ipCfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _ipCfg.cfgId}">修改</c:if>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
@@ -57,8 +60,8 @@ $(function(){
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i><spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _ipCfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _ipCfg.cfgId}">修改</c:if>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</div>
|
||||
<!-- <div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
|
||||
@@ -72,11 +75,11 @@ $(function(){
|
||||
<form id="ipCfgFrom" action="#" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
<c:if test="${not empty _ipCfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_ipCfg.cfgId}">
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<input type="hidden" name="tableName" value="${_ipCfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_ipCfg.serviceId}">
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -107,7 +110,7 @@ $(function(){
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">保存</button>
|
||||
<button type="button" class="btn default">Cancel</button>
|
||||
<button id="cancel" type="button" class="btn default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/ip/ipCfgList?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/ip/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/ip/ipCfgForm?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'">新增<spring:message code="${cfgName}"></spring:message></button>
|
||||
onClick="javascript:window.location='${ctx}/cfg/ip/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'">新增<spring:message code="${cfgName}"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="ipCfg" action="${ctx}/cfg/ip/ipCfgList?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="ipCfg" action="${ctx}/cfg/ip/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
@@ -103,14 +103,6 @@
|
||||
<th>协议</th>
|
||||
<th>协议ID</th>
|
||||
<th>管控类型</th>
|
||||
<th>有效标识</th>
|
||||
<th>是否审核</th>
|
||||
<th>创建人员</th>
|
||||
<th>配置时间</th>
|
||||
<th>修改人员</th>
|
||||
<th>修改时间</th>
|
||||
<th>审核人员</th>
|
||||
<th>审核时间</th>
|
||||
<th>业务id</th>
|
||||
<th>来函</th>
|
||||
<th>编译id</th>
|
||||
@@ -119,6 +111,14 @@
|
||||
<th>性质</th>
|
||||
<th>标签</th>
|
||||
<th>区域生效id</th>
|
||||
<th>有效标识</th>
|
||||
<th>是否审核</th>
|
||||
<th>创建人员</th>
|
||||
<th>配置时间</th>
|
||||
<th>修改人员</th>
|
||||
<th>修改时间</th>
|
||||
<th>审核人员</th>
|
||||
<th>审核时间</th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -147,6 +147,17 @@
|
||||
<c:if test="${7 eq ipCfg.action }">封堵监测白名单</c:if>
|
||||
<c:if test="${8 eq ipCfg.action }">灰名单</c:if>
|
||||
</td>
|
||||
<td>${ipCfg.serviceId }</td>
|
||||
<td>${ipCfg.requestName }</td>
|
||||
<td>${ipCfg.compileId }</td>
|
||||
<td>
|
||||
<c:if test="${ipCfg.isAreaEffective==0}">否</c:if>
|
||||
<c:if test="${ipCfg.isAreaEffective==1}">是</c:if>
|
||||
</td>
|
||||
<td>${ipCfg.classifyName }</td>
|
||||
<td>${ipCfg.attributeName }</td>
|
||||
<td>${ipCfg.lableName }</td>
|
||||
<td>${ipCfg.areaEffectiveIds }</td>
|
||||
<td>
|
||||
<c:if test="${ipCfg.isValid==0}">否</c:if>
|
||||
<c:if test="${ipCfg.isValid==1}">是</c:if>
|
||||
@@ -166,17 +177,6 @@
|
||||
<td><fmt:formatDate value="${ipCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${ipCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${ipCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${ipCfg.serviceId }</td>
|
||||
<td>${ipCfg.requestName }</td>
|
||||
<td>${ipCfg.compileId }</td>
|
||||
<td>
|
||||
<c:if test="${ipCfg.isAreaEffective==0}">否</c:if>
|
||||
<c:if test="${ipCfg.isAreaEffective==1}">是</c:if>
|
||||
</td>
|
||||
<td>${ipCfg.classifyName }</td>
|
||||
<td>${ipCfg.attributeName }</td>
|
||||
<td>${ipCfg.lableName }</td>
|
||||
<td>${ipCfg.areaEffectiveIds }</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>
|
||||
@@ -184,21 +184,21 @@
|
||||
<!-- 审核未通过可修改 -->
|
||||
<c:choose>
|
||||
<c:when test="${ipCfg.isAudit eq '1'}">
|
||||
<li><a href="${ctx}/cfg/ip/auditIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${ipCfg.isAudit eq '0'}">
|
||||
<li><a href="${ctx}/cfg/ip/auditIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/deleteIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/deleteCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${ipCfg.isAudit eq '2'}">
|
||||
<li><a href="${ctx}/cfg/ip/updateIpCfgForm?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="修改配置"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/deleteIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/updateForm?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="修改配置"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/deleteCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="${ctx}/cfg/ip/auditIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/deleteIpCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/ip/deleteCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ul>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/request/list'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -117,12 +117,12 @@
|
||||
<!-- 审核未通过可修改 -->
|
||||
<c:choose>
|
||||
<c:when test="${requestInfo.isAudit eq '1'}">
|
||||
<li><a href="javascript:void(0);" onclick="return confirmx('requestCancelExamine', ${requestInfo.id})"><spring:message code="cancel"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/requestCancelExamine?id=${requestInfo.id}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="javascript:void(0);" onclick="return confirmx('requestExamine', ${requestInfo.id})"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="javascript:void(0);" onclick="return confirmx('form', ${requestInfo.id})"><spring:message code="update_request"></spring:message></a></li>
|
||||
<li><a href="javascript:void(0);" onclick="return confirmx('delete', ${requestInfo.id})"><spring:message code="delete"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/requestExamine?id=${requestInfo.id}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/form?id=${requestInfo.id}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/delete?id=${requestInfo.id}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ul>
|
||||
@@ -155,24 +155,6 @@
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
//确认框
|
||||
function confirmx(m,id){
|
||||
var submit = function (v, h, f) {
|
||||
if (v == 'ok'){
|
||||
window.location='${ctx}/cfg/request/'+m+"?id="+id;
|
||||
jBox.tip(v, 'info');
|
||||
}
|
||||
else if (v == 'cancel')
|
||||
jBox.tip(v, 'info');
|
||||
return true; //close
|
||||
};
|
||||
|
||||
top.$.jBox.confirm("确定吗?", "提示", submit);
|
||||
|
||||
top.$('.jbox-button-panel').css('height','auto');
|
||||
top.$('.jbox-title-panel').css('height','32px');
|
||||
top.$('.jbox-content').css('font-size','16px');
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>结果跳转页</title>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
setTimeout("javascript:window.location.href='${ctx}/cfg/ip/ipCfgList?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'",5000);
|
||||
setTimeout("javascript:window.location.href='${ctx}/cfg/${cfgType}/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'",1000);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -91,14 +91,9 @@
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<%-- <div class="col-md-4">
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.id" value="${serviceDictInfo.parent.serviceDictId}" labelName="serviceDictInfo.parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue}"
|
||||
title="父级字典" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.id}" cssClass="required form-control"/>
|
||||
</div> --%>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%-- <form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control" disabled="disabled" readonly="readonly"/> --%>
|
||||
<form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemCode}"
|
||||
title="菜单" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">描述信息:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="${serviceDictInfo.itemDesc}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
122
src/main/webapp/WEB-INF/views/cfg/serviceDictInfoSearchList.jsp
Normal file
122
src/main/webapp/WEB-INF/views/cfg/serviceDictInfoSearchList.jsp
Normal file
@@ -0,0 +1,122 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>分类性质配置信息</title>
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'"><spring:message code="add_request"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
分类性质管理
|
||||
</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-cogs"></i>分类性质搜索结果
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode ne '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<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>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td>${serviceDictInfo.serviceDictCreator.id}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${serviceDictInfo.serviceDictEditor.name}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" 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">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,122 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>标签配置信息</title>
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/markList'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'"><spring:message code="add_request"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
标签管理
|
||||
</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-cogs"></i>标签搜索结果
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchMarkList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<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>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td>${serviceDictInfo.serviceDictCreator.id}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${serviceDictInfo.serviceDictEditor.name}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" 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">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchMarkList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,137 +3,134 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>分类性质配置信息</title>
|
||||
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.input-medium {
|
||||
width: 200px !important;
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
function page2(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.dropdown-menu {
|
||||
min-width: 70px;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'">新增</button>
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i><spring:message code="分类性质配置列表"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="requestInfo" action="${ctx}/configuration/serviceDictInfo/list" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
|
||||
<label class="search-lable">开始时间:</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<label class="search-lable">结束时间:</label><input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<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>
|
||||
<h3 class="page-title">
|
||||
分类性质管理
|
||||
</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-cogs"></i>分类性质配置列表
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort-column mark" width="5%">编码</th>
|
||||
<th class="sort-column mark" width="10%">编码对应值</th>
|
||||
<th class="sort-column mark" width="20%">描述信息</th>
|
||||
<th class="sort-column mark" width="9%">数据类型</th>
|
||||
<th class="sort-column create_time" width="15%">创建时间</th>
|
||||
<!-- <th width="10%">修改记录</th> -->
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<th width="10%">操作</th>
|
||||
</shiro:hasPermission>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<%-- <td>
|
||||
<button class="btn revision popovers purple-stripe" data-content="${serviceDictInfo.itemDesc}">修改记录查看</button>
|
||||
</td> --%>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="#"><i class="icon-cogs"></i> 操作</a>
|
||||
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0"><i class="icon-list"></i>查看</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)"><i class="icon-edit"></i> 修改</a></li>
|
||||
<li class="divider"></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)"><i class="icon-trash"></i> 删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode ne '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" 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="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">${page}</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -86,26 +86,31 @@
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/markSaveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:hidden path="serviceDictId"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<%-- <div class="col-md-4">
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.id" value="${serviceDictInfo.parent.serviceDictId}" labelName="serviceDictInfo.parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue}"
|
||||
title="父级字典" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.id}" cssClass="required form-control"/>
|
||||
</div> --%>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%-- <form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control" disabled="disabled" readonly="readonly"/> --%>
|
||||
<form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemCode}"
|
||||
title="菜单" url="/configuration/serviceDictInfo/treeMarkData" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 数据类型:</label>
|
||||
<div class="col-md-4">
|
||||
<input name="itemType" value="3" type="hidden" />
|
||||
<input id="itemType" class="form-control" value="${fns:getDictLabel('SERVICE_DICT_ITM_TYPE','3','0')}"/>
|
||||
<select id="itemType" name="itemType" class="form-control">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -2,138 +2,135 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>分标签配置信息</title>
|
||||
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/markList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.input-medium {
|
||||
width: 200px !important;
|
||||
<title>标签配置信息</title>
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/markList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
function page2(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchMarkList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.dropdown-menu {
|
||||
min-width: 70px;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/markList'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'">新增</button>
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i><spring:message code="标签配置列表"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="requestInfo" action="${ctx}/configuration/serviceDictInfo/markList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
|
||||
<label class="search-lable">开始时间:</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<label class="search-lable">结束时间:</label><input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<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>
|
||||
<h3 class="page-title">
|
||||
标签配置管理
|
||||
</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-cogs"></i>标签配置列表
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort-column mark" width="5%">编码</th>
|
||||
<th class="sort-column mark" width="10%">编码对应值</th>
|
||||
<th class="sort-column mark" width="20%">描述信息</th>
|
||||
<th class="sort-column mark" width="9%">数据类型</th>
|
||||
<th class="sort-column create_time" width="15%">创建时间</th>
|
||||
<!-- <th width="10%">修改记录</th> -->
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<th width="10%">操作</th>
|
||||
</shiro:hasPermission>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<%-- <td>
|
||||
<button class="btn revision popovers purple-stripe" data-content="${serviceDictInfo.itemDesc}">修改记录查看</button>
|
||||
</td> --%>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="#"><i class="icon-cogs"></i> 操作</a>
|
||||
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0"><i class="icon-list"></i>查看</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)"><i class="icon-edit"></i> 修改</a></li>
|
||||
<li class="divider"></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)"><i class="icon-trash"></i> 删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchMarkList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" 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="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">${page}</div>
|
||||
</body>
|
||||
</html>
|
||||
101
src/main/webapp/WEB-INF/views/cfg/stringCfgForm.jsp
Normal file
101
src/main/webapp/WEB-INF/views/cfg/stringCfgForm.jsp
Normal file
@@ -0,0 +1,101 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#save").on("click",function(){
|
||||
$("#cfgFrom").attr("action","${ctx}/cfg/string/saveOrUpdateCfg");
|
||||
$("#save").submit();
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</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><spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</div>
|
||||
<!-- <div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
|
||||
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="#" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/stringInfo.jsp" %>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">IP地址</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">配置名称</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<%@include file="/WEB-INF/include/form/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">保存</button>
|
||||
<button id="cancel" type="button" class="btn default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
210
src/main/webapp/WEB-INF/views/cfg/stringCfgList.jsp
Normal file
210
src/main/webapp/WEB-INF/views/cfg/stringCfgList.jsp
Normal file
@@ -0,0 +1,210 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#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">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/string/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/string/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'">新增<spring:message code="${cfgName}"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<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-cogs"></i><spring:message code="${cfgName}"></spring:message>详情
|
||||
</div>
|
||||
<div class="tools">
|
||||
<!-- <a href="javascript:;" class="collapse" data-original-title=""
|
||||
title=""> </a> <a href="#portlet-config" data-toggle="modal"
|
||||
class="config" data-original-title="" title=""> </a> <a
|
||||
href="javascript:;" class="reload" data-original-title=""
|
||||
title=""> </a> <a href="javascript:;" class="remove"
|
||||
data-original-title="" title=""> </a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/string/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<spring:message code="state"/> : <form:select path="isAudit" class="selectpicker select2" title="--请选择--" >
|
||||
<form:option value=""></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="取消审核通过"></spring:message></form:option>
|
||||
</form:select>
|
||||
<spring:message code="函号"/> :
|
||||
<form:select path="requestId" class="selectpicker select2" title="--请选择--" data-live-search="true" data-live-search-placeholder="搜索">
|
||||
<form:option value=""></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>
|
||||
<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>
|
||||
<spring:message code="排序"/> :
|
||||
<form:select path="page.orderBy" class="selectpicker select2" title="--请选择--">
|
||||
<form:option value=""></form:option>
|
||||
<form:option value="createTime asc">按创建时间顺序</form:option>
|
||||
<form:option value="createTime desc">按创建时间倒序</form:option>
|
||||
<form:option value="editTime asc">按修改时间顺序</form:option>
|
||||
<form:option value="editTime desc">按修改时间倒序</form:option>
|
||||
<form:option value="auditTime asc">按审核时间顺序</form:option>
|
||||
<form:option value="auditTime desc">按审核时间倒序</form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>配置ID</th>
|
||||
<th>配置描述</th>
|
||||
<th>配置关键词</th>
|
||||
<th>管控类型</th>
|
||||
<th>业务id</th>
|
||||
<th>来函</th>
|
||||
<th>编译id</th>
|
||||
<th>是否区域管控</th>
|
||||
<th>分类</th>
|
||||
<th>性质</th>
|
||||
<th>标签</th>
|
||||
<th>区域生效id</th>
|
||||
<th>有效标识</th>
|
||||
<th>是否审核</th>
|
||||
<th>创建人员</th>
|
||||
<th>配置时间</th>
|
||||
<th>修改人员</th>
|
||||
<th>修改时间</th>
|
||||
<th>审核人员</th>
|
||||
<th>审核时间</th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg">
|
||||
<tr>
|
||||
<td>${cfg.cfgId }</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.cfgKeywords }</td>
|
||||
<td>
|
||||
<c:if test="${1 eq cfg.action }">阻断</c:if>
|
||||
<c:if test="${2 eq cfg.action }">监测</c:if>
|
||||
<c:if test="${5 eq cfg.action }">封堵白名单</c:if>
|
||||
<c:if test="${6 eq cfg.action }">监测白名单</c:if>
|
||||
<c:if test="${7 eq cfg.action }">封堵监测白名单</c:if>
|
||||
<c:if test="${8 eq cfg.action }">灰名单</c:if>
|
||||
</td>
|
||||
<td>${cfg.serviceId }</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>${cfg.compileId }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}">否</c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">是</c:if>
|
||||
</td>
|
||||
<td>${cfg.classifyName }</td>
|
||||
<td>${cfg.attributeName }</td>
|
||||
<td>${cfg.lableName }</td>
|
||||
<td>${cfg.areaEffectiveIds }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}">否</c:if>
|
||||
<c:if test="${cfg.isValid==1}">是</c:if>
|
||||
<c:if test="${cfg.isValid==-1}">已删除</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="取消审核通过"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.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:choose>
|
||||
<c:when test="${cfg.isAudit eq '1'}">
|
||||
<li><a href="${ctx}/cfg/string/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '0'}">
|
||||
<li><a href="${ctx}/cfg/string/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/string/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/string/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}">
|
||||
<li><a href="${ctx}/cfg/string/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="修改配置"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/string/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/string/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="${ctx}/cfg/string/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/string/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</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>
|
||||
@@ -6,3 +6,16 @@ sysDict serviceDict
|
||||
margin-right: 5px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.input-medium {
|
||||
width: 155px !important;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
|
||||
34
src/main/webapp/static/pages/scripts/dict.js
Normal file
34
src/main/webapp/static/pages/scripts/dict.js
Normal file
@@ -0,0 +1,34 @@
|
||||
$(document).ready(function() {
|
||||
jQuery.validator.addMethod("codeNumber",function(value,element){
|
||||
return value>=0&value<=20000000},"请填写正确的数值");
|
||||
$("#name").focus();
|
||||
$("#searchForm").validate({
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'itemCode':{
|
||||
digits:true,
|
||||
codeNumber:true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
'itemCode':{
|
||||
digits:'请填写整数值',
|
||||
codeNumber:'请填写合适的数值(0~200000000)'
|
||||
}
|
||||
},
|
||||
|
||||
submitHandler: function(form){
|
||||
loading('正在处理,请稍等...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
errorPlacement: function(error, element) {
|
||||
$("#messageBox").text("输入有误,请先更正。");
|
||||
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
||||
error.appendTo(element.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user