diff --git a/ad-platform-pojo/src/main/java/com/baiye/model/enums/ClueStageEnum.java b/ad-platform-pojo/src/main/java/com/baiye/model/enums/ClueStageEnum.java new file mode 100644 index 00000000..06f3efb1 --- /dev/null +++ b/ad-platform-pojo/src/main/java/com/baiye/model/enums/ClueStageEnum.java @@ -0,0 +1,34 @@ +package com.baiye.model.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author wujingtao + * @date 2022/05/19 + */ +@Getter +@AllArgsConstructor +public enum ClueStageEnum { + /** + * 新线索 + */ + NEW_CLUE(0, "新线索"), + FOLLOWED(1, "待沟通"), + INTENTION(3, "有意向"), + ADD_WE_CHAT(3, "已加微信"), + TO_INTENTION(4, "无意向"), + ; + + private final Integer type; + private final String value; + + public static String findValue(Integer type) { + for (ClueStageEnum clueStageEnum : ClueStageEnum.values()) { + if (type.equals(clueStageEnum.type)) { + return clueStageEnum.getValue(); + } + } + return ""; + } +} diff --git a/ad-platform-pojo/src/main/java/com/baiye/model/vo/ResSourceLabel.java b/ad-platform-pojo/src/main/java/com/baiye/model/vo/ResSourceLabel.java index 9bc75637..18c30016 100644 --- a/ad-platform-pojo/src/main/java/com/baiye/model/vo/ResSourceLabel.java +++ b/ad-platform-pojo/src/main/java/com/baiye/model/vo/ResSourceLabel.java @@ -5,6 +5,9 @@ import lombok.Data; import java.util.Date; +/** + * @author wjt + */ @Data public class ResSourceLabel { diff --git a/manage/ad-platform-management/src/main/java/com/baiye/modules/report/service/impl/QueryReportServiceImpl.java b/manage/ad-platform-management/src/main/java/com/baiye/modules/report/service/impl/QueryReportServiceImpl.java index cf487c57..87cd594c 100644 --- a/manage/ad-platform-management/src/main/java/com/baiye/modules/report/service/impl/QueryReportServiceImpl.java +++ b/manage/ad-platform-management/src/main/java/com/baiye/modules/report/service/impl/QueryReportServiceImpl.java @@ -13,6 +13,7 @@ import com.baiye.constant.DefaultNumberConstants; import com.baiye.exception.BadRequestException; import com.baiye.feign.SourceClueClient; import com.baiye.http.CommonResponse; +import com.baiye.model.enums.ClueStageEnum; import com.baiye.model.enums.ResponseCode; import com.baiye.model.vo.ResSourceLabel; import com.baiye.modules.report.dao.TaskReportRepository; @@ -254,15 +255,22 @@ public class QueryReportServiceImpl implements QueryReportService { List label = new ArrayList<>(); String remark = null; String nid = null; + //线索创建时间 + Date createTime = null; + String clueStage = ""; if (clueMap.containsKey(key)) { ResSourceLabel resSourceLabel = clueMap.get(key); clueName = resSourceLabel.getName(); remark = resSourceLabel.getRemark(); nid = resSourceLabel.getNid(); label = JSONUtil.toList(JSONUtil.parseArray(resSourceLabel.getSourceLabel()), String.class); + createTime = resSourceLabel.getCreateTime(); + clueStage = ClueStageEnum.findValue(resSourceLabel.getClueStage()); } //计算 LinkedList linkedList = getDownLoadTaskInfo(clueName, nid, list); + linkedList.add(createTime); + linkedList.add(clueStage); linkedList.add(remark); for (String l : baseLabel) { if (label.size() > 0 && label.contains(l)) { diff --git a/manage/ad-platform-management/src/main/java/com/baiye/util/ExportExcelUtil.java b/manage/ad-platform-management/src/main/java/com/baiye/util/ExportExcelUtil.java index 57e7076d..82664d63 100644 --- a/manage/ad-platform-management/src/main/java/com/baiye/util/ExportExcelUtil.java +++ b/manage/ad-platform-management/src/main/java/com/baiye/util/ExportExcelUtil.java @@ -116,7 +116,11 @@ public class ExportExcelUtil { List head6 = new ArrayList<>(); head6.add("平均通话时长(秒)"); List head7 = new ArrayList<>(); - head7.add("备注"); + head7.add("线索创建时间"); + List head9 = new ArrayList<>(); + head9.add("线索阶段"); + List head10 = new ArrayList<>(); + head10.add("备注"); headList.add(head0); headList.add(head1); headList.add(head8); @@ -126,6 +130,8 @@ public class ExportExcelUtil { headList.add(head5); headList.add(head6); headList.add(head7); + headList.add(head9); + headList.add(head10); for (String s : list) { List head = new ArrayList<>(); head.add(s); diff --git a/services/ad-platform-source/src/main/java/com/baiye/AdPlatformSourceApplication.java b/services/ad-platform-source/src/main/java/com/baiye/AdPlatformSourceApplication.java index 2f4b4c53..b59c89ff 100644 --- a/services/ad-platform-source/src/main/java/com/baiye/AdPlatformSourceApplication.java +++ b/services/ad-platform-source/src/main/java/com/baiye/AdPlatformSourceApplication.java @@ -1,5 +1,6 @@ package com.baiye; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @@ -17,8 +18,10 @@ import org.springframework.scheduling.annotation.EnableScheduling; @EnableFeignClients @EnableDiscoveryClient @EnableScheduling +@Slf4j public class AdPlatformSourceApplication { public static void main(String[] args) { SpringApplication.run(AdPlatformSourceApplication.class, args); + log.info("--------------------------------启动成功--------------------------------------"); } }