基本配置增加csv和excel导出
This commit is contained in:
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @ClassName: PolicyGroupInfo.java
|
||||
@@ -18,9 +19,12 @@ public class PolicyGroupInfo extends BaseCfg<PolicyGroupInfo> implements Seriali
|
||||
private static final long serialVersionUID = 7931466570918016654L;
|
||||
|
||||
private Integer groupId;
|
||||
@ExcelField(title="group_name",sort=1)
|
||||
private String groupName;
|
||||
@ExcelField(title="group_type",dictType="GROUP_TYPE",sort=2)
|
||||
private Integer groupType;
|
||||
private Integer serviceGroupId;
|
||||
@ExcelField(title="desc",sort=4)
|
||||
private String description;
|
||||
private Long asnNo;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
/**
|
||||
* 业务辅助表-业务字典信息表
|
||||
* @author zsl
|
||||
@@ -21,16 +22,24 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
private static final long serialVersionUID = 4680466118906894338L;
|
||||
|
||||
private Integer serviceDictId; //service_dict_id 字典ID int N 主键,自增
|
||||
@ExcelField(title="item_type",dictType="SERVICE_DICT_ITM_TYPE",sort=3)
|
||||
private Integer itemType; //item_type 数据类型 int N 1:分类 2:性质 3:标签
|
||||
private String itemCode; //item_code编码 varchar(64) N
|
||||
@ExcelField(title="config_content",sort=1)
|
||||
private String itemValue; //item_value 编码对应值 varchar2(64) N
|
||||
@ExcelField(title="desc",sort=2)
|
||||
private String itemDesc; //item_desc 描述信息 varcahr2(128) Y
|
||||
private ServiceDictInfo parent; //parent_id 父ID number(9) N 无父属性,默认填0
|
||||
@ExcelField(title="is_leaf",dictType="INT_YES_NO",sort=4)
|
||||
private Integer isLeaf; //is_leaf 是否叶子节点 int N 0-否 1-是;只有一级填0;
|
||||
private Integer isValid; //is_valid 有效标志 int N 1-有效 0-无效
|
||||
|
||||
private SysUser serviceDictCreator; //creator_id 创建人员 int N 取自sys_user.id
|
||||
@ExcelField(title="create_time",sort=6)
|
||||
private Date createTime; //create_time 配置时间 date N
|
||||
|
||||
private SysUser serviceDictEditor; //editor_id 修改人员 int Y 取自sys_user.id
|
||||
@ExcelField(title="edit_time",sort=8)
|
||||
private Date editTime; //edit_time 修改时间 date Y
|
||||
private Integer levelNo; //层级
|
||||
private List<ServiceDictInfo> childrenList = new ArrayList<ServiceDictInfo>();//子列表
|
||||
@@ -41,6 +50,11 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
private Date editEndDate; // 修改结束日期
|
||||
|
||||
private String showSequence; //显示序号
|
||||
@ExcelField(title="creator",sort=5)
|
||||
private String creatorName;
|
||||
@ExcelField(title="editor",sort=7)
|
||||
private String editorName;
|
||||
|
||||
|
||||
private String pNames;//父节点名称
|
||||
/**
|
||||
@@ -49,6 +63,20 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
*/
|
||||
private List<Integer> conditionType;
|
||||
|
||||
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
public String getEditorName() {
|
||||
return editorName;
|
||||
}
|
||||
public void setEditorName(String editorName) {
|
||||
this.editorName = editorName;
|
||||
}
|
||||
@JsonIgnore
|
||||
public String getpNames() {
|
||||
return pNames;
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* 系统特定服务信息表-记录特定服务信息(specific_service_cfg)
|
||||
@@ -17,19 +18,25 @@ public class SpecificServiceCfg extends BaseEntity<SpecificServiceCfg>{
|
||||
private static final long serialVersionUID = -1133644323636425766L;
|
||||
|
||||
private Integer specServiceId; //spec_service_id 协议ID int N 主键,初始化
|
||||
@ExcelField(title="app_code",sort=2)
|
||||
private Integer specServiceCode; //协议编码 int N 暂定,以后可扩展 1000:微信 , 1001:QQ
|
||||
@ExcelField(title="app_name",sort=3)
|
||||
private String specServiceName; //spec_service_name 协议名称 varchar(64) N
|
||||
@ExcelField(title="app_desc",sort=4)
|
||||
private String specServiceDesc; //spec_service_desc 协议描述 varchar2(64) N
|
||||
private Integer isValid; //is_valid 有效标志 int N 1-有效 0-无效
|
||||
@ExcelField(title="operate_time",sort=6)
|
||||
private Date opTime; //op_time 操作时间 date N
|
||||
private SpecificServiceCfg parent; //parent_id 父节点id int N 0表示一级节点
|
||||
private Integer isLeaf; //is_leaf 是否是叶子节点 int N 0否,1是,只有一级填0
|
||||
private Integer groupId; //group_id maat端配置分组id int N 缺省0,表示未与maat分组同步
|
||||
@ExcelField(title="cfg_type",dictType="SPECIFIC_SERVICE_CFG_TYPE",sort=5)
|
||||
private Integer cfgType;//配置类型,1,app;2,加密隧道;3,基础协议
|
||||
private Integer parentType;//父配置类型
|
||||
private Date beginDate; // 开始日期
|
||||
private Date endDate; // 结束日期
|
||||
private String showSequence; //显示序号
|
||||
@ExcelField(title="business_type",sort=1)
|
||||
private String businessType;
|
||||
private Integer addFlag;//app界面添加标记
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -18,20 +17,18 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.AsnCacheUtils;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/basics/asn")
|
||||
@@ -186,33 +183,50 @@ public class AsnIpController extends BaseController{
|
||||
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
Map<String, String> noExportMap=new HashMap<String, String>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
List<AsnIpCfg> list = new ArrayList<AsnIpCfg>();
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
list = asnIpCfgService.findByPage(ids);
|
||||
} else {
|
||||
Page<AsnIpCfg> pageInfo=new Page<AsnIpCfg>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<AsnIpCfg> page = asnIpCfgService.findPage(pageInfo, entity);
|
||||
for (AsnIpCfg asnIp : page.getList()) {
|
||||
list=page.getList();
|
||||
}
|
||||
for (AsnIpCfg asnIp : list) {
|
||||
asnIp.setIsIssued(String.valueOf(asnIp.getIsValid()));
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AsnIpCfg.class);
|
||||
String ipPortInfoNoExport=",do_log,action,valid_identifier,is_audit"
|
||||
String cfgIndexInfoNoExport=",block_type,do_log,action,valid_identifier,is_audit"
|
||||
+ ",auditor,audit_time,letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
noExportMap.put(entity.getMenuNameCode(),ipPortInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
+",userregion2,userregion3,userregion4,userregion5,ir_type,group_name,&userregion1:asn_no-";
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null ) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), list);
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("asnIp export failed",e);
|
||||
addMessage(redirectAttributes,"error","export_failed");
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.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 org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -14,6 +20,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
/**
|
||||
@@ -133,4 +140,62 @@ public class PolicyGroupController extends BaseController {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//Group配置导出
|
||||
@RequestMapping(value = "exportGroup")
|
||||
public void exportGroup(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")PolicyGroupInfo entity,String ids,RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
//export data info
|
||||
entity.setMenuNameCode("policy_group_manage");
|
||||
List<String> titleList=new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
Map<String, String> noExportMap=new HashMap<String, String>();
|
||||
List<PolicyGroupInfo> list = new ArrayList<PolicyGroupInfo>();
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
list = policyGroupInfoService.findPolicyByGroupInfoList(ids);
|
||||
} else {
|
||||
Page<PolicyGroupInfo> pageInfo=new Page<PolicyGroupInfo>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page page = policyGroupInfoService.findPolicyGroupInfoList(pageInfo,entity);
|
||||
list=page.getList();
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PolicyGroupInfo.class);
|
||||
String cfgIndexInfoNoExport=",config_describe,cfg_id,block_type,do_log,action,valid_identifier,is_audit"
|
||||
+ ",auditor,audit_time,letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,";
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null ) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), list);
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Group export failed",e);
|
||||
addMessage(redirectAttributes,"error","export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,40 +1,37 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.zookeeper.ZooDefs.Ids;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
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.SysUser;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigDictUtils;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/basics/serviceDictInfo")
|
||||
@@ -474,4 +471,126 @@ public class ServiceDictInfoController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
// dict配置导出
|
||||
@RequestMapping(value = "exportDict")
|
||||
public void exportDict(String itType, ServiceDictInfo serviceDictInfo,Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
String ids, RedirectAttributes redirectAttributes,String exType,String hColumns) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<Integer> intArr = ConfigDictUtils.dealTypeCondition(Configurations.getStringProperty("SERVICE_DICT_ITM_TYPE", ""), itType);
|
||||
//处理数据
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
list = serviceDictInfoService.findByDictInfo(ids,intArr);
|
||||
} else {
|
||||
|
||||
Page<ServiceDictInfo> pageCondition = new Page<ServiceDictInfo>(request, response);
|
||||
pageCondition.setPageNo(1);
|
||||
pageCondition.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
//查询符合条件总数
|
||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllServiceDictInfo(serviceDictInfo,intArr,pageCondition.getOrderBy());
|
||||
//查出顶层分页数据
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictList(pageCondition, serviceDictInfo,intArr);
|
||||
// 删除顶层数据、取出id
|
||||
List<Integer> intList = Lists.newArrayList();
|
||||
for(ServiceDictInfo tempSe : page.getList()) {
|
||||
if (tempSe != null) {
|
||||
intList.add(tempSe.getServiceDictId());
|
||||
}
|
||||
}
|
||||
for (int i = allList.size() - 1; i >= 0; i--) {
|
||||
ServiceDictInfo se = allList.get(i);
|
||||
if(se!=null&&intList.contains(se.getServiceDictId())||(se!=null&&se.getParent().getServiceDictId()==0)){
|
||||
allList.remove(se);
|
||||
}
|
||||
}
|
||||
allList.addAll(page.getList());
|
||||
ServiceDictInfo.sortList(list,allList,0,true);
|
||||
}
|
||||
|
||||
for(ServiceDictInfo tempSe : list) {
|
||||
if(tempSe.getServiceDictCreator()!=null){
|
||||
if(tempSe.getServiceDictCreator().getId()!=null){
|
||||
SysUser creator=UserUtils.get(tempSe.getServiceDictCreator().getId().toString());
|
||||
tempSe.setCreatorName(creator.getName());
|
||||
}
|
||||
}
|
||||
if(tempSe.getServiceDictEditor()!=null){
|
||||
if(tempSe.getServiceDictEditor().getId()!=null){
|
||||
SysUser creator=UserUtils.get(tempSe.getServiceDictEditor().getId().toString());
|
||||
tempSe.setEditorName(creator.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
String dictName=getDicName(intArr);
|
||||
titleList.add(dictName);
|
||||
classMap.put(dictName, ServiceDictInfo.class);
|
||||
String cfgIndexInfoNoExport = "";
|
||||
if("5".equals(itType)){
|
||||
cfgIndexInfoNoExport=",item_type,is_leaf,&config_content:vpn_ip-";
|
||||
}
|
||||
if(serviceDictInfo.getBeginDate()==null){
|
||||
cfgIndexInfoNoExport=",create_time,"+cfgIndexInfoNoExport;
|
||||
}
|
||||
if(serviceDictInfo.getEditBeginDate()==null){
|
||||
cfgIndexInfoNoExport=",edit_time,"+cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
if (!StringUtil.isEmpty(hColumns)) {
|
||||
cfgIndexInfoNoExport = "," +hColumns+ ","+cfgIndexInfoNoExport;
|
||||
}
|
||||
noExportMap.put(dictName, cfgIndexInfoNoExport);
|
||||
dataMap.put(dictName, list);
|
||||
String timeRange = initDictMap(serviceDictInfo,dictName);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(exType)) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, dictName, titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, dictName, titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("dict white export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
}
|
||||
|
||||
public String initDictMap(ServiceDictInfo cfg,String dictName){
|
||||
Properties msgProp = getMsgProp();
|
||||
String titleTime=dictName;
|
||||
if(cfg.getBeginDate()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("create_time")+":"+DateUtils.formatDateTime(cfg.getBeginDate());
|
||||
if(cfg.getEndDate()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getEndDate());
|
||||
}else{
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
if(cfg.getEditBeginDate()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("edit_time")+":"+DateUtils.formatDateTime(cfg.getEditBeginDate());
|
||||
if(cfg.getEditEndDate()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getEditEndDate());
|
||||
}else{
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
return titleTime;
|
||||
}
|
||||
|
||||
|
||||
public String getDicName(List intArr){
|
||||
String dicName="";
|
||||
Properties msgProp = getMsgProp();
|
||||
List<String> dict=ConfigDictUtils.getItemTypeByNo("SERVICE_DICT_ITM_TYPE",intArr);
|
||||
if(dict.size()>0){
|
||||
dicName=msgProp.getProperty(dict.get(0),dict.get(0));
|
||||
}
|
||||
return dicName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.nis.web.controller.specific;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -23,12 +25,19 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigDictUtils;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeResult;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@Controller
|
||||
@@ -490,4 +499,117 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Specific配置导出
|
||||
@RequestMapping(value = "exportSpec")
|
||||
public void exportDict(String itType, SpecificServiceCfg specificServiceCfg, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response, String ids, RedirectAttributes redirectAttributes, String exType,
|
||||
String hColumns) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
//--------------------------------------------
|
||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||
//处理数据
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
list = specificServiceCfgService.findBySpecificServiceCfg(ids);
|
||||
} else {
|
||||
if(specificServiceCfg.getCfgType()==null){
|
||||
specificServiceCfg.setCfgType(1);
|
||||
}
|
||||
Page<SpecificServiceCfg> pageCondition = new Page<SpecificServiceCfg>(request, response);
|
||||
pageCondition.setPageNo(1);
|
||||
pageCondition.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
List<SpecificServiceCfg> allList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,pageCondition.getOrderBy());
|
||||
Page<SpecificServiceCfg> page = specificServiceCfgService.findTopPage(pageCondition, specificServiceCfg);
|
||||
// 删除顶层数据、取出id
|
||||
List<Integer> intList = Lists.newArrayList();
|
||||
for (int i = allList.size() - 1; i >= 0; i--) {
|
||||
SpecificServiceCfg ss = allList.get(i);
|
||||
if ((ss != null && intList.contains(ss.getSpecServiceId())) || (ss != null && ss.getParent().getSpecServiceId() == 0)) {
|
||||
allList.remove(ss);
|
||||
}
|
||||
}
|
||||
allList.addAll(page.getList());
|
||||
SpecificServiceCfg.sortList(list, allList, 0, true);
|
||||
SpecificServiceCfg.addChildrenSeq(list, 0);
|
||||
}
|
||||
List<SysDataDictionaryItem> app=DictUtils.getDictList("APP_BUSINESS_TYPE");
|
||||
List<SysDataDictionaryItem> tunnel=DictUtils.getDictList("TUNNEL_BEHAV_BUSINESS_TYPE");
|
||||
List<SysDataDictionaryItem> basic=DictUtils.getDictList("BASIC_PROTOCOL_BUSINESS_TYPE");
|
||||
Properties msgProp = getMsgProp();
|
||||
for (SpecificServiceCfg spec : list) {
|
||||
if (!StringUtils.isEmpty(spec.getBusinessType())) {
|
||||
if (spec.getCfgType() == 1) {
|
||||
spec.setBusinessType(getName(spec.getBusinessType(),app,msgProp));
|
||||
} else if (spec.getCfgType() == 2) {
|
||||
spec.setBusinessType(getName(spec.getBusinessType(),tunnel,msgProp));
|
||||
} else if (spec.getCfgType() == 3) {
|
||||
spec.setBusinessType(getName(spec.getBusinessType(),basic,msgProp));
|
||||
}
|
||||
}
|
||||
}
|
||||
String dictName = "specific_service_cfg";
|
||||
titleList.add(dictName);
|
||||
classMap.put(dictName, SpecificServiceCfg.class);
|
||||
String cfgIndexInfoNoExport = "";
|
||||
if (specificServiceCfg.getCfgType() != null) {
|
||||
if (specificServiceCfg.getCfgType() == 2) {
|
||||
cfgIndexInfoNoExport = ",&app_code:tunnel_code-app_name:tunnel_name-app_desc:tunnel_desc-";
|
||||
} else if (specificServiceCfg.getCfgType() == 3) {
|
||||
cfgIndexInfoNoExport = ",&app_code:protocol_code-app_name:protocol_name-app_desc:protocol_desc-";
|
||||
}
|
||||
}
|
||||
if (specificServiceCfg.getBeginDate() == null) {
|
||||
cfgIndexInfoNoExport = ",operate_time," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
if (!StringUtil.isEmpty(hColumns)) {
|
||||
cfgIndexInfoNoExport = "," + hColumns + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
noExportMap.put(dictName, cfgIndexInfoNoExport);
|
||||
dataMap.put(dictName, list);
|
||||
String timeRange = initDictMap(specificServiceCfg, dictName,msgProp);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(exType)) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, dictName, titleList, classMap, dataMap,
|
||||
noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, dictName, titleList, classMap, dataMap,
|
||||
noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("dict white export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String getName(String id,List<SysDataDictionaryItem> list,Properties msgProp){
|
||||
String name=id;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
if(id.equals(list.get(i).getItemCode())){
|
||||
name=msgProp.getProperty(list.get(i).getItemValue(),list.get(i).getItemValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public String initDictMap(SpecificServiceCfg cfg, String dictName,Properties msgProp) {
|
||||
String titleTime =msgProp.getProperty(dictName,dictName) ;
|
||||
if (cfg.getBeginDate() != null) {
|
||||
titleTime += " " + msgProp.getProperty("operate_time") + ":" + DateUtils.formatDateTime(cfg.getBeginDate());
|
||||
if (cfg.getEndDate() != null) {
|
||||
titleTime += "—" + DateUtils.formatDateTime(cfg.getEndDate());
|
||||
} else {
|
||||
titleTime += "—" + DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
return titleTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.nis.web.dao.MyBatisDao;
|
||||
public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public List<AsnIpCfg> findPage(AsnIpCfg cfg);
|
||||
//public void updateValid(@Param("isValid")Integer isValid,@Param("ids")String ids);
|
||||
public List<AsnIpCfg> findByPage(@Param("ids")String ids);
|
||||
public void delete(@Param("ids")String ids);
|
||||
public void updateIssued(AsnIpCfg cfg);
|
||||
public List<AsnIpCfg> getByIds(@Param("ids")String ids);
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name,d.group_name as asnIpGroupName
|
||||
<!-- ,asn.group_name as asn_ip_group_name -->
|
||||
</trim>
|
||||
from asn_ip_cfg r
|
||||
@@ -68,6 +68,7 @@
|
||||
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 policy_group_info d on r.asn_ip_group = d.service_group_id
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
@@ -471,4 +472,24 @@
|
||||
#{asnIp.userRegion5,jdbcType=VARCHAR})
|
||||
</foreach >
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<select id="findByPage" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name,d.group_name as asnIpGroupName
|
||||
<!-- ,asn.group_name as asn_ip_group_name -->
|
||||
</trim>
|
||||
from asn_ip_cfg r
|
||||
<!-- left join config_group_info asn on asn.group_id=r.asn_ip_group -->
|
||||
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 policy_group_info d on r.asn_ip_group = d.service_group_id
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -2,6 +2,7 @@ package com.nis.web.dao.basics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -23,4 +24,6 @@ public interface PolicyGroupInfoDao extends CrudDao<PolicyGroupInfo> {
|
||||
|
||||
Integer getGroupIdByGroupName(String groupName);
|
||||
PolicyGroupInfo getGroupInfo(PolicyGroupInfo policyGroupInfo);
|
||||
|
||||
List<PolicyGroupInfo> findPolicyByGroupInfoList(@Param("ids")String ids);
|
||||
}
|
||||
@@ -250,4 +250,20 @@
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findPolicyByGroupInfoList" resultMap="PolicyGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name
|
||||
,e.name as editor_name
|
||||
</trim>
|
||||
FROM policy_group_info r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -27,6 +27,10 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllServiceDictInfo(@Param("serviceDictInfo")ServiceDictInfo serviceDictInfo,@Param("orderBy")String orderBy);
|
||||
|
||||
List<ServiceDictInfo> findByDictInfo(@Param("ids")String ids,@Param("itemType")String itemType);
|
||||
|
||||
|
||||
/**
|
||||
* 查出所有有效数据父级(!=0)
|
||||
*/
|
||||
|
||||
@@ -207,7 +207,16 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="findByDictInfo" resultType="com.nis.domain.basics.ServiceDictInfo" >
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
<include refid="menuJoins"/>
|
||||
WHERE s.is_valid =1
|
||||
AND s.service_dict_id in (${ids})
|
||||
AND s.item_type = #{itemType}
|
||||
ORDER BY field (s.service_dict_id, ${ids})
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -49,4 +49,6 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
||||
SpecificServiceCfg getRepeat(@Param("specServiceCode")Integer code, @Param("cfgType")Integer cfgType,@Param("parentId")Integer parentId);
|
||||
Integer getMaxServiceCode(@Param("maxCode")Integer code, @Param("cfgType")Integer cfgType,@Param("addFlag")Integer addFlag);
|
||||
|
||||
List<SpecificServiceCfg> findBySpecificServiceCfg(@Param("ids")String ids);
|
||||
|
||||
}
|
||||
@@ -213,4 +213,13 @@
|
||||
<select id="getChildrenById" resultMap="CFGResultMap" parameterType="java.lang.Integer">
|
||||
SELECT * FROM specific_service_cfg s WHERE s.is_valid = 1 and s.parent_id = #{specServiceId}
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的所有数据 -->
|
||||
<select id="findBySpecificServiceCfg" resultMap="CFGResultMap" >
|
||||
SELECT * from specific_service_cfg
|
||||
where is_valid = 1
|
||||
and spec_service_id in(${ids})
|
||||
ORDER BY field ( spec_service_id, ${ids})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -61,6 +61,13 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<AsnIpCfg> findByPage(String ids) {
|
||||
List<AsnIpCfg> list=asnIpCfgDao.findByPage(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public AsnIpCfg get(Long id ) {
|
||||
return asnIpCfgDao.get(id);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,13 @@ public class PolicyGroupInfoService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<PolicyGroupInfo> findPolicyByGroupInfoList(String ids) {
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findPolicyByGroupInfoList(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public List<PolicyGroupInfo> findPolicyGroupInfos() {
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findPolicyGroupInfos();
|
||||
return list;
|
||||
|
||||
@@ -51,15 +51,33 @@ public class ServiceDictInfoService extends BaseService{
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllServiceDictInfo(ServiceDictInfo serviceDictInfo,List<Integer> itType,String orderBy){
|
||||
|
||||
serviceDictInfo.setConditionType(itType);;
|
||||
serviceDictInfo.setConditionType(itType);
|
||||
return serviceDictInfoDao.findAllServiceDictInfo(serviceDictInfo,orderBy);
|
||||
}
|
||||
|
||||
|
||||
public List<ServiceDictInfo> findByDictInfo(String ids,List<Integer> itType){
|
||||
String itemType=String.valueOf(itType.get(0));
|
||||
return serviceDictInfoDao.findByDictInfo(ids,itemType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件查询所有数据
|
||||
* @param serviceDictInfo
|
||||
* @param itType
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findAllPageServiceDictInfo(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo,List<Integer> itType,String orderBy){
|
||||
serviceDictInfo.setPage(page);
|
||||
serviceDictInfo.setConditionType(itType);
|
||||
List<ServiceDictInfo> parentList =serviceDictInfoDao.findAllServiceDictInfo(serviceDictInfo,orderBy);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -332,5 +350,4 @@ public class ServiceDictInfoService extends BaseService{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -68,6 +68,12 @@ public class SpecificServiceCfgService extends BaseService{
|
||||
public List<SpecificServiceCfg> findAllSpecificServiceCfg(SpecificServiceCfg specificServiceCfg, String orderBy) {
|
||||
return specificServiceCfgDao.findAllSpecificServiceCfg(specificServiceCfg,orderBy);
|
||||
}
|
||||
|
||||
|
||||
public List<SpecificServiceCfg> findBySpecificServiceCfg(String ids) {
|
||||
return specificServiceCfgDao.findBySpecificServiceCfg(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或修改
|
||||
* @param specificServiceCfg
|
||||
|
||||
@@ -152,8 +152,20 @@
|
||||
<shiro:hasPermission name="asn:ip:config">
|
||||
<sys:delRow url="${ctx}/basics/asn/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/asn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/asn/exportAsnIp?functionId=${cfg.functionId }&asnIpGroup=${cfg.asnIpGroup}" searchUrl="${ctx}/basics/asn/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/basics/asn/exportAsnIp?functionId=${cfg.functionId }&asnIpGroup=${cfg.asnIpGroup}&exType=excel" searchUrl="${ctx}/basics/asn/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/asn/exportAsnIp?functionId=${cfg.functionId }&asnIpGroup=${cfg.asnIpGroup}&exType=csv" searchUrl="${ctx}/basics/asn/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <shiro:hasPermission name="asn:ip:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
@@ -245,26 +257,26 @@
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="group"/></th>
|
||||
<th><spring:message code="asn_no"/></th>
|
||||
<th><spring:message code="ip_type"/></th>
|
||||
<th><spring:message code="IP"/></th>
|
||||
<th column="config_describe" ><spring:message code="config_describe"/></th>
|
||||
<th column="group" ><spring:message code="group"/></th>
|
||||
<th column="userregion1" ><spring:message code="asn_no"/></th>
|
||||
<th column="ip_type" ><spring:message code="ip_type"/></th>
|
||||
<th column="IP" ><spring:message code="IP"/></th>
|
||||
<%-- <th><spring:message code="port"/></th> --%>
|
||||
<th><spring:message code="ip_pattern"/></th>
|
||||
<th column="ip_pattern" ><spring:message code="ip_pattern"/></th>
|
||||
<%-- <th><spring:message code="port_pattern"/></th> --%>
|
||||
<%-- <th><spring:message code="block_type"/></th> --%>
|
||||
<%-- <th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th> --%>
|
||||
<th><spring:message code="is_issued"/></th>
|
||||
<th column="is_issued" ><spring:message code="is_issued"/></th>
|
||||
<%-- <th><spring:message code="is_audit"/></th> --%>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<%-- <th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th> --%>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<c:if test="${cfg.groupType==1}">
|
||||
<%-- <c:if test="${cfg.groupType==1}">
|
||||
<spring:message code="dns_group_manage"/>
|
||||
</c:if>
|
||||
<c:if test="${cfg.groupType==4}">
|
||||
@@ -136,7 +136,8 @@
|
||||
</c:if>
|
||||
<c:if test="${cfg.groupType==6}">
|
||||
<spring:message code="ip_spoofing_group_manage"/>
|
||||
</c:if>
|
||||
</c:if> --%>
|
||||
<spring:message code="policy_group_manage"/>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
@@ -203,6 +204,17 @@
|
||||
<%-- <sys:delRow url="${ctx}/basics/asn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||||
<%-- </shiro:hasPermission> --%>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/basics/policyGroup/exportGroup?exType=excel" searchUrl="${ctx}/basics/policyGroup/policyGroupList" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/policyGroup/exportGroup?exType=csv" searchUrl="${ctx}/basics/policyGroup/policyGroupList" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -259,19 +271,19 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="group_name"/></th>
|
||||
<th><spring:message code="group_type"/></th>
|
||||
<c:if test="${cfg.groupType==4}">
|
||||
<th><spring:message code="asn_no"/></th>
|
||||
</c:if>
|
||||
<th column="group_name" ><spring:message code="group_name"/></th>
|
||||
<th column="group_type" ><spring:message code="group_type"/></th>
|
||||
<%-- <c:if test="${cfg.groupType==4}">
|
||||
<th column="asn_no" ><spring:message code="asn_no"/></th>
|
||||
</c:if> --%>
|
||||
<%-- <c:if test="${cfg.groupType==6}">
|
||||
<th><spring:message code="group_type"/></th>
|
||||
</c:if> --%>
|
||||
<th><spring:message code="desc"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="desc" ><spring:message code="desc"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -298,9 +310,9 @@
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<c:if test="${cfg.groupType==4}">
|
||||
<%-- <c:if test="${cfg.groupType==4}">
|
||||
<td>${cfg.asnNo}</td>
|
||||
</c:if>
|
||||
</c:if> --%>
|
||||
<%-- <c:if test="${cfg.groupType==6}">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="ipTypeC">
|
||||
|
||||
@@ -185,16 +185,24 @@
|
||||
<i class="fa fa-trash"></i><spring:message code="delete" /></button>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/basics/serviceDictInfo/exportDict?itType=${itType}&exType=excel" searchUrl="${ctx}/basics/serviceDictInfo/list?itType=${itType}" id="treeTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/serviceDictInfo/exportDict?itType=${itType}&exType=csv" searchUrl="${ctx}/basics/serviceDictInfo/list?itType=${itType}" id="treeTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title="<spring:message code="custom_columns" />" href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
|
||||
@@ -220,20 +228,14 @@
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.editBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
@@ -242,32 +244,14 @@
|
||||
value="<fmt:formatDate value="${serviceDictInfo.editEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -275,27 +259,27 @@
|
||||
<!-- <th>序号</th> -->
|
||||
<%-- <th><spring:message code="item_code"/></th> --%>
|
||||
<c:if test="${itType==5 }">
|
||||
<th><spring:message code="vpn_ip"/></th>
|
||||
<th column="vpn_ip"><spring:message code="vpn_ip"/></th>
|
||||
</c:if>
|
||||
<c:if test="${itType!=5 }">
|
||||
<th><spring:message code="config_content"/></th>
|
||||
<th column="config_content"><spring:message code="config_content"/></th>
|
||||
</c:if>
|
||||
<th><spring:message code="desc"/></th>
|
||||
<th column="desc"><spring:message code="desc"/></th>
|
||||
<c:if test="${itType!=5 }">
|
||||
<th><spring:message code="item_type"/></th>
|
||||
<th><spring:message code="is_leaf"/></th>
|
||||
<th column="item_type"><spring:message code="item_type"/></th>
|
||||
<th column="is_leaf"><spring:message code="is_leaf"/></th>
|
||||
</c:if>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column create_time"><spring:message code="create_time"/>
|
||||
</th><th><spring:message code="editor"/></th>
|
||||
<th class="sort-column edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="creator"><spring:message code="creator"/></th>
|
||||
<th column="create_time" class="sort-column create_time"><spring:message code="create_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column edit_time"><spring:message code="edit_time"/></th>
|
||||
<%-- <shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${list}" var="serviceDictInfo" varStatus="se">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td><input type="checkbox" class="ckbox" name="check" value="${serviceDictInfo.serviceDictId}"></td>
|
||||
<td><input type="checkbox" class="i-checks ckbox" name="check" id="${serviceDictInfo.serviceDictId}" value="${serviceDictInfo.serviceDictId}"></td>
|
||||
<%-- <td>${serviceDictInfo.showSequence}</td> --%>
|
||||
<%-- <td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td> --%>
|
||||
<td nowrap><i class="icon-icon-tablet"></i>
|
||||
|
||||
@@ -213,6 +213,17 @@
|
||||
<i class="fa fa-trash"></i> <spring:message code="delete"/></button>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/specific/specificServiceCfg/exportSpec?exType=excel" searchUrl="${ctx}/specific/specificServiceCfg/list" id="treeTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/specific/specificServiceCfg/exportSpec?exType=csv" searchUrl="${ctx}/specific/specificServiceCfg/list" id="treeTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title="<spring:message code='custom_columns'/>" href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -266,16 +277,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
@@ -284,8 +290,8 @@
|
||||
<tr>
|
||||
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||
<!-- <th>序号</th> -->
|
||||
<th><spring:message code="business_type"/></th>
|
||||
<th>
|
||||
<th column="business_type" ><spring:message code="business_type"/></th>
|
||||
<th column="app_code" >
|
||||
<c:if test="${specificServiceCfg.cfgType==1}">
|
||||
<spring:message code="app_code"/>
|
||||
</c:if>
|
||||
@@ -296,7 +302,7 @@
|
||||
<spring:message code="protocol_code"/>
|
||||
</c:if>
|
||||
</th>
|
||||
<th>
|
||||
<th column="app_name" >
|
||||
<c:if test="${specificServiceCfg.cfgType==1}">
|
||||
<spring:message code="app_name"/>
|
||||
</c:if>
|
||||
@@ -307,7 +313,7 @@
|
||||
<spring:message code="protocol_name"/>
|
||||
</c:if>
|
||||
</th>
|
||||
<th>
|
||||
<th column="app_desc" >
|
||||
<c:if test="${specificServiceCfg.cfgType==1}">
|
||||
<spring:message code="app_desc"/>
|
||||
</c:if>
|
||||
@@ -320,14 +326,14 @@
|
||||
</th>
|
||||
<%-- <th><spring:message code="group_id"/></th> --%>
|
||||
<%-- <th><spring:message code="is_leaf"/></th> --%>
|
||||
<th><spring:message code="cfg_type"/></th>
|
||||
<th class="sort-column op_time"><spring:message code="operate_time"/></th>
|
||||
<th column="cfg_type" ><spring:message code="cfg_type"/></th>
|
||||
<th column="operate_time" class="sort-column op_time"><spring:message code="operate_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${list}" var="specificServiceCfg" varStatus="ss">
|
||||
<tr id="${specificServiceCfg.specServiceId}" pId="${specificServiceCfg.parent.specServiceId ne 0?specificServiceCfg.parent.specServiceId:0}">
|
||||
<td><input type="checkbox" class="ckbox" name="check" value="${specificServiceCfg.specServiceId}"></td>
|
||||
<td><input type="checkbox" class="i-checks ckbox" id="${specificServiceCfg.specServiceId}" name="check" value="${specificServiceCfg.specServiceId}"></td>
|
||||
<%-- <td>${specificServiceCfg.showSequence}</td> --%>
|
||||
<td title="${specificServiceCfg.businessType}">
|
||||
<c:if test="${specificServiceCfg.cfgType==1}">
|
||||
|
||||
Reference in New Issue
Block a user