Commit 0e170ad5 by 林永健

feat(peanalysis): 增加业务智能记录查询接口及扩展请求参数

- BusinessSceneAnalysisRemoteImpl新增getBiRecords方法,支持查询业务智能记录列表
- BusinessSceneAnalysisService新增getBiRecords方法,调用mapper查询对应记录
- SceneBaseReq请求参数新增多项业务场景相关字段,丰富查询条件支持
- 修改多个响应DTO字段注解,统一@ApiModelProperty备注格式为notes
- SceneOutputResponse新增产值环比字段outputValueMon用于趋势分析展示
- 统一调整多个响应DTO中字段的@ApiModelProperty注释,提升接口文档一致性和完整性
1 parent a7236d83
Showing 18 changed files with 263 additions and 203 deletions
......@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@Data
@Slf4j
......@@ -14,24 +15,57 @@ public class SceneBaseReq implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty(notes = "排序:1-产值(默认),2-客单价,3-转化率")
private Integer sortType;
@ApiModelProperty(notes = "业务场景(0.会员权益,1.精品升级),必须,默认会员权益")
private Byte sceneType;
@ApiModelProperty(notes = "排序:1-降序(默认),2-升序")
@ApiModelProperty(notes = "业务类型(1.延保 2.轻改 3.权益)")
private Integer bizs;
@ApiModelProperty(notes = "周期类型(1.按天,2.按周,3.按月,4.自定义,5.按年),必须", required = true)
private Integer cycleType;
@ApiModelProperty(notes = "开始时间", required = true)
private String startTime;
@ApiModelProperty(notes = "结束时间")
private String endTime;
@ApiModelProperty(notes = "车品牌ID")
private Integer carBrandId;
@ApiModelProperty(notes = "省份编码")
private String provinceId;
@ApiModelProperty(notes = "门店类型 1新店 2老店")
private Byte storeType;
@ApiModelProperty(notes = "经营品类 1单品类 2多品类")
private Byte businessCategory;
@ApiModelProperty(notes = "业务性质(1:直营4S店,2:合资收公司,3:服务商")
private Byte businessType;
@ApiModelProperty(notes = "排序")
private Integer orderBy;
@ApiModelProperty(notes = "排序方式 1.Desc 2.asc")
private Integer orderType;
@ApiModelProperty(notes = "门店号列表")
private List<Integer> merchantIds;
@ApiModelProperty(notes = "员工Id列表")
@ApiModelProperty(notes = "门店号聚合")
private Map<String, List<Integer>> merchantMap;
@ApiModelProperty(notes = "员工编号列表")
private List<String> staffUuids;
@ApiModelProperty(notes = "模糊搜索")
private String search;
@ApiModelProperty(notes = "指标查询参数")
private DataBizQueryParamsDTO queryParams;
@ApiModelProperty(notes = "周期类型(1.按天,2.按周,3.按月,4.自定义,5.按年),必须", required = true)
private Integer cycleType;
private String preStartDate;
private String preEndDate;
......
......@@ -13,13 +13,13 @@ public class ContactRateAnalysisResponse implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("省份编码")
@ApiModelProperty(notes = "省份编码")
private String provinceId;
@ApiModelProperty("省份名称")
@ApiModelProperty(notes = "省份名称")
private String provinceName;
@ApiModelProperty("触客率")
@ApiModelProperty(notes = "触客率")
private BigDecimal contactRate;
}
\ No newline at end of file
......@@ -15,73 +15,73 @@ public class EmployeeDetailSummaryResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("总产值")
@ApiModelProperty(notes = "总产值")
private BigDecimal totalOutputValue;
@ApiModelProperty("总产值环比")
@ApiModelProperty(notes = "总产值环比")
private BigDecimal totalOutputValueMom;
@ApiModelProperty("客单价")
@ApiModelProperty(notes = "客单价")
private BigDecimal avgCustomerPrice;
@ApiModelProperty("客单价环比")
@ApiModelProperty(notes = "客单价环比")
private BigDecimal avgCustomerPriceMom;
@ApiModelProperty("日报完成率")
@ApiModelProperty(notes = "日报完成率")
private BigDecimal dailyReportCompletionRate;
@ApiModelProperty("售前触客数")
@ApiModelProperty(notes = "售前触客数")
private BigDecimal preSalesContactCount;
@ApiModelProperty("售前触客数环比")
@ApiModelProperty(notes = "售前触客数环比")
private BigDecimal preSalesContactCountMom;
@ApiModelProperty("售后触客数")
@ApiModelProperty(notes = "售后触客数")
private BigDecimal afterSalesContactCount;
@ApiModelProperty("售后触客数环比")
@ApiModelProperty(notes = "售后触客数环比")
private BigDecimal afterSalesContactCountMom;
@ApiModelProperty("总触客数")
@ApiModelProperty(notes = "总触客数")
private BigDecimal totalContactCount;
@ApiModelProperty("总触客数环比")
@ApiModelProperty(notes = "总触客数环比")
private BigDecimal totalContactCountMom;
@ApiModelProperty("售前成交数")
@ApiModelProperty(notes = "售前成交数")
private BigDecimal preSalesDealCount;
@ApiModelProperty("售前成交数环比")
@ApiModelProperty(notes = "售前成交数环比")
private BigDecimal preSalesDealCountMom;
@ApiModelProperty("售后成交数")
@ApiModelProperty(notes = "售后成交数")
private BigDecimal afterSalesDealCount;
@ApiModelProperty("售后成交数环比")
@ApiModelProperty(notes = "售后成交数环比")
private BigDecimal afterSalesDealCountMom;
@ApiModelProperty("总成交数")
@ApiModelProperty(notes = "总成交数")
private BigDecimal totalDealCount;
@ApiModelProperty("总成交数环比")
@ApiModelProperty(notes = "总成交数环比")
private BigDecimal totalDealCountMom;
@ApiModelProperty("售前转化率")
@ApiModelProperty(notes = "售前转化率")
private BigDecimal preSalesConversionRate;
@ApiModelProperty("售前转化率环比")
@ApiModelProperty(notes = "售前转化率环比")
private BigDecimal preSalesConversionRateMom;
@ApiModelProperty("售后转化率")
@ApiModelProperty(notes = "售后转化率")
private BigDecimal afterSalesConversionRate;
@ApiModelProperty("售后转化率环比")
@ApiModelProperty(notes = "售后转化率环比")
private BigDecimal afterSalesConversionRateMom;
@ApiModelProperty("转化率")
@ApiModelProperty(notes = "转化率")
private BigDecimal conversionRate;
@ApiModelProperty("转化率环比")
@ApiModelProperty(notes = "转化率环比")
private BigDecimal conversionRateMom;
}
......@@ -14,142 +14,142 @@ public class GoodsCategorySummaryResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("新车交付数")
@ApiModelProperty(notes = "新车交付数")
private BigDecimal newCarDeliveryCount;
@ApiModelProperty("整车延保-成交数")
@ApiModelProperty(notes = "整车延保-成交数")
private BigDecimal vehicleWarrantyDealCount;
@ApiModelProperty("整车延保-渗透率")
@ApiModelProperty(notes = "整车延保-渗透率")
private BigDecimal vehicleWarrantyPenetrationRate;
@ApiModelProperty("整车延保-渗透率兜底目标")
@ApiModelProperty(notes = "整车延保-渗透率兜底目标")
private BigDecimal vehicleWarrantyPenetrationBottomTarget;
@ApiModelProperty("整车延保-转化率")
@ApiModelProperty(notes = "整车延保-转化率")
private BigDecimal vehicleWarrantyConversionRate;
@ApiModelProperty("整车延保-转化率兜底目标")
@ApiModelProperty(notes = "整车延保-转化率兜底目标")
private BigDecimal vehicleWarrantyConversionBottomTarget;
@ApiModelProperty("整车延保-生态系数")
@ApiModelProperty(notes = "整车延保-生态系数")
private BigDecimal vehicleWarrantyEcoCoefficient;
@ApiModelProperty("安心包-成交数")
@ApiModelProperty(notes = "安心包-成交数")
private BigDecimal safetyPackageDealCount;
@ApiModelProperty("安心包-渗透率")
@ApiModelProperty(notes = "安心包-渗透率")
private BigDecimal safetyPackagePenetrationRate;
@ApiModelProperty("安心包-渗透率兜底目标")
@ApiModelProperty(notes = "安心包-渗透率兜底目标")
private BigDecimal safetyPackagePenetrationBottomTarget;
@ApiModelProperty("安心包-转化率")
@ApiModelProperty(notes = "安心包-转化率")
private BigDecimal safetyPackageConversionRate;
@ApiModelProperty("安心包-转化率兜底目标")
@ApiModelProperty(notes = "安心包-转化率兜底目标")
private BigDecimal safetyPackageConversionBottomTarget;
@ApiModelProperty("安心包-生态系数")
@ApiModelProperty(notes = "安心包-生态系数")
private BigDecimal safetyPackageEcoCoefficient;
@ApiModelProperty("电池延保-成交数")
@ApiModelProperty(notes = "电池延保-成交数")
private BigDecimal batteryWarrantyDealCount;
@ApiModelProperty("电池延保-渗透率")
@ApiModelProperty(notes = "电池延保-渗透率")
private BigDecimal batteryWarrantyPenetrationRate;
@ApiModelProperty("电池延保-渗透率兜底目标")
@ApiModelProperty(notes = "电池延保-渗透率兜底目标")
private BigDecimal batteryWarrantyPenetrationBottomTarget;
@ApiModelProperty("电池延保-转化率")
@ApiModelProperty(notes = "电池延保-转化率")
private BigDecimal batteryWarrantyConversionRate;
@ApiModelProperty("电池延保-转化率兜底目标")
@ApiModelProperty(notes = "电池延保-转化率兜底目标")
private BigDecimal batteryWarrantyConversionBottomTarget;
@ApiModelProperty("电池延保-生态系数")
@ApiModelProperty(notes = "电池延保-生态系数")
private BigDecimal batteryWarrantyEcoCoefficient;
@ApiModelProperty("轮胎延保-成交数")
@ApiModelProperty(notes = "轮胎延保-成交数")
private BigDecimal tireWarrantyDealCount;
@ApiModelProperty("轮胎延保-渗透率")
@ApiModelProperty(notes = "轮胎延保-渗透率")
private BigDecimal tireWarrantyPenetrationRate;
@ApiModelProperty("轮胎延保-渗透率兜底目标")
@ApiModelProperty(notes = "轮胎延保-渗透率兜底目标")
private BigDecimal tireWarrantyPenetrationBottomTarget;
@ApiModelProperty("轮胎延保-转化率")
@ApiModelProperty(notes = "轮胎延保-转化率")
private BigDecimal tireWarrantyConversionRate;
@ApiModelProperty("轮胎延保-转化率兜底目标")
@ApiModelProperty(notes = "轮胎延保-转化率兜底目标")
private BigDecimal tireWarrantyConversionBottomTarget;
@ApiModelProperty("轮胎延保-生态系数")
@ApiModelProperty(notes = "轮胎延保-生态系数")
private BigDecimal tireWarrantyEcoCoefficient;
@ApiModelProperty("车窗膜-成交数")
@ApiModelProperty(notes = "车窗膜-成交数")
private BigDecimal windowFilmDealCount;
@ApiModelProperty("车窗膜-单车采购产值")
@ApiModelProperty(notes = "车窗膜-单车采购产值")
private BigDecimal windowFilmPerCarOutput;
@ApiModelProperty("车窗膜-渗透率")
@ApiModelProperty(notes = "车窗膜-渗透率")
private BigDecimal windowFilmPenetrationRate;
@ApiModelProperty("车窗膜-渗透率兜底目标")
@ApiModelProperty(notes = "车窗膜-渗透率兜底目标")
private BigDecimal windowFilmPenetrationBottomTarget;
@ApiModelProperty("车窗膜-转化率")
@ApiModelProperty(notes = "车窗膜-转化率")
private BigDecimal windowFilmConversionRate;
@ApiModelProperty("车窗膜-转化率兜底目标")
@ApiModelProperty(notes = "车窗膜-转化率兜底目标")
private BigDecimal windowFilmConversionBottomTarget;
@ApiModelProperty("车窗膜-生态系数")
@ApiModelProperty(notes = "车窗膜-生态系数")
private BigDecimal windowFilmEcoCoefficient;
@ApiModelProperty("车身膜-成交数")
@ApiModelProperty(notes = "车身膜-成交数")
private BigDecimal carBodyFilmDealCount;
@ApiModelProperty("车身膜-单车采购产值")
@ApiModelProperty(notes = "车身膜-单车采购产值")
private BigDecimal carBodyFilmPerCarOutput;
@ApiModelProperty("车身膜-渗透率")
@ApiModelProperty(notes = "车身膜-渗透率")
private BigDecimal carBodyFilmPenetrationRate;
@ApiModelProperty("车身膜-渗透率兜底目标")
@ApiModelProperty(notes = "车身膜-渗透率兜底目标")
private BigDecimal carBodyFilmPenetrationBottomTarget;
@ApiModelProperty("车身膜-转化率")
@ApiModelProperty(notes = "车身膜-转化率")
private BigDecimal carBodyFilmConversionRate;
@ApiModelProperty("车身膜-转化率兜底目标")
@ApiModelProperty(notes = "车身膜-转化率兜底目标")
private BigDecimal carBodyFilmConversionBottomTarget;
@ApiModelProperty("车身膜-生态系数")
@ApiModelProperty(notes = "车身膜-生态系数")
private BigDecimal carBodyFilmEcoCoefficient;
@ApiModelProperty("精品附件-成交数")
@ApiModelProperty(notes = "精品附件-成交数")
private BigDecimal accessoriesDealCount;
@ApiModelProperty("精品附件-单车采购产值")
@ApiModelProperty(notes = "精品附件-单车采购产值")
private BigDecimal accessoriesPerCarOutput;
@ApiModelProperty("精品附件-渗透率")
@ApiModelProperty(notes = "精品附件-渗透率")
private BigDecimal accessoriesPenetrationRate;
@ApiModelProperty("精品附件-渗透率兜底目标")
@ApiModelProperty(notes = "精品附件-渗透率兜底目标")
private BigDecimal accessoriesPenetrationBottomTarget;
@ApiModelProperty("精品附件-转化率")
@ApiModelProperty(notes = "精品附件-转化率")
private BigDecimal accessoriesConversionRate;
@ApiModelProperty("精品附件-转化率兜底目标")
@ApiModelProperty(notes = "精品附件-转化率兜底目标")
private BigDecimal accessoriesConversionBottomTarget;
@ApiModelProperty("精品附件-生态系数")
@ApiModelProperty(notes = "精品附件-生态系数")
private BigDecimal accessoriesEcoCoefficient;
}
......@@ -12,16 +12,16 @@ import java.math.BigDecimal;
public class NewStoreAnalysisResponse implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("潜客数")
@ApiModelProperty(notes = "潜客数")
private Integer potentialCustomerCount;
@ApiModelProperty("签约数")
@ApiModelProperty(notes = "签约数")
private Integer signedCustomerCount;
@ApiModelProperty("展业数")
@ApiModelProperty(notes = "展业数")
private Integer newStoreCount;
@ApiModelProperty("展业目标达成率(仅月周期展示)")
@ApiModelProperty(notes = "展业目标达成率(仅月周期展示)")
private BigDecimal targetAchievementRate;
}
\ No newline at end of file
......@@ -13,12 +13,12 @@ public class RegionalDistributionResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("省份编码")
@ApiModelProperty(notes = "省份编码")
private String provinceId;
@ApiModelProperty("开单门店数")
@ApiModelProperty(notes = "开单门店数")
private Integer storeCount;
@ApiModelProperty("新车交付数总和")
@ApiModelProperty(notes = "新车交付数总和")
private Integer deliveryCount;
}
......@@ -13,13 +13,16 @@ import java.math.BigDecimal;
public class SceneOutputResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("目标产值")
@ApiModelProperty(notes = "目标产值")
private BigDecimal targetOutputValue;
@ApiModelProperty("产值")
@ApiModelProperty(notes = "产值")
private BigDecimal outputValue;
@ApiModelProperty("达成率")
@ApiModelProperty(notes = "产值环比")
private BigDecimal outputValueMon;
@ApiModelProperty(notes = "达成率")
private BigDecimal ratio;
}
......@@ -14,39 +14,39 @@ public class StoreAvgResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("店均产值")
@ApiModelProperty(notes = "店均产值")
private BigDecimal avgStoreOutput;
@ApiModelProperty("店均产值环比")
@ApiModelProperty(notes = "店均产值环比")
private BigDecimal avgStoreOutputMom;
@ApiModelProperty("平均触客率")
@ApiModelProperty(notes = "平均触客率")
private BigDecimal avgCustomerContactRate;
@ApiModelProperty("平均触客率环比")
@ApiModelProperty(notes = "平均触客率环比")
private BigDecimal avgCustomerContactRateMom;
@ApiModelProperty("平均渗透率")
@ApiModelProperty(notes = "平均渗透率")
private BigDecimal avgPenetrationRate;
@ApiModelProperty("平均渗透率环比")
@ApiModelProperty(notes = "平均渗透率环比")
private BigDecimal avgPenetrationRateMom;
@ApiModelProperty("平均转化率")
@ApiModelProperty(notes = "平均转化率")
private BigDecimal avgConversionRate;
@ApiModelProperty("平均转化率环比")
@ApiModelProperty(notes = "平均转化率环比")
private BigDecimal avgConversionRateMom;
@ApiModelProperty("平均客单价")
@ApiModelProperty(notes = "平均客单价")
private BigDecimal avgCustomerPrice;
@ApiModelProperty("平均客单价环比")
@ApiModelProperty(notes = "平均客单价环比")
private BigDecimal avgCustomerPriceMom;
@ApiModelProperty("升级客单价")
@ApiModelProperty(notes = "升级客单价")
private BigDecimal upgradeCustomerPrice;
@ApiModelProperty("升级客单价环比")
@ApiModelProperty(notes = "升级客单价环比")
private BigDecimal upgradeCustomerPriceMom;
}
......@@ -17,112 +17,112 @@ public class StoreDetailSummaryResponse implements Serializable {
private String merchantId;
@ApiModelProperty("所属服务商")
@ApiModelProperty(notes = "所属服务商")
private String shopMerchantName;
@ApiModelProperty("所属服务商ID")
@ApiModelProperty(notes = "所属服务商ID")
private String shopMerchantId;
@ApiModelProperty("销售")
@ApiModelProperty(notes = "销售")
private String sellerUserName;
@ApiModelProperty("销售ID")
@ApiModelProperty(notes = "销售ID")
private String sellerUserId;
@ApiModelProperty("区域运营")
@ApiModelProperty(notes = "区域运营")
private String regionalOperationName;
@ApiModelProperty("区域运营ID")
@ApiModelProperty(notes = "区域运营ID")
private String regionalOperationId;
@ApiModelProperty("线上运营")
@ApiModelProperty(notes = "线上运营")
private String onlineOperationName;
@ApiModelProperty("线上运营ID")
@ApiModelProperty(notes = "线上运营ID")
private String onlineOperationId;
@ApiModelProperty("总产值")
@ApiModelProperty(notes = "总产值")
private BigDecimal totalOutputValue;
@ApiModelProperty("总产值环比")
@ApiModelProperty(notes = "总产值环比")
private BigDecimal totalOutputValueMom;
@ApiModelProperty("目标产值(仅月周期展示)")
@ApiModelProperty(notes = "目标产值(仅月周期展示)")
private BigDecimal targetOutputValue;
@ApiModelProperty("达成率(仅月周期展示)")
@ApiModelProperty(notes = "达成率(仅月周期展示)")
private BigDecimal achievementRate;
@ApiModelProperty("新车交付数")
@ApiModelProperty(notes = "新车交付数")
private BigDecimal newCarDeliveryCount;
@ApiModelProperty("新车交付数环比")
@ApiModelProperty(notes = "新车交付数环比")
private BigDecimal newCarDeliveryCountMom;
@ApiModelProperty("售前触客数")
@ApiModelProperty(notes = "售前触客数")
private BigDecimal preSalesContactCount;
@ApiModelProperty("售前触客数环比")
@ApiModelProperty(notes = "售前触客数环比")
private BigDecimal preSalesContactCountMom;
@ApiModelProperty("售后触客数")
@ApiModelProperty(notes = "售后触客数")
private BigDecimal afterSalesContactCount;
@ApiModelProperty("售后触客数环比")
@ApiModelProperty(notes = "售后触客数环比")
private BigDecimal afterSalesContactCountMom;
@ApiModelProperty("总触客数")
@ApiModelProperty(notes = "总触客数")
private BigDecimal totalContactCount;
@ApiModelProperty("总触客数环比")
@ApiModelProperty(notes = "总触客数环比")
private BigDecimal totalContactCountMom;
@ApiModelProperty("触客率")
@ApiModelProperty(notes = "触客率")
private BigDecimal contactRate;
@ApiModelProperty("触客率环比")
@ApiModelProperty(notes = "触客率环比")
private BigDecimal contactRateMom;
@ApiModelProperty("售前成交数")
@ApiModelProperty(notes = "售前成交数")
private BigDecimal preSalesDealCount;
@ApiModelProperty("售前成交数环比")
@ApiModelProperty(notes = "售前成交数环比")
private BigDecimal preSalesDealCountMom;
@ApiModelProperty("售后成交数")
@ApiModelProperty(notes = "售后成交数")
private BigDecimal afterSalesDealCount;
@ApiModelProperty("售后成交数环比")
@ApiModelProperty(notes = "售后成交数环比")
private BigDecimal afterSalesDealCountMom;
@ApiModelProperty("总成交数")
@ApiModelProperty(notes = "总成交数")
private BigDecimal totalDealCount;
@ApiModelProperty("总成交数环比")
@ApiModelProperty(notes = "总成交数环比")
private BigDecimal totalDealCountMom;
@ApiModelProperty("售前转化率")
@ApiModelProperty(notes = "售前转化率")
private BigDecimal preSalesConversionRate;
@ApiModelProperty("售前转化率环比")
@ApiModelProperty(notes = "售前转化率环比")
private BigDecimal preSalesConversionRateMom;
@ApiModelProperty("售后转化率")
@ApiModelProperty(notes = "售后转化率")
private BigDecimal afterSalesConversionRate;
@ApiModelProperty("售后转化率环比")
@ApiModelProperty(notes = "售后转化率环比")
private BigDecimal afterSalesConversionRateMom;
@ApiModelProperty("转化率")
@ApiModelProperty(notes = "转化率")
private BigDecimal conversionRate;
@ApiModelProperty("转化率环比")
@ApiModelProperty(notes = "转化率环比")
private BigDecimal conversionRateMom;
@ApiModelProperty("渗透率")
@ApiModelProperty(notes = "渗透率")
private BigDecimal penetrationRate;
@ApiModelProperty("渗透率环比")
@ApiModelProperty(notes = "渗透率环比")
private BigDecimal penetrationRateMom;
}
......@@ -20,10 +20,10 @@ public class StoreEmployeeRankResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("员工列表")
@ApiModelProperty(notes = "员工列表")
private List<EmployeeAnalysisItem> employeeList;
@ApiModelProperty("门店汇总数据")
@ApiModelProperty(notes = "门店汇总数据")
private StoreSummaryData storeSummary;
@ApiModel("员工分析项")
......@@ -33,31 +33,31 @@ public class StoreEmployeeRankResponse implements Serializable {
@AllArgsConstructor
@Accessors(chain = true)
public static class EmployeeAnalysisItem {
@ApiModelProperty("员工ID")
@ApiModelProperty(notes = "员工ID")
private String employeeId;
@ApiModelProperty("员工姓名")
@ApiModelProperty(notes = "员工姓名")
private String employeeName;
@ApiModelProperty("员工手机号")
@ApiModelProperty(notes = "员工手机号")
private String employeePhone;
@ApiModelProperty("个人产值")
@ApiModelProperty(notes = "个人产值")
private BigDecimal personalOutputValue;
@ApiModelProperty("个人客单价")
@ApiModelProperty(notes = "个人客单价")
private BigDecimal personalCustomerPrice;
@ApiModelProperty("个人转化率")
@ApiModelProperty(notes = "个人转化率")
private BigDecimal personalConversionRate;
// @ApiModelProperty("个人成交客户数")
// @ApiModelProperty(notes = "个人成交客户数")
// private Integer personalDealCustomerCount;
//
// @ApiModelProperty("个人总触客数")
// @ApiModelProperty(notes = "个人总触客数")
// private Integer personalTotalContactCount;
@ApiModelProperty("排名")
@ApiModelProperty(notes = "排名")
private Integer rank;
public EmployeeAnalysisItem(DataBusinessDTO data) {
......@@ -69,22 +69,22 @@ public class StoreEmployeeRankResponse implements Serializable {
@Data
public static class StoreSummaryData {
@ApiModelProperty("门店总产值")
@ApiModelProperty(notes = "门店总产值")
private BigDecimal totalOutputValue;
// @ApiModelProperty("门店总成交客户数")
// @ApiModelProperty(notes = "门店总成交客户数")
// private Integer totalDealCustomerCount;
//
// @ApiModelProperty("有效驻店人员数量")
// @ApiModelProperty(notes = "有效驻店人员数量")
// private Integer effectiveStaffCount;
@ApiModelProperty("平均产值")
@ApiModelProperty(notes = "平均产值")
private BigDecimal averageOutputValue;
@ApiModelProperty("平均客单价")
@ApiModelProperty(notes = "平均客单价")
private BigDecimal averageCustomerPrice;
@ApiModelProperty("平均转化率")
@ApiModelProperty(notes = "平均转化率")
private BigDecimal averageConversionRate;
}
}
......@@ -18,34 +18,34 @@ public class StoreListResponse implements Serializable {
private static final long serialVersionUID = -1L;
@ApiModelProperty("门店名称")
@ApiModelProperty(notes = "门店名称")
private String storeName;
@ApiModelProperty("门店id")
@ApiModelProperty(notes = "门店id")
private Integer storeId;
@ApiModelProperty("产值")
@ApiModelProperty(notes = "产值")
private BigDecimal outputValue;
@ApiModelProperty("达成率")
@ApiModelProperty(notes = "达成率")
private BigDecimal achievementRate;
@ApiModelProperty("触客率")
@ApiModelProperty(notes = "触客率")
private BigDecimal customerContactRate;
@ApiModelProperty("渗透率")
@ApiModelProperty(notes = "渗透率")
private BigDecimal penetrationRate;
@ApiModelProperty("转化率")
@ApiModelProperty(notes = "转化率")
private BigDecimal conversionRate;
@ApiModelProperty("升客价")
@ApiModelProperty(notes = "升客价")
private BigDecimal upgradeCustomerPrice;
@ApiModelProperty("客单价")
@ApiModelProperty(notes = "客单价")
private BigDecimal avgCustomerPrice;
@ApiModelProperty("门店状态 1:正常 2:兜底预警 3:生态指标预警 4:达成率不及预期")
@ApiModelProperty(notes = "门店状态 1:正常 2:兜底预警 3:生态指标预警 4:达成率不及预期")
private List<String> storeStatus;
public StoreListResponse(Integer storeId) {
......
......@@ -15,78 +15,78 @@ public class StoreSceneSummaryResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("总开单门店数")
@ApiModelProperty(notes = "总开单门店数")
private Integer totalStores;
@ApiModelProperty("总开单门店环比")
@ApiModelProperty(notes = "总开单门店环比")
private BigDecimal totalStoresMom;
@ApiModelProperty("新店数量")
@ApiModelProperty(notes = "新店数量")
private Integer newStores;
@ApiModelProperty("新店占比")
@ApiModelProperty(notes = "新店占比")
private BigDecimal newStoresRatio;
@ApiModelProperty("新店商户号")
@ApiModelProperty(notes = "新店商户号")
private List<Integer> newStoreIds;
@ApiModelProperty("新店环比")
@ApiModelProperty(notes = "新店环比")
private BigDecimal newStoresMom;
@ApiModelProperty("老店数量")
@ApiModelProperty(notes = "老店数量")
private Integer oldStores;
@ApiModelProperty("老店占比")
@ApiModelProperty(notes = "老店占比")
private BigDecimal oldStoresRatio;
@ApiModelProperty("老店环比")
@ApiModelProperty(notes = "老店环比")
private BigDecimal oldStoresMom;
@ApiModelProperty("老店商户号")
@ApiModelProperty(notes = "老店商户号")
private List<Integer> oldStoreIds;
@ApiModelProperty("多品类门店数量")
@ApiModelProperty(notes = "多品类门店数量")
private Integer multiCategoryStores;
@ApiModelProperty("多品类门店环比")
@ApiModelProperty(notes = "多品类门店环比")
private BigDecimal multiCategoryStoresMom;
@ApiModelProperty("多品类门店占比")
@ApiModelProperty(notes = "多品类门店占比")
private BigDecimal multiCategoryStoresRatio;
@ApiModelProperty("多品类门店商户号")
@ApiModelProperty(notes = "多品类门店商户号")
private List<Integer> multiCategoryStoreIds;
@ApiModelProperty("单品类门店数量")
@ApiModelProperty(notes = "单品类门店数量")
private Integer singleCategoryStores;
@ApiModelProperty("单品类门店环比")
@ApiModelProperty(notes = "单品类门店环比")
private BigDecimal singleCategoryStoresMom;
@ApiModelProperty("单品类门店占比")
@ApiModelProperty(notes = "单品类门店占比")
private BigDecimal singleCategoryStoresRatio;
@ApiModelProperty("多品类门店商户号")
@ApiModelProperty(notes = "多品类门店商户号")
private List<Integer> singleCategoryStoreIds;
@ApiModelProperty("流失门店")
@ApiModelProperty(notes = "流失门店")
private Integer churnedStores;
@ApiModelProperty("流失率")
@ApiModelProperty(notes = "流失率")
private BigDecimal churnRate;
@ApiModelProperty("流失门店商户号")
@ApiModelProperty(notes = "流失门店商户号")
private List<Integer> churnedStoreIds;
@ApiModelProperty("兜底预警门店数量")
@ApiModelProperty(notes = "兜底预警门店数量")
private Integer bottomLineWarningStores;
@ApiModelProperty("兜底预警门店商户号")
@ApiModelProperty(notes = "兜底预警门店商户号")
private List<Integer> bottomLineWarningStoreIds;
@ApiModelProperty("生态指标预警门店数量")
@ApiModelProperty(notes = "生态指标预警门店数量")
private Integer ecosystemWarningStores;
@ApiModelProperty("生态指标预警门店商户号")
@ApiModelProperty(notes = "生态指标预警门店商户号")
private List<Integer> ecosystemWarningStoreIds;
}
......@@ -11,28 +11,28 @@ import java.io.Serializable;
public class TrafficContributionRankResponse implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("排名")
@ApiModelProperty(notes = "排名")
private Integer rank;
@ApiModelProperty("员工ID")
@ApiModelProperty(notes = "员工ID")
private String employeeId;
@ApiModelProperty("员工姓名")
@ApiModelProperty(notes = "员工姓名")
private String employeeName;
@ApiModelProperty("员工手机号")
@ApiModelProperty(notes = "员工手机号")
private String employeePhone;
@ApiModelProperty("所属门店名称")
@ApiModelProperty(notes = "所属门店名称")
private String storeName;
@ApiModelProperty("流量贡献总数")
@ApiModelProperty(notes = "流量贡献总数")
private Integer totalTrafficContribution;
@ApiModelProperty("战败订单数")
@ApiModelProperty(notes = "战败订单数")
private Integer defeatedOrderCount;
@ApiModelProperty("升级订单数")
@ApiModelProperty(notes = "升级订单数")
private Integer upgradedOrderCount;
}
\ No newline at end of file
......@@ -14,12 +14,12 @@ public class TrafficSummaryResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("月流量范围")
@ApiModelProperty(notes = "月流量范围")
private String label;
@ApiModelProperty("流量数值")
@ApiModelProperty(notes = "流量数值")
private BigDecimal value;
@ApiModelProperty("占比")
@ApiModelProperty(notes = "占比")
private BigDecimal ratio;
}
......@@ -13,12 +13,12 @@ import java.math.BigDecimal;
public class TrendOutputResponse implements Serializable {
private static final long serialVersionUID = -1;
@ApiModelProperty("时间")
@ApiModelProperty(notes = "时间")
private String time;
@ApiModelProperty("产值")
@ApiModelProperty(notes = "产值")
private BigDecimal output;
@ApiModelProperty("达成率")
@ApiModelProperty(notes = "达成率")
private BigDecimal ratio;
}
package cn.com.glsx.dj.peanalysis.remote;
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.res.output.*;
import cn.com.glsx.framework.core.annotation.ApiMethod;
......@@ -56,4 +57,7 @@ public interface BusinessSceneAnalysisRemote {
@ApiMethod("商品品类分析")
RpcResponse<GoodsCategorySummaryResponse> goodsSummary(SceneBaseReq req);
@ApiMethod("查询BI统计信息中的门店")
RpcResponse<List<BiRecord>> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate);
}
package cn.com.glsx.dj.peanalysis.remote;
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.res.output.*;
import cn.com.glsx.dj.peanalysis.service.BusinessSceneAnalysisService;
......@@ -200,4 +201,17 @@ public class BusinessSceneAnalysisRemoteImpl implements BusinessSceneAnalysisRem
}
}
@Override
public RpcResponse<List<BiRecord>> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate){
try {
return RpcResponse.success(businessSceneAnalysisService.getBiRecords(businessType, merchantIds, startDate, endDate));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("系统异常", e);
return RpcResponse.error(e);
}
}
}
......@@ -91,6 +91,7 @@ public class BusinessSceneAnalysisService {
@Resource
private DataStatsConfig dataStatsConfig;
/**
* 总产值、目标产值、达成率
......@@ -1354,4 +1355,8 @@ public class BusinessSceneAnalysisService {
}
return value.multiply(rate).divide(count, 2, RoundingMode.HALF_UP);
}
public List<BiRecord> getBiRecords(Integer businessType, List<Integer> merchantIds, String startDate, String endDate) {
return businessIntelligenceMapper.getBiRecords(businessType, merchantIds, startDate, endDate);
}
}
  • @wangxw1
    commented
    Master

    Auto Review Result:

    代码审查报告

    问题描述和优化建议

    1. 功能实现的正确性与健壮性

    • 问题描述:

      • 新增的字段未提供默认值或校验机制,可能导致在某些情况下出现空指针异常或其他未定义行为。
      • startTime 和 endTime 字段是字符串类型,但未提供日期格式验证,可能导致日期解析错误。
      • sceneType、bizs、cycleType 等字段使用了特定的数值表示业务含义,但未提供枚举类来明确这些数值的具体含义,增加了代码可读性和维护难度。
    • 优化建议:

      • 为新增字段提供默认值,并增加必要的校验逻辑。
      • 使用 LocalDate 或 LocalDateTime 类型替代字符串来表示日期,并添加相应的格式验证。
      • 将 sceneType、bizs、cycleType 等字段的数值定义为枚举类型,增强代码可读性和安全性。

    2. 安全性与潜在风险

    • 问题描述:

      • 代码中没有看到任何与输入验证或防止SQL注入相关的逻辑,如果这些字段直接用于数据库查询,可能存在安全风险。
    • 优化建议:

      • 在处理用户输入之前,务必进行严格的输入验证。
      • 使用参数化查询或ORM框架来避免SQL注入。

    3. 是否符合最佳实践

    • 问题描述:

      • 字段注释格式已统一,但部分字段缺少详细说明,例如 sceneType 和 bizs 的具体取值范围和含义。
      • 缺少对新增字段的Javadoc注释,不利于其他开发者理解和维护代码。
    • 优化建议:

      • 为每个字段提供详细的Javadoc注释,说明其用途、可能的取值范围以及默认值。
      • 对于关键字段,增加示例值或使用枚举类来明确其可能的取值。

    4. 性能与资源利用效率

    • 问题描述:

      • 当前代码变更主要集中在数据模型的结构调整上,对性能的影响较小。
      • 但是,新增的 Map<String, List<Integer>> merchantMap 字段可能会导致内存消耗增加,特别是在数据量较大时。
    • 优化建议:

      • 在使用 Map 类型时,确保其键值对的数量不会无限制地增长。
      • 考虑使用更高效的集合类型或数据结构来优化内存使用。

    5. Commits信息的清晰性与准确性

    • 问题描述:

      • 提交信息较为清晰,但可以进一步细化,例如对每个变更点提供更具体的描述。
    • 优化建议:

      • 每个变更点应单独列出,并尽可能详细地描述变更内容及其影响。
      • 使用一致的提交信息模板,方便后续维护和协作。

    评分明细

    1. 功能实现的正确性与健壮性:25分/40分
    2. 安全性与潜在风险:20分/30分
    3. 是否符合最佳实践:15分/20分
    4. 性能与资源利用效率:3分/5分
    5. Commits信息的清晰性与准确性:4分/5分

    总分: 67分


    以上是针对提交代码的详细审查报告,希望对您有所帮助。如有任何疑问或需要进一步讨论的地方,请随时联系。

Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!