|
|
@@ -172,7 +172,6 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
Map<String, Integer> verifyCountMap = list2.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
Map<String, Integer> verifyCountMap = list2.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
|
|
|
|
|
|
// B端刷卡支付被核销数 |
|
|
// B端刷卡支付被核销数 |
|
|
// TODO |
|
|
|
|
|
HashMap<String, Object> params3 = new HashMap<>(); |
|
|
HashMap<String, Object> params3 = new HashMap<>(); |
|
|
params3.put("tenantId", tenantId); |
|
|
params3.put("tenantId", tenantId); |
|
|
params3.put("startTime", addDay(-30)); |
|
|
params3.put("startTime", addDay(-30)); |
|
|
@@ -181,10 +180,20 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
List<MarkingSceneDataReportVo> list3 = wxCouponActionLogMapper.sceneDataMapJoinCouponOrder(params3); |
|
|
List<MarkingSceneDataReportVo> list3 = wxCouponActionLogMapper.sceneDataMapJoinCouponOrder(params3); |
|
|
Map<String, Integer> microPayCountMap = list3.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
Map<String, Integer> microPayCountMap = list3.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
|
|
|
|
|
|
|
|
|
// 购买发券被核销数 |
|
|
|
|
|
HashMap<String, Object> params4 = new HashMap<>(); |
|
|
|
|
|
params3.put("tenantId", tenantId); |
|
|
|
|
|
params3.put("startTime", addDay(-30)); |
|
|
|
|
|
params3.put("endTime", addDay(1)); |
|
|
|
|
|
params3.put("channelType", EnumCouponSendSendType.C_ORDER.getCode());//B端刷卡支付 |
|
|
|
|
|
List<MarkingSceneDataReportVo> list4 = wxCouponActionLogMapper.sceneDataMapJoinCouponOrder(params4); |
|
|
|
|
|
Map<String, Integer> OrderCountMap = list4.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
|
|
|
|
|
|
for (MarkingSceneDataReportVo vo : list) { |
|
|
for (MarkingSceneDataReportVo vo : list) { |
|
|
vo.setParkCount(parkCountMap.get(vo.getXTime()) == null ? 0 : parkCountMap.get(vo.getXTime())); |
|
|
vo.setParkCount(parkCountMap.get(vo.getXTime()) == null ? 0 : parkCountMap.get(vo.getXTime())); |
|
|
vo.setVerifyCount(verifyCountMap.get(vo.getXTime()) == null ? 0 : verifyCountMap.get(vo.getXTime())); |
|
|
vo.setVerifyCount(verifyCountMap.get(vo.getXTime()) == null ? 0 : verifyCountMap.get(vo.getXTime())); |
|
|
vo.setMicroPayCount(microPayCountMap.get(vo.getXTime()) == null ? 0 : microPayCountMap.get(vo.getXTime())); |
|
|
vo.setMicroPayCount(microPayCountMap.get(vo.getXTime()) == null ? 0 : microPayCountMap.get(vo.getXTime())); |
|
|
|
|
|
vo.setOrderCount(OrderCountMap.get(vo.getXTime()) == null ? 0 : OrderCountMap.get(vo.getXTime())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
String startdate = DateUtils.getTimeBefore(30, new Date()); |
|
|
String startdate = DateUtils.getTimeBefore(30, new Date()); |
|
|
@@ -202,16 +211,21 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
msdVo.setParkCount(0); |
|
|
msdVo.setParkCount(0); |
|
|
msdVo.setVerifyCount(0); |
|
|
msdVo.setVerifyCount(0); |
|
|
msdVo.setMicroPayCount(0); |
|
|
msdVo.setMicroPayCount(0); |
|
|
|
|
|
msdVo.setOrderCount(0); |
|
|
msdVo.setTempCount(0); |
|
|
msdVo.setTempCount(0); |
|
|
msdVo.setParkSendCount(0); |
|
|
msdVo.setParkSendCount(0); |
|
|
msdVo.setVerifySendCount(0); |
|
|
msdVo.setVerifySendCount(0); |
|
|
msdVo.setMicroPaySendCount(0); |
|
|
msdVo.setMicroPaySendCount(0); |
|
|
|
|
|
msdVo.setOrderSendCount(0); |
|
|
msdVo.setTotal(0); |
|
|
msdVo.setTotal(0); |
|
|
tempDatalist.add(msdVo); |
|
|
tempDatalist.add(msdVo); |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
MarkingSceneDataReportVo msdVo = first.get(); |
|
|
MarkingSceneDataReportVo msdVo = first.get(); |
|
|
msdVo.setTotal(msdVo.getParkSendCount() + msdVo.getVerifySendCount() + msdVo.getMicroPaySendCount()); |
|
|
|
|
|
|
|
|
msdVo.setTotal(msdVo.getParkSendCount() + |
|
|
|
|
|
msdVo.getVerifySendCount() + |
|
|
|
|
|
msdVo.getMicroPaySendCount() + |
|
|
|
|
|
msdVo.getOrderSendCount()); |
|
|
tempDatalist.add(msdVo); |
|
|
tempDatalist.add(msdVo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -283,6 +297,8 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
vo.setSendCount(temp.getMicroPaySendCount()); |
|
|
vo.setSendCount(temp.getMicroPaySendCount()); |
|
|
}else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){ |
|
|
}else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){ |
|
|
vo.setSendCount(temp.getVerifySendCount()); |
|
|
vo.setSendCount(temp.getVerifySendCount()); |
|
|
|
|
|
}else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.C_ORDER.getCode())){ |
|
|
|
|
|
vo.setSendCount(temp.getOrderSendCount()); |
|
|
}else { |
|
|
}else { |
|
|
vo.setSendCount(0); |
|
|
vo.setSendCount(0); |
|
|
} |
|
|
} |
|
|
@@ -312,8 +328,8 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
params.put("channelType", EnumCouponSendSendType.B_MICROPAY.getCode()); |
|
|
params.put("channelType", EnumCouponSendSendType.B_MICROPAY.getCode()); |
|
|
List<MarkingSceneDataReportVo> list1 = wxCouponActionLogMapper.sceneDataJoinCouponOrderList(params); |
|
|
|
|
|
countMap = list1.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
|
|
|
|
|
|
List<MarkingSceneDataReportVo> list2 = wxCouponActionLogMapper.sceneDataJoinCouponOrderList(params); |
|
|
|
|
|
countMap = list2.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
} else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){ |
|
|
} else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){ |
|
|
//核销发券被核销数 |
|
|
//核销发券被核销数 |
|
|
params.clear(); |
|
|
params.clear(); |
|
|
@@ -323,8 +339,19 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
params.put("channelType", EnumCouponSendSendType.COUPON_VERIFY.getCode()); |
|
|
params.put("channelType", EnumCouponSendSendType.COUPON_VERIFY.getCode()); |
|
|
List<MarkingSceneDataReportVo> list2 = wxCouponActionLogMapper.sceneDataJoinCouponOrderList(params); |
|
|
|
|
|
countMap = list2.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
|
|
|
|
|
|
List<MarkingSceneDataReportVo> list3 = wxCouponActionLogMapper.sceneDataJoinCouponOrderList(params); |
|
|
|
|
|
countMap = list3.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
|
|
|
} else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.C_ORDER.getCode())){ |
|
|
|
|
|
//购买发数 |
|
|
|
|
|
params.clear(); |
|
|
|
|
|
params.put("tenantId", tenantId); |
|
|
|
|
|
if (markingCouponDataReportDto.getStartTime() != null) |
|
|
|
|
|
params.put("startTime", convertDateAndAdd(markingCouponDataReportDto.getStartTime(),0)); |
|
|
|
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
|
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
|
|
|
params.put("channelType", EnumCouponSendSendType.C_ORDER.getCode()); |
|
|
|
|
|
List<MarkingSceneDataReportVo> list4 = wxCouponActionLogMapper.sceneDataJoinCouponOrderList(params); |
|
|
|
|
|
countMap = list4.stream().collect(Collectors.toMap(MarkingSceneDataReportVo::getXTime, p -> p.getTempCount())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Map<String, Integer> triggerCountMap = new HashMap<>(); |
|
|
Map<String, Integer> triggerCountMap = new HashMap<>(); |
|
|
@@ -361,6 +388,16 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
List<MarkingSceneDataVo> markingSceneDataVos = wxCouponOrderMapper.queryForSceneRepotyHistoryVerified(params); |
|
|
List<MarkingSceneDataVo> markingSceneDataVos = wxCouponOrderMapper.queryForSceneRepotyHistoryVerified(params); |
|
|
triggerCountMap = markingSceneDataVos.stream().collect(Collectors.toMap(MarkingSceneDataVo::getxTime, p -> p.getTriggerCount())); |
|
|
triggerCountMap = markingSceneDataVos.stream().collect(Collectors.toMap(MarkingSceneDataVo::getxTime, p -> p.getTriggerCount())); |
|
|
|
|
|
}else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.C_ORDER.getCode())) { |
|
|
|
|
|
//购买发券数 |
|
|
|
|
|
params.clear(); |
|
|
|
|
|
params.put("tenantId", tenantId); |
|
|
|
|
|
if (markingCouponDataReportDto.getStartTime() != null) |
|
|
|
|
|
params.put("startTime", convertDateAndAdd(markingCouponDataReportDto.getStartTime(),0)); |
|
|
|
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
|
|
|
params.put("endTime", convertDateAndAdd(markingCouponDataReportDto.getEndTime(), 1)); |
|
|
|
|
|
List<MarkingSceneDataVo> markingSceneDataVos = wxCouponOrderMapper.queryForSceneRepotyHistoryOrdered(params); |
|
|
|
|
|
triggerCountMap = markingSceneDataVos.stream().collect(Collectors.toMap(MarkingSceneDataVo::getxTime, p -> p.getTriggerCount())); |
|
|
} |
|
|
} |
|
|
NumberFormat nf = NumberFormat.getPercentInstance(); |
|
|
NumberFormat nf = NumberFormat.getPercentInstance(); |
|
|
nf.setMinimumFractionDigits(2); |
|
|
nf.setMinimumFractionDigits(2); |
|
|
|