Commit 72bb6423 by 张富康

fix(staffPerformance): 添加详细日志记录以增强绩效计算调试能力

- 增加个人月度总产值、个人月度单店产值相关日志输出
- 添加个人客户渗透率及个人单品渗透率计算步骤日志
- 记录高客单价、总触客客单价与触客客单价的详细计算信息
- 新增升级客单价及交车客单价的日志说明
- 补充门店触客率(交车)及有效引荐相关日志
- 添加升级订单数计算日志以便追踪数据来源
1 parent 5ce82a31
...@@ -504,10 +504,12 @@ public class StaffPerformanceCalService { ...@@ -504,10 +504,12 @@ public class StaffPerformanceCalService {
switch (factorEnum) { switch (factorEnum) {
case PERSONAL_MONTHLY_TOTAL_OUTPUT_VALUE: case PERSONAL_MONTHLY_TOTAL_OUTPUT_VALUE:
// 个人月度总产值 = 个人月度总产值(业务) // 个人月度总产值 = 个人月度总产值(业务)
log.info("===个人月度总产值(业务)= 个人月度总产值(业务):{}", orderData.getPersonalMonthlyTotalOutput());
return Optional.ofNullable(orderData.getPersonalMonthlyTotalOutput()) return Optional.ofNullable(orderData.getPersonalMonthlyTotalOutput())
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
case PERSONAL_MONTHLY_SINGLE_STORE_OUTPUT_VALUE: case PERSONAL_MONTHLY_SINGLE_STORE_OUTPUT_VALUE:
// 个人月度单店产值 = 个人月度单店产值(门店+业务) // 个人月度单店产值 = 个人月度单店产值(门店+业务)
log.info("===个人月度单店产值(门店+业务)= 个人月度单店产值(门店+业务):{}", orderData.getPersonalMonthlyStoreOutput());
return Optional.ofNullable(orderData.getPersonalMonthlyStoreOutput()) return Optional.ofNullable(orderData.getPersonalMonthlyStoreOutput())
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
case PERSONAL_CUSTOMER_PENETRATION_RATE: { case PERSONAL_CUSTOMER_PENETRATION_RATE: {
...@@ -517,7 +519,8 @@ public class StaffPerformanceCalService { ...@@ -517,7 +519,8 @@ public class StaffPerformanceCalService {
.orElse(0)); .orElse(0));
BigDecimal targetTouch = Optional.ofNullable(dailyData.getPersonalTargetTouchCount()) BigDecimal targetTouch = Optional.ofNullable(dailyData.getPersonalTargetTouchCount())
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
log.info("mainCount:{},targetTouch:{}", mainCount, targetTouch); log.info("===个人客户渗透率 = 主订单成交数(门店+业务+品牌+品类)/ 个人应触客数");
log.info("主订单成交数(门店+业务+品牌+品类)-mainCount:{}, 个人应触客数-targetTouch:{}", mainCount, targetTouch);
return DataCalUtil.divideToPercent(mainCount, targetTouch); return DataCalUtil.divideToPercent(mainCount, targetTouch);
} }
case PERSONAL_SINGLE_PRODUCT_PENETRATION_RATE: { case PERSONAL_SINGLE_PRODUCT_PENETRATION_RATE: {
...@@ -527,11 +530,13 @@ public class StaffPerformanceCalService { ...@@ -527,11 +530,13 @@ public class StaffPerformanceCalService {
.orElse(0)); .orElse(0));
BigDecimal targetTouch = Optional.ofNullable(dailyData.getPersonalTargetTouchCount()) BigDecimal targetTouch = Optional.ofNullable(dailyData.getPersonalTargetTouchCount())
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
log.info("subCount:{},targetTouch:{}", subCount, targetTouch); log.info("===个人单品渗透率 = 子订单成交数(门店+业务+品牌+品类)/ 个人应触客数");
log.info("子订单成交数(门店+业务+品牌+品类)-subCount:{}, 个人应触客数-targetTouch:{}", subCount, targetTouch);
return DataCalUtil.divideToPercent(subCount, targetTouch); return DataCalUtil.divideToPercent(subCount, targetTouch);
} }
case HIGH_CUSTOMER_UNIT_PRICE: case HIGH_CUSTOMER_UNIT_PRICE:
// 高客单价 = 品类订单产值合计(门店+业务+品牌+品类) // 高客单价 = 品类订单产值合计(门店+业务+品牌+品类)
log.info("===高客单价 = 品类订单产值合计(门店+业务+品牌+品类):{}", orderData.getCategoryOrderOutputTotalByBrandAndCategory());
return Optional.ofNullable(orderData.getCategoryOrderOutputTotalByBrandAndCategory()) return Optional.ofNullable(orderData.getCategoryOrderOutputTotalByBrandAndCategory())
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
case TOTAL_CUSTOMER_CONTACT_UNIT_PRICE: { case TOTAL_CUSTOMER_CONTACT_UNIT_PRICE: {
...@@ -541,7 +546,8 @@ public class StaffPerformanceCalService { ...@@ -541,7 +546,8 @@ public class StaffPerformanceCalService {
BigDecimal totalTouch = new BigDecimal( BigDecimal totalTouch = new BigDecimal(
Optional.ofNullable(dailyData.getPersonalTotalPreSalesTouchCount()) Optional.ofNullable(dailyData.getPersonalTotalPreSalesTouchCount())
.orElse(0)); .orElse(0));
log.info("totalOutput:{},totalTouch:{}", totalOutput, totalTouch); log.info("===总触客客单价(适用园区店) = 个人月度总产值(业务)/ 该个人在所有门店的实际售前触客数总和");
log.info("个人月度总产值(业务)-totalOutput:{}, 该个人在所有门店的实际售前触客数总和-totalTouch:{}", totalOutput, totalTouch);
return DataCalUtil.divide(totalOutput, totalTouch); return DataCalUtil.divide(totalOutput, totalTouch);
} }
case CUSTOMER_CONTACT_UNIT_PRICE: { case CUSTOMER_CONTACT_UNIT_PRICE: {
...@@ -551,7 +557,8 @@ public class StaffPerformanceCalService { ...@@ -551,7 +557,8 @@ public class StaffPerformanceCalService {
BigDecimal storePersonalTouch = new BigDecimal( BigDecimal storePersonalTouch = new BigDecimal(
Optional.ofNullable(dailyData.getStorePersonalPreSalesTouchCount()) Optional.ofNullable(dailyData.getStorePersonalPreSalesTouchCount())
.orElse(0)); .orElse(0));
log.info("storeOutput:{},storePersonalTouch:{}", storeOutput, storePersonalTouch); log.info("===触客客单价 = 个人月度单店产值(门店+业务)/ 该门店的该个人实际售前触客数");
log.info("个人月度单店产值(门店+业务)-storeOutput:{}, 该门店的该个人实际售前触客数-storePersonalTouch:{}", storeOutput, storePersonalTouch);
return DataCalUtil.divide(storeOutput, storePersonalTouch); return DataCalUtil.divide(storeOutput, storePersonalTouch);
} }
case UPGRADE_UNIT_PRICE: { case UPGRADE_UNIT_PRICE: {
...@@ -560,7 +567,8 @@ public class StaffPerformanceCalService { ...@@ -560,7 +567,8 @@ public class StaffPerformanceCalService {
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
BigDecimal mainOrderCount = new BigDecimal( BigDecimal mainOrderCount = new BigDecimal(
Optional.ofNullable(orderData.getMainOrderCountByBrand()).orElse(0)); Optional.ofNullable(orderData.getMainOrderCountByBrand()).orElse(0));
log.info("storeOutput:{},mainOrderCount:{}", storeOutput, mainOrderCount); log.info("===升级客单价 = 个人月度单店产值(门店+业务)/ 主订单成交数(门店+业务+品牌)");
log.info("个人月度单店产值(门店+业务)-storeOutput:{}, 主订单成交数(门店+业务+品牌)-mainOrderCount:{}", storeOutput, mainOrderCount);
return DataCalUtil.divide(storeOutput, mainOrderCount); return DataCalUtil.divide(storeOutput, mainOrderCount);
} }
case DELIVERY_UNIT_PRICE: { case DELIVERY_UNIT_PRICE: {
...@@ -569,6 +577,7 @@ public class StaffPerformanceCalService { ...@@ -569,6 +577,7 @@ public class StaffPerformanceCalService {
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
BigDecimal targetTouch = Optional.ofNullable(dailyData.getPersonalTargetTouchCount()) BigDecimal targetTouch = Optional.ofNullable(dailyData.getPersonalTargetTouchCount())
.orElse(BigDecimal.ZERO); .orElse(BigDecimal.ZERO);
log.info("===交车客单价 = 个人月度单店产值(门店+业务)/ 个人应触客数");
log.info("storeOutput:{},targetTouch:{}", storeOutput, targetTouch); log.info("storeOutput:{},targetTouch:{}", storeOutput, targetTouch);
return DataCalUtil.divide(storeOutput, targetTouch); return DataCalUtil.divide(storeOutput, targetTouch);
} }
...@@ -578,7 +587,8 @@ public class StaffPerformanceCalService { ...@@ -578,7 +587,8 @@ public class StaffPerformanceCalService {
Optional.ofNullable(dailyData.getStoreTotalTouchCount()).orElse(0)); Optional.ofNullable(dailyData.getStoreTotalTouchCount()).orElse(0));
BigDecimal storeDelivery = new BigDecimal( BigDecimal storeDelivery = new BigDecimal(
Optional.ofNullable(dailyData.getStoreDeliveryCount()).orElse(0)); Optional.ofNullable(dailyData.getStoreDeliveryCount()).orElse(0));
log.info("storeTotalTouch:{},storeDelivery:{}", storeTotalTouch, storeDelivery); log.info("===门店触客率(交车) = 门店总触客数(该门店的所有个人实际售前触客数之和) / 门店交车数");
log.info("门店总触客数(该门店的所有个人实际售前触客数之和)-storeTotalTouch:{}, 门店交车数-storeDelivery:{}", storeTotalTouch, storeDelivery);
return DataCalUtil.divideToPercent(storeTotalTouch, storeDelivery); return DataCalUtil.divideToPercent(storeTotalTouch, storeDelivery);
} }
case STORE_CUSTOMER_CONTACT_RATE_EFFECTIVE_REFERRAL: { case STORE_CUSTOMER_CONTACT_RATE_EFFECTIVE_REFERRAL: {
...@@ -588,11 +598,13 @@ public class StaffPerformanceCalService { ...@@ -588,11 +598,13 @@ public class StaffPerformanceCalService {
BigDecimal storeValidReferral = new BigDecimal( BigDecimal storeValidReferral = new BigDecimal(
Optional.ofNullable(dailyData.getStoreValidRecommendationCount()) Optional.ofNullable(dailyData.getStoreValidRecommendationCount())
.orElse(0)); .orElse(0));
log.info("storeTotalTouch:{},storeValidReferral:{}", storeTotalTouch, storeValidReferral); log.info("===门店触客率(有效引荐) = 门店总触客数(该门店的所有个人实际售前触客数之和) / 门店有效引荐数");
log.info("门店总触客数(该门店的所有个人实际售前触客数之和)-storeTotalTouch:{}, 门店有效引荐数-storeValidReferral:{}", storeTotalTouch, storeValidReferral);
return DataCalUtil.divideToPercent(storeTotalTouch, storeValidReferral); return DataCalUtil.divideToPercent(storeTotalTouch, storeValidReferral);
} }
case UPGRADE_ORDER_QUANTITY: case UPGRADE_ORDER_QUANTITY:
// 升级订单数 = 主订单成交数(门店+业务+品牌) // 升级订单数 = 主订单成交数(门店+业务+品牌)
log.info("===升级订单数 = 主订单成交数(门店+业务+品牌):{}", orderData.getMainOrderCountByBrand());
return new BigDecimal( return new BigDecimal(
Optional.ofNullable(orderData.getMainOrderCountByBrand()).orElse(0)); Optional.ofNullable(orderData.getMainOrderCountByBrand()).orElse(0));
default: default:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!