main
黄海 9 months ago
parent ecc56cec16
commit 3cc4ed9f2b

@ -105,13 +105,17 @@ public class A9 {
if (StrKit.isBlank(q1)) { if (StrKit.isBlank(q1)) {
q1 = "0"; q1 = "0";
} }
String v1 = String.format("%.2f", Double.parseDouble(q1) * mul / 10000);
double x = Double.parseDouble(q1) * mul;
String v1 = String.format("%.2f", (x > 1000 ? x / 10000 : x));
String q2 = row.get(2); String q2 = row.get(2);
if (StrKit.isBlank(q2)) { if (StrKit.isBlank(q2)) {
q2 = "0"; q2 = "0";
} }
String v2 = String.format("%.2f", Double.parseDouble(q2) * mul / 10000); x = Double.parseDouble(q2) * mul;
String v2 = String.format("%.2f", (x > 1000 ? x / 10000 : x));
ExcelKit.putData(outRow, Arrays.asList(cityName, areaName, year, v1, "", v2, ""), dataStyle); ExcelKit.putData(outRow, Arrays.asList(cityName, areaName, year, v1, "", v2, ""), dataStyle);
} }
} }

Loading…
Cancel
Save