Commit 81801610 by 林冲

Merge branch 'v5.8.2' into 'master'

上线合并

See merge request !10
2 parents fa1e8ef7 f826a976
Showing 25 changed files with 708 additions and 62 deletions
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</parent> </parent>
<groupId>cn.com.glsx.dj.peanalysis</groupId> <groupId>cn.com.glsx.dj.peanalysis</groupId>
<artifactId>rpc-dj-pe-analysis-api</artifactId> <artifactId>rpc-dj-pe-analysis-api</artifactId>
<version>5.8.1-SNAPSHOT</version> <version>5.8.2-SNAPSHOT</version>
<name>rpc-dj-pe-analysis-api</name> <name>rpc-dj-pe-analysis-api</name>
<properties> <properties>
<deploy.scanPackage>cn.com.glsx.dj.peanalysis.remote</deploy.scanPackage> <deploy.scanPackage>cn.com.glsx.dj.peanalysis.remote</deploy.scanPackage>
......
...@@ -25,4 +25,7 @@ public class MerchantOperatorDetailDTO implements Serializable { ...@@ -25,4 +25,7 @@ public class MerchantOperatorDetailDTO implements Serializable {
/** 区域运营 */ /** 区域运营 */
private List<MerchantBiMatterDTO.OperatorDTO> areaOperator = Lists.newArrayList(); private List<MerchantBiMatterDTO.OperatorDTO> areaOperator = Lists.newArrayList();
/** 飞行督导 */
private List<MerchantBiMatterDTO.OperatorDTO> flightSupervision = Lists.newArrayList();
} }
...@@ -134,12 +134,31 @@ public class SceneBaseReq implements Serializable { ...@@ -134,12 +134,31 @@ public class SceneBaseReq implements Serializable {
private List<Integer> excludeIds; private List<Integer> excludeIds;
/**
* @deprecated 被warningType替代
*/
@Deprecated
@ApiModelProperty(notes = "兜底预警门店 1.是 0.否") @ApiModelProperty(notes = "兜底预警门店 1.是 0.否")
private Byte ddyjMerchantFlag; private Byte ddyjMerchantFlag;
/**
* @deprecated 被warningType替代
*/
@Deprecated
@ApiModelProperty(notes = "生态预警门店 1.是 0.否") @ApiModelProperty(notes = "生态预警门店 1.是 0.否")
private Byte styjMerchantFlag; private Byte styjMerchantFlag;
@ApiModelProperty(notes = "项目组id")
private Integer projectGroupId;
@ApiModelProperty(notes = "预警类型")
private Integer warningType;
/**
* 预警参数
*/
private String[] resolved;
/** /**
* 转换指标参数 * 转换指标参数
*/ */
......
...@@ -84,4 +84,10 @@ public class EmployeeDetailSummaryResponse implements Serializable { ...@@ -84,4 +84,10 @@ public class EmployeeDetailSummaryResponse implements Serializable {
@ApiModelProperty(notes = "转化率环比") @ApiModelProperty(notes = "转化率环比")
private String conversionRateMom; private String conversionRateMom;
@ApiModelProperty(notes = "触客转化率")
private BigDecimal contractConversionRate;
@ApiModelProperty(notes = "触客转化率环比")
private String contractConversionRateMom;
} }
...@@ -14,7 +14,7 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -14,7 +14,7 @@ public class GoodsCategorySummaryResponse implements Serializable {
private static final long serialVersionUID = -1; private static final long serialVersionUID = -1;
@ApiModelProperty(notes = "新车交付数") @ApiModelProperty(notes = "新车交付数/应触客数")
private BigDecimal newCarDeliveryCount; private BigDecimal newCarDeliveryCount;
@ApiModelProperty(notes = "整车延保-成交数") @ApiModelProperty(notes = "整车延保-成交数")
...@@ -26,10 +26,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -26,10 +26,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "整车延保-渗透率兜底目标") @ApiModelProperty(notes = "整车延保-渗透率兜底目标")
private BigDecimal vehicleWarrantyPenetrationBottomTarget; private BigDecimal vehicleWarrantyPenetrationBottomTarget;
@ApiModelProperty(notes = "整车延保-转化率") @ApiModelProperty(notes = "整车延保-转化率(触客转化率)")
private BigDecimal vehicleWarrantyConversionRate; private BigDecimal vehicleWarrantyConversionRate;
@ApiModelProperty(notes = "整车延保-转化率兜底目标") @ApiModelProperty(notes = "整车延保-转化率兜底目标(触客转化率)")
private BigDecimal vehicleWarrantyConversionBottomTarget; private BigDecimal vehicleWarrantyConversionBottomTarget;
@ApiModelProperty(notes = "整车延保-生态系数(依据渗透率计算)") @ApiModelProperty(notes = "整车延保-生态系数(依据渗透率计算)")
...@@ -44,10 +44,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -44,10 +44,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "安心包-渗透率兜底目标") @ApiModelProperty(notes = "安心包-渗透率兜底目标")
private BigDecimal safetyPackagePenetrationBottomTarget; private BigDecimal safetyPackagePenetrationBottomTarget;
@ApiModelProperty(notes = "安心包-转化率") @ApiModelProperty(notes = "安心包-转化率(触客转化率)")
private BigDecimal safetyPackageConversionRate; private BigDecimal safetyPackageConversionRate;
@ApiModelProperty(notes = "安心包-转化率兜底目标") @ApiModelProperty(notes = "安心包-转化率兜底目标(触客转化率)")
private BigDecimal safetyPackageConversionBottomTarget; private BigDecimal safetyPackageConversionBottomTarget;
@ApiModelProperty(notes = "安心包-生态系数") @ApiModelProperty(notes = "安心包-生态系数")
...@@ -62,10 +62,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -62,10 +62,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "电池延保-渗透率兜底目标") @ApiModelProperty(notes = "电池延保-渗透率兜底目标")
private BigDecimal batteryWarrantyPenetrationBottomTarget; private BigDecimal batteryWarrantyPenetrationBottomTarget;
@ApiModelProperty(notes = "电池延保-转化率") @ApiModelProperty(notes = "电池延保-转化率(触客转化率)")
private BigDecimal batteryWarrantyConversionRate; private BigDecimal batteryWarrantyConversionRate;
@ApiModelProperty(notes = "电池延保-转化率兜底目标") @ApiModelProperty(notes = "电池延保-转化率兜底目标(触客转化率)")
private BigDecimal batteryWarrantyConversionBottomTarget; private BigDecimal batteryWarrantyConversionBottomTarget;
@ApiModelProperty(notes = "电池延保-生态系数") @ApiModelProperty(notes = "电池延保-生态系数")
...@@ -80,10 +80,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -80,10 +80,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "轮胎延保-渗透率兜底目标") @ApiModelProperty(notes = "轮胎延保-渗透率兜底目标")
private BigDecimal tireWarrantyPenetrationBottomTarget; private BigDecimal tireWarrantyPenetrationBottomTarget;
@ApiModelProperty(notes = "轮胎延保-转化率") @ApiModelProperty(notes = "轮胎延保-转化率(触客转化率)")
private BigDecimal tireWarrantyConversionRate; private BigDecimal tireWarrantyConversionRate;
@ApiModelProperty(notes = "轮胎延保-转化率兜底目标") @ApiModelProperty(notes = "轮胎延保-转化率兜底目标(触客转化率)")
private BigDecimal tireWarrantyConversionBottomTarget; private BigDecimal tireWarrantyConversionBottomTarget;
@ApiModelProperty(notes = "轮胎延保-生态系数") @ApiModelProperty(notes = "轮胎延保-生态系数")
...@@ -101,10 +101,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -101,10 +101,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "车窗膜-渗透率兜底目标") @ApiModelProperty(notes = "车窗膜-渗透率兜底目标")
private BigDecimal windowFilmPenetrationBottomTarget; private BigDecimal windowFilmPenetrationBottomTarget;
@ApiModelProperty(notes = "车窗膜-转化率") @ApiModelProperty(notes = "车窗膜-转化率(触客转化率)")
private BigDecimal windowFilmConversionRate; private BigDecimal windowFilmConversionRate;
@ApiModelProperty(notes = "车窗膜-转化率兜底目标") @ApiModelProperty(notes = "车窗膜-转化率兜底目标(触客转化率)")
private BigDecimal windowFilmConversionBottomTarget; private BigDecimal windowFilmConversionBottomTarget;
@ApiModelProperty(notes = "车窗膜-生态系数") @ApiModelProperty(notes = "车窗膜-生态系数")
...@@ -122,10 +122,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -122,10 +122,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "车身膜-渗透率兜底目标") @ApiModelProperty(notes = "车身膜-渗透率兜底目标")
private BigDecimal carBodyFilmPenetrationBottomTarget; private BigDecimal carBodyFilmPenetrationBottomTarget;
@ApiModelProperty(notes = "车身膜-转化率") @ApiModelProperty(notes = "车身膜-转化率(触客转化率)")
private BigDecimal carBodyFilmConversionRate; private BigDecimal carBodyFilmConversionRate;
@ApiModelProperty(notes = "车身膜-转化率兜底目标") @ApiModelProperty(notes = "车身膜-转化率兜底目标(触客转化率)")
private BigDecimal carBodyFilmConversionBottomTarget; private BigDecimal carBodyFilmConversionBottomTarget;
@ApiModelProperty(notes = "车身膜-生态系数") @ApiModelProperty(notes = "车身膜-生态系数")
...@@ -143,10 +143,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -143,10 +143,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
@ApiModelProperty(notes = "精品附件-渗透率兜底目标") @ApiModelProperty(notes = "精品附件-渗透率兜底目标")
private BigDecimal accessoriesPenetrationBottomTarget; private BigDecimal accessoriesPenetrationBottomTarget;
@ApiModelProperty(notes = "精品附件-转化率") @ApiModelProperty(notes = "精品附件-转化率(触客转化率)")
private BigDecimal accessoriesConversionRate; private BigDecimal accessoriesConversionRate;
@ApiModelProperty(notes = "精品附件-转化率兜底目标") @ApiModelProperty(notes = "精品附件-转化率兜底目标(触客转化率)")
private BigDecimal accessoriesConversionBottomTarget; private BigDecimal accessoriesConversionBottomTarget;
@ApiModelProperty(notes = "精品附件-生态系数") @ApiModelProperty(notes = "精品附件-生态系数")
......
...@@ -32,7 +32,7 @@ public class StoreAvgResponse implements Serializable { ...@@ -32,7 +32,7 @@ public class StoreAvgResponse implements Serializable {
@ApiModelProperty(notes = "平均渗透率环比") @ApiModelProperty(notes = "平均渗透率环比")
private BigDecimal avgPenetrationRateMom; private BigDecimal avgPenetrationRateMom;
@ApiModelProperty(notes = "平均转化率") @ApiModelProperty(notes = "平均转化率(触客转化率总和/门店数)")
private BigDecimal avgConversionRate; private BigDecimal avgConversionRate;
@ApiModelProperty(notes = "平均转化率环比") @ApiModelProperty(notes = "平均转化率环比")
......
...@@ -143,4 +143,21 @@ public class StoreDetailSummaryResponse implements Serializable { ...@@ -143,4 +143,21 @@ public class StoreDetailSummaryResponse implements Serializable {
@ApiModelProperty(notes = "渗透率环比") @ApiModelProperty(notes = "渗透率环比")
private String penetrationRateMom; private String penetrationRateMom;
@ApiModelProperty(notes = "触客转化率")
private BigDecimal contactConversionRate;
@ApiModelProperty(notes = "触客转化率环比")
private String contactConversionRateMom;
/**
* 归属周期-开始日期(yyyy-MM-dd)
*/
private String periodStartDate;
/**
* 归属周期-结束日期(yyyy-MM-dd)
*/
private String periodEndDate;
} }
...@@ -48,7 +48,7 @@ public class StoreEmployeeRankResponse implements Serializable { ...@@ -48,7 +48,7 @@ public class StoreEmployeeRankResponse implements Serializable {
@ApiModelProperty(notes = "个人客单价") @ApiModelProperty(notes = "个人客单价")
private BigDecimal personalCustomerPrice; private BigDecimal personalCustomerPrice;
@ApiModelProperty(notes = "个人转化率") @ApiModelProperty(notes = "个人转化率(触客转化率)")
private BigDecimal personalConversionRate; private BigDecimal personalConversionRate;
// @ApiModelProperty(notes = "个人成交客户数") // @ApiModelProperty(notes = "个人成交客户数")
......
...@@ -40,7 +40,7 @@ public class StoreListResponse implements Serializable { ...@@ -40,7 +40,7 @@ public class StoreListResponse implements Serializable {
@ApiModelProperty(notes = "渗透率") @ApiModelProperty(notes = "渗透率")
private BigDecimal penetrationRate; private BigDecimal penetrationRate;
@ApiModelProperty(notes = "转化率") @ApiModelProperty(notes = "触客转化率")
private BigDecimal conversionRate; private BigDecimal conversionRate;
@ApiModelProperty(notes = "升客价") @ApiModelProperty(notes = "升客价")
......
...@@ -91,8 +91,10 @@ public class StoreSceneSummaryResponse implements Serializable { ...@@ -91,8 +91,10 @@ public class StoreSceneSummaryResponse implements Serializable {
private List<Integer> bottomLineWarningStoreIds; private List<Integer> bottomLineWarningStoreIds;
@ApiModelProperty(notes = "生态指标预警门店数量") @ApiModelProperty(notes = "生态指标预警门店数量")
@Deprecated
private Integer ecosystemWarningStores; private Integer ecosystemWarningStores;
@ApiModelProperty(notes = "生态指标预警门店商户号") @ApiModelProperty(notes = "生态指标预警门店商户号")
@Deprecated
private List<Integer> ecosystemWarningStoreIds; private List<Integer> ecosystemWarningStoreIds;
} }
...@@ -18,9 +18,9 @@ public class StaffAnalysisDTO implements Serializable { ...@@ -18,9 +18,9 @@ public class StaffAnalysisDTO implements Serializable {
@ApiModelProperty(notes = "员工状态(D:已删除;N:未删除 I :禁用)") @ApiModelProperty(notes = "员工状态(D:已删除;N:未删除 I :禁用)")
private String staffStatus = "D"; private String staffStatus = "D";
// private Integer tempFlag; @ApiModelProperty(notes = "驻店类型(1:门店常驻, 2:临时调动支援)")
private Integer stationType;
@ApiModelProperty(notes = "警告信息列表") @ApiModelProperty(notes = "警告信息列表")
private List<WarningInfo> warningInfoList; private List<WarningInfo> warningInfoList;
} }
...@@ -4,15 +4,110 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -4,15 +4,110 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data @Data
public class WarningInfo implements Serializable { public class WarningInfo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "警告类型") @ApiModelProperty(notes = "记录ID")
private Integer id;
@ApiModelProperty(notes = "项目组ID")
private Integer groupId;
@ApiModelProperty(notes = "配置ID")
private Integer configId;
@ApiModelProperty(notes = "预警类型")
private Integer warningType; private Integer warningType;
@ApiModelProperty(notes = "预警内容") @ApiModelProperty(notes = "预警类型名称")
private String warningTypeName;
@ApiModelProperty(notes = "业务类型")
private Integer businessType;
@ApiModelProperty(notes = "监控对象: 1=员工 2=门店")
private Integer monitorTarget;
@ApiModelProperty(notes = "时间维度")
private String timeDimension;
@ApiModelProperty(notes = "周期开始")
private Date periodStart;
@ApiModelProperty(notes = "周期结束")
private Date periodEnd;
@ApiModelProperty(notes = "门店ID")
private Integer storeId;
@ApiModelProperty(notes = "门店名称")
private String storeName;
@ApiModelProperty(notes = "员工ID")
private String staffId;
@ApiModelProperty(notes = "员工姓名")
private String staffName;
@ApiModelProperty(notes = "员工手机号")
private String staffPhone;
@ApiModelProperty(notes = "指标字典ID")
private Integer metricId;
@ApiModelProperty(notes = "指标编码")
private String metricCode;
@ApiModelProperty(notes = "指标名称")
private String metricName;
@ApiModelProperty(notes = "指标值")
private BigDecimal metricValue;
@ApiModelProperty(notes = "指标展示值")
private BigDecimal metricDisplay;
@ApiModelProperty(notes = "阈值类型")
private Integer thresholdType;
@ApiModelProperty(notes = "阈值展示值")
private BigDecimal thresholdDisplay;
@ApiModelProperty(notes = "区间下界展示值")
private BigDecimal thresholdMinDisplay;
@ApiModelProperty(notes = "区间上界展示值")
private BigDecimal thresholdMaxDisplay;
@ApiModelProperty(notes = "生态系数")
private BigDecimal ecoCoefficient;
@ApiModelProperty(notes = "运算符")
private String operator;
@ApiModelProperty(notes = "预警描述文本")
private String warningText; private String warningText;
@ApiModelProperty(notes = "是否已下发策略")
private Integer isStrategySent;
@ApiModelProperty(notes = "状态")
private Integer status;
@ApiModelProperty(notes = "创建时间")
private Date createdTime;
@ApiModelProperty(notes = "指标数据类型: 1=比率 2=数值")
private Integer dataType;
@ApiModelProperty(notes = "指标单位")
private String unit;
@ApiModelProperty(notes = "指标扩展品类")
private String categoryExtension;
} }
...@@ -4,9 +4,7 @@ package cn.com.glsx.dj.peanalysis.remote; ...@@ -4,9 +4,7 @@ package cn.com.glsx.dj.peanalysis.remote;
import cn.com.glsx.dj.peanalysis.dto.job.BiRecord; import cn.com.glsx.dj.peanalysis.dto.job.BiRecord;
import cn.com.glsx.dj.peanalysis.dto.req.output.SceneBaseReq; import cn.com.glsx.dj.peanalysis.dto.req.output.SceneBaseReq;
import cn.com.glsx.dj.peanalysis.dto.res.output.*; import cn.com.glsx.dj.peanalysis.dto.res.output.*;
import cn.com.glsx.dj.peanalysis.dto.strategy.GoodsCategorySummaryWithWarn;
import cn.com.glsx.dj.peanalysis.dto.strategy.StaffAnalysisDTO; import cn.com.glsx.dj.peanalysis.dto.strategy.StaffAnalysisDTO;
import cn.com.glsx.dj.peanalysis.dto.strategy.StaffSummaryDTO;
import cn.com.glsx.framework.core.annotation.ApiMethod; import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiService; import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...@@ -49,6 +47,9 @@ public interface BusinessSceneAnalysisRemote { ...@@ -49,6 +47,9 @@ public interface BusinessSceneAnalysisRemote {
@ApiMethod("门店分析") @ApiMethod("门店分析")
RpcResponse<StoreDetailSummaryResponse> storeDetailSummary(SceneBaseReq req); RpcResponse<StoreDetailSummaryResponse> storeDetailSummary(SceneBaseReq req);
@ApiMethod("门店分析(主机厂版)- 交付数从目标配置表获取")
RpcResponse<StoreDetailSummaryResponse> storeDetailSummaryZj(SceneBaseReq req);
@ApiMethod("门店员工排名") @ApiMethod("门店员工排名")
RpcResponse<StoreEmployeeRankResponse> storeEmployeeRank(SceneBaseReq req); RpcResponse<StoreEmployeeRankResponse> storeEmployeeRank(SceneBaseReq req);
...@@ -61,6 +62,9 @@ public interface BusinessSceneAnalysisRemote { ...@@ -61,6 +62,9 @@ public interface BusinessSceneAnalysisRemote {
@ApiMethod("商品品类分析") @ApiMethod("商品品类分析")
RpcResponse<GoodsCategorySummaryResponse> goodsSummary(SceneBaseReq req); RpcResponse<GoodsCategorySummaryResponse> goodsSummary(SceneBaseReq req);
@ApiMethod("商品品类分析(主机厂版)- 交付数从目标配置表获取")
RpcResponse<GoodsCategorySummaryResponse> goodsSummaryZj(SceneBaseReq req);
@ApiMethod("查询BI统计信息中的门店") @ApiMethod("查询BI统计信息中的门店")
RpcResponse<List<BiRecord>> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate); RpcResponse<List<BiRecord>> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate);
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<properties> <properties>
<platform-merchants.api.version>5.5.1-SNAPSHOT</platform-merchants.api.version> <platform-merchants.api.version>5.5.1-SNAPSHOT</platform-merchants.api.version>
<smartcarlife.api.version>5.6.4-SNAPSHOT</smartcarlife.api.version> <smartcarlife.api.version>5.8.2-SNAPSHOT</smartcarlife.api.version>
<mindworkplate.api.version>5.7.0-SNAPSHOT</mindworkplate.api.version> <mindworkplate.api.version>5.7.0-SNAPSHOT</mindworkplate.api.version>
<pe-analysis.api.version>5.8.1-SNAPSHOT</pe-analysis.api.version> <pe-analysis.api.version>5.8.2-SNAPSHOT</pe-analysis.api.version>
<strategy.api.version>5.7.0-SNAPSHOT</strategy.api.version> <strategy.api.version>5.8.2-SNAPSHOT</strategy.api.version>
<supervisor.api.version>1.0.0-SNAPSHOT</supervisor.api.version> <supervisor.api.version>1.0.0-SNAPSHOT</supervisor.api.version>
<wechat.api.version>4.54.0-SNAPSHOT</wechat.api.version> <wechat.api.version>4.54.0-SNAPSHOT</wechat.api.version>
<entmicro.api.version>5.3.0-SNAPSHOT</entmicro.api.version> <entmicro.api.version>5.3.0-SNAPSHOT</entmicro.api.version>
......
...@@ -19,6 +19,9 @@ public class DataStatsConstants { ...@@ -19,6 +19,9 @@ public class DataStatsConstants {
/** 转化率 */ /** 转化率 */
public static final String ITEM_CODE_A085 = "A085"; public static final String ITEM_CODE_A085 = "A085";
/** 触客转化率 */
public static final String ITEM_CODE_A0130 = "A0130";
/** 渗透率 */ /** 渗透率 */
public static final String ITEM_CODE_A077 = "A077"; public static final String ITEM_CODE_A077 = "A077";
...@@ -31,6 +34,9 @@ public class DataStatsConstants { ...@@ -31,6 +34,9 @@ public class DataStatsConstants {
/** 新车交付数 */ /** 新车交付数 */
public static final String ITEM_CODE_A062 = "A062"; public static final String ITEM_CODE_A062 = "A062";
/** 应触客数 */
public static final String ITEM_CODE_A061 = "A061";
/** 整车延保-渗透率(门店) */ /** 整车延保-渗透率(门店) */
public static final String ITEM_CODE_A067 = "A067"; public static final String ITEM_CODE_A067 = "A067";
...@@ -43,6 +49,9 @@ public class DataStatsConstants { ...@@ -43,6 +49,9 @@ public class DataStatsConstants {
/** 整车延保-转化率 */ /** 整车延保-转化率 */
public static final String ITEM_CODE_A099 = "A099"; public static final String ITEM_CODE_A099 = "A099";
/** 整车延保-触客转化率 */
public static final String ITEM_CODE_A0131 = "A0131";
/** 电池-渗透率(门店) */ /** 电池-渗透率(门店) */
public static final String ITEM_CODE_A094 = "A094"; public static final String ITEM_CODE_A094 = "A094";
...@@ -55,6 +64,9 @@ public class DataStatsConstants { ...@@ -55,6 +64,9 @@ public class DataStatsConstants {
/** 电池-转化率 */ /** 电池-转化率 */
public static final String ITEM_CODE_A091 = "A091"; public static final String ITEM_CODE_A091 = "A091";
/** 电池-触客转化率 */
public static final String ITEM_CODE_A0132 = "A0132";
/** 安心包-渗透率(门店) */ /** 安心包-渗透率(门店) */
public static final String ITEM_CODE_A092 = "A092"; public static final String ITEM_CODE_A092 = "A092";
...@@ -67,6 +79,9 @@ public class DataStatsConstants { ...@@ -67,6 +79,9 @@ public class DataStatsConstants {
/** 安心包-转化率 */ /** 安心包-转化率 */
public static final String ITEM_CODE_A089 = "A089"; public static final String ITEM_CODE_A089 = "A089";
/** 安心包-触客转化率 */
public static final String ITEM_CODE_A0134 = "A0134";
/** 轮胎成交数 */ /** 轮胎成交数 */
public static final String ITEM_CODE_A087 = "A087"; public static final String ITEM_CODE_A087 = "A087";
...@@ -79,6 +94,9 @@ public class DataStatsConstants { ...@@ -79,6 +94,9 @@ public class DataStatsConstants {
/** 轮胎转化率 */ /** 轮胎转化率 */
public static final String ITEM_CODE_A090 = "A090"; public static final String ITEM_CODE_A090 = "A090";
/** 轮胎-触客转化率 */
public static final String ITEM_CODE_A0133 = "A0133";
/** 车窗膜成交数 */ /** 车窗膜成交数 */
public static final String ITEM_CODE_A0106 = "A0106"; public static final String ITEM_CODE_A0106 = "A0106";
...@@ -91,6 +109,9 @@ public class DataStatsConstants { ...@@ -91,6 +109,9 @@ public class DataStatsConstants {
/** 车窗膜转化率 */ /** 车窗膜转化率 */
public static final String ITEM_CODE_A0109 = "A0109"; public static final String ITEM_CODE_A0109 = "A0109";
/** 车窗膜-触客转化率 */
public static final String ITEM_CODE_A0135 = "A0135";
/** 车窗膜渗透率(员工) */ /** 车窗膜渗透率(员工) */
public static final String ITEM_CODE_A0110 = "A0110"; public static final String ITEM_CODE_A0110 = "A0110";
...@@ -106,6 +127,9 @@ public class DataStatsConstants { ...@@ -106,6 +127,9 @@ public class DataStatsConstants {
/** 车身膜转化率 */ /** 车身膜转化率 */
public static final String ITEM_CODE_A0114 = "A0114"; public static final String ITEM_CODE_A0114 = "A0114";
/** 车身膜-触客转化率 */
public static final String ITEM_CODE_A0136 = "A0136";
/** 车身膜渗透率(员工) */ /** 车身膜渗透率(员工) */
public static final String ITEM_CODE_A0115 = "A0115"; public static final String ITEM_CODE_A0115 = "A0115";
...@@ -121,6 +145,9 @@ public class DataStatsConstants { ...@@ -121,6 +145,9 @@ public class DataStatsConstants {
/** 精品附件转化率 */ /** 精品附件转化率 */
public static final String ITEM_CODE_A0119 = "A0119"; public static final String ITEM_CODE_A0119 = "A0119";
/** 精品附件-触客转化率 */
public static final String ITEM_CODE_A0137 = "A0137";
/** 精品附件渗透率(员工) */ /** 精品附件渗透率(员工) */
public static final String ITEM_CODE_A0120 = "A0120"; public static final String ITEM_CODE_A0120 = "A0120";
...@@ -179,8 +206,8 @@ public class DataStatsConstants { ...@@ -179,8 +206,8 @@ public class DataStatsConstants {
public static List<String> getGoodsItemCodes(int bizs, String aggregateType){ public static List<String> getGoodsItemCodes(int bizs, String aggregateType){
List<String> res = null; List<String> res = null;
if (bizs == 1 || bizs == 3) { if (bizs == 1 || bizs == 3) {
res = Lists.newArrayList(ITEM_CODE_A099, ITEM_CODE_A066, ITEM_CODE_A091, ITEM_CODE_A070, ITEM_CODE_A090, res = Lists.newArrayList(ITEM_CODE_A0131, ITEM_CODE_A066, ITEM_CODE_A0132, ITEM_CODE_A070, ITEM_CODE_A0133,
ITEM_CODE_A087, ITEM_CODE_A089, ITEM_CODE_A086); ITEM_CODE_A087, ITEM_CODE_A0134, ITEM_CODE_A086);
if (aggregateType.equals("merchantIds")) { if (aggregateType.equals("merchantIds")) {
res.add(ITEM_CODE_A067); res.add(ITEM_CODE_A067);
res.add(ITEM_CODE_A093); res.add(ITEM_CODE_A093);
...@@ -195,8 +222,8 @@ public class DataStatsConstants { ...@@ -195,8 +222,8 @@ public class DataStatsConstants {
} }
} }
if (bizs == 2) { if (bizs == 2) {
res = Lists.newArrayList(ITEM_CODE_A0119, ITEM_CODE_A0117, ITEM_CODE_A0116, ITEM_CODE_A0114, ITEM_CODE_A0112, res = Lists.newArrayList(ITEM_CODE_A0137, ITEM_CODE_A0117, ITEM_CODE_A0116, ITEM_CODE_A0136, ITEM_CODE_A0112,
ITEM_CODE_A0111, ITEM_CODE_A0109, ITEM_CODE_A0107, ITEM_CODE_A0106); ITEM_CODE_A0111, ITEM_CODE_A0135, ITEM_CODE_A0107, ITEM_CODE_A0106);
if (aggregateType.equals("merchantIds")) { if (aggregateType.equals("merchantIds")) {
res.add(ITEM_CODE_A0108); res.add(ITEM_CODE_A0108);
res.add(ITEM_CODE_A0113); res.add(ITEM_CODE_A0113);
...@@ -259,7 +286,10 @@ public class DataStatsConstants { ...@@ -259,7 +286,10 @@ public class DataStatsConstants {
ITEM_CODE_A0108, ITEM_CODE_A0109, ITEM_CODE_A0110, ITEM_CODE_A0108, ITEM_CODE_A0109, ITEM_CODE_A0110,
ITEM_CODE_A0118, ITEM_CODE_A0119, ITEM_CODE_A0120, ITEM_CODE_A0118, ITEM_CODE_A0119, ITEM_CODE_A0120,
ITEM_CODE_A0113, ITEM_CODE_A0114, ITEM_CODE_A0115, ITEM_CODE_A0113, ITEM_CODE_A0114, ITEM_CODE_A0115,
ITEM_CODE_A0104, ITEM_CODE_A0105); ITEM_CODE_A0104, ITEM_CODE_A0105, ITEM_CODE_A0130,
ITEM_CODE_A0131, ITEM_CODE_A0132, ITEM_CODE_A0133,
ITEM_CODE_A0134, ITEM_CODE_A0135, ITEM_CODE_A0136,
ITEM_CODE_A0137);
public static boolean isRateItemCode(String itemCode){ public static boolean isRateItemCode(String itemCode){
if (StringUtils.isBlank(itemCode)) { if (StringUtils.isBlank(itemCode)) {
......
package cn.com.glsx.dj.peanalysis.config; package cn.com.glsx.dj.peanalysis.config;
import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote; import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote;
import cn.com.glsx.dj.strategy.remote.StrategyInfoRemote;
import cn.com.glsx.dj.strategy.remote.WarningEngineRemote;
import cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemote; import cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemote;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory; import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -40,4 +42,14 @@ public class DubboConfig { ...@@ -40,4 +42,14 @@ public class DubboConfig {
return factory.builder(SupervisorTaskInfoRemote.class).check(check).timeout(timeout).build(); return factory.builder(SupervisorTaskInfoRemote.class).check(check).timeout(timeout).build();
} }
@Bean
public StrategyInfoRemote strategyInfoRemote(){
return factory.builder(StrategyInfoRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
@Bean
public WarningEngineRemote warningEngineRemote(){
return factory.builder(WarningEngineRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
} }
package cn.com.glsx.dj.peanalysis.config; package cn.com.glsx.dj.peanalysis.config;
import cn.com.glsx.dj.smartcarlife.remote.MerchantOutputTargetConfigRemote; import cn.com.glsx.dj.smartcarlife.remote.MerchantOutputTargetConfigRemote;
import cn.com.glsx.dj.smartcarlife.remote.SceneRemote;
import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote; import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote;
import cn.com.glsx.dj.strategy.remote.ProjectGroupRemote;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -17,4 +19,14 @@ public class SmartCarLifeDubboConfig extends DubboConfig { ...@@ -17,4 +19,14 @@ public class SmartCarLifeDubboConfig extends DubboConfig {
public StaffInfoRemote staffInfoRemote(){ public StaffInfoRemote staffInfoRemote(){
return factory.builder(StaffInfoRemote.class).version("1.0.0").check(check).timeout(timeout).build(); return factory.builder(StaffInfoRemote.class).version("1.0.0").check(check).timeout(timeout).build();
} }
@Bean
public ProjectGroupRemote projectGroupRemote() {
return factory.builder(ProjectGroupRemote.class).version("1.0.0").check(check).timeout(timeout).build();
}
@Bean
public SceneRemote sceneRemote() {
return factory.builder(SceneRemote.class).version("1.0.0").check(check).timeout(timeout).build();
}
} }
package cn.com.glsx.dj.peanalysis.dto;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 门店交付数目标配置DTO
*
* 对应表: dj_car_life_merchant_deliver_target_config
*/
public class MerchantDeliverTargetConfigDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private Integer id;
/**
* 商户号
*/
private Integer merchantId;
/**
* 商户名称
*/
private String merchantName;
/**
* 目标交付数
*/
private BigDecimal targetValue;
/**
* 目标月份(yyyy-MM)
*/
private String targetMonth;
/**
* 品牌id
*/
private Integer brandId;
/**
* 主品牌名称
*/
private String brandName;
/**
* 子品牌id
*/
private Integer childId;
/**
* 子品牌名称
*/
private String childName;
/**
* 归属周期-开始日期(yyyy-MM-dd)
*/
private String periodStartDate;
/**
* 归属周期-结束日期(yyyy-MM-dd)
*/
private String periodEndDate;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdDate;
/**
* 修改人
*/
private String updatedBy;
/**
* 修改时间
*/
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
private String deletedFlag;
// Getters and Setters
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public BigDecimal getTargetValue() {
return targetValue;
}
public void setTargetValue(BigDecimal targetValue) {
this.targetValue = targetValue;
}
public String getTargetMonth() {
return targetMonth;
}
public void setTargetMonth(String targetMonth) {
this.targetMonth = targetMonth;
}
public Integer getBrandId() {
return brandId;
}
public void setBrandId(Integer brandId) {
this.brandId = brandId;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public Integer getChildId() {
return childId;
}
public void setChildId(Integer childId) {
this.childId = childId;
}
public String getChildName() {
return childName;
}
public void setChildName(String childName) {
this.childName = childName;
}
public String getPeriodStartDate() {
return periodStartDate;
}
public void setPeriodStartDate(String periodStartDate) {
this.periodStartDate = periodStartDate;
}
public String getPeriodEndDate() {
return periodEndDate;
}
public void setPeriodEndDate(String periodEndDate) {
this.periodEndDate = periodEndDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public Date getUpdatedDate() {
return updatedDate;
}
public void setUpdatedDate(Date updatedDate) {
this.updatedDate = updatedDate;
}
public String getDeletedFlag() {
return deletedFlag;
}
public void setDeletedFlag(String deletedFlag) {
this.deletedFlag = deletedFlag;
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.peanalysis.mapper;
import cn.com.glsx.dj.peanalysis.dto.MerchantDeliverTargetConfigDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 门店交付数目标配置Mapper
*/
@Mapper
public interface MerchantDeliverTargetConfigMapper {
/**
* 查询门店交付数目标配置
*
* @param merchantId 商户号
* @param targetMonth 目标月份(yyyy-MM)
* @return 配置列表
*/
List<MerchantDeliverTargetConfigDTO> selectByMerchantAndMonth(@Param("merchantId") Integer merchantId,
@Param("targetMonth") String targetMonth);
/**
* 查询门店最大归属周期
*
* @param merchantId 商户号
* @param targetMonth 目标月份(yyyy-MM)
* @param bizs
* @return 最大周期配置
*/
MerchantDeliverTargetConfigDTO selectMaxPeriodByMerchantAndMonth(@Param("merchantId") Integer merchantId,
@Param("targetMonth") String targetMonth,
@Param("bizs") Integer bizs);
/**
* 查询门店的所有交付目标配置(按周期结束日期降序)
*
* @param merchantId 商户号
* @return 配置列表
*/
List<MerchantDeliverTargetConfigDTO> selectByMerchantId(@Param("merchantId") Integer merchantId);
/**
* 查询门店在指定月份的目标交付数总和
*
* @param merchantId 商户号
* @param targetMonth 目标月份(yyyy-MM)
* @return 目标交付数
*/
java.math.BigDecimal selectTargetValueSumByMerchantAndMonth(@Param("merchantId") Integer merchantId,
@Param("targetMonth") String targetMonth);
}
\ No newline at end of file \ No newline at end of file
...@@ -3,9 +3,7 @@ package cn.com.glsx.dj.peanalysis.remote; ...@@ -3,9 +3,7 @@ package cn.com.glsx.dj.peanalysis.remote;
import cn.com.glsx.dj.peanalysis.dto.job.BiRecord; import cn.com.glsx.dj.peanalysis.dto.job.BiRecord;
import cn.com.glsx.dj.peanalysis.dto.req.output.SceneBaseReq; import cn.com.glsx.dj.peanalysis.dto.req.output.SceneBaseReq;
import cn.com.glsx.dj.peanalysis.dto.res.output.*; import cn.com.glsx.dj.peanalysis.dto.res.output.*;
import cn.com.glsx.dj.peanalysis.dto.strategy.GoodsCategorySummaryWithWarn;
import cn.com.glsx.dj.peanalysis.dto.strategy.StaffAnalysisDTO; import cn.com.glsx.dj.peanalysis.dto.strategy.StaffAnalysisDTO;
import cn.com.glsx.dj.peanalysis.dto.strategy.StaffSummaryDTO;
import cn.com.glsx.dj.peanalysis.service.BusinessSceneAnalysisService; import cn.com.glsx.dj.peanalysis.service.BusinessSceneAnalysisService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
...@@ -153,6 +151,19 @@ public class BusinessSceneAnalysisRemoteImpl implements BusinessSceneAnalysisRem ...@@ -153,6 +151,19 @@ public class BusinessSceneAnalysisRemoteImpl implements BusinessSceneAnalysisRem
} }
@Override @Override
public RpcResponse<StoreDetailSummaryResponse> storeDetailSummaryZj(SceneBaseReq req) {
try {
return RpcResponse.success(businessSceneAnalysisService.storeDetailSummaryZj(req));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("系统异常", e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<StoreEmployeeRankResponse> storeEmployeeRank(SceneBaseReq req) { public RpcResponse<StoreEmployeeRankResponse> storeEmployeeRank(SceneBaseReq req) {
try { try {
return RpcResponse.success(businessSceneAnalysisService.storeEmployeeRank(req)); return RpcResponse.success(businessSceneAnalysisService.storeEmployeeRank(req));
...@@ -205,6 +216,19 @@ public class BusinessSceneAnalysisRemoteImpl implements BusinessSceneAnalysisRem ...@@ -205,6 +216,19 @@ public class BusinessSceneAnalysisRemoteImpl implements BusinessSceneAnalysisRem
} }
@Override @Override
public RpcResponse<GoodsCategorySummaryResponse> goodsSummaryZj(SceneBaseReq req) {
try {
return RpcResponse.success(businessSceneAnalysisService.goodsSummaryZj(req));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("系统异常", e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<BiRecord>> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate) { public RpcResponse<List<BiRecord>> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate) {
try { try {
return RpcResponse.success(businessSceneAnalysisService.getBiRecords(businessType, merchantIds, startDate, endDate)); return RpcResponse.success(businessSceneAnalysisService.getBiRecords(businessType, merchantIds, startDate, endDate));
......
...@@ -804,6 +804,8 @@ public class BiAnalyseBackgroundService { ...@@ -804,6 +804,8 @@ public class BiAnalyseBackgroundService {
.ifPresent(r -> result.getAreaOperator().addAll(r)); .ifPresent(r -> result.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue())) Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue()))
.ifPresent(r -> result.getAreaOperator().addAll(r)); .ifPresent(r -> result.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.FLIGHT_SUPERVISION.getValue()))
.ifPresent(r -> result.getFlightSupervision().addAll(r));
// 无关联的线上运营或区域运营,则无法提交并toast:无可跟进的线上运营或区域运营,请确认后重新操作; // 无关联的线上运营或区域运营,则无法提交并toast:无可跟进的线上运营或区域运营,请确认后重新操作;
...@@ -822,6 +824,10 @@ public class BiAnalyseBackgroundService { ...@@ -822,6 +824,10 @@ public class BiAnalyseBackgroundService {
if (CollUtil.isNotEmpty(areaOperator)) { if (CollUtil.isNotEmpty(areaOperator)) {
result.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList())); result.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList()));
} }
List<MerchantBiMatterDTO.OperatorDTO> flightSupervision = result.getFlightSupervision();
if (CollUtil.isNotEmpty(flightSupervision)) {
result.setFlightSupervision(flightSupervision.stream().distinct().collect(Collectors.toList()));
}
return result; return result;
} }
...@@ -839,16 +845,18 @@ public class BiAnalyseBackgroundService { ...@@ -839,16 +845,18 @@ public class BiAnalyseBackgroundService {
return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1, return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1,
DirectorTypeEnum.AREA_SUPERVISION_2_1, DirectorTypeEnum.AREA_SUPERVISION_2_1,
DirectorTypeEnum.DF_DIRECTOR, DirectorTypeEnum.DF_DIRECTOR,
DirectorTypeEnum.AREA_SUPERVISION_1_1); DirectorTypeEnum.AREA_SUPERVISION_1_1,
DirectorTypeEnum.FLIGHT_SUPERVISION,
DirectorTypeEnum.FLIGHT_SUPERVISION_2_1);
} }
BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByCode(businessType); BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByCode(businessType);
switch (businessTypeEnum) { switch (businessTypeEnum) {
case BUSINESS_TYPE_1: case BUSINESS_TYPE_1:
case BUSINESS_TYPE_3: case BUSINESS_TYPE_3:
return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1, DirectorTypeEnum.AREA_SUPERVISION_2_1); return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1, DirectorTypeEnum.AREA_SUPERVISION_2_1, DirectorTypeEnum.FLIGHT_SUPERVISION_2_1);
case BUSINESS_TYPE_2: case BUSINESS_TYPE_2:
return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR, DirectorTypeEnum.AREA_SUPERVISION_1_1); return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR, DirectorTypeEnum.AREA_SUPERVISION_1_1, DirectorTypeEnum.FLIGHT_SUPERVISION);
default: default:
throw new RpcServiceException(BiErrorEnum.NOT_SUPPORT_BUSINESS_TYPE_ERROR); throw new RpcServiceException(BiErrorEnum.NOT_SUPPORT_BUSINESS_TYPE_ERROR);
} }
...@@ -910,6 +918,10 @@ public class BiAnalyseBackgroundService { ...@@ -910,6 +918,10 @@ public class BiAnalyseBackgroundService {
.ifPresent(r -> item.getAreaOperator().addAll(r)); .ifPresent(r -> item.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue())) Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue()))
.ifPresent(r -> item.getAreaOperator().addAll(r)); .ifPresent(r -> item.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.FLIGHT_SUPERVISION.getValue()))
.ifPresent(r -> item.getFlightSupervision().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.FLIGHT_SUPERVISION_2_1.getValue()))
.ifPresent(r -> item.getFlightSupervision().addAll(r));
// 去重 // 去重
List<MerchantBiMatterDTO.OperatorDTO> onlineOperator = item.getOnlineOperator(); List<MerchantBiMatterDTO.OperatorDTO> onlineOperator = item.getOnlineOperator();
...@@ -920,6 +932,10 @@ public class BiAnalyseBackgroundService { ...@@ -920,6 +932,10 @@ public class BiAnalyseBackgroundService {
if (CollUtil.isNotEmpty(areaOperator)) { if (CollUtil.isNotEmpty(areaOperator)) {
item.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList())); item.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList()));
} }
List<MerchantBiMatterDTO.OperatorDTO> flightSupervision = item.getFlightSupervision();
if (CollUtil.isNotEmpty(flightSupervision)) {
item.setFlightSupervision(flightSupervision.stream().distinct().collect(Collectors.toList()));
}
result.add(item); result.add(item);
}); });
......
...@@ -72,7 +72,7 @@ public class MerchantBiCommentService { ...@@ -72,7 +72,7 @@ public class MerchantBiCommentService {
if (success && CollectionUtils.isNotEmpty(request.getHandlerStaffList())) { if (success && CollectionUtils.isNotEmpty(request.getHandlerStaffList())) {
// 推送督导小程序任务 // 推送督导小程序任务
List<CreateSpecialTaskDTO> pushSupervisorTaskList = new ArrayList<>(); // List<CreateSpecialTaskDTO> pushSupervisorTaskList = new ArrayList<>();
// 2. 插入处理人关联表 (@ 提醒) // 2. 插入处理人关联表 (@ 提醒)
List<String> uuids = new ArrayList<>(); List<String> uuids = new ArrayList<>();
for (HandlerStaffInfo handler : request.getHandlerStaffList()) { for (HandlerStaffInfo handler : request.getHandlerStaffList()) {
...@@ -88,14 +88,14 @@ public class MerchantBiCommentService { ...@@ -88,14 +88,14 @@ public class MerchantBiCommentService {
uuids.add(handler.getStaffUuid()); uuids.add(handler.getStaffUuid());
CreateSpecialTaskDTO pushItem = new CreateSpecialTaskDTO(); // CreateSpecialTaskDTO pushItem = new CreateSpecialTaskDTO();
pushItem.setMerchantId(strategy.getMerchantId()); // pushItem.setMerchantId(strategy.getMerchantId());
pushItem.setMerchantName(strategy.getMerchantName()); // pushItem.setMerchantName(strategy.getMerchantName());
pushItem.setTaskDesc(request.getContent()); // pushItem.setTaskDesc(request.getContent());
pushItem.setSupervisorName(rel.getUserName()); // pushItem.setSupervisorName(rel.getUserName());
pushItem.setSupervisorPhone(rel.getUserPhone()); // pushItem.setSupervisorPhone(rel.getUserPhone());
pushItem.setCreatedBy(rel.getCreatedBy()); // pushItem.setCreatedBy(rel.getCreatedBy());
pushSupervisorTaskList.add(pushItem); // pushSupervisorTaskList.add(pushItem);
} }
// 3. 企微推送 (@ 提醒) // 3. 企微推送 (@ 提醒)
...@@ -105,15 +105,16 @@ public class MerchantBiCommentService { ...@@ -105,15 +105,16 @@ public class MerchantBiCommentService {
log.error("触发留言 @ 推送异常", e); log.error("触发留言 @ 推送异常", e);
} }
// 20260610 无须同步到督导小程序了
// 4. 推送到督导小程序 // 4. 推送到督导小程序
pushSupervisorTaskList.forEach(p -> { // pushSupervisorTaskList.forEach(p -> {
try { // try {
RpcResponse<Long> pushResp = supervisorTaskInfoRemote.createSpecialTask(p); // RpcResponse<Long> pushResp = supervisorTaskInfoRemote.createSpecialTask(p);
log.info("推送到督导小程序,结果:{}", pushResp); // log.info("推送到督导小程序,结果:{}", pushResp);
} catch (Exception e) { // } catch (Exception e) {
log.error("推送到督导小程序异常, req:{}", p, e); // log.error("推送到督导小程序异常, req:{}", p, e);
} // }
}); // });
} }
return success; return success;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.glsx.dj.peanalysis.mapper.MerchantDeliverTargetConfigMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.peanalysis.dto.MerchantDeliverTargetConfigDTO">
<id column="id" property="id" />
<result column="merchant_id" property="merchantId" />
<result column="merchant_name" property="merchantName" />
<result column="target_value" property="targetValue" />
<result column="target_month" property="targetMonth" />
<result column="brand_id" property="brandId" />
<result column="brand_name" property="brandName" />
<result column="child_id" property="childId" />
<result column="child_name" property="childName" />
<result column="period_start_date" property="periodStartDate" />
<result column="period_end_date" property="periodEndDate" />
<result column="created_by" property="createdBy" />
<result column="created_date" property="createdDate" />
<result column="updated_by" property="updatedBy" />
<result column="updated_date" property="updatedDate" />
<result column="deleted_flag" property="deletedFlag" />
</resultMap>
<select id="selectByMerchantAndMonth" resultMap="BaseResultMap">
SELECT
id,
merchant_id,
merchant_name,
target_value,
target_month,
brand_id,
brand_name,
child_id,
child_name,
period_start_date,
period_end_date,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag
FROM dj_car_life_merchant_deliver_target_config
WHERE merchant_id = #{merchantId}
AND target_month = #{targetMonth}
AND deleted_flag = 'N'
ORDER BY period_end_date DESC
</select>
<select id="selectMaxPeriodByMerchantAndMonth" resultMap="BaseResultMap">
SELECT
merchant_id,
merchant_name,
SUM(target_value) AS target_value,
target_month,
period_start_date,
period_end_date
FROM dj_car_life_merchant_deliver_target_config
WHERE merchant_id = #{merchantId}
AND target_month = #{targetMonth}
AND deleted_flag = 'N'
AND period_end_date = (
SELECT MAX(period_end_date)
FROM dj_car_life_merchant_deliver_target_config
WHERE merchant_id = #{merchantId}
AND target_month = #{targetMonth}
AND deleted_flag = 'N'
)
GROUP BY merchant_id, merchant_name, target_month, period_start_date, period_end_date
</select>
<select id="selectByMerchantId" resultMap="BaseResultMap">
SELECT
id,
merchant_id,
merchant_name,
target_value,
target_month,
brand_id,
brand_name,
child_id,
child_name,
period_start_date,
period_end_date,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag
FROM dj_car_life_merchant_deliver_target_config
WHERE merchant_id = #{merchantId}
AND deleted_flag = 'N'
ORDER BY period_end_date DESC
</select>
<select id="selectTargetValueSumByMerchantAndMonth" resultType="java.math.BigDecimal">
SELECT COALESCE(SUM(target_value), 0)
FROM dj_car_life_merchant_deliver_target_config
WHERE merchant_id = #{merchantId}
AND target_month = #{targetMonth}
AND deleted_flag = 'N'
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
...@@ -14,6 +14,7 @@ import com.google.common.collect.Lists; ...@@ -14,6 +14,7 @@ import com.google.common.collect.Lists;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -222,14 +223,17 @@ public class BusinessSceneAnalysisServiceTest extends BaseRemoteTest { ...@@ -222,14 +223,17 @@ public class BusinessSceneAnalysisServiceTest extends BaseRemoteTest {
@Test @Test
public void testStoreAnalysis() { public void testStoreAnalysis() {
SceneBaseReq req = new SceneBaseReq(); SceneBaseReq req = new SceneBaseReq();
req.setBizs(2); req.setBizs(1);
req.setCycleType(3); req.setCycleType(3);
req.setStartTime("2025-12-01"); req.setStartTime("2026-03-01");
req.setEndTime("2025-12-31"); req.setEndTime("2026-03-31");
req.setExcludeIds(Lists.newArrayList(44217664)); // req.setExcludeIds(Lists.newArrayList(44217664));
//req.setMerchantIds(Lists.newArrayList(44217664)); //req.setMerchantIds(Lists.newArrayList(44217664));
StoreSceneSummaryResponse res = service.storeAnalysis(req); StoreSceneSummaryResponse res = service.storeAnalysis(req);
System.out.println(JSON.toJSONString(res)); System.out.println(JSON.toJSONString(res));
req.setProjectGroupId(1);
System.out.println(service.storeAnalysis(req));
} }
@Test @Test
...@@ -271,13 +275,15 @@ public class BusinessSceneAnalysisServiceTest extends BaseRemoteTest { ...@@ -271,13 +275,15 @@ public class BusinessSceneAnalysisServiceTest extends BaseRemoteTest {
@Test @Test
public void findLostStore() { public void findLostStore() {
SceneBaseReq req = new SceneBaseReq(); SceneBaseReq req = new SceneBaseReq();
req.setBizs(3);
req.setSceneType((byte)0); req.setSceneType((byte)0);
req.setStartTime("2026-01-27"); req.setBizs(1);
req.setEndTime("2026-01-29");
req.setCycleType(3); req.setCycleType(3);
req.setStartTime("2026-03-01");
req.setEndTime("2026-03-31");
List<LostStoreDetailResponse> lostStore = service.findLostStore(req); List<LostStoreDetailResponse> lostStore = service.findLostStore(req);
System.out.println(JSON.toJSONString(lostStore)); System.out.println(JSON.toJSONString(lostStore));
req.setProjectGroupId(1);
System.out.println(service.findLostStore(req));
} }
@Test @Test
...@@ -344,4 +350,21 @@ public class BusinessSceneAnalysisServiceTest extends BaseRemoteTest { ...@@ -344,4 +350,21 @@ public class BusinessSceneAnalysisServiceTest extends BaseRemoteTest {
req.setMerchantIds(Lists.newArrayList(44217700)); req.setMerchantIds(Lists.newArrayList(44217700));
System.out.println(service.queryTargetAvgCustomerPrice(req)); System.out.println(service.queryTargetAvgCustomerPrice(req));
} }
@Test
public void testHandlerStaffStationType() {
List<StaffAnalysisDTO> staffList = new ArrayList<>();
StaffAnalysisDTO staff = new StaffAnalysisDTO();
staff.setStaffId("304c01b8abf14db581606ce42e35ede5");
staffList.add(staff);
StaffAnalysisDTO staff1 = new StaffAnalysisDTO();
staffList.add(staff1);
staff1.setStaffId("d4ea07f2bebc4647aab630d9c6acae36");
SceneBaseReq req = new SceneBaseReq();
req.setBizs(1);
req.setMerchantIds(Lists.newArrayList(44209339));
req.setStartTime("2026-01-15");
req.setEndTime("2026-01-25");
service.handlerStaffStationType(staffList, req, Lists.newArrayList("304c01b8abf14db581606ce42e35ede5", "d4ea07f2bebc4647aab630d9c6acae36"), Lists.newArrayList("100101"));
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!