|
|
|
@@ -67,6 +67,9 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
@Autowired |
|
|
|
WxMsgConfigMapper wxMsgConfigMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCUserCarMapper wxCUserCarMapper; |
|
|
|
|
|
|
|
|
|
|
|
//出租与未出租*********************************************** |
|
|
|
private Map<String, Object> shopRunning(String tenantId){ |
|
|
|
@@ -198,7 +201,8 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
carMap.put("carCount", todaycar); |
|
|
|
|
|
|
|
//环比 |
|
|
|
long yesterdaycar = (long) historymap.get(tjTimeList.get(8 - 2).substring(5).replace("-", "/")); |
|
|
|
String yesterday = DateUtils.getTimeBefore(1, new Date()); |
|
|
|
long yesterdaycar = (long) historymap.get(yesterday.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(); |
|
|
|
@@ -208,7 +212,8 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
} |
|
|
|
|
|
|
|
//上周同期 |
|
|
|
long last = (long) historymap.get(tjTimeList.get(0).substring(5).replace("-", "/")); |
|
|
|
String lastweek = DateUtils.getTimeBefore(7, new Date()); |
|
|
|
long last = (long) historymap.get(lastweek.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(); |
|
|
|
@@ -507,7 +512,8 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
long todaycar = (long) historymap.get(DateUtils.getSystemTime("MM/dd")); |
|
|
|
datamap.put("todaycar", todaycar); |
|
|
|
//环比 |
|
|
|
long yesterdaycar = (long) historymap.get(tjTimeList.get(8 - 2).substring(5).replace("-", "/")); |
|
|
|
String yesterday = DateUtils.getTimeBefore(1, new Date()); |
|
|
|
long yesterdaycar = (long) historymap.get(yesterday.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(); |
|
|
|
@@ -517,7 +523,8 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
} |
|
|
|
|
|
|
|
//上周同期 |
|
|
|
long last = (long) historymap.get(tjTimeList.get(0).substring(5).replace("-", "/")); |
|
|
|
String lastweek = DateUtils.getTimeBefore(7, new Date()); |
|
|
|
long last = (long) historymap.get(lastweek.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(); |
|
|
|
@@ -553,7 +560,6 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
|
|
|
|
datamap.put("todaycardata", hourMap); |
|
|
|
|
|
|
|
String yesterday = DateUtils.getTimeBefore(1, new Date()); |
|
|
|
params.put("startdate", yesterday + " 05:00:00"); |
|
|
|
params.put("enddate", yesterday + " 22:59:59"); |
|
|
|
List<Map<String, Object>> yesterdayCarlist = wxCarCmdLogMapper.queryTodayCar(params); |
|
|
|
@@ -567,8 +573,6 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
|
|
|
|
datamap.put("yesterdaycardata", yesterdaytreemap); |
|
|
|
|
|
|
|
|
|
|
|
String lastweek = DateUtils.getTimeBefore(7, new Date(), "yyyy-MM-dd"); |
|
|
|
params.put("startdate", lastweek + " 05:00:00"); |
|
|
|
params.put("enddate", lastweek + " 22:59:59"); |
|
|
|
List<Map<String, Object>> lastdayCarlist = wxCarCmdLogMapper.queryTodayCar(params); |
|
|
|
@@ -582,6 +586,38 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
datamap.put("lastdaycardata", lastdaytreemap); |
|
|
|
|
|
|
|
|
|
|
|
//绑定车牌 |
|
|
|
Map<String,Object> carParams=new HashMap<>(); |
|
|
|
carParams.put("tenantId",tenantId); |
|
|
|
carParams.put("startdate",DateUtils.getSystemTime("yyyy-MM-dd 00:00:00")); |
|
|
|
carParams.put("enddate",DateUtils.getSystemTime("yyyy-MM-dd HH:mm:ss")); |
|
|
|
long todaybindcar = wxCUserCarMapper.queryCarCount(carParams); |
|
|
|
carParams.put("startdate",yesterday+" 00:00:00"); |
|
|
|
carParams.put("enddate",yesterday+" 23:59:59"); |
|
|
|
long yesterdaybindcar = wxCUserCarMapper.queryCarCount(carParams); |
|
|
|
carParams.put("startdate",lastweek+" 00:00:00"); |
|
|
|
carParams.put("enddate",lastweek+" 23:59:59"); |
|
|
|
long lastweekbindcar = wxCUserCarMapper.queryCarCount(carParams); |
|
|
|
datamap.put("todaybindcar",todaybindcar); |
|
|
|
//datamap.put("yesterdaybindcar",yesterdaybindcar); |
|
|
|
//datamap.put("lastweekbindcar",lastweekbindcar); |
|
|
|
|
|
|
|
if (yesterdaybindcar > 0) { |
|
|
|
double yesterdaybinddhb = (double) (todaycar - yesterdaybindcar) / yesterdaybindcar * 100; |
|
|
|
double yesterdaybindhb = new BigDecimal(yesterdaybinddhb).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
datamap.put("yesterdaybindhb", yesterdaybindhb); |
|
|
|
} else { |
|
|
|
datamap.put("yesterdaybindhb", "--"); |
|
|
|
} |
|
|
|
|
|
|
|
if (lastweekbindcar > 0) { |
|
|
|
double lastweekbinddhb = (double) (todaycar - lastweekbindcar) / lastweekbindcar * 100; |
|
|
|
double lastweekbindhb = new BigDecimal(lastweekbinddhb).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
datamap.put("lastweekbindhb", lastweekbindhb); |
|
|
|
} else { |
|
|
|
datamap.put("lastweekbindhb", "--"); |
|
|
|
} |
|
|
|
|
|
|
|
return datamap; |
|
|
|
} |
|
|
|
|
|
|
|
|