(1)ip,字符串,增强字符串mapper.xml里的get方法删除多余参数,只保留cfgId以及compileId。
(2)系统字典表更新方法查询多域增强字符串配置的匹配区域。mysql这里查询好像自动大小写忽略,待测试。 (3)多域界面提交。界面展示采用查一张主表再查其他表的方式展示,非所有表都有的字段只能查主表的,这里界面查询条件已做限制;另外表单提交未做验证;多个同类型(字符串,增强字符串)的表现在界面无法区分,后面会将界面展示意义不明的字段调整展示名称。
This commit is contained in:
@@ -22,6 +22,7 @@ import com.nis.domain.BaseEntity;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class BaseCfg<T> extends BaseEntity<T> {
|
||||
protected String showName;//表在界面上展示的名称
|
||||
protected String seltype;//选中类型,页面搜索用
|
||||
protected String tableName;
|
||||
/**
|
||||
@@ -663,5 +664,4 @@ public class BaseCfg<T> extends BaseEntity<T> {
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -1939538118388300002L;
|
||||
/**
|
||||
* ip类型
|
||||
|
||||
@@ -33,6 +33,7 @@ public class BaseStringCfg extends BaseCfg<BaseStringCfg> {
|
||||
@Expose
|
||||
@SerializedName("keywords")
|
||||
protected String cfgKeywords;
|
||||
protected String cfgKeywordsShowName;
|
||||
/**
|
||||
* cfgKeywords
|
||||
* @return cfgKeywords
|
||||
@@ -116,5 +117,19 @@ public class BaseStringCfg extends BaseCfg<BaseStringCfg> {
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
/**
|
||||
* cfgKeywordsShowName
|
||||
* @return cfgKeywordsShowName
|
||||
*/
|
||||
|
||||
public String getCfgKeywordsShowName() {
|
||||
return cfgKeywordsShowName;
|
||||
}
|
||||
/**
|
||||
* @param cfgKeywordsShowName the cfgKeywordsShowName to set
|
||||
*/
|
||||
public void setCfgKeywordsShowName(String cfgKeywordsShowName) {
|
||||
this.cfgKeywordsShowName = cfgKeywordsShowName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
104
src/main/java/com/nis/domain/maat/ToMaatResult.java
Normal file
104
src/main/java/com/nis/domain/maat/ToMaatResult.java
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
*@Title: ToMaatResult.java
|
||||
*@Package com.nis.domain.maat
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年3月27日 下午5:10:01
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.maat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName: ToMaatResult.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年3月27日 下午5:10:01
|
||||
* @version V1.0
|
||||
*/
|
||||
public class ToMaatResult implements Serializable{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 4244178887886507606L;
|
||||
private Integer status;
|
||||
private Integer businessCode;
|
||||
private String reason;
|
||||
private String msg;
|
||||
private String fromuri;
|
||||
/**
|
||||
* status
|
||||
* @return status
|
||||
*/
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* @param status the status to set
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
/**
|
||||
* businessCode
|
||||
* @return businessCode
|
||||
*/
|
||||
|
||||
public Integer getBusinessCode() {
|
||||
return businessCode;
|
||||
}
|
||||
/**
|
||||
* @param businessCode the businessCode to set
|
||||
*/
|
||||
public void setBusinessCode(Integer businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
/**
|
||||
* reason
|
||||
* @return reason
|
||||
*/
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
/**
|
||||
* @param reason the reason to set
|
||||
*/
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
/**
|
||||
* msg
|
||||
* @return msg
|
||||
*/
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
/**
|
||||
* @param msg the msg to set
|
||||
*/
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
/**
|
||||
* fromuri
|
||||
* @return fromuri
|
||||
*/
|
||||
|
||||
public String getFromuri() {
|
||||
return fromuri;
|
||||
}
|
||||
/**
|
||||
* @param fromuri the fromuri to set
|
||||
*/
|
||||
public void setFromuri(String fromuri) {
|
||||
this.fromuri = fromuri;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
@@ -85,18 +86,18 @@ public class MultipleCfgController extends BaseController{
|
||||
List<ServiceConfigInfo> serviceConfigInfos=serviceConfigInfoService.findList(serviceId);
|
||||
List<MultipleCfg> resultList=new ArrayList<MultipleCfg>();
|
||||
resultPage.setList(resultList);
|
||||
|
||||
List<? extends BaseCfg> mainList=null;
|
||||
//查询主表,将主表中的数据set到结果中
|
||||
for(ServiceConfigInfo info:serviceConfigInfos){
|
||||
int type=info.getTableType();
|
||||
String tableName=info.getTableName();
|
||||
if(mainTable.equals(tableName)){
|
||||
model.addAttribute("mainTableType", String.valueOf(info.getTableType()));
|
||||
cfg.setMainTableType(String.valueOf(type));
|
||||
if(Constants.TABLE_TYPE_COMPLEX==type){//增强字符串类型
|
||||
ComplexkeywordCfg _cfg=cfg.getComplexCfg()==null?new ComplexkeywordCfg():cfg.getComplexCfg();
|
||||
_cfg.setTableName(mainTable);
|
||||
this.setProperties(cfg, null, null, null, _cfg);
|
||||
this.setProperties(cfg,_cfg);
|
||||
Page<ComplexkeywordCfg> mainPage=complexStringCfgService.findPage(new Page<ComplexkeywordCfg>(request,response,"r"), _cfg);
|
||||
setPageProps(mainPage,resultPage);
|
||||
mainList=mainPage.getList();//主表结果
|
||||
@@ -120,7 +121,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}else if(Constants.TABLE_TYPE_STRING==type){//字符串类型
|
||||
BaseStringCfg _cfg=cfg.getStringCfg()==null?new BaseStringCfg():cfg.getStringCfg();
|
||||
_cfg.setTableName(mainTable);
|
||||
this.setProperties(cfg, null, _cfg, null,null);
|
||||
this.setProperties(cfg,_cfg);
|
||||
Page<BaseStringCfg> mainPage=stringCfgService.findPage(new Page<BaseStringCfg>(request,response,"r"), _cfg);
|
||||
mainList=mainPage.getList();//主表结果
|
||||
setPageProps(mainPage,resultPage);
|
||||
@@ -143,7 +144,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}else if(Constants.TABLE_TYPE_IP==type){//字符串类型
|
||||
BaseIpCfg _cfg=cfg.getIpCfg()==null?new BaseIpCfg():cfg.getIpCfg();
|
||||
_cfg.setTableName(mainTable);
|
||||
this.setProperties(cfg, _cfg,null,null,null);
|
||||
this.setProperties(cfg, _cfg);
|
||||
Page<BaseIpCfg> mainPage=ipCfgService.findPage(new Page<BaseIpCfg>(request,response,"r"), _cfg);
|
||||
mainList=mainPage.getList();//主表结果
|
||||
setPageProps(mainPage,resultPage);
|
||||
@@ -166,7 +167,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}else if(Constants.TABLE_TYPE_NUMBER==type){
|
||||
NumBoundaryCfg _cfg=cfg.getNumCfg()==null?new NumBoundaryCfg():cfg.getNumCfg();
|
||||
_cfg.setTableName(mainTable);
|
||||
this.setProperties(cfg, null,null,_cfg,null);
|
||||
this.setProperties(cfg,_cfg);
|
||||
Page<NumBoundaryCfg> mainPage=numCfgService.findPage(new Page<NumBoundaryCfg>(request,response,"r"), _cfg);
|
||||
mainList=mainPage.getList();//主表结果
|
||||
setPageProps(mainPage,resultPage);
|
||||
@@ -214,7 +215,7 @@ public class MultipleCfgController extends BaseController{
|
||||
if(Constants.TABLE_TYPE_COMPLEX==type){//增强字符串类型
|
||||
ComplexkeywordCfg _cfg=cfg.getComplexCfg()==null?new ComplexkeywordCfg():cfg.getComplexCfg();
|
||||
_cfg.setTableName(info.getTableName());
|
||||
this.setProperties(cfg, null, null, null, _cfg);
|
||||
this.setProperties(cfg,_cfg);
|
||||
List<ComplexkeywordCfg> list=complexStringCfgService
|
||||
.findPage(page, _cfg)
|
||||
.getList();
|
||||
@@ -246,7 +247,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}else if(Constants.TABLE_TYPE_STRING==type){//字符串类型
|
||||
BaseStringCfg _cfg=cfg.getStringCfg()==null?new BaseStringCfg():cfg.getStringCfg();
|
||||
_cfg.setTableName(info.getTableName());
|
||||
this.setProperties(cfg, null, _cfg, null,null);
|
||||
this.setProperties(cfg,_cfg);
|
||||
List<BaseStringCfg> list=stringCfgService
|
||||
.findPage(page, _cfg)
|
||||
.getList();
|
||||
@@ -279,7 +280,7 @@ public class MultipleCfgController extends BaseController{
|
||||
tableBean.setCanEmpty(true);
|
||||
BaseIpCfg _cfg=cfg.getIpCfg()==null?new BaseIpCfg():cfg.getIpCfg();
|
||||
_cfg.setTableName(info.getTableName());
|
||||
this.setProperties(cfg, _cfg,null,null,null);
|
||||
this.setProperties(cfg, _cfg);
|
||||
List<BaseIpCfg> list=ipCfgService
|
||||
.findPage(page, _cfg)
|
||||
.getList();
|
||||
@@ -311,7 +312,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}else if(Constants.TABLE_TYPE_NUMBER==type){
|
||||
NumBoundaryCfg _cfg=cfg.getNumCfg()==null?new NumBoundaryCfg():cfg.getNumCfg();
|
||||
_cfg.setTableName(info.getTableName());
|
||||
this.setProperties(cfg, null,null,_cfg,null);
|
||||
this.setProperties(cfg,_cfg);
|
||||
List<NumBoundaryCfg> list=numCfgService
|
||||
.findPage(page, _cfg)
|
||||
.getList();
|
||||
@@ -435,7 +436,8 @@ public class MultipleCfgController extends BaseController{
|
||||
Map<String,ComplexkeywordCfg> map=cfg.getComplexCfg();
|
||||
map.put(tableName,complexCfg);
|
||||
}
|
||||
|
||||
List<SysDictInfo> districts=sysDictInfoService.getDistrictDict(tableName);
|
||||
model.addAttribute("districts", districts);
|
||||
}
|
||||
}
|
||||
cfg.setAction(action);
|
||||
@@ -501,6 +503,21 @@ public class MultipleCfgController extends BaseController{
|
||||
if(mainTable.equals(info.getTableName())){
|
||||
this.setPropertiesToMultipleCfg(resultCfg, resultIpCfg,"update");
|
||||
}
|
||||
}else{
|
||||
resultIpCfg=(BaseIpCfg)this.getClassBean(info.getTableName(), true);
|
||||
resultIpCfg.initDefaultValue();
|
||||
resultIpCfg.setCompileId(compileId);
|
||||
if(resultCfg.getIpCfg()==null){
|
||||
Map<String,BaseIpCfg> map=new HashMap<String,BaseIpCfg>();
|
||||
map.put(info.getTableName(), resultIpCfg);
|
||||
resultCfg.setIpCfg(map);
|
||||
}else{
|
||||
Map<String,BaseIpCfg> map=resultCfg.getIpCfg();
|
||||
map.put(info.getTableName(), resultIpCfg);
|
||||
}
|
||||
if(mainTable.equals(info.getTableName())){
|
||||
this.setPropertiesToMultipleCfg(resultCfg, resultIpCfg,"update");
|
||||
}
|
||||
}
|
||||
}else if(Constants.TABLE_TYPE_STRING==type){
|
||||
BaseStringCfg searchStringCfg=new BaseStringCfg();
|
||||
@@ -709,7 +726,7 @@ public class MultipleCfgController extends BaseController{
|
||||
ipCfg.getValue().setIsValid(Constants.VALID_NO);
|
||||
ipCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
ipCfg.getValue().setCompileId(compileId);
|
||||
setProperties(cfg,ipCfg.getValue(),null,null,null);
|
||||
setProperties(cfg,ipCfg.getValue());
|
||||
if(ipCfg.getValue().getCfgId()==null){
|
||||
ipCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
|
||||
ipCfg.getValue().setCreateTime(date);
|
||||
@@ -728,7 +745,7 @@ public class MultipleCfgController extends BaseController{
|
||||
stringCfg.getValue().setIsValid(Constants.VALID_NO);
|
||||
stringCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
stringCfg.getValue().setCompileId(compileId);
|
||||
setProperties(cfg,null,stringCfg.getValue(),null,null);
|
||||
setProperties(cfg,stringCfg.getValue());
|
||||
if(stringCfg.getValue().getCfgId()==null){
|
||||
stringCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
|
||||
stringCfg.getValue().setCreateTime(date);
|
||||
@@ -747,7 +764,7 @@ public class MultipleCfgController extends BaseController{
|
||||
numCfg.getValue().setIsValid(Constants.VALID_NO);
|
||||
numCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
numCfg.getValue().setCompileId(compileId);
|
||||
setProperties(cfg,null,null,numCfg.getValue(),null);
|
||||
setProperties(cfg,numCfg.getValue());
|
||||
if(numCfg.getValue().getCfgId()==null){
|
||||
numCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
|
||||
numCfg.getValue().setCreateTime(date);
|
||||
@@ -757,7 +774,6 @@ public class MultipleCfgController extends BaseController{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else if(Constants.TABLE_TYPE_COMPLEX==info.getTableType()){
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
@@ -767,7 +783,7 @@ public class MultipleCfgController extends BaseController{
|
||||
complexCfg.getValue().setIsValid(Constants.VALID_NO);
|
||||
complexCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
complexCfg.getValue().setCompileId(compileId);
|
||||
setProperties(cfg,null,null,null,complexCfg.getValue());
|
||||
setProperties(cfg,complexCfg.getValue());
|
||||
if(complexCfg.getValue().getCfgId()==null){
|
||||
complexCfg.getValue().setCreatorId(cfg.getCurrentUser().getId());
|
||||
complexCfg.getValue().setCreateTime(date);
|
||||
@@ -808,28 +824,46 @@ public class MultipleCfgController extends BaseController{
|
||||
public String auditCfg(String cfgName,MultipleCfg cfg,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", Constants.AUDIT_PAGE);
|
||||
model.addAttribute("cfgType", "multiple");
|
||||
model.addAttribute("serviceId", cfg.getServiceId());
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
model.addAttribute("mainTable", cfg.getMainTable());
|
||||
int compileId=cfg.getCompileId().intValue();
|
||||
int audit=cfg.getIsAudit();
|
||||
try{
|
||||
MultipleCfg resultCfg=new MultipleCfg();
|
||||
MultipleCfg searchCfg=new MultipleCfg();
|
||||
searchCfg.setIsAudit(cfg.getIsAudit());
|
||||
List<ServiceConfigInfo> serviceConfigInfos=serviceConfigInfoService.findList(cfg.getServiceId());
|
||||
Date date=new Date();
|
||||
for(ServiceConfigInfo info:serviceConfigInfos){
|
||||
int type=info.getTableType();
|
||||
String tableName=info.getTableName();
|
||||
if(cfg.getMainTable().equals(tableName)){
|
||||
model.addAttribute("mainTableType", String.valueOf(type));
|
||||
}
|
||||
if(Constants.TABLE_TYPE_IP==type){
|
||||
BaseIpCfg searchIpCfg=new BaseIpCfg();
|
||||
searchIpCfg.setTableName(tableName);
|
||||
searchIpCfg.setCompileId(compileId);
|
||||
//根据表名,编译ID查询唯一结果
|
||||
BaseIpCfg resultIpCfg=ipCfgService.get(searchIpCfg);
|
||||
searchIpCfg.setAuditorId(searchIpCfg.getCurrentUser().getId());
|
||||
searchIpCfg.setAuditTime(date);
|
||||
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
searchIpCfg.setIsValid(Constants.VALID_NO);
|
||||
if(resultIpCfg!=null){
|
||||
resultIpCfg.setIsValid(Constants.VALID_NO);
|
||||
resultIpCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}else if(audit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
searchIpCfg.setIsValid(Constants.VALID_YES);
|
||||
if(resultIpCfg!=null){
|
||||
resultIpCfg.setIsValid(Constants.VALID_YES);
|
||||
resultIpCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}
|
||||
//更新gwall库表数据
|
||||
if(searchCfg.getIpCfg()==null){
|
||||
Map<String,BaseIpCfg> map=new HashMap<String,BaseIpCfg>();
|
||||
map.put(tableName, searchIpCfg);
|
||||
@@ -838,17 +872,40 @@ public class MultipleCfgController extends BaseController{
|
||||
Map<String,BaseIpCfg> map=searchCfg.getIpCfg();
|
||||
map.put(tableName, searchIpCfg);
|
||||
}
|
||||
//传入maat数据
|
||||
if(resultIpCfg!=null){
|
||||
if(resultCfg.getIpCfg()==null){
|
||||
Map<String,BaseIpCfg> map=new HashMap<String,BaseIpCfg>();
|
||||
map.put(tableName, resultIpCfg);
|
||||
resultCfg.setIpCfg(map);
|
||||
}else{
|
||||
Map<String,BaseIpCfg> map=resultCfg.getIpCfg();
|
||||
map.put(tableName, resultIpCfg);
|
||||
}
|
||||
}
|
||||
|
||||
}else if(Constants.TABLE_TYPE_STRING==type){
|
||||
BaseStringCfg searchStringCfg=new BaseStringCfg();
|
||||
searchStringCfg.setTableName(tableName);
|
||||
searchStringCfg.setCompileId(compileId);
|
||||
//根据表名,编译ID查询唯一结果
|
||||
BaseStringCfg resultStringCfg=stringCfgService.get(searchStringCfg);
|
||||
searchStringCfg.setAuditorId(searchStringCfg.getCurrentUser().getId());
|
||||
searchStringCfg.setAuditTime(date);
|
||||
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
searchStringCfg.setIsValid(Constants.VALID_NO);
|
||||
if(resultStringCfg!=null){
|
||||
resultStringCfg.setIsValid(Constants.VALID_NO);
|
||||
resultStringCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}else if(audit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
searchStringCfg.setIsValid(Constants.VALID_YES);
|
||||
if(resultStringCfg!=null){
|
||||
resultStringCfg.setIsValid(Constants.VALID_YES);
|
||||
resultStringCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}
|
||||
//更新gwall库表数据
|
||||
if(searchCfg.getStringCfg()==null){
|
||||
Map<String,BaseStringCfg> map=new HashMap<String,BaseStringCfg>();
|
||||
map.put(tableName, searchStringCfg);
|
||||
@@ -857,17 +914,38 @@ public class MultipleCfgController extends BaseController{
|
||||
Map<String,BaseStringCfg> map=searchCfg.getStringCfg();
|
||||
map.put(tableName, searchStringCfg);
|
||||
}
|
||||
//传入maat数据
|
||||
if(resultStringCfg!=null){
|
||||
if(resultCfg.getStringCfg()==null){
|
||||
Map<String,BaseStringCfg> map=new HashMap<String,BaseStringCfg>();
|
||||
map.put(tableName, resultStringCfg);
|
||||
resultCfg.setStringCfg(map);
|
||||
}else{
|
||||
Map<String,BaseStringCfg> map=resultCfg.getStringCfg();
|
||||
map.put(tableName, resultStringCfg);
|
||||
}
|
||||
}
|
||||
}else if(Constants.TABLE_TYPE_NUMBER==type){
|
||||
NumBoundaryCfg searchNumCfg=new NumBoundaryCfg();
|
||||
searchNumCfg.setTableName(tableName);
|
||||
searchNumCfg.setCompileId(compileId);
|
||||
NumBoundaryCfg resultNumCfg=numCfgService.get(searchNumCfg);
|
||||
searchNumCfg.setAuditorId(searchNumCfg.getCurrentUser().getId());
|
||||
searchNumCfg.setAuditTime(date);
|
||||
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
searchNumCfg.setIsValid(Constants.VALID_NO);
|
||||
if(resultNumCfg!=null){
|
||||
resultNumCfg.setIsValid(Constants.VALID_NO);
|
||||
resultNumCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}else if(audit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
searchNumCfg.setIsValid(Constants.VALID_YES);
|
||||
if(resultNumCfg!=null){
|
||||
resultNumCfg.setIsValid(Constants.VALID_YES);
|
||||
resultNumCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}
|
||||
//更新gwall库表数据
|
||||
if(searchCfg.getNumCfg()==null){
|
||||
Map<String,NumBoundaryCfg> map=new HashMap<String,NumBoundaryCfg>();
|
||||
map.put(tableName, searchNumCfg);
|
||||
@@ -876,17 +954,38 @@ public class MultipleCfgController extends BaseController{
|
||||
Map<String,NumBoundaryCfg> map=searchCfg.getNumCfg();
|
||||
map.put(tableName, searchNumCfg);
|
||||
}
|
||||
//传入maat数据
|
||||
if(resultNumCfg!=null){
|
||||
if(resultCfg.getNumCfg()==null){
|
||||
Map<String,NumBoundaryCfg> map=new HashMap<String,NumBoundaryCfg>();
|
||||
map.put(tableName, resultNumCfg);
|
||||
resultCfg.setNumCfg(map);
|
||||
}else{
|
||||
Map<String,NumBoundaryCfg> map=resultCfg.getNumCfg();
|
||||
map.put(tableName, resultNumCfg);
|
||||
}
|
||||
}
|
||||
}else if(Constants.TABLE_TYPE_COMPLEX==type){
|
||||
ComplexkeywordCfg searchComplexCfg=new ComplexkeywordCfg();
|
||||
searchComplexCfg.setTableName(tableName);
|
||||
searchComplexCfg.setCompileId(compileId);
|
||||
ComplexkeywordCfg resultComplexCfg=complexStringCfgService.get(searchComplexCfg);
|
||||
searchComplexCfg.setAuditorId(searchComplexCfg.getCurrentUser().getId());
|
||||
searchComplexCfg.setAuditTime(date);
|
||||
if(audit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
searchComplexCfg.setIsValid(Constants.VALID_NO);
|
||||
if(resultComplexCfg!=null){
|
||||
resultComplexCfg.setIsValid(Constants.VALID_NO);
|
||||
resultComplexCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}else if(audit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
searchComplexCfg.setIsValid(Constants.VALID_YES);
|
||||
if(resultComplexCfg!=null){
|
||||
resultComplexCfg.setIsValid(Constants.VALID_YES);
|
||||
resultComplexCfg.setMaatTable(info.getMaatTable());
|
||||
}
|
||||
}
|
||||
//更新gwall库表数据
|
||||
if(searchCfg.getComplexCfg()==null){
|
||||
Map<String,ComplexkeywordCfg> map=new HashMap<String,ComplexkeywordCfg>();
|
||||
map.put(tableName, searchComplexCfg);
|
||||
@@ -895,11 +994,30 @@ public class MultipleCfgController extends BaseController{
|
||||
Map<String,ComplexkeywordCfg> map=searchCfg.getComplexCfg();
|
||||
map.put(tableName, searchComplexCfg);
|
||||
}
|
||||
//传入maat数据
|
||||
if(resultComplexCfg!=null){
|
||||
if(resultCfg.getComplexCfg()==null){
|
||||
Map<String,ComplexkeywordCfg> map=new HashMap<String,ComplexkeywordCfg>();
|
||||
map.put(tableName, resultComplexCfg);
|
||||
resultCfg.setComplexCfg(map);
|
||||
}else{
|
||||
Map<String,ComplexkeywordCfg> map=resultCfg.getComplexCfg();
|
||||
map.put(tableName, resultComplexCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
multipleCfgService.auditCfg(searchCfg);
|
||||
|
||||
return "redirect:" + adminPath + "/cfg/multiple/list";
|
||||
int result=multipleCfgService.auditCfg(resultCfg,searchCfg);
|
||||
if(result==0){
|
||||
addMessage(model,"审核失败");
|
||||
}else{
|
||||
addMessage(model,"审核成功,正在为您跳转页面...");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
logger.error("审核失败",e);
|
||||
addMessage(model,"审核失败");
|
||||
}
|
||||
return "/cfg/resultPage";
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -942,7 +1060,8 @@ public class MultipleCfgController extends BaseController{
|
||||
Field[] fieldArray=cfg.getClass().getDeclaredFields();
|
||||
for(Field field:fieldArray){
|
||||
field.setAccessible(true);
|
||||
if(field.get(cfg)!=null&&!"serialVersionUID".equals(field.getName())){
|
||||
if(field.get(cfg)!=null&&!"serialVersionUID".equals(field.getName())
|
||||
&&!field.getName().endsWith("ShowName")&&!field.getName().endsWith("cfgDesc")){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -965,6 +1084,7 @@ public class MultipleCfgController extends BaseController{
|
||||
resultCfg.setIsValid(_cfg.getIsValid());
|
||||
resultCfg.setRequestId(_cfg.getRequestId());
|
||||
resultCfg.setServiceId(_cfg.getServiceId());
|
||||
resultCfg.setRequestName(_cfg.getRequestName());
|
||||
if("select".equals(option)){//列表时设置以下属性
|
||||
resultCfg.setCreatorId(_cfg.getCreatorId());
|
||||
resultCfg.setCreatorName(_cfg.getCreatorName());
|
||||
@@ -977,126 +1097,51 @@ public class MultipleCfgController extends BaseController{
|
||||
resultCfg.setAuditTime(_cfg.getAuditTime());
|
||||
}
|
||||
}
|
||||
protected void setProperties(MultipleSearchCfg source,BaseIpCfg ipCfg,BaseStringCfg stringCfg,NumBoundaryCfg numCfg,ComplexkeywordCfg complexCfg){
|
||||
if(ipCfg!=null){
|
||||
ipCfg.setAction(source.getAction());
|
||||
ipCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
ipCfg.setAttribute(source.getAttribute());
|
||||
ipCfg.setClassify(source.getClassify());
|
||||
ipCfg.setLable(source.getLable());
|
||||
ipCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
ipCfg.setRequestId(source.getRequestId());
|
||||
ipCfg.setServiceId(source.getServiceId());
|
||||
ipCfg.setCreatorId(source.getCreatorId());
|
||||
ipCfg.setCreatorName(source.getCreatorName());
|
||||
ipCfg.setCreateTime(source.getCreateTime());
|
||||
ipCfg.setEditorId(source.getEditorId());
|
||||
ipCfg.setEditorName(source.getEditorName());
|
||||
ipCfg.setEditTime(source.getEditTime());
|
||||
ipCfg.setAuditorId(source.getAuditorId());
|
||||
ipCfg.setAuditorName(source.getAuditorName());
|
||||
ipCfg.setAuditTime(source.getAuditTime());
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected void setProperties(MultipleSearchCfg source,BaseCfg cfg){
|
||||
if(cfg!=null){
|
||||
cfg.setIsValid(source.getIsValid());
|
||||
cfg.setIsAudit(source.getIsAudit());
|
||||
cfg.setAction(source.getAction());
|
||||
cfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
cfg.setAttribute(source.getAttribute());
|
||||
cfg.setClassify(source.getClassify());
|
||||
cfg.setLable(source.getLable());
|
||||
cfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
cfg.setRequestId(source.getRequestId());
|
||||
cfg.setServiceId(source.getServiceId());
|
||||
cfg.setCreatorId(source.getCreatorId());
|
||||
cfg.setCreatorName(source.getCreatorName());
|
||||
cfg.setCreateTime(source.getCreateTime());
|
||||
cfg.setEditorId(source.getEditorId());
|
||||
cfg.setEditorName(source.getEditorName());
|
||||
cfg.setEditTime(source.getEditTime());
|
||||
cfg.setAuditorId(source.getAuditorId());
|
||||
cfg.setAuditorName(source.getAuditorName());
|
||||
cfg.setAuditTime(source.getAuditTime());
|
||||
cfg.setSeltype(source.getSeltype());
|
||||
cfg.setSearch_create_time_start(source.getSearch_create_time_start());
|
||||
cfg.setSearch_create_time_end(source.getSearch_create_time_end());
|
||||
cfg.setSearch_edit_time_start(source.getSearch_edit_time_start());
|
||||
cfg.setSearch_edit_time_end(source.getSearch_edit_time_end());
|
||||
cfg.setSearch_audit_time_start(source.getSearch_audit_time_start());
|
||||
cfg.setSearch_audit_time_end(source.getSearch_audit_time_end());
|
||||
}
|
||||
if(stringCfg!=null){
|
||||
stringCfg.setAction(source.getAction());
|
||||
stringCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
stringCfg.setAttribute(source.getAttribute());
|
||||
stringCfg.setClassify(source.getClassify());
|
||||
stringCfg.setLable(source.getLable());
|
||||
stringCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
stringCfg.setRequestId(source.getRequestId());
|
||||
stringCfg.setServiceId(source.getServiceId());
|
||||
stringCfg.setCreatorId(source.getCreatorId());
|
||||
stringCfg.setCreatorName(source.getCreatorName());
|
||||
stringCfg.setCreateTime(source.getCreateTime());
|
||||
stringCfg.setEditorId(source.getEditorId());
|
||||
stringCfg.setEditorName(source.getEditorName());
|
||||
stringCfg.setEditTime(source.getEditTime());
|
||||
stringCfg.setAuditorId(source.getAuditorId());
|
||||
stringCfg.setAuditorName(source.getAuditorName());
|
||||
stringCfg.setAuditTime(source.getAuditTime());
|
||||
}
|
||||
if(numCfg!=null){
|
||||
numCfg.setAction(source.getAction());
|
||||
numCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
numCfg.setAttribute(source.getAttribute());
|
||||
numCfg.setClassify(source.getClassify());
|
||||
numCfg.setLable(source.getLable());
|
||||
numCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
numCfg.setRequestId(source.getRequestId());
|
||||
numCfg.setServiceId(source.getServiceId());
|
||||
numCfg.setCreatorId(source.getCreatorId());
|
||||
numCfg.setCreatorName(source.getCreatorName());
|
||||
numCfg.setCreateTime(source.getCreateTime());
|
||||
numCfg.setEditorId(source.getEditorId());
|
||||
numCfg.setEditorName(source.getEditorName());
|
||||
numCfg.setEditTime(source.getEditTime());
|
||||
numCfg.setAuditorId(source.getAuditorId());
|
||||
numCfg.setAuditorName(source.getAuditorName());
|
||||
numCfg.setAuditTime(source.getAuditTime());
|
||||
}
|
||||
if(complexCfg!=null){
|
||||
complexCfg.setAction(source.getAction());
|
||||
complexCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
complexCfg.setAttribute(source.getAttribute());
|
||||
complexCfg.setClassify(source.getClassify());
|
||||
complexCfg.setLable(source.getLable());
|
||||
complexCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
complexCfg.setRequestId(source.getRequestId());
|
||||
complexCfg.setServiceId(source.getServiceId());
|
||||
complexCfg.setCreatorId(source.getCreatorId());
|
||||
complexCfg.setCreatorName(source.getCreatorName());
|
||||
complexCfg.setCreateTime(source.getCreateTime());
|
||||
complexCfg.setEditorId(source.getEditorId());
|
||||
complexCfg.setEditorName(source.getEditorName());
|
||||
complexCfg.setEditTime(source.getEditTime());
|
||||
complexCfg.setAuditorId(source.getAuditorId());
|
||||
complexCfg.setAuditorName(source.getAuditorName());
|
||||
complexCfg.setAuditTime(source.getAuditTime());
|
||||
}
|
||||
}
|
||||
protected void setProperties(MultipleCfg source,BaseIpCfg ipCfg,BaseStringCfg stringCfg,NumBoundaryCfg numCfg,ComplexkeywordCfg complexCfg){
|
||||
if(ipCfg!=null){
|
||||
ipCfg.setAction(source.getAction());
|
||||
ipCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
ipCfg.setAttribute(source.getAttribute());
|
||||
ipCfg.setClassify(source.getClassify());
|
||||
ipCfg.setLable(source.getLable());
|
||||
ipCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
ipCfg.setRequestId(source.getRequestId());
|
||||
ipCfg.setServiceId(source.getServiceId());
|
||||
}
|
||||
if(stringCfg!=null){
|
||||
stringCfg.setAction(source.getAction());
|
||||
stringCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
stringCfg.setAttribute(source.getAttribute());
|
||||
stringCfg.setClassify(source.getClassify());
|
||||
stringCfg.setLable(source.getLable());
|
||||
stringCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
stringCfg.setRequestId(source.getRequestId());
|
||||
stringCfg.setServiceId(source.getServiceId());
|
||||
}
|
||||
if(numCfg!=null){
|
||||
numCfg.setAction(source.getAction());
|
||||
numCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
numCfg.setAttribute(source.getAttribute());
|
||||
numCfg.setClassify(source.getClassify());
|
||||
numCfg.setLable(source.getLable());
|
||||
numCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
numCfg.setRequestId(source.getRequestId());
|
||||
numCfg.setServiceId(source.getServiceId());
|
||||
}
|
||||
if(complexCfg!=null){
|
||||
complexCfg.setAction(source.getAction());
|
||||
complexCfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
complexCfg.setAttribute(source.getAttribute());
|
||||
complexCfg.setClassify(source.getClassify());
|
||||
complexCfg.setLable(source.getLable());
|
||||
complexCfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
complexCfg.setRequestId(source.getRequestId());
|
||||
complexCfg.setServiceId(source.getServiceId());
|
||||
|
||||
}
|
||||
protected void setProperties(MultipleCfg source,BaseCfg cfg){
|
||||
if(cfg!=null){
|
||||
cfg.setAction(source.getAction());
|
||||
cfg.setAreaEffectiveIds(source.getAreaEffectiveIds());
|
||||
cfg.setAttribute(source.getAttribute());
|
||||
cfg.setClassify(source.getClassify());
|
||||
cfg.setLable(source.getLable());
|
||||
cfg.setIsAreaEffective(source.getIsAreaEffective());
|
||||
cfg.setRequestId(source.getRequestId());
|
||||
cfg.setServiceId(source.getServiceId());
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected void setPageProps(Page source,Page target){
|
||||
target.setCount(source.getCount());
|
||||
target.setPageNo(source.getPageNo());
|
||||
|
||||
@@ -86,6 +86,16 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
|
||||
* @param sysDictInfo
|
||||
*/
|
||||
void updateLevelNo(SysDictInfo sysDictInfo);
|
||||
/**
|
||||
* getDistrictDict(这里用一句话描述这个方法的作用)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param sysDictInfo
|
||||
* @return
|
||||
*List<SysDictInfo>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
List<SysDictInfo> getDistrictDict(String itemCode);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -327,5 +327,11 @@
|
||||
s.level_no = #{levelNo}
|
||||
WHERE s.sys_dict_id = #{sysDictId}
|
||||
</update>
|
||||
|
||||
<!-- 获取增强字符串配置district -->
|
||||
<select id="getDistrictDict" resultType="com.nis.domain.basics.SysDictInfo" >
|
||||
SELECT
|
||||
<include refid="sysDictInfoColumns"/>
|
||||
FROM sys_dict_info s
|
||||
WHERE s.is_valid = 1 AND item_type = 3 AND item_code like concat(#{itemCode,jdbcType=VARCHAR},'%')
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -94,75 +94,10 @@
|
||||
<if test="cfgId != null">
|
||||
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="district != null">
|
||||
AND DISTRICT=#{district,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
AND KEYWORDS=#{keywords,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND classify=#{classify,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND attribute=#{attribute,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND lable=#{lable,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
AND IS_VALID!=-1
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="ComplexStringMapWithUser">
|
||||
|
||||
@@ -155,96 +155,10 @@
|
||||
<if test="cfgId != null">
|
||||
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipType != null">
|
||||
AND IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIp != null">
|
||||
AND SRC_IP=#{srcIp,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="srcIpMask != null">
|
||||
AND SRC_IP_MASK=#{srcIpMask,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="srcPort != null">
|
||||
AND SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="srcPortMask != null">
|
||||
AND SRC_PORT_MASK=#{srcPortMask,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="dstIp != null">
|
||||
AND DST_IP=#{dstIp,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="dstIpMask != null">
|
||||
AND DST_IP_MASK=#{dstIpMask,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="dstPort != null">
|
||||
AND DST_PORT=#{dstPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="dstPortMask != null">
|
||||
AND DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="direction != null">
|
||||
AND DIRECTION=#{direction,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
AND PROTOCOL=#{protocol,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="protocolId != null">
|
||||
AND PROTOCOL_ID=#{protocolId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND classify=#{classify,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND attribute=#{attribute,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND lable=#{lable,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
AND IS_VALID!=-1
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="BaseIpMapWithUser">
|
||||
|
||||
@@ -94,78 +94,10 @@
|
||||
<if test="cfgId != null">
|
||||
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lowBounadry != null">
|
||||
AND LOW_BOUNADRY=#{lowBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="upBounadry != null">
|
||||
AND UP_BOUNADRY=#{upBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgKeywords != null">
|
||||
AND CFG_KEYWORDS=#{cfgKeywords,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND classify=#{classify,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND attribute=#{attribute,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND lable=#{lable,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
AND IS_VALID!=-1
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="NumMapWithUser">
|
||||
|
||||
@@ -115,72 +115,10 @@
|
||||
<if test="cfgId != null">
|
||||
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="cfgKeywords != null">
|
||||
AND CFG_KEYWORDS=#{cfgKeywords,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND classify=#{classify,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND attribute=#{attribute,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND lable=#{lable,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
AND IS_VALID!=-1
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -274,7 +274,9 @@ public class SysDictInfoService extends BaseService{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<SysDictInfo> getDistrictDict(String tableName){
|
||||
return sysDictInfoDao.getDistrictDict(tableName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.MultipleCfg;
|
||||
import com.nis.domain.configuration.MultipleSearchCfg;
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.dao.configuration.ComplexStringCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.MultipleCfgDao;
|
||||
@@ -76,7 +81,12 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
|
||||
if(cfg==null) return 0;
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
if(_cfg.getCfgId()==null){//修改配置时用户可能希望新增IP配置,此时新增的IP配置无配置ID
|
||||
ipCfgDao.insert(_cfg);
|
||||
}else{
|
||||
ipCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
@@ -128,32 +138,85 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @throws Exception
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int auditCfg(MultipleCfg cfg){
|
||||
public int auditCfg(MultipleCfg sendCfg,MultipleCfg cfg) throws Exception{
|
||||
if(cfg==null) return 0;
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.audit(_cfg);
|
||||
if(Constants.AUDIT_YES==cfg.getIsAudit()||Constants.AUDIT_NOT_YES==cfg.getIsAudit()){
|
||||
List<BaseCfg> cfgs=new ArrayList<BaseCfg>();
|
||||
if(sendCfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:sendCfg.getIpCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(sendCfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:sendCfg.getStringCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(sendCfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:sendCfg.getNumCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(sendCfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:sendCfg.getComplexCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
BaseCfg[] cfgArray=new BaseCfg[cfgs.size()];
|
||||
cfgs.toArray(cfgArray);
|
||||
if(this.sendToMaatConvertor(cfg.getIsAudit(), null, cfgArray)){
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.audit(_cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user