|
@ -434,7 +434,7 @@ public class ElasticSearchDataProcessService {
|
|
dataType = dataType.toLowerCase();
|
|
dataType = dataType.toLowerCase();
|
|
if(dataType.equals("string")){
|
|
if(dataType.equals("string")){
|
|
value = keyValue;
|
|
value = keyValue;
|
|
}else if(dataType.equals("int")){
|
|
|
|
|
|
}else if(dataType.equals("integer")){
|
|
int intValue = Integer.valueOf(keyValue);
|
|
int intValue = Integer.valueOf(keyValue);
|
|
value = intValue;
|
|
value = intValue;
|
|
}else if(dataType.equals("double")){
|
|
}else if(dataType.equals("double")){
|
|
@ -443,8 +443,16 @@ public class ElasticSearchDataProcessService {
|
|
double doubleValue = Double.valueOf(keyValue);
|
|
double doubleValue = Double.valueOf(keyValue);
|
|
value = doubleValue;
|
|
value = doubleValue;
|
|
}else if(dataType.equals("date")){
|
|
}else if(dataType.equals("date")){
|
|
Date dateValue = DateUtil.formatCharDateYMDHMS(keyValue);
|
|
|
|
value = dateValue;
|
|
|
|
|
|
String dateFormat = "yyyy-MM-dd";
|
|
|
|
if(keyValue.length() != 10){
|
|
|
|
dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ";
|
|
|
|
}
|
|
|
|
//比中国所在地区东八区少8小时.
|
|
|
|
Date dateValue = DateUtil.parseDate(keyValue, dateFormat);
|
|
|
|
Calendar ca = Calendar.getInstance();
|
|
|
|
ca.setTime(dateValue);
|
|
|
|
ca.add(Calendar.HOUR_OF_DAY, 8);
|
|
|
|
value = ca.getTime();
|
|
}
|
|
}
|
|
return value;
|
|
return value;
|
|
}
|
|
}
|