Commit 39d48f5d by 王璐琦

fix(daily-report): 修复售前销售类型下延保业务统计逻辑

- 增加判断仅对售前销售类型客户统计延保业务
- 避免非售前销售类型客户订单误计入延保车辆数
- 确保延保业务统计只在子订单列表非空时进行
- 修正了原有条件判断逻辑,提高统计准确性
1 parent bfc7b57b
......@@ -1812,7 +1812,8 @@ public class DailyReportDataService {
if (tags.contains((int) CustomerTagTypeEnum.TOUCHED_CUSTOMER.getValue())) tTalk++;
}
}
if (matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY)
if (customer.getSalesType() != null && customer.getSalesType() == SalesTypeEnum.BEFORE_SALE.getValue()
&& matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY)
&& CollectionUtils.isNotEmpty(order.getSubOrderList())) {
for (GoodsSubOrderDTO sub : order.getSubOrderList()) {
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceCar)) tWarrantyCar++;
......@@ -1836,7 +1837,8 @@ public class DailyReportDataService {
if (tags.contains((int) CustomerTagTypeEnum.TOUCHED_CUSTOMER.getValue())) mTalk++;
}
}
if (matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY)
if (customer.getSalesType() != null && customer.getSalesType() == SalesTypeEnum.BEFORE_SALE.getValue()
&& matchesHmReportBusiness(order, HmReportBusinessType.EXTENDED_WARRANTY)
&& CollectionUtils.isNotEmpty(order.getSubOrderList())) {
for (GoodsSubOrderDTO sub : order.getSubOrderList()) {
if (matchesCategory(sub.getUpgradeGoodsType(), sub.getUpgradeSecondaryGoodsType(), sub.getUpgradeThirdLevelGoodsType(), goodsTypeExtInsuranceCar)) mWarrantyCar++;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!