Commit bfc7b57b by 王璐琦

fix(report): 修正延保类别计数逻辑及客户访问记录统计

- 将延保商品判断由布尔标记改为直接累加计数器tWarrantyCar、tBattery和tAxPackage
- 修正另一个延保相关计数器mWarrantyCar、mBattery和mAxPackage的累加方式,去掉中间布尔变量
- 修改客户访问统计逻辑,删除实际交付日期时间范围校验,确保只要手机号非空且未重复则计入访问次数
- 删除SQL映射中对source字段的过滤条件,简化查询条件逻辑
1 parent d90f97fc
...@@ -1814,13 +1814,11 @@ public class DailyReportDataService { ...@@ -1814,13 +1814,11 @@ public class DailyReportDataService {
} }
if (matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY) if (matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY)
&& CollectionUtils.isNotEmpty(order.getSubOrderList())) { && CollectionUtils.isNotEmpty(order.getSubOrderList())) {
boolean hasCar = false, hasBattery = false, hasAx = false;
for (GoodsSubOrderDTO sub : order.getSubOrderList()) { for (GoodsSubOrderDTO sub : order.getSubOrderList()) {
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceCar)) hasCar = true; if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceCar)) tWarrantyCar++;
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceBattery)) hasBattery = true; if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceBattery)) tBattery++;
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceAxPackageLv2)) hasAx = true; if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceAxPackageLv2)) tAxPackage++;
} }
if (hasCar) tWarrantyCar++; if (hasBattery) tBattery++; if (hasAx) tAxPackage++;
} }
} }
...@@ -1840,13 +1838,11 @@ public class DailyReportDataService { ...@@ -1840,13 +1838,11 @@ public class DailyReportDataService {
} }
if (matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY) if (matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY)
&& CollectionUtils.isNotEmpty(order.getSubOrderList())) { && CollectionUtils.isNotEmpty(order.getSubOrderList())) {
boolean hasCar = false, hasBattery = false, hasAx = false;
for (GoodsSubOrderDTO sub : order.getSubOrderList()) { for (GoodsSubOrderDTO sub : order.getSubOrderList()) {
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceCar)) hasCar = true; if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceCar)) mWarrantyCar++;
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceBattery)) hasBattery = true; if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceBattery)) mBattery++;
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceAxPackageLv2)) hasAx = true; if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceAxPackageLv2)) mAxPackage++;
} }
if (hasCar) mWarrantyCar++; if (hasBattery) mBattery++; if (hasAx) mAxPackage++;
} }
} }
...@@ -2530,7 +2526,7 @@ public class DailyReportDataService { ...@@ -2530,7 +2526,7 @@ public class DailyReportDataService {
String phone = customer.getCustomerPhone(); String phone = customer.getCustomerPhone();
if (customer.getSalesType() != null && customer.getSalesType() == SalesTypeEnum.AFTER_SALE.getValue()) { if (customer.getSalesType() != null && customer.getSalesType() == SalesTypeEnum.AFTER_SALE.getValue()) {
oTransaction++; oTransaction++;
if (isDateInRange(customer.getActualDeliveryDate(), startDate, endDate) && StringUtils.isNotBlank(phone) && vPhones.add(phone)) { if (StringUtils.isNotBlank(phone) && vPhones.add(phone)) {
oVisit++; Set<Integer> tags = parseCustomerTagSet(customer.getCustomerTags()); oVisit++; Set<Integer> tags = parseCustomerTagSet(customer.getCustomerTags());
if (tags.contains((int) CustomerTagTypeEnum.TOUCHED_CUSTOMER.getValue())) { oTalk++; tPhones.add(phone); } if (tags.contains((int) CustomerTagTypeEnum.TOUCHED_CUSTOMER.getValue())) { oTalk++; tPhones.add(phone); }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!