|
|
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.dto.WxCUserBasicInfoDto; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.vo.WxBillAll; |
|
|
|
import com.iformall.enums.*; |
|
|
|
@@ -510,10 +511,10 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
datamap.put("history", historymap); |
|
|
|
|
|
|
|
// 查询近一周的缴费车辆----start------ |
|
|
|
HashMap<Object, Object> weekParams = new HashMap<>(); |
|
|
|
HashMap<String, Object> weekParams = new HashMap<>(); |
|
|
|
weekParams.put("tenantId", tenantId); |
|
|
|
String oneWeekStartdate = DateUtils.getTimeBefore(7, new Date()); |
|
|
|
String oneWeekEndDate = DateUtils.getTimeBefore(1, new Date());; |
|
|
|
String oneWeekEndDate = DateUtils.getTimeBefore(1, new Date()); |
|
|
|
weekParams.put("startdate", oneWeekStartdate + " 00:00:00"); |
|
|
|
weekParams.put("enddate", oneWeekEndDate + " 23:59:59"); |
|
|
|
weekParams.put("cmdType", EnumCarCmd.CAR_ETCP_CALLBACK_PAY_MANUAL.getCode()); |
|
|
|
@@ -538,6 +539,39 @@ public class DataTowerServiceImpl implements DataTowerService { |
|
|
|
weekMap.put(key,weekCollect.get(key)); |
|
|
|
} |
|
|
|
datamap.put("oneWeekCarPayFeeCount",weekMap); |
|
|
|
|
|
|
|
// 近一周新增会员历史 |
|
|
|
List<Map<String, Object>> carCountHistory = wxCUserCarMapper.queryCarCountHistory(weekParams); |
|
|
|
Map<String, Object> weekCarCollect = carCountHistory.stream().collect(Collectors.toMap(m -> { |
|
|
|
return (String)m.get("create_time"); |
|
|
|
}, m -> { |
|
|
|
return m.get("count"); |
|
|
|
})); |
|
|
|
TreeMap<String, Object> weekCarMap = new TreeMap<>(); |
|
|
|
for (String date:days) { |
|
|
|
weekCarMap.put(date.substring(5,date.length()).replace("-","/"),"0"); |
|
|
|
} |
|
|
|
for (String key : weekCarCollect.keySet()) { |
|
|
|
weekCarMap.put(key,weekCarCollect.get(key)); |
|
|
|
} |
|
|
|
datamap.put("oneWeekNewCarUserHistory",weekCarMap); |
|
|
|
|
|
|
|
//近一周新增停车会员数 |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
WxCUserBasicInfoDto wxCUserBasicInfoDto = new WxCUserBasicInfoDto(); |
|
|
|
wxCUserBasicInfoDto.setTenantId(tenantId); |
|
|
|
try { |
|
|
|
wxCUserBasicInfoDto.setStartTime(sdf.parse(oneWeekStartdate)); |
|
|
|
wxCUserBasicInfoDto.setEndTime(sdf.parse(oneWeekEndDate)); |
|
|
|
}catch (Exception e){ |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
datamap.put("oneWeekNewCarUserCount",wxCUserCarMapper.countUser(wxCUserBasicInfoDto)); |
|
|
|
//停车会员总数 |
|
|
|
wxCUserBasicInfoDto = new WxCUserBasicInfoDto(); |
|
|
|
wxCUserBasicInfoDto.setTenantId(tenantId); |
|
|
|
datamap.put("newCarUserSumCount",wxCUserCarMapper.countUser(wxCUserBasicInfoDto)); |
|
|
|
|
|
|
|
// 查询近一周的缴费车辆----end------ |
|
|
|
|
|
|
|
//今日车流量 |
|
|
|
|