txf %!s(int64=3) %!d(string=hai) anos
pai
achega
f4feafee58
Modificáronse 1 ficheiros con 9 adicións e 4 borrados
  1. 9 4
      src/main/java/com/steerinfo/dil/util/DataChange.java

+ 9 - 4
src/main/java/com/steerinfo/dil/util/DataChange.java

@@ -111,10 +111,15 @@ public class DataChange {
         for (Map<String, Object> map : list) {
             for (String s : key) {
                 //修改数据为带两位小数
-                BigDecimal oldDate = (BigDecimal) map.get(s);
-                DecimalFormat df =  new DecimalFormat("0.00");
-                String resultDeduction = df.format(oldDate.doubleValue());
-                map.put(s, resultDeduction);
+                try {
+                    BigDecimal oldDate = (BigDecimal) map.get(s);
+                    DecimalFormat df =  new DecimalFormat("0.00");
+                    String resultDeduction = df.format(oldDate.doubleValue());
+                    map.put(s, resultDeduction);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+
             }
         }
     }