|
|
|
@@ -128,7 +128,7 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
|
|
|
|
List<Map<String,Object>> recordlist=wxDateAmountRecordMapper.queryprice(tenantId); |
|
|
|
Map<Object, Object> collect = recordlist.stream().collect(Collectors.toMap(m -> { |
|
|
|
return m.get("date"); |
|
|
|
return DateUtils.date2String((Date)m.get("date"),"MM/dd"); |
|
|
|
}, m -> { |
|
|
|
return m.get("price"); |
|
|
|
})); |
|
|
|
@@ -168,7 +168,7 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
List<Map<String,Object>> historylist=wxCarCmdLogMapper.queryHistory(params); |
|
|
|
|
|
|
|
Map<Object, Object> collect = historylist.stream().collect(Collectors.toMap(m -> { |
|
|
|
return m.get("create_date"); |
|
|
|
return DateUtils.date2String((Date)m.get("create_date"),"MM/dd"); |
|
|
|
}, m -> { |
|
|
|
return m.get("carcount"); |
|
|
|
})); |
|
|
|
@@ -176,7 +176,7 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
for(String date:tjTimeList){ |
|
|
|
Object o = collect.get(date); |
|
|
|
if(o==null){ |
|
|
|
collect.put(date,0l); |
|
|
|
collect.put(date.substring(5).replace("-","/"),0l); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -187,10 +187,10 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
datamap.put("history",historymap); |
|
|
|
|
|
|
|
//今日车流量 |
|
|
|
long todaycar = (long) collect.get(systemTime); |
|
|
|
long todaycar = (long) collect.get(DateUtils.getSystemTime("MM/dd")); |
|
|
|
datamap.put("todaycar",todaycar); |
|
|
|
//环比 |
|
|
|
long yesterdaycar = (long) collect.get(tjTimeList.get(8 - 2)); |
|
|
|
long yesterdaycar = (long) collect.get(tjTimeList.get(8 - 2).substring(5).replace("-","/")); |
|
|
|
if(yesterdaycar>0){ |
|
|
|
double hbd = (double) (todaycar - yesterdaycar) / yesterdaycar *100; |
|
|
|
double hb = new BigDecimal(hbd).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
@@ -200,7 +200,7 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
} |
|
|
|
|
|
|
|
//上周同期 |
|
|
|
long last = (long) collect.get(tjTimeList.get(0)); |
|
|
|
long last = (long) collect.get(tjTimeList.get(0).substring(5).replace("-","/")); |
|
|
|
if(last>0){ |
|
|
|
double lasthbd = (double) (todaycar - last) / last *100; |
|
|
|
double lasthb = new BigDecimal(lasthbd).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
|