@Override
public List lineChart(Integer cyear) {
TerTerminalReqVo vo = new TerTerminalReqVo();
List<TerTerminalReqVo> list = terTerminalMapper.queryCount(null, vo);
long a = 0;
LinkedList<Object> resultArray = Lists.newLinkedList();
for (Month value : Month.values()) {
HashMap<String, Object> resultJson = Maps.newHashMap();
resultJson.put("cmonth", value.getValue() + "月");
long sumnumber = list.parallelStream()
.filter(data -> Objects.equals(value.getValue(), LocalDateTime.parse(data.getCmonth(), DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)).getMonthValue()))
.count();
a = Objects.equals(NumberUtils.LONG_ZERO, sumnumber) ? a : (sumnumber + a);
resultJson.put("totalQuantity", Objects.equals(NumberUtils.LONG_ZERO, sumnumber) ? NumberUtils.LONG_ZERO : a);
resultArray.add(resultJson);
}
return resultArray;