Merge remote-tracking branch 'origin/master'
| | |
| | | .open(file); |
| | | |
| | | listData =readhandle(book); |
| | | }catch (OLE2NotOfficeXmlFileException ex){ |
| | | ex.printStackTrace(); |
| | | throw new RuntimeException("excel版本不为2007及以上"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e.getMessage()); |
| | |
| | | |
| | | return null == map.get(key) ? BigDecimal.ZERO : new BigDecimal(map.get(key).toString()); |
| | | } |
| | | |
| | | /** |
| | | * 获取浮点数,默认返回0 |
| | | * @param map |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static Double getDoubleZero(Map<String, Object> map, String key) |
| | | { |
| | | if(map == null || StringUtils.isEmpty(key)) |
| | | { |
| | | return 0D; |
| | | } |
| | | |
| | | return null == map.get(key) ? 0D : Double.parseDouble(map.get(key).toString()); |
| | | } |
| | | } |