字符串类导入模板定义
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入增强字符串类配置
|
||||
*/
|
||||
public class ComplexStringAllTemplate {
|
||||
private String cfgDesc;
|
||||
|
||||
private String district;
|
||||
private String cfgKeywords;
|
||||
private Integer exprType ;
|
||||
private Integer matchMethod ;
|
||||
private Integer isHex;
|
||||
private Integer isCaseInsenstive;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
@ExcelField(title="district",sort=11)
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
@ExcelField(title="key_word",sort=12)
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=13)
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=14)
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
@ExcelField(title="is_hex",dictType="IS_HEX",sort=15)
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
@ExcelField(title="is_case_insenstive",dictType="CASE_INSENSTIVE",sort=16)
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入DNS字符串类配置
|
||||
*/
|
||||
public class DnsComplexStringTemplate extends ComplexStringAllTemplate {
|
||||
private Integer dnsStrategyId;
|
||||
|
||||
@ExcelField(title="policy_name",align=2,sort=2)
|
||||
public Integer getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
public void setDnsStrategyId(Integer dnsStrategyId) {
|
||||
this.dnsStrategyId = dnsStrategyId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入DNS IP类配置
|
||||
*/
|
||||
public class DnsIpTemplate extends IpAllTemplate {
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
|
||||
private Integer dnsStrategyId;
|
||||
|
||||
@ExcelField(title="policy_name",align=2,sort=2)
|
||||
public Integer getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
public void setDnsStrategyId(Integer dnsStrategyId) {
|
||||
this.dnsStrategyId = dnsStrategyId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,14 +19,14 @@ public class IpPayloadTemplate extends IpAllTemplate {
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
@ExcelField(title="replaced_content",align=2,sort=2)
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
public void setUserRegion2(String userRegion1) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
@ExcelField(title="replace_content",align=2,sort=2)
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入字符串类配置
|
||||
*/
|
||||
public class StringAllTemplate {
|
||||
private String cfgDesc;
|
||||
|
||||
private String cfgKeywords;
|
||||
private Integer exprType ;
|
||||
private Integer matchMethod ;
|
||||
private Integer isHex;
|
||||
private Integer isCaseInsenstive;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
@ExcelField(title="key_word",sort=11)
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=12)
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=13)
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
@ExcelField(title="is_hex",dictType="IS_HEX",sort=14)
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
@ExcelField(title="is_case_insenstive",dictType="CASE_INSENSTIVE",sort=15)
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
}
|
||||
@@ -46,10 +46,12 @@ import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.Encodes;
|
||||
import com.nis.util.Reflections;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.service.configuration.DnsResStrategyService;
|
||||
import com.sun.xml.internal.rngom.ast.builder.CommentList;
|
||||
|
||||
import sun.util.logging.resources.logging;
|
||||
@@ -239,7 +241,7 @@ public class ExportExcel {
|
||||
if("protocol".equals(headerStr)){
|
||||
if(service.getFunctionId().equals(5) ){
|
||||
commentStr="";
|
||||
//block tcp
|
||||
//ip block tcp
|
||||
if(service.getAction().equals(16) ){
|
||||
List<SysDataDictionaryItem> protocol=DictUtils.getDictList("PROTOCOL");
|
||||
if(protocol !=null && protocol.size()>0){
|
||||
@@ -292,7 +294,7 @@ public class ExportExcel {
|
||||
}
|
||||
}
|
||||
|
||||
//导入的Direction
|
||||
//Direction
|
||||
if("direction".equals(headerStr)){
|
||||
if(StringUtil.isEmpty(region.getConfigDirection())){
|
||||
headerStr="";
|
||||
@@ -302,7 +304,8 @@ public class ExportExcel {
|
||||
List<SysDataDictionaryItem> direction=DictUtils.getDictList("DIRECTION");
|
||||
if(direction !=null && direction.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : direction) {
|
||||
if(((","+region.getConfigDirection()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1) && StringUtil.isEmpty(msgProp.getProperty(sysDataDictionaryItem.getItemValue()))){
|
||||
if(((","+region.getConfigDirection()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1)
|
||||
&& StringUtil.isEmpty(msgProp.getProperty(sysDataDictionaryItem.getItemValue()))){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}else if((","+region.getConfigDirection()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+"\n";
|
||||
@@ -316,7 +319,7 @@ public class ExportExcel {
|
||||
}
|
||||
}
|
||||
|
||||
//导入的限速
|
||||
//ratelimit
|
||||
if("ratelimit".equals(headerStr)){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> ratelimit=DictUtils.getDictList("RATE_LIMIT");
|
||||
@@ -330,6 +333,149 @@ public class ExportExcel {
|
||||
}
|
||||
}
|
||||
}
|
||||
//字符串或摘要字符串
|
||||
}else if(region.getRegionType().equals(2) || region.getRegionType().equals(3)){
|
||||
if(region.getRegionType().equals(3)){
|
||||
if("district".equals(headerStr)){
|
||||
if(StringUtil.isEmpty(region.getConfigDistrict())){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr=region.getConfigDistrict();
|
||||
}
|
||||
}
|
||||
|
||||
if("policy_name".equals(headerStr)){
|
||||
DnsResStrategyService dnsResStrategyService=new DnsResStrategyService();
|
||||
List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(null, 1,1);
|
||||
if(StringUtil.isEmpty(resStrategys)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
if(service.getAction().equals(1)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
for (DnsResStrategy dnsResStrategy : resStrategys) {
|
||||
commentStr=commentStr+dnsResStrategy.getCfgId()+":"+dnsResStrategy.getCfgDesc()+"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtil.isEmpty(commentStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}
|
||||
}
|
||||
}
|
||||
//expr type
|
||||
if("expression_type".equals(headerStr)){
|
||||
if(StringUtil.isEmpty(region.getConfigExprType())){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> exprType=DictUtils.getDictList("EXPRESSION_TYPE");
|
||||
if(exprType !=null && exprType.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : exprType) {
|
||||
if(((","+region.getConfigExprType()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1)
|
||||
&& StringUtil.isEmpty(msgProp.getProperty(sysDataDictionaryItem.getItemValue()))){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}else if((","+region.getConfigExprType()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+"\n";
|
||||
}
|
||||
}
|
||||
if(StringUtil.isEmpty(commentStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//match method
|
||||
if("match_method".equals(headerStr)){
|
||||
if(StringUtil.isEmpty(region.getConfigMatchMethod())){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> matchMethod=DictUtils.getDictList("MATCH_METHOD");
|
||||
if(matchMethod !=null && matchMethod.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : matchMethod) {
|
||||
if(((","+region.getConfigMatchMethod()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1)
|
||||
&& StringUtil.isEmpty(msgProp.getProperty(sysDataDictionaryItem.getItemValue()))){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}else if((","+region.getConfigMatchMethod()+",").indexOf(sysDataDictionaryItem.getItemCode()) >-1){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+"\n";
|
||||
}
|
||||
}
|
||||
if(StringUtil.isEmpty(commentStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//ishex
|
||||
if("is_hex".equals(headerStr)){
|
||||
if(StringUtil.isEmpty(region.getConfigHex())){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> isHex=DictUtils.getDictList("IS_HEX");
|
||||
if(isHex !=null && isHex.size()>0){
|
||||
if(((","+region.getConfigHex()+",").indexOf("1") >-1)){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : isHex) {
|
||||
if(sysDataDictionaryItem.getItemCode().equals(1)){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!((","+region.getConfigHex()+",").indexOf("1") >-1)){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : isHex) {
|
||||
if(sysDataDictionaryItem.getItemCode().equals(0)){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtil.isEmpty(commentStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if("is_case_insenstive".equals(headerStr)){
|
||||
if(StringUtil.isEmpty(region.getConfigHex())){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> isCaseSenstive=DictUtils.getDictList("CASE_INSENSTIVE");
|
||||
if(isCaseSenstive !=null && isCaseSenstive.size()>0){
|
||||
if(((","+region.getConfigHex()+",").indexOf("2") >-1)){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : isCaseSenstive) {
|
||||
if(sysDataDictionaryItem.getItemCode().equals(1)){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!((","+region.getConfigHex()+",").indexOf("2") >-1)){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : isCaseSenstive) {
|
||||
if(sysDataDictionaryItem.getItemCode().equals(1)){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtil.isEmpty(commentStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
titleInfo[0]=headerStr;
|
||||
titleInfo[1]=commentStr;
|
||||
|
||||
@@ -27,8 +27,13 @@ import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.template.ComplexStringAllTemplate;
|
||||
import com.nis.domain.configuration.template.DnsComplexStringTemplate;
|
||||
import com.nis.domain.configuration.template.DnsIpTemplate;
|
||||
import com.nis.domain.configuration.template.IpAllTemplate;
|
||||
import com.nis.domain.configuration.template.IpPayloadTemplate;
|
||||
import com.nis.domain.configuration.template.IpRateLimitTemplate;
|
||||
import com.nis.domain.configuration.template.StringAllTemplate;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
@@ -229,8 +234,8 @@ public class IpController extends BaseController{
|
||||
,Integer requestId) throws Exception{
|
||||
String fileName = "template.xlsx";
|
||||
//ip类模板
|
||||
if(regionDict.getFunctionId().equals(5)){
|
||||
if(regionDict.getRegionType().equals(1)){
|
||||
if(regionDict.getRegionType().equals(1)){
|
||||
if(regionDict.getFunctionId().equals(5)){// IP Address
|
||||
if(serviceDict.getAction().equals(64)){//ip限速
|
||||
List<IpRateLimitTemplate> classList=new ArrayList<IpRateLimitTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, IpRateLimitTemplate.class, 2);
|
||||
@@ -242,26 +247,51 @@ public class IpController extends BaseController{
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}
|
||||
}else if(regionDict.getFunctionId().equals(212)){ //IP Payload
|
||||
List<IpPayloadTemplate> classList=new ArrayList<IpPayloadTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, IpAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(7)){ //Dns IP
|
||||
List<IpPayloadTemplate> classList=new ArrayList<IpPayloadTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, IpAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<DnsIpTemplate> classList=new ArrayList<DnsIpTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, IpAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}
|
||||
}else if(regionDict.getRegionType().equals(1)){
|
||||
List<IpAllTemplate> classList=new ArrayList<IpAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, IpAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}
|
||||
/*//str类模板
|
||||
//str类模板
|
||||
if(regionDict.getRegionType().equals(2)){
|
||||
List<IpAllTemplate> classList=new ArrayList<IpAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(this.getMsgProp(),null, IpAllTemplate.class, 2,regionDict);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
if(regionDict.getFunctionId().equals(212)){
|
||||
List<StringAllTemplate> classList=new ArrayList<StringAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, StringAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<StringAllTemplate> classList=new ArrayList<StringAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, StringAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}
|
||||
}
|
||||
//district类模板
|
||||
if(regionDict.getRegionType().equals(2)){
|
||||
ExportExcel excel=new ExportExcel(this.getMsgProp(),null, IpAllTemplate.class, 2,regionDict);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}*/
|
||||
if(regionDict.getRegionType().equals(3)){
|
||||
if(regionDict.getFunctionId().equals(7)){//DNS DISTRICT STRING
|
||||
List<DnsComplexStringTemplate> classList=new ArrayList<DnsComplexStringTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, StringAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<ComplexStringAllTemplate> classList=new ArrayList<ComplexStringAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, ComplexStringAllTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ip配置导入
|
||||
|
||||
Reference in New Issue
Block a user