Commit 75835af0 by 范富荣

feat:精品升级导出新增客户标签字段

1 parent 3b9ced6a
......@@ -4,6 +4,7 @@ import cn.com.glsx.dj.smartcarlife.dto.ClientSignatureDTO;
import cn.com.glsx.dj.smartcarlife.dto.GoodsOrderDTO;
import cn.com.glsx.dj.smartcarlife.dto.GoodsSubOrderDTO;
import cn.com.glsx.dj.smartcarlife.enums.CustomerSexEnum;
import cn.com.glsx.dj.smartcarlife.enums.CustomerTagTypeEnum;
import cn.com.glsx.dj.smartcarlife.model.GoodsOrderCustomer;
import cn.com.glsx.dj.smartcarlife.request.smartcarlife.AdvanceCreateOrderRequest;
import cn.com.glsx.dj.smartcarlife.request.smartcarlife.OrderExportRequest;
......@@ -89,7 +90,9 @@ public interface GoodsOrderDTOConvert {
@Mapping(source = "customer.carTypeId", target = "carTypeId"),
@Mapping(source = "customer.carTypeName", target = "carTypeName"),
@Mapping(source = "customer.plateNumber", target = "plateNumber"),
@Mapping(source = "customer.actualDeliveryDate", target = "actualDeliveryDate"),
@Mapping(source = "customer.salesType", target = "salesType"),
@Mapping(target = "customerTags", expression = "java(cn.com.glsx.dj.smartcarlife.convert.GoodsOrderDTOConvert.convertCustomerTags(sourceEntity))"),
@Mapping(source = "orderTime", target = "orderTimeStr", dateFormat = "yyyy-MM-dd HH:mm:ss"),
@Mapping(source = "baseSceneName", target = "baseSceneName")
......@@ -135,7 +138,9 @@ public interface GoodsOrderDTOConvert {
@Mapping(source = "payOrder.tradeNo", target = "tradeNo"),
@Mapping(source = "upgradeFlag",target = "upgradeFlag", defaultValue = "待升级"),
@Mapping(source = "baseSceneName", target = "baseSceneName"),
@Mapping(target = "carTypeStr", expression = "java(cn.com.glsx.dj.smartcarlife.convert.GoodsOrderDTOConvert.getCarTypeStr(sourceEntity))")
@Mapping(target = "carTypeStr", expression = "java(cn.com.glsx.dj.smartcarlife.convert.GoodsOrderDTOConvert.getCarTypeStr(sourceEntity))"),
@Mapping(target = "customerTags", expression = "java(cn.com.glsx.dj.smartcarlife.convert.GoodsOrderDTOConvert.convertCustomerTags(sourceEntity))"),
@Mapping(source = "customer.actualDeliveryDate", target = "actualDeliveryDate"),
})
OrderExportVo toOrderExportVo(GoodsOrderDTO sourceEntity);
......@@ -143,6 +148,8 @@ public interface GoodsOrderDTOConvert {
@Mapping(source = "customer.customerName", target = "customerName"),
@Mapping(source = "customer.customerPhone", target = "customerPhone"),
@Mapping(source = "payOrder.successDate", target = "paySuccessDate"),
@Mapping(target = "customerTags", expression = "java(cn.com.glsx.dj.smartcarlife.convert.GoodsOrderDTOConvert.convertCustomerTags(sourceEntity))"),
@Mapping(source = "customer.actualDeliveryDate", target = "actualDeliveryDate"),
})
UpgradeOrderExportVo toUpgradeOrderExportVo(GoodsOrderDTO sourceEntity);
......@@ -169,6 +176,24 @@ public interface GoodsOrderDTOConvert {
return buffer.toString();
}
static String convertCustomerTags(GoodsOrderDTO dto) {
if (dto.getCustomer() == null || StringUtils.isBlank(dto.getCustomer().getCustomerTags())) {
return null;
}
String[] tags = dto.getCustomer().getCustomerTags().split(",");
StringBuilder sb = new StringBuilder();
for (String tag : tags) {
tag = tag.trim();
if (tag.isEmpty()) continue;
CustomerTagTypeEnum en = CustomerTagTypeEnum.getByValue(Byte.valueOf(tag));
if (en != null) {
if (sb.length() > 0) sb.append(",");
sb.append(en.getDisplayName());
}
}
return sb.toString();
}
static Byte getCustomerSex(String sexStr){
CustomerSexEnum customerSexEnum = CustomerSexEnum.getByDisplayName(sexStr);
if (customerSexEnum != null) {
......
......@@ -18,6 +18,8 @@ public interface OrderExportConvert {
@Mapping(source = "customer.customerPhone", target = "customerPhone"),
@Mapping(source = "customer.plateNumber", target = "plateNumber"),
@Mapping(source = "customer.salesType", target = "salesType"),
@Mapping(source = "customer.actualDeliveryDate", target = "actualDeliveryDate"),
@Mapping(target = "customerTags", expression = "java(cn.com.glsx.dj.smartcarlife.convert.GoodsOrderDTOConvert.convertCustomerTags(sourceEntity))"),
@Mapping(source = "payOrder.successDate", target = "paySuccessDate"),
@Mapping(source = "payOrder.zyVoucherStatus", target = "zyVoucherStatus"),
@Mapping(source = "upgradeFlag",target = "upgradeFlag", defaultValue = "待升级"),
......
......@@ -208,4 +208,10 @@ public class OrderManagePageResponse implements Serializable {
@ApiModelProperty(notes="基础场景码")
private String baseSceneCode;
@ApiModelProperty(notes="日报标签(逗号分割: 1=已触客,2=已拉群,3=已交付引荐,4=首保维保客户,5=事故车客户)")
private String customerTags;
@ApiModelProperty(notes="客户实际交付日期")
private Date actualDeliveryDate;
}
......@@ -105,107 +105,116 @@ public class OrderExportScene0Vo implements Serializable{
@ExcelMergeRow(columIndex = 17)
private String upgradeFlag = "待升级";
@ExcelProperty(value="日报标签")
@ExcelMergeRow(columIndex = 18)
private String customerTags;
@ExcelProperty(value="客户实际交付日期")
@DateTimeFormat(value="yyyy-MM-dd HH:mm:ss")
@ExcelMergeRow(columIndex = 19)
private Date actualDeliveryDate;
@ExcelValueReplace(replace={"待跟进_1", "战败_2", "待支付_3", "已支付_4", "已评价_6","已撤销_9","已关闭_10","错误订单_11","已退款_12","待上传_13","审核中_14"},repeatValue=true)
@ExcelProperty(value = "订单状态",converter=ReplaceByteToStringConvert.class)
@ExcelMergeRow(columIndex = 18)
@ExcelMergeRow(columIndex = 20)
private Byte status;
@ExcelValueReplace(replace = {"未开票_1", "已开票_2"}, repeatValue = true)
@ExcelProperty(value = "开票状态", converter = ReplaceByteToStringConvert.class)
@ExcelMergeRow(columIndex = 19)
@ExcelMergeRow(columIndex = 21)
private Byte invoiceStatus;
@ExcelNumericCell(index = 40)
@ExcelNumericCell(index = 42)
@ExcelProperty(value="总价")
@ExcelMergeRow(columIndex = 40)
@ExcelMergeRow(columIndex = 42)
private BigDecimal totalPrice;
@ExcelNumericCell(index = 41)
@ExcelNumericCell(index = 43)
@ExcelProperty(value="支付金额")
@ExcelMergeRow(columIndex = 41)
@ExcelMergeRow(columIndex = 43)
private BigDecimal finalPrice;
@ExcelProperty(value="退款明细")
@ExcelMergeRow(columIndex = 42)
@ExcelMergeRow(columIndex = 44)
private String refundDetails;
@ExcelProperty(value="主服务商名称")
@ExcelMergeRow(columIndex = 43)
@ExcelMergeRow(columIndex = 45)
private String masterPartnerMerchantName;
@ExcelProperty(value="主服务商商户号")
@ExcelMergeRow(columIndex = 44)
@ExcelMergeRow(columIndex = 46)
private Integer masterPartnerMerchantId;
@ExcelProperty(value="全部服务商名称")
@ExcelMergeRow(columIndex = 45)
@ExcelMergeRow(columIndex = 47)
private String allPartnerMerchantName;
@ExcelProperty(value="4s店")
@ExcelMergeRow(columIndex = 46)
@ExcelMergeRow(columIndex = 48)
private String merchantName;
@ExcelProperty(value="门店商户号")
@ExcelMergeRow(columIndex = 47)
@ExcelMergeRow(columIndex = 49)
private Integer merchantId;
@ExcelProperty(value="门店品牌")
@ExcelMergeRow(columIndex = 48)
@ExcelMergeRow(columIndex = 50)
private String merchantBrand;
@ExcelProperty(value="二级流量方")
@ExcelMergeRow(columIndex = 49)
@ExcelMergeRow(columIndex = 51)
private String subShopMerchantName;
@ExcelValueReplace(replace={"非直营_0", "直营_1"}, repeatValue=true)
@ExcelProperty(value = "运营模式", converter = ReplaceByteToStringConvert.class)
@ExcelMergeRow(columIndex = 50)
@ExcelMergeRow(columIndex = 52)
private Byte directSalesFlag;
@ExcelProperty(value="省份")
@ExcelMergeRow(columIndex = 51)
@ExcelMergeRow(columIndex = 53)
private String provinceName;
@ExcelProperty(value="服务对接")
@ExcelMergeRow(columIndex = 52)
@ExcelMergeRow(columIndex = 54)
private String sellerMerchantName;
@ExcelProperty(value="安装服务商")
@ExcelMergeRow(columIndex = 53)
@ExcelMergeRow(columIndex = 55)
private String installMerchantName;
@ExcelProperty(value="营销服务商")
@ExcelMergeRow(columIndex = 54)
@ExcelMergeRow(columIndex = 56)
private String marketingMerchantName;
@ExcelProperty(value="销售顾问")
@ExcelMergeRow(columIndex = 55)
@ExcelMergeRow(columIndex = 57)
private String employeeName;
@ExcelProperty(value="转化人员")
@ExcelMergeRow(columIndex = 56)
@ExcelMergeRow(columIndex = 58)
private String sellerName;
@ExcelValueReplace(replace={"系统导入_7", "小程序订单_1", "小程序订单_2", "小程序订单_3", "小程序订单_4", "小程序订单_5", "小程序订单_6","小程序订单_10", "冀联小程序_12"},repeatValue=true)
@ExcelProperty(value = "订单来源", converter = ReplaceByteToStringConvert.class)
@ExcelMergeRow(columIndex = 57)
@ExcelMergeRow(columIndex = 59)
private Byte source;
@ExcelProperty(value="备注")
@ExcelMergeRow(columIndex = 58)
@ExcelMergeRow(columIndex = 60)
private String remark;
@ExcelProperty(value="战败原因")
@ExcelMergeRow(columIndex = 59)
@ExcelMergeRow(columIndex = 61)
private String refusalReason;
@ExcelProperty(value="技师名称")
@ExcelMergeRow(columIndex = 60)
@ExcelMergeRow(columIndex = 62)
private String technicianName;
@ExcelValueReplace(replace={"无需上传_0", "待上传_1", "已上传_2"}, repeatValue=true)
@ExcelProperty(value = "上传协议", converter = ReplaceByteToStringConvert.class)
@ExcelMergeRow(columIndex = 61)
@ExcelMergeRow(columIndex = 63)
private Byte zyVoucherStatus;
private List<GoodsSubOrderExportDTO> subOrderList;
......
......@@ -68,6 +68,13 @@ public class OrderExportVo implements Serializable{
@ExcelProperty(value = "升级状态",converter= ReplaceStringToStringConvert.class)
private String upgradeFlag = "待升级";
@ExcelProperty(value="日报标签")
private String customerTags;
@ExcelProperty(value="实际交付日期")
@DateTimeFormat(value="yyyy-MM-dd HH:mm:ss")
private Date actualDeliveryDate;
// @ExcelValueReplace(replace={"已施工_Y", "未施工_N"},repeatValue=true)
// @ExcelProperty(value = "施工状态",converter=ReplaceStringToStringConvert.class)
// private String constructionFlag;
......@@ -199,5 +206,4 @@ public class OrderExportVo implements Serializable{
@ExcelValueReplace(replace={"销售端引流售前_0", "门店引流-售后_1", "自然到店_2","交付端引流售前_3"},repeatValue=true)
@ExcelProperty(value = "客户来源",converter=ReplaceByteToStringConvert.class)
private Byte salesType;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!