Commit ed433448 by 杨卫

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

2 parents fbf446ad a4265b2d
Showing 17 changed files with 75 additions and 47 deletions
...@@ -41,9 +41,9 @@ public class CycleDataReq implements Serializable { ...@@ -41,9 +41,9 @@ public class CycleDataReq implements Serializable {
* 选择「自定义」时,需触发日期区间选择组件,可点击日期范围重新选择对应的日期区间;不能选择当天后的 日期,开始日期必须等于或早于结束日期; * 选择「自定义」时,需触发日期区间选择组件,可点击日期范围重新选择对应的日期区间;不能选择当天后的 日期,开始日期必须等于或早于结束日期;
*/ */
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -22,9 +22,9 @@ public class FlowContributionRankingReq implements Serializable { ...@@ -22,9 +22,9 @@ public class FlowContributionRankingReq implements Serializable {
private Integer merchantId; private Integer merchantId;
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -29,9 +29,9 @@ public class RegionDistributionReq implements Serializable { ...@@ -29,9 +29,9 @@ public class RegionDistributionReq implements Serializable {
private Integer brandId; private Integer brandId;
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -34,9 +34,9 @@ public class StockStoreAnalysisReq implements Serializable { ...@@ -34,9 +34,9 @@ public class StockStoreAnalysisReq implements Serializable {
private Integer provinceId; private Integer provinceId;
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -42,9 +42,9 @@ public class StoreListCountReq implements Serializable { ...@@ -42,9 +42,9 @@ public class StoreListCountReq implements Serializable {
*/ */
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -42,9 +42,9 @@ public class StoreListReq implements Serializable { ...@@ -42,9 +42,9 @@ public class StoreListReq implements Serializable {
*/ */
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -49,9 +49,9 @@ public class TrendChartReq implements Serializable { ...@@ -49,9 +49,9 @@ public class TrendChartReq implements Serializable {
*/ */
/** /**
* 1-天 2-周 3-月 4-自定义 * 0-天 1-周 2-月 4-自定义
*/ */
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义") @ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull @NotNull
private Integer cycleType; private Integer cycleType;
......
...@@ -5,11 +5,13 @@ import cn.com.glsx.framework.core.exception.RpcServiceException; ...@@ -5,11 +5,13 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
@Data @Data
@Slf4j @Slf4j
...@@ -78,6 +80,12 @@ public class SceneBaseReq implements Serializable { ...@@ -78,6 +80,12 @@ public class SceneBaseReq implements Serializable {
@ApiModelProperty(notes = "指标数据聚合规则:merchantIds按门店,staffIds按员工") @ApiModelProperty(notes = "指标数据聚合规则:merchantIds按门店,staffIds按员工")
private String exts; private String exts;
@ApiModelProperty(notes = "是否查询达成率趋势")
private boolean withTargetRatio;
@ApiModelProperty(notes = "查询类型")
private int queryType;
/** /**
* 转换指标参数 * 转换指标参数
*/ */
...@@ -90,6 +98,9 @@ public class SceneBaseReq implements Serializable { ...@@ -90,6 +98,9 @@ public class SceneBaseReq implements Serializable {
if (StringUtils.hasLength(exts)) { if (StringUtils.hasLength(exts)) {
res.setExts(exts); res.setExts(exts);
} }
if (!CollectionUtils.isEmpty(merchantIds)) {
res.setMerchantIds(merchantIds.stream().map(String::valueOf).collect(Collectors.joining(",")));
}
return res; return res;
} }
......
...@@ -192,10 +192,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -192,10 +192,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
} }
BigDecimal[] thresholds = { BigDecimal[] thresholds = {
new BigDecimal("0.6"), new BigDecimal("1.2"), // x>=0.6:1.2 new BigDecimal("60"), new BigDecimal("1.2"), // x>=0.6:1.2
new BigDecimal("0.5"), new BigDecimal("1.0"), // 0.5<=x<0.6:1.0 new BigDecimal("50"), new BigDecimal("1.0"), // 0.5<=x<0.6:1.0
new BigDecimal("0.4"), new BigDecimal("0.8"), // 0.4<=x<0.5:0.8 new BigDecimal("40"), new BigDecimal("0.8"), // 0.4<=x<0.5:0.8
new BigDecimal("0.3"), new BigDecimal("0.6") // 0.3<=x<0.4:0.6 new BigDecimal("30"), new BigDecimal("0.6") // 0.3<=x<0.4:0.6
}; };
this.vehicleWarrantyEcoCoefficient = computeEcoCoefficient(this.vehicleWarrantyPenetrationRate, thresholds, BigDecimal.ZERO); this.vehicleWarrantyEcoCoefficient = computeEcoCoefficient(this.vehicleWarrantyPenetrationRate, thresholds, BigDecimal.ZERO);
...@@ -210,10 +210,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -210,10 +210,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
} }
BigDecimal[] thresholds = { BigDecimal[] thresholds = {
new BigDecimal("0.2"), new BigDecimal("1.2"), // x>=0.2:1.2 new BigDecimal("20"), new BigDecimal("1.2"), // x>=0.2:1.2
new BigDecimal("0.15"), new BigDecimal("1.0"), // 0.15<=x<0.2:1.0 new BigDecimal("15"), new BigDecimal("1.0"), // 0.15<=x<0.2:1.0
new BigDecimal("0.1"), new BigDecimal("0.8"), // 0.1<=x<0.15:0.8 new BigDecimal("10"), new BigDecimal("0.8"), // 0.1<=x<0.15:0.8
new BigDecimal("0.05"), new BigDecimal("0.6") // 0.05<=x<0.1:0.6 new BigDecimal("5"), new BigDecimal("0.6") // 0.05<=x<0.1:0.6
}; };
this.safetyPackageEcoCoefficient = computeEcoCoefficient(this.safetyPackagePenetrationRate, thresholds, BigDecimal.ZERO); this.safetyPackageEcoCoefficient = computeEcoCoefficient(this.safetyPackagePenetrationRate, thresholds, BigDecimal.ZERO);
...@@ -228,10 +228,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -228,10 +228,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
} }
BigDecimal[] thresholds = { BigDecimal[] thresholds = {
new BigDecimal("0.15"), new BigDecimal("1.2"), // x>=0.15:1.2 new BigDecimal("15"), new BigDecimal("1.2"), // x>=0.15:1.2
new BigDecimal("0.11"), new BigDecimal("1.0"), // 0.11<=x<0.15:1.0 new BigDecimal("11"), new BigDecimal("1.0"), // 0.11<=x<0.15:1.0
new BigDecimal("0.08"), new BigDecimal("0.8"), // 0.08<=x<0.11:0.8 new BigDecimal("8"), new BigDecimal("0.8"), // 0.08<=x<0.11:0.8
new BigDecimal("0.05"), new BigDecimal("0.6") // 0.05<=x<0.08:0.6 new BigDecimal("5"), new BigDecimal("0.6") // 0.05<=x<0.08:0.6
}; };
this.batteryWarrantyEcoCoefficient = computeEcoCoefficient(this.batteryWarrantyPenetrationRate, thresholds, BigDecimal.ZERO); this.batteryWarrantyEcoCoefficient = computeEcoCoefficient(this.batteryWarrantyPenetrationRate, thresholds, BigDecimal.ZERO);
...@@ -247,10 +247,10 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -247,10 +247,10 @@ public class GoodsCategorySummaryResponse implements Serializable {
} }
BigDecimal[] thresholds = { BigDecimal[] thresholds = {
new BigDecimal("0.15"), new BigDecimal("1.2"), // x>=0.15:1.2 new BigDecimal("15"), new BigDecimal("1.2"), // x>=0.15:1.2
new BigDecimal("0.11"), new BigDecimal("1.0"), // 0.11<=x<0.15:1.0 new BigDecimal("11"), new BigDecimal("1.0"), // 0.11<=x<0.15:1.0
new BigDecimal("0.08"), new BigDecimal("0.8"), // 0.08<=x<0.11:0.8 new BigDecimal("8"), new BigDecimal("0.8"), // 0.08<=x<0.11:0.8
new BigDecimal("0.05"), new BigDecimal("0.6") // 0.05<=x<0.08:0.6 new BigDecimal("5"), new BigDecimal("0.6") // 0.05<=x<0.08:0.6
}; };
this.tireWarrantyEcoCoefficient = computeEcoCoefficient(this.tireWarrantyPenetrationRate, thresholds, BigDecimal.ZERO); this.tireWarrantyEcoCoefficient = computeEcoCoefficient(this.tireWarrantyPenetrationRate, thresholds, BigDecimal.ZERO);
...@@ -260,7 +260,7 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -260,7 +260,7 @@ public class GoodsCategorySummaryResponse implements Serializable {
* 计算车窗膜-生态系数 * 计算车窗膜-生态系数
*/ */
public void computeWindowFilmEcoCoefficient() { public void computeWindowFilmEcoCoefficient() {
if (this.windowFilmPenetrationRate == null) { if (this.windowFilmPerCarOutput == null) {
return; return;
} }
...@@ -271,14 +271,14 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -271,14 +271,14 @@ public class GoodsCategorySummaryResponse implements Serializable {
new BigDecimal("200"), new BigDecimal("0.6") new BigDecimal("200"), new BigDecimal("0.6")
}; };
this.windowFilmEcoCoefficient = computeEcoCoefficient(this.windowFilmPenetrationRate, thresholds, BigDecimal.ZERO); this.windowFilmEcoCoefficient = computeEcoCoefficient(this.windowFilmPerCarOutput, thresholds, BigDecimal.ZERO);
} }
/** /**
* 计算车身膜-生态系数 * 计算车身膜-生态系数
*/ */
public void computeCarBodyFilmEcoCoefficient() { public void computeCarBodyFilmEcoCoefficient() {
if (this.carBodyFilmPenetrationRate == null) { if (this.carBodyFilmPerCarOutput == null) {
return; return;
} }
...@@ -289,14 +289,14 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -289,14 +289,14 @@ public class GoodsCategorySummaryResponse implements Serializable {
new BigDecimal("400"), new BigDecimal("0.6") new BigDecimal("400"), new BigDecimal("0.6")
}; };
this.carBodyFilmEcoCoefficient = computeEcoCoefficient(this.carBodyFilmPenetrationRate, thresholds, BigDecimal.ZERO); this.carBodyFilmEcoCoefficient = computeEcoCoefficient(this.carBodyFilmPerCarOutput, thresholds, BigDecimal.ZERO);
} }
/** /**
* 计算精品附件-生态系数 * 计算精品附件-生态系数
*/ */
public void computeAccessoriesEcoCoefficient() { public void computeAccessoriesEcoCoefficient() {
if (this.accessoriesPenetrationRate == null) { if (this.accessoriesPerCarOutput == null) {
return; return;
} }
...@@ -307,6 +307,6 @@ public class GoodsCategorySummaryResponse implements Serializable { ...@@ -307,6 +307,6 @@ public class GoodsCategorySummaryResponse implements Serializable {
new BigDecimal("3000"), new BigDecimal("0.6") new BigDecimal("3000"), new BigDecimal("0.6")
}; };
this.accessoriesEcoCoefficient = computeEcoCoefficient(this.accessoriesPenetrationRate, thresholds, BigDecimal.ZERO); this.accessoriesEcoCoefficient = computeEcoCoefficient(this.accessoriesPerCarOutput, thresholds, BigDecimal.ZERO);
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -17,7 +17,7 @@ public class MerchantDubboConfig { ...@@ -17,7 +17,7 @@ public class MerchantDubboConfig {
@Bean @Bean
public MerchantRemote rpcApiMethodRemote(){ public MerchantRemote rpcApiMethodRemote(){
return factory.builder(MerchantRemote.class) return factory.builder(MerchantRemote.class)
.version("2.0.0").url("dubbo://192.168.3.188:22889") .version("2.0.0")
.check(false).timeout(30000).build(); .check(false).timeout(30000).build();
} }
......
...@@ -4,7 +4,7 @@ import cn.com.glsx.dj.peanalysis.dto.StoreSettingDTO; ...@@ -4,7 +4,7 @@ import cn.com.glsx.dj.peanalysis.dto.StoreSettingDTO;
import cn.com.glsx.dj.peanalysis.dto.MerchantInfoDTO; import cn.com.glsx.dj.peanalysis.dto.MerchantInfoDTO;
import cn.com.glsx.dj.peanalysis.dto.MerchantQueryDTO; import cn.com.glsx.dj.peanalysis.dto.MerchantQueryDTO;
import cn.com.glsx.dj.peanalysis.model.ServiceMerchant; import cn.com.glsx.dj.peanalysis.model.ServiceMerchant;
import cn.com.glsx.dj.peanalysis.model.StoreInfo; import cn.com.glsx.dj.peanalysis.service.model.StoreInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
......
...@@ -312,7 +312,7 @@ public class UsedCarDataStatsService { ...@@ -312,7 +312,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO(); DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4); queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null); queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4); queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts(null); queryDataBiz.setExts(null);
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null); queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime()); queryDataBiz.setStartDate(request.getStartTime());
...@@ -489,7 +489,7 @@ public class UsedCarDataStatsService { ...@@ -489,7 +489,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO(); DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4); queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null); queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4); queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts(null); queryDataBiz.setExts(null);
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null); queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null);
// 二手车产值(当期卖车总产值、环比)-A0001 二手车毛利(当期毛利、环比)-A0002 // 二手车产值(当期卖车总产值、环比)-A0001 二手车毛利(当期毛利、环比)-A0002
...@@ -728,7 +728,7 @@ public class UsedCarDataStatsService { ...@@ -728,7 +728,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO(); DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4); queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null); queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4); queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts("merchantId"); queryDataBiz.setExts("merchantId");
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null); queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime()); queryDataBiz.setStartDate(request.getStartTime());
...@@ -815,7 +815,7 @@ public class UsedCarDataStatsService { ...@@ -815,7 +815,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO(); DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4); queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null); queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4); queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts(null); queryDataBiz.setExts(null);
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(finalMerchantIds) ? StrUtil.join(",", finalMerchantIds) : null); queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(finalMerchantIds) ? StrUtil.join(",", finalMerchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime()); queryDataBiz.setStartDate(request.getStartTime());
...@@ -900,7 +900,7 @@ public class UsedCarDataStatsService { ...@@ -900,7 +900,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO(); DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4); queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null); queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4); queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts("merchantId"); queryDataBiz.setExts("merchantId");
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(finalMerchantIds) ? StrUtil.join(",", finalMerchantIds) : null); queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(finalMerchantIds) ? StrUtil.join(",", finalMerchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime()); queryDataBiz.setStartDate(request.getStartTime());
......
package cn.com.glsx.dj.peanalysis.service.model;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import java.util.List;
import lombok.Data;
@Data
public class StoreInfo {
private Integer storeId; // 门店ID
private String yydstoreName; // 关联园区店名称
private Integer yydStoreId; //关联园区店ID
private boolean isLuxury; // 是否豪华店
private Integer technicianCount; // 技师人数
List<MerchantStaffResponse> technicianList;
}
\ No newline at end of file \ No newline at end of file
...@@ -138,16 +138,16 @@ public class DateUtils { ...@@ -138,16 +138,16 @@ public class DateUtils {
} }
switch (dateType) { switch (dateType) {
case 1: // 日 case 0: // 日
lastStart = DateUtil.offsetDay(start, -1); lastStart = DateUtil.offsetDay(start, -1);
lastEnd = DateUtil.offsetDay(end, -1); lastEnd = DateUtil.offsetDay(end, -1);
break; break;
case 2: // 周 case 1: // 周
lastStart = DateUtil.offsetWeek(start, -1); lastStart = DateUtil.offsetWeek(start, -1);
lastEnd = DateUtil.offsetWeek(end, -1); lastEnd = DateUtil.offsetWeek(end, -1);
break; break;
case 3: // 月 case 2: // 月
lastStart = DateUtil.offsetMonth(start, -1); lastStart = DateUtil.offsetMonth(start, -1);
Date nextMonthStart = DateUtil.offsetMonth(lastStart, 1); Date nextMonthStart = DateUtil.offsetMonth(lastStart, 1);
lastEnd = DateUtil.offsetDay(nextMonthStart, -1); lastEnd = DateUtil.offsetDay(nextMonthStart, -1);
......
...@@ -616,7 +616,7 @@ ...@@ -616,7 +616,7 @@
group by smdc.merchant_id group by smdc.merchant_id
</select> </select>
<select id="findYydList" <select id="findYydList"
resultType="cn.com.glsx.dj.peanalysis.model.StoreInfo"> resultType="cn.com.glsx.dj.peanalysis.service.model.StoreInfo">
select distinct main_merchant_id as storeId, sub_merchant_id as yydStoreId, select distinct main_merchant_id as storeId, sub_merchant_id as yydStoreId,
sub_merchant_name as yydstoreName sub_merchant_name as yydstoreName
from dj_car_life_scene_merchant_ref from dj_car_life_scene_merchant_ref
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!