|
|
@@ -187,6 +187,8 @@ public class WxChartServiceImpl implements WxChartDataService { |
|
|
WxBillOtherMapper wxBillOtherMapper; |
|
|
WxBillOtherMapper wxBillOtherMapper; |
|
|
@Autowired |
|
|
@Autowired |
|
|
WxBillAllMapper wxBillAllMapper; |
|
|
WxBillAllMapper wxBillAllMapper; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
WxCUserCarMapper wxCUserCarMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Lazy |
|
|
@Lazy |
|
|
@@ -313,10 +315,10 @@ public class WxChartServiceImpl implements WxChartDataService { |
|
|
if (chart.equals(EnumChart.JYZXSJFJE.getCode())) { |
|
|
if (chart.equals(EnumChart.JYZXSJFJE.getCode())) { |
|
|
return getCarPayCountInWeek(tenantEntity); |
|
|
return getCarPayCountInWeek(tenantEntity); |
|
|
} |
|
|
} |
|
|
//近一周新增会员数 |
|
|
|
|
|
// if (chart.equals(EnumChart.JYZXZHYS.getCode())) { |
|
|
|
|
|
// return getCarNewMemberCountInWeek(tenantEntity); |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
//近一周新增会员统计 |
|
|
|
|
|
if (chart.equals(EnumChart.JYZXZHYS.getCode())) { |
|
|
|
|
|
return getCarNewMemberCountInWeek(tenantEntity); |
|
|
|
|
|
} |
|
|
//// --- 车流 -- END |
|
|
//// --- 车流 -- END |
|
|
//昨日触达用户 |
|
|
//昨日触达用户 |
|
|
if (chart.equals(EnumChart.ZRCDYH.getCode())) { |
|
|
if (chart.equals(EnumChart.ZRCDYH.getCode())) { |
|
|
@@ -1064,6 +1066,53 @@ public class WxChartServiceImpl implements WxChartDataService { |
|
|
return new ResultData(datamap); |
|
|
return new ResultData(datamap); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 车流 - 近一周新增会员统计 |
|
|
|
|
|
* @param tenantEntity |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private ResultData getCarNewMemberCountInWeek(TenantEntity tenantEntity) { |
|
|
|
|
|
// List<TenantEntity> tenantEntitys = wxMallMapper.getTenantEntitys(tenantEntity); |
|
|
|
|
|
HashMap<String, Object> datamap = new HashMap<>(); |
|
|
|
|
|
HashMap<String, Object> weekParams = new HashMap<>(); |
|
|
|
|
|
// weekParams.put("tenantEntitys", tenantEntitys); |
|
|
|
|
|
weekParams.put("tenantId", tenantEntity.getTenantId()); |
|
|
|
|
|
weekParams.put("finalTenantId", tenantEntity.getFinalTenantId()); |
|
|
|
|
|
if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { |
|
|
|
|
|
weekParams.put("parentTenantId", tenantEntity.getParentTenantId()); |
|
|
|
|
|
} |
|
|
|
|
|
String oneWeekStartdate = DateUtils.getTimeBefore(7, 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()); |
|
|
|
|
|
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"); |
|
|
|
|
|
})); |
|
|
|
|
|
List<String> days = DateUtils.getTjTimeList(oneWeekStartdate, oneWeekEndDate, "0"); |
|
|
|
|
|
List<String> timeList = new ArrayList<>(); |
|
|
|
|
|
List<Object> valList = new ArrayList<>(); |
|
|
|
|
|
for (String date : days) { |
|
|
|
|
|
String newdate = date.substring(5, date.length()).replace("-", "/"); |
|
|
|
|
|
Object o = weekCarCollect.get(newdate); |
|
|
|
|
|
timeList.add(newdate); |
|
|
|
|
|
if (o == null) { |
|
|
|
|
|
valList.add(0L); |
|
|
|
|
|
} else { |
|
|
|
|
|
valList.add(o); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map map = new HashMap(); |
|
|
|
|
|
map.put("index", timeList); |
|
|
|
|
|
map.put("val", valList); |
|
|
|
|
|
datamap.put("oneWeekNewCarUserHistory", map); |
|
|
|
|
|
return new ResultData(datamap); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 近一周线上缴费车辆 |
|
|
* 近一周线上缴费车辆 |
|
|
* @param tenantEntity |
|
|
* @param tenantEntity |
|
|
|