Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into
develop Conflicts: src/main/java/com/nis/web/controller/configuration/proxy/PxyObjKeyringController.java 证书增加CN和SAN列,修改时间类型 common.js去掉无用字符 国际化增加cert_not_match_domain
This commit is contained in:
@@ -56,6 +56,10 @@ public final class Constants {
|
||||
* 配置审核下发的类型 回调类型
|
||||
*/
|
||||
public static final int CALLBACK_TYPE=2;
|
||||
/**
|
||||
* 域名验证正则
|
||||
*/
|
||||
public static final String DOMAIN_REGEXP=Configurations.getStringProperty("domain_regexp", "*");
|
||||
/**
|
||||
* IP验证正则
|
||||
*/
|
||||
@@ -680,6 +684,7 @@ public final class Constants {
|
||||
public static final String NTC_TOTAL_REPORT=Configurations.getStringProperty("ntcTotalReport","ntcTotalReport");
|
||||
public static final String TRAFFIC_IPACTIVE_FIVEMINUTE=Configurations.getStringProperty("trafficIpActiveFiveMinute","trafficIpActiveFiveMinute");
|
||||
public static final String TRAFFIC_IPACTIVE_ONEHOUR=Configurations.getStringProperty("trafficIpActiveOneHour","trafficIpActiveOneHour");
|
||||
public static final String NTC_RADIUS_REPORT=Configurations.getStringProperty("ntcRadiusReport","ntcRadiusReport");
|
||||
|
||||
/**
|
||||
* httpclient 工具超时时间设置
|
||||
|
||||
@@ -485,21 +485,21 @@ public class ExportExcel {
|
||||
if((","+region.getConfigIpPattern()+",").indexOf(",3,") > -1){
|
||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_VALUE+"(IPv4)"+"\n";
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue=Constants.IPV4_DEFAULT_IP_VALUE+"(IPv4)";
|
||||
defaultValue=Constants.IPV4_DEFAULT_IP_VALUE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){
|
||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n";
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue=Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip");
|
||||
defaultValue=Constants.IPV4_DEFAULT_IP_RANGE_VALUE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){
|
||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n";
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue=Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")";
|
||||
defaultValue=Constants.IPV4_DEFAULT_IP_SUBNET_VALUE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
@@ -508,21 +508,21 @@ public class ExportExcel {
|
||||
if((","+region.getConfigIpPattern()+",").indexOf(",3,") > -1){
|
||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_VALUE+"(IPv6)"+"\n";
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue=Constants.IPV6_DEFAULT_IP_VALUE+"(IPv6)";
|
||||
defaultValue=Constants.IPV6_DEFAULT_IP_VALUE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){
|
||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n";
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue=Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")";
|
||||
defaultValue=Constants.IPV6_DEFAULT_IP_RANGE_VALUE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){
|
||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n";
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue=Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")";
|
||||
defaultValue=Constants.IPV6_DEFAULT_IP_SUBNET_VALUE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,14 @@ import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.hadoop.hbase.protobuf.generated.CellProtos.CellType;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDataFormatter;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.DateUtil;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
@@ -219,6 +222,35 @@ public class ImportExcel {
|
||||
}
|
||||
return val;
|
||||
}
|
||||
/**
|
||||
* 获取单元格值
|
||||
* @param row 获取的行
|
||||
* @param column 获取单元格列号
|
||||
* @return 单元格值
|
||||
*/
|
||||
public Object getStringCellValue(Row row, int column){
|
||||
Object val = "";
|
||||
try{
|
||||
Cell cell = row.getCell(column);
|
||||
if (cell != null){
|
||||
if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC){
|
||||
HSSFDataFormatter dataFormatter = new HSSFDataFormatter();
|
||||
val = dataFormatter.formatCellValue(cell);
|
||||
}else if (cell.getCellType() == Cell.CELL_TYPE_STRING){
|
||||
val = cell.getStringCellValue();
|
||||
}else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA){
|
||||
val = cell.getCellFormula();
|
||||
}else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN){
|
||||
val = cell.getBooleanCellValue();
|
||||
}else if (cell.getCellType() == Cell.CELL_TYPE_ERROR){
|
||||
val = cell.getErrorCellValue();
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
return val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
/**
|
||||
* //递归获取cls实体对象及父级对象的属性
|
||||
* wx:修改,子类覆盖父类的同名方法
|
||||
@@ -786,7 +818,8 @@ public class ImportExcel {
|
||||
Row row = this.getRow(i);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Object[] os : annotationList){
|
||||
Object val = this.getCellValue(row, column++);
|
||||
// Object val = this.getCellValue(row, column++);
|
||||
Object val = this.getStringCellValue(row, column++);
|
||||
if (val != null){
|
||||
ExcelField ef = (ExcelField)os[0];
|
||||
// If is dict type, get dict value
|
||||
|
||||
@@ -51,6 +51,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.Encodes;
|
||||
import com.nis.util.StringUtil;
|
||||
|
||||
/**
|
||||
* @ClassName: HttpClientBean.java
|
||||
@@ -193,8 +194,12 @@ public class HttpClientUtil {
|
||||
String url = "";
|
||||
try {
|
||||
URIBuilder uriBuilder = new URIBuilder(destUrl);
|
||||
for (String param : params.keySet()) {
|
||||
uriBuilder.addParameter(param, params.get(param).toString());
|
||||
if(params!=null) {
|
||||
for (String param : params.keySet()) {
|
||||
if(!StringUtil.isBlank(param)&¶ms.get(param)!=null) {
|
||||
uriBuilder.addParameter(param, params.get(param).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
System.err.println(uriBuilder);
|
||||
url=uriBuilder.toString();
|
||||
|
||||
Reference in New Issue
Block a user