//把字符串转换为Double 类型
public Double convertStringToDouble(String value){
Double doubleValue = new Double("0.00");
if(value != null && !"".equals(value))
doubleValue = new Double(value.replaceAll(",",""));
return doubleValue;
}
public Integer convertStringToInteger(String value){
Integer intValue = new Integer("0");
if(value != null && !"".equals(value))
intValue = new Integer(value);
return intValue;
}
//把字符串转换为Date类型
public Date convertStringToDate(String value){
Date dateValue = null;
if(value != null && !"".equals(value)){
try{
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
dateValue = format.parse(value);
}catch(Exception e){
log.error("convertStrngToDouble:日期转换错误!");
e.printStackTrace();
}
}
return dateValue;
}