Commit 5bad87ff by 王璐琦

feat(daily-report): 废弃旧模板和字段,新增日报字段支持

- 注释并废弃了驻店日报(模板类型1)相关逻辑及接口
- 在接口请求类中标注模板类型字段为废弃并调整备注
- 更新pom版本号至5.8.5-SNAPSHOT
- DailyReportFieldEnum中大量旧字段标注为@Deprecated并新增新的日报字段
- 新增接口listDailyReportTemplate,标记为@Deprecated,提示替代使用
- 调整部分API模型中的员工UUID字段为非必填
- 保持旧接口和逻辑兼容,逐步过渡到新字段体系
1 parent 24f1af83
Showing 19 changed files with 263 additions and 12 deletions
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<name>rpc-dj-daily-report-api</name> <name>rpc-dj-daily-report-api</name>
<properties> <properties>
<deploy.scanPackage>cn.com.glsx.dj.daily.report.remote</deploy.scanPackage> <deploy.scanPackage>cn.com.glsx.dj.daily.report.remote</deploy.scanPackage>
<daily-report.api.version>5.8.4-SNAPSHOT</daily-report.api.version> <daily-report.api.version>5.8.5-SNAPSHOT</daily-report.api.version>
<smartcarlife.api.version>5.8.4-SNAPSHOT</smartcarlife.api.version> <smartcarlife.api.version>5.8.5-SNAPSHOT</smartcarlife.api.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
......
package cn.com.glsx.dj.daily.report.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 轻改售后部数据统计导出 VO
*/
@Data
public class LightChangeAfterSaleStatisticsVO implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "部门")
private String departmentName;
@ExcelProperty(value = "SA")
private String sa;
@ExcelProperty(value = "今日售后首保维保数")
private Integer firstMaintenanceCountOfToday;
@ExcelProperty(value = "今日事故车数")
private Integer accidentVehicleCountOfToday;
@ExcelProperty(value = "今日售后触客数")
private Integer reachCountOfToday;
@ExcelProperty(value = "今日升级数")
private Integer upgradeCountOfToday;
@ExcelProperty(value = "今日总产值")
private BigDecimal totalOutputValueOfToday;
@ExcelProperty(value = "本月首保维保数")
private Integer firstMaintenanceCountOfMonth;
@ExcelProperty(value = "本月事故车数")
private Integer accidentVehicleCountOfMonth;
@ExcelProperty(value = "本月售后触客数")
private Integer reachCountOfMonth;
@ExcelProperty(value = "本月升级数")
private Integer upgradeCountOfMonth;
@ExcelProperty(value = "本月总产值")
private BigDecimal totalOutputValueOfMonth;
@ApiModelProperty("本月售后触客客单价")
private BigDecimal averageOrderValueOfMonth;
}
...@@ -49,6 +49,18 @@ public class LightChangeDailyReportData implements Serializable { ...@@ -49,6 +49,18 @@ public class LightChangeDailyReportData implements Serializable {
@ApiModelProperty("洽谈明细表格数据") @ApiModelProperty("洽谈明细表格数据")
private List<Map<String, String>> negotiationRows; private List<Map<String, String>> negotiationRows;
@ApiModelProperty("销售部统计表格数据(轻改+问界鸿蒙)")
private List<LightChangeSalesStatisticsVO> salesStatisticsRows;
@ApiModelProperty("交付部统计表格数据(轻改+问界鸿蒙)")
private List<LightChangeDeliveryStatisticsVO> deliveryStatisticsRows;
@ApiModelProperty("售后部统计表格数据(轻改+问界鸿蒙)")
private List<LightChangeAfterSaleStatisticsVO> afterSaleStatisticsRows;
@ApiModelProperty("洽谈明细表格数据(轻改+问界鸿蒙)")
private List<LightChangeNegotiationVO> negotiationDetailRows;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
...@@ -84,7 +96,7 @@ public class LightChangeDailyReportData implements Serializable { ...@@ -84,7 +96,7 @@ public class LightChangeDailyReportData implements Serializable {
@ApiModelProperty("今日总产值") @ApiModelProperty("今日总产值")
private BigDecimal todayTotalOutput; private BigDecimal todayTotalOutput;
@ApiModelProperty("今日平均客单价") @ApiModelProperty("今日交付客单价")
private BigDecimal todayAvgOrderPrice; private BigDecimal todayAvgOrderPrice;
@ApiModelProperty("今日客单价") @ApiModelProperty("今日客单价")
...@@ -129,7 +141,7 @@ public class LightChangeDailyReportData implements Serializable { ...@@ -129,7 +141,7 @@ public class LightChangeDailyReportData implements Serializable {
@ApiModelProperty("本月售后事故车数量") @ApiModelProperty("本月售后事故车数量")
private Integer monthAfterSaleAccidentCount; private Integer monthAfterSaleAccidentCount;
@ApiModelProperty("本月售后触客总数量") @ApiModelProperty("本月售后触客数量")
private Integer monthAfterSaleTouchCount; private Integer monthAfterSaleTouchCount;
@ApiModelProperty("本月售后触客率") @ApiModelProperty("本月售后触客率")
...@@ -138,7 +150,7 @@ public class LightChangeDailyReportData implements Serializable { ...@@ -138,7 +150,7 @@ public class LightChangeDailyReportData implements Serializable {
@ApiModelProperty("本月总产值") @ApiModelProperty("本月总产值")
private BigDecimal monthTotalOutput; private BigDecimal monthTotalOutput;
@ApiModelProperty("本月平均客单价") @ApiModelProperty("本月交付客单价")
private BigDecimal monthAvgOrderPrice; private BigDecimal monthAvgOrderPrice;
@ApiModelProperty("本月原厂窗膜升级数量") @ApiModelProperty("本月原厂窗膜升级数量")
......
package cn.com.glsx.dj.daily.report.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 轻改交付部数据统计导出 VO
*/
@Data
public class LightChangeDeliveryStatisticsVO implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "部门")
private String departmentName;
@ExcelProperty(value = "交付专员")
private String deliverySpecialist;
@ExcelProperty(value = "今日交付数")
private Integer deliveryCountOfToday;
@ExcelProperty(value = "今日交付引荐数")
private Integer referralCountOfToday;
@ExcelProperty(value = "今日成交数")
private Integer transactionCountOfToday;
@ExcelProperty(value = "今日成交金额")
private BigDecimal transactionAmountOfToday;
@ExcelProperty(value = "本月交付数")
private Integer deliveryCountOfMonth;
@ExcelProperty(value = "本月交付引荐数")
private Integer referralCountOfMonth;
@ExcelProperty(value = "本月成交数")
private Integer transactionCountOfMonth;
@ExcelProperty(value = "本月无效引荐数")
private Integer referralInvalidCountOfMonth;
@ExcelProperty(value = "本月成交金额")
private BigDecimal transactionAmountOfMonth;
@ApiModelProperty("本月交付客单价")
private BigDecimal averageOrderValueOfMonth;
}
package cn.com.glsx.dj.daily.report.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 轻改洽谈明细导出 VO
*/
@Data
public class LightChangeNegotiationVO implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "洽谈日期")
private String negotiationDate;
@ExcelProperty(value = "驻店人员")
private String storeSales;
@ExcelProperty(value = "部门")
private String departmentName;
@ExcelProperty(value = "销售/交付/SA")
private String sa;
@ExcelProperty(value = "客户姓名")
private String customerName;
@ExcelProperty(value = "客户手机号")
private String phone;
@ExcelProperty(value = "车型配置")
private String vehicleConfig;
@ExcelProperty(value = "车架号")
private String vin;
@ExcelProperty(value = "销售赠送")
private String salesGifts;
@ExcelProperty(value = "销售渠道")
private String salesChannels;
@ExcelProperty(value = "是否有效")
private String isEffective;
@ExcelProperty(value = "是否升级")
private String isUpgraded;
@ExcelProperty(value = "窗膜成交金额")
private BigDecimal windowTintAmount;
@ExcelProperty(value = "车衣成交金额")
private BigDecimal carWrapAmount;
@ExcelProperty(value = "精品成交金额")
private BigDecimal boutiqueAmount;
@ExcelProperty(value = "升级成交金额")
private BigDecimal upgradeAmount;
@ExcelProperty(value = "备注")
private String remark;
@ApiModelProperty("数据来源:订单/日报")
private String dataSource;
}
package cn.com.glsx.dj.daily.report.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 轻改销售部数据统计导出 VO
*/
@Data
public class LightChangeSalesStatisticsVO implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "部门")
private String departmentName;
@ExcelProperty(value = "销售顾问")
private String salesConsultant;
@ExcelProperty(value = "今日大定数")
private Integer largeOrderCountOfToday;
@ExcelProperty(value = "今日大定触客/大定进群数")
private Integer largeOrderReachGroupCountOfToday;
@ExcelProperty(value = "今日成交金额")
private BigDecimal transactionAmountOfToday;
@ExcelProperty(value = "本月大定数")
private Integer largeOrderCountOfMonth;
@ExcelProperty(value = "本月大定触客/大定进群数")
private Integer largeOrderReachGroupCountOfMonth;
@ExcelProperty(value = "本月大定触客率")
private String largeOrderReachRateOfMonth;
@ExcelProperty(value = "本月成交金额")
private BigDecimal transactionAmountOfMonth;
@ApiModelProperty("本月客单价")
private BigDecimal averageOrderValueOfMonth;
}
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
</parent> </parent>
<groupId>cn.com.glsx.dj</groupId> <groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-daily-report</artifactId> <artifactId>rpc-dj-daily-report</artifactId>
<version>5.8.4-SNAPSHOT</version> <version>5.8.5-SNAPSHOT</version>
<name>rpc-dj-daily-report</name> <name>rpc-dj-daily-report</name>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>
<skipTests>true</skipTests> <skipTests>true</skipTests>
<daily-report.api.version>5.8.4-SNAPSHOT</daily-report.api.version> <daily-report.api.version>5.8.5-SNAPSHOT</daily-report.api.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<dependency> <dependency>
<groupId>cn.com.glsx.dj</groupId> <groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-smartcarlife-api</artifactId> <artifactId>rpc-dj-smartcarlife-api</artifactId>
<version>5.8.4-SNAPSHOT</version> <version>5.8.5-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
package cn.com.glsx.dj.daily.report.config;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class PlatformMerchantsDubboConfig extends DubboConfig{
@Bean
public MerchantStaffRemote merchantStaffRemote(){
return factory.builder(MerchantStaffRemote.class).timeout(timeout).check(check).version("2.0.0").build();
}
}
...@@ -81,7 +81,7 @@ public class DailyReportRecordService { ...@@ -81,7 +81,7 @@ public class DailyReportRecordService {
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
public Boolean saveDailyReport(DailyReportRecordDTO dailyReportRecordDTO) { public Boolean saveDailyReport(DailyReportRecordDTO dailyReportRecordDTO) {
RpcAssert.assertNotNull(dailyReportRecordDTO, DefaultErrorEnum.PARAMETER_NULL, "dailyReportRecordDTO must not be null"); RpcAssert.assertNotNull(dailyReportRecordDTO, DefaultErrorEnum.PARAMETER_NULL, "dailyReportRecordDTO must not be null");
RpcAssert.assertNotNull(dailyReportRecordDTO.getTemplateType(), DefaultErrorEnum.PARAMETER_NULL, "templateType must not be null"); //RpcAssert.assertNotNull(dailyReportRecordDTO.getTemplateType(), DefaultErrorEnum.PARAMETER_NULL, "templateType must not be null");
if (!Objects.equals(DailyReportTemplateTypeEnum.DISCUSSION.getValue(), dailyReportRecordDTO.getTemplateType())){ if (!Objects.equals(DailyReportTemplateTypeEnum.DISCUSSION.getValue(), dailyReportRecordDTO.getTemplateType())){
RpcAssert.assertNotNull(dailyReportRecordDTO.getFieldDataList(), DefaultErrorEnum.PARAMETER_NULL, "fieldDataList must not be null"); RpcAssert.assertNotNull(dailyReportRecordDTO.getFieldDataList(), DefaultErrorEnum.PARAMETER_NULL, "fieldDataList must not be null");
} }
...@@ -163,7 +163,7 @@ public class DailyReportRecordService { ...@@ -163,7 +163,7 @@ public class DailyReportRecordService {
log.info("saveDailyReport 批量插入subformData成功, count={}", subformEntities.size()); log.info("saveDailyReport 批量插入subformData成功, count={}", subformEntities.size());
} }
// 数据同步逻辑(异常隔离:任一同步失败不影响主流程日报落库) /*// 数据同步逻辑(异常隔离:任一同步失败不影响主流程日报落库)
if (Objects.equals(DailyReportTemplateTypeEnum.MERCHANT_DAILY_REPORT.getValue(), templateType)) { if (Objects.equals(DailyReportTemplateTypeEnum.MERCHANT_DAILY_REPORT.getValue(), templateType)) {
try { try {
syncMerchantDailyReport(dailyReportRecordDTO); syncMerchantDailyReport(dailyReportRecordDTO);
...@@ -178,7 +178,7 @@ public class DailyReportRecordService { ...@@ -178,7 +178,7 @@ public class DailyReportRecordService {
} catch (Exception e) { } catch (Exception e) {
log.error("syncStaffDailyReport 同步异常,不影响主流程, merchantId={}", dailyReportRecordDTO.getMerchantId(), e); log.error("syncStaffDailyReport 同步异常,不影响主流程, merchantId={}", dailyReportRecordDTO.getMerchantId(), e);
} }
} }*/
return Boolean.TRUE; return Boolean.TRUE;
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
log.info("保存日报报表数据异常,异常原因:{}", e.getMessage()); log.info("保存日报报表数据异常,异常原因:{}", e.getMessage());
...@@ -1255,6 +1255,8 @@ public class DailyReportRecordService { ...@@ -1255,6 +1255,8 @@ public class DailyReportRecordService {
log.info("condition:{}", condition); log.info("condition:{}", condition);
Page<DailyReportRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount()); Page<DailyReportRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount());
dailyReportRecordMapper.listDailyReportOverview(condition); dailyReportRecordMapper.listDailyReportOverview(condition);
// 员工日报已废弃
if (Objects.equals(condition.getTemplateType(),DailyReportTemplateTypeEnum.STAFF_DAILY_REPORT.getValue()) && CollectionUtils.isNotEmpty(page.getResult())) { if (Objects.equals(condition.getTemplateType(),DailyReportTemplateTypeEnum.STAFF_DAILY_REPORT.getValue()) && CollectionUtils.isNotEmpty(page.getResult())) {
populateOnBreak(page.getResult(), condition); populateOnBreak(page.getResult(), condition);
} }
...@@ -1385,7 +1387,7 @@ public class DailyReportRecordService { ...@@ -1385,7 +1387,7 @@ public class DailyReportRecordService {
dailyReportRecordDTO.setMerchantId(existing.getMerchantId()); dailyReportRecordDTO.setMerchantId(existing.getMerchantId());
dailyReportRecordDTO.setSceneType(existing.getSceneType()); dailyReportRecordDTO.setSceneType(existing.getSceneType());
asyncPushDailyReportData(dailyReportRecordDTO); asyncPushDailyReportData(dailyReportRecordDTO); //TODO 修改群推送逻辑
log.info("pushDailyReport success, id={}", dailyReportRecordId); log.info("pushDailyReport success, id={}", dailyReportRecordId);
return Boolean.TRUE; return Boolean.TRUE;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!