|
@@ -140,8 +140,9 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<Map<String, List<ChartBasic>>> smartAddCharListAll(String timeBegin, String timeEnd) {
|
|
|
- List<Map<String, List<ChartBasic>>> result = new ArrayList<>();
|
|
|
+ public Map<String, List<ChartBasic>> smartAddCharListAll(String timeBegin, String timeEnd) {
|
|
|
+ //返回结果
|
|
|
+ Map<String, List<ChartBasic>> result = new HashMap<>();
|
|
|
//日期兜底处理
|
|
|
Date nowDate = DateUtils.getNowDate();
|
|
|
Date dayBefore7 = DateUtils.plusDate(-1, nowDate);
|
|
@@ -153,75 +154,51 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
List<TShuju1> tShuju1List = this.shuju1Mapper.selectTShuju1List(TShuju1.builder().timeBegin(dayBefore1Str).timeEnd(nowDateStr).build());
|
|
|
//返回的对象具体内容
|
|
|
//进水流量
|
|
|
- Map<String, List<ChartBasic>> map0 = new HashMap<>();
|
|
|
- map0.put("0", tShuju1List.stream()
|
|
|
+ result.put("0", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), Objects.isNull(o.getScJsZll()) ? null : o.getScJsZll().divide(BigDecimal_2, NUMBER_SCALE_4, RoundingMode.HALF_UP)))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map0);
|
|
|
//#1好氧池硝酸盐
|
|
|
- Map<String, List<ChartBasic>> map1 = new HashMap<>();
|
|
|
- map1.put("1", tShuju1List.stream()
|
|
|
+ result.put("1", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getJqr1HyXiaodan()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map1);
|
|
|
//#2好氧池硝酸盐
|
|
|
- Map<String, List<ChartBasic>> map2 = new HashMap<>();
|
|
|
- map2.put("2", tShuju1List.stream()
|
|
|
+ result.put("2", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getJqr2HyXiaodan()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map2);
|
|
|
//#1缺氧池氨氮
|
|
|
- Map<String, List<ChartBasic>> map3 = new HashMap<>();
|
|
|
- map3.put("3", tShuju1List.stream()
|
|
|
+ result.put("3", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getJqr1QyAndan()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map3);
|
|
|
//#2缺氧池氨氮
|
|
|
- Map<String, List<ChartBasic>> map4 = new HashMap<>();
|
|
|
- map4.put("4", tShuju1List.stream()
|
|
|
+ result.put("4", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getJqr2QyAndan()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map4);
|
|
|
//进水COD--连续检测
|
|
|
- Map<String, List<ChartBasic>> map5 = new HashMap<>();
|
|
|
- map5.put("5", tShuju1List.stream()
|
|
|
+ result.put("5", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getJqrSwcCod()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map5);
|
|
|
//进水COD--在线仪表
|
|
|
- Map<String, List<ChartBasic>> map6 = new HashMap<>();
|
|
|
- map6.put("6", tShuju1List.stream()
|
|
|
+ result.put("6", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getScJsCod()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map6);
|
|
|
//进水总氮
|
|
|
- Map<String, List<ChartBasic>> map7 = new HashMap<>();
|
|
|
- map7.put("7", tShuju1List.stream()
|
|
|
+ result.put("7", tShuju1List.stream()
|
|
|
.map(o -> new ChartBasic(o.getTIME(), o.getScJsZongdan()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map7);
|
|
|
//处理投加信息
|
|
|
List<TXlhtAddRecord> tXlhtAddRecords = xlhtAddRecordMapper.selectTXlhtAddRecordList(TXlhtAddRecord.builder().build());
|
|
|
- Map<String, List<ChartBasic>> map8 = new HashMap<>();
|
|
|
- map8.put("8", tXlhtAddRecords.stream()
|
|
|
+ result.put("8", tXlhtAddRecords.stream()
|
|
|
.map(o -> new ChartBasic(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, o.getCreateTime()), o.getOneAmount()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map8);
|
|
|
- Map<String, List<ChartBasic>> map9 = new HashMap<>();
|
|
|
- map9.put("9", tXlhtAddRecords.stream()
|
|
|
+ result.put("9", tXlhtAddRecords.stream()
|
|
|
.map(o -> new ChartBasic(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, o.getCreateTime()), o.getTwoAmount()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map9);
|
|
|
- Map<String, List<ChartBasic>> map10 = new HashMap<>();
|
|
|
- map10.put("10", tXlhtAddRecords.stream()
|
|
|
+ result.put("10", tXlhtAddRecords.stream()
|
|
|
.map(o -> new ChartBasic(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, o.getCreateTime()), o.getRealOneAmount()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map10);
|
|
|
- Map<String, List<ChartBasic>> map11 = new HashMap<>();
|
|
|
- map11.put("11", tXlhtAddRecords.stream()
|
|
|
+ result.put("11", tXlhtAddRecords.stream()
|
|
|
.map(o -> new ChartBasic(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, o.getCreateTime()), o.getRealTwoAmount()))
|
|
|
.collect(Collectors.toList()));
|
|
|
- result.add(map11);
|
|
|
return result;
|
|
|
}
|
|
|
|