|
|
@ -75,6 +75,21 @@ public class DateUtils { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
public Map<String,String> getXproSub(){ |
|
|
|
Map<String,String> xAxis = new HashMap<>(); |
|
|
|
LocalDate today = LocalDate.now(); |
|
|
|
|
|
|
|
for(int i = NumConstant.TWELVE;i > NumConstant.ZERO; i--){ |
|
|
|
LocalDate localDate = today.minusMonths(i); |
|
|
|
String s = localDate.getMonth().getValue() + "月"; |
|
|
|
xAxis.put(localDate.format(fmt),s); |
|
|
|
} |
|
|
|
Map<String, String> result = Maps.newLinkedHashMap(); |
|
|
|
xAxis.entrySet().stream().sorted(Map.Entry.comparingByKey()) |
|
|
|
.forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
public Map<String,String> getXproEndMonth(String monthId){ |
|
|
|
Map<String,String> xAxis = new HashMap<>(); |
|
|
|
for(int i=NumConstant.ZERO;i <= NumConstant.ELEVEN; i++){ |
|
|
|