Commit dbf70662 by 范富荣

Merge remote-tracking branch 'origin/v5.8.2' into v5.8.2

2 parents d2c66c22 330e0b1c
...@@ -359,4 +359,70 @@ public class MerchantAnalysisController { ...@@ -359,4 +359,70 @@ public class MerchantAnalysisController {
} }
} }
@ApiOperation("策略中心-门店分析-门店经营概况-主机厂")
@ServiceMethod(method = "dj.api.strategy.merchant.analysis.store.detail.zjsummary", needInSession = NeedInSessionType.YES)
public RopResponse<StoreDetailSummaryResponse> merchantDetailSummaryZJ(SceneMerchantBaseRequest request) {
try {
SceneBaseReq req = CommonUtil.convertRequest(SceneBaseReq.class);
RpcResponse<StoreDetailSummaryResponse> response = businessSceneAnalysisRemote.storeDetailSummaryZj(req);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("接口异常", e);
return RopResponse.error(e.getMessage());
}
}
@ApiOperation("策略中心-门店商品品类分析-主机厂")
@ServiceMethod(method = "dj.api.strategy.merchant.analysis.goods.summary.withWarnZJ", needInSession = NeedInSessionType.YES)
public RopResponse<GoodsCategorySummaryResponse> merchantGoodsSummaryWithWarmZJ(SceneMerchantBaseRequest request) {
try {
SceneBaseReq req = CommonUtil.convertRequest(SceneBaseReq.class);
// 调用主机厂版方法,交付数从目标配置表获取
RpcResponse<GoodsCategorySummaryResponse> response = businessSceneAnalysisRemote.goodsSummaryZj(req);
if (response.isSuccess()) {
GoodsCategorySummaryResponse result = Optional.ofNullable(response.getResult()).orElse(new GoodsCategorySummaryResponse());
// 处理兜底指标
Optional.ofNullable(req.getMerchantIds())
.filter(CollUtil::isNotEmpty)
.flatMap(list -> Optional.ofNullable(list.get(0)).map(ObjectUtil::toString))
.filter(StrUtil::isNotEmpty)
.ifPresent(merchantId -> {
RpcResponse<EarlyWarningThresholdConfig> warningConfigRes = warningMsgRemote.findByMerchantNo(merchantId);
if (!warningConfigRes.hasResult()) {
log.error("兜底预警目标配置查询异常: {}", warningConfigRes);
return;
}
EarlyWarningThresholdConfig warningConfig = warningConfigRes.getResult();
// 电池转化率
result.setBatteryWarrantyConversionBottomTarget(warningConfig.getBatteryConversionRate());
// 电池渗透率
result.setBatteryWarrantyPenetrationBottomTarget(warningConfig.getBatteryPenetrationRate());
// 延保转化率
result.setVehicleWarrantyConversionBottomTarget(warningConfig.getEwConRate());
// 延保渗透率
result.setVehicleWarrantyPenetrationBottomTarget(warningConfig.getEwPenetrationRate());
// 延保安心包转化率
result.setSafetyPackageConversionBottomTarget(warningConfig.getEwAxbConRate());
// 安心包渗透率
result.setSafetyPackagePenetrationBottomTarget(warningConfig.getEwAxbPenetrationRate());
// 延保轮胎转化率
result.setTireWarrantyConversionBottomTarget(warningConfig.getEwLtConRate());
// 轮胎渗透率
result.setTireWarrantyPenetrationBottomTarget(warningConfig.getEwLtPenetrationRate());
});
return RopResponse.success(result);
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("接口异常", e);
return RopResponse.error(e.getMessage());
}
}
} }
...@@ -10,6 +10,8 @@ import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote; ...@@ -10,6 +10,8 @@ import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote;
import cn.com.glsx.dj.strategy.dto.BatchInsertStrategyInfo; import cn.com.glsx.dj.strategy.dto.BatchInsertStrategyInfo;
import cn.com.glsx.dj.strategy.dto.MerchantBusinessInfo; import cn.com.glsx.dj.strategy.dto.MerchantBusinessInfo;
import cn.com.glsx.dj.strategy.dto.MerchantBusinessOverview; import cn.com.glsx.dj.strategy.dto.MerchantBusinessOverview;
import cn.com.glsx.dj.strategy.dto.ShopMerchantOperatorReqDTO;
import cn.com.glsx.dj.strategy.dto.ShopMerchantOperatorRespDTO;
import cn.com.glsx.dj.strategy.model.StrategyInfo; import cn.com.glsx.dj.strategy.model.StrategyInfo;
import cn.com.glsx.dj.strategy.remote.StrategyInfoRemote; import cn.com.glsx.dj.strategy.remote.StrategyInfoRemote;
import cn.com.glsx.dj.strategy.request.*; import cn.com.glsx.dj.strategy.request.*;
...@@ -27,6 +29,8 @@ import io.swagger.annotations.ApiOperation; ...@@ -27,6 +29,8 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j @Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES) @ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("策略中心-策略信息") @Api("策略中心-策略信息")
...@@ -177,7 +181,7 @@ public class StrategyInfoController { ...@@ -177,7 +181,7 @@ public class StrategyInfoController {
} }
@ApiOperation("查询策略详情(学习和课程类)") @ApiOperation("查询策略详情(学习、课程、带教申请)")
@ServiceMethod(method = "dj.api.strategy.info.queryStrategyInfoById",needInSession = NeedInSessionType.YES) @ServiceMethod(method = "dj.api.strategy.info.queryStrategyInfoById",needInSession = NeedInSessionType.YES)
public RopResponse<StrategyInfo> queryStrategyInfoById(StrategyInfoQueryRequest request) { public RopResponse<StrategyInfo> queryStrategyInfoById(StrategyInfoQueryRequest request) {
try { try {
...@@ -266,4 +270,24 @@ public class StrategyInfoController { ...@@ -266,4 +270,24 @@ public class StrategyInfoController {
return RopResponse.error(e.getMessage()); return RopResponse.error(e.getMessage());
} }
} }
@ApiOperation("查询当前门店+业务下的全部区域运营")
@ServiceMethod(method = "dj.api.strategy.shop.merchant.operators", needInSession = NeedInSessionType.NO, ignoreSign = IgnoreSignType.YES)
public RopResponse<List<ShopMerchantOperatorRespDTO>> listShopMerchantOperators(ShopMerchantOperatorRequest request) {
try {
ShopMerchantOperatorReqDTO reqDTO = CommonUtil.convertRequest(ShopMerchantOperatorReqDTO.class);
RpcResponse<List<ShopMerchantOperatorRespDTO>> response = strategyInfoRemote.listShopMerchantOperators(reqDTO);
if (response.hasError()) {
log.error(response.getMessage());
return RopResponse.error(response.getError(), response.getMessage());
}
return RopResponse.success(response.getResult());
} catch (RpcServiceException e) {
log.error("=====dj.api.strategy.shop.merchant.operators rpcServiceException:{}", e.getMessage());
return RopResponse.error(e);
} catch (Exception e) {
log.error("=====dj.api.strategy.shop.merchant.operators exception:{}", e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
} }
package cn.com.glsx.dj.strategy.request;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 查询门店区域运营列表请求
*/
@Data
public class ShopMerchantOperatorRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "门店商户号", required = true)
@NotNull(message = "门店商户号不能为空")
private Integer merchantId;
@ApiModelProperty(notes = "业务类型:1-延保,2-轻改,3-权益", required = true)
@NotNull(message = "业务类型不能为空")
private Integer businessType;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!