(1)细化IPV4掩码范围验证的提示
(2)IP不能为xxxx的提示前方加入空格 (3)DNS响应策略导入模板,导入功能提交
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
package com.nis.util.excel;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -16,7 +15,6 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -29,7 +27,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.Comment;
|
||||
import org.apache.poi.ss.usermodel.DataFormat;
|
||||
import org.apache.poi.ss.usermodel.Font;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
@@ -41,7 +38,6 @@ import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
@@ -56,15 +52,10 @@ import com.nis.util.DictUtils;
|
||||
import com.nis.util.Encodes;
|
||||
import com.nis.util.Reflections;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.FunctionServiceDictDao;
|
||||
import com.nis.web.dao.basics.PolicyGroupInfoDao;
|
||||
import com.nis.web.dao.basics.SysDictInfoDao;
|
||||
import com.nis.web.dao.configuration.DnsResStrategyDao;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
import com.nis.web.service.configuration.DnsResStrategyService;
|
||||
import com.sun.xml.internal.rngom.ast.builder.CommentList;
|
||||
|
||||
import sun.util.logging.resources.logging;
|
||||
|
||||
/**
|
||||
* 导出Excel文件(导出“XLSX”格式,支持大数据量导出 @see org.apache.poi.ss.SpreadsheetVersion)
|
||||
@@ -262,35 +253,36 @@ public class ExportExcel {
|
||||
index++;
|
||||
}
|
||||
if("policy_name".equals(headerStr)){
|
||||
|
||||
if(service.getAction().equals(1)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
List<DnsResStrategy> resStrategys=dnsResStrategyDao.findList(null, 1,1);
|
||||
commentStr=commentStr+"0"+"("+msgProp.getProperty("no_strategy")+")\n";
|
||||
index++;
|
||||
defaultValue="0";
|
||||
if(!StringUtil.isEmpty(resStrategys)){
|
||||
for (DnsResStrategy dnsResStrategy : resStrategys) {
|
||||
commentStr=commentStr+dnsResStrategy.getCfgId()+"("+dnsResStrategy.getCfgDesc()+")\n";
|
||||
index++;
|
||||
if(region.getFunctionId().intValue()!=400) {//400 policy_name为DNS响应策略
|
||||
if(service.getAction().equals(1)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
List<DnsResStrategy> resStrategys=dnsResStrategyDao.findList(null, 1,1);
|
||||
commentStr=commentStr+"0"+"("+msgProp.getProperty("no_strategy")+")\n";
|
||||
index++;
|
||||
defaultValue="0";
|
||||
if(!StringUtil.isEmpty(resStrategys)){
|
||||
for (DnsResStrategy dnsResStrategy : resStrategys) {
|
||||
commentStr=commentStr+dnsResStrategy.getCfgId()+"("+dnsResStrategy.getCfgDesc()+")\n";
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtil.isEmpty(headerStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//2、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
if(StringUtil.isEmpty(headerStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//2、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1157,6 +1149,31 @@ public class ExportExcel {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}else if(region.getRegionType().equals(6)) {
|
||||
if(region.getFunctionId().equals(400)) {
|
||||
if("group".equals(headerStr)){
|
||||
commentStr="";
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findPolicyGroupInfosByType(1);
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
for (PolicyGroupInfo policyGroupInfo : list) {
|
||||
commentStr=commentStr+policyGroupInfo.getGroupId()+"("+policyGroupInfo.getGroupName()+")\n";
|
||||
index++;
|
||||
}
|
||||
}
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
}
|
||||
if("res_group_num".equals(headerStr)) {
|
||||
commentStr=msgProp.getProperty("input_integer")+":\n"+commentStr;
|
||||
index++;
|
||||
}
|
||||
if("min_ttl".equals(headerStr)) {
|
||||
commentStr="1-2";
|
||||
index++;
|
||||
commentStr=msgProp.getProperty("example_tip")+":\n"+commentStr;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
titleInfo[0]=headerStr;
|
||||
titleInfo[1]=commentStr;
|
||||
|
||||
Reference in New Issue
Block a user