增加任务详情下载字段

master
wujingtao 2 years ago
parent bdfa3f40a5
commit b3b1f4aab7

@ -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 "";
}
}

@ -5,6 +5,9 @@ import lombok.Data;
import java.util.Date; import java.util.Date;
/**
* @author wjt
*/
@Data @Data
public class ResSourceLabel { public class ResSourceLabel {

@ -13,6 +13,7 @@ import com.baiye.constant.DefaultNumberConstants;
import com.baiye.exception.BadRequestException; import com.baiye.exception.BadRequestException;
import com.baiye.feign.SourceClueClient; import com.baiye.feign.SourceClueClient;
import com.baiye.http.CommonResponse; import com.baiye.http.CommonResponse;
import com.baiye.model.enums.ClueStageEnum;
import com.baiye.model.enums.ResponseCode; import com.baiye.model.enums.ResponseCode;
import com.baiye.model.vo.ResSourceLabel; import com.baiye.model.vo.ResSourceLabel;
import com.baiye.modules.report.dao.TaskReportRepository; import com.baiye.modules.report.dao.TaskReportRepository;
@ -254,15 +255,22 @@ public class QueryReportServiceImpl implements QueryReportService {
List<String> label = new ArrayList<>(); List<String> label = new ArrayList<>();
String remark = null; String remark = null;
String nid = null; String nid = null;
//线索创建时间
Date createTime = null;
String clueStage = "";
if (clueMap.containsKey(key)) { if (clueMap.containsKey(key)) {
ResSourceLabel resSourceLabel = clueMap.get(key); ResSourceLabel resSourceLabel = clueMap.get(key);
clueName = resSourceLabel.getName(); clueName = resSourceLabel.getName();
remark = resSourceLabel.getRemark(); remark = resSourceLabel.getRemark();
nid = resSourceLabel.getNid(); nid = resSourceLabel.getNid();
label = JSONUtil.toList(JSONUtil.parseArray(resSourceLabel.getSourceLabel()), String.class); label = JSONUtil.toList(JSONUtil.parseArray(resSourceLabel.getSourceLabel()), String.class);
createTime = resSourceLabel.getCreateTime();
clueStage = ClueStageEnum.findValue(resSourceLabel.getClueStage());
} }
//计算 //计算
LinkedList<Object> linkedList = getDownLoadTaskInfo(clueName, nid, list); LinkedList<Object> linkedList = getDownLoadTaskInfo(clueName, nid, list);
linkedList.add(createTime);
linkedList.add(clueStage);
linkedList.add(remark); linkedList.add(remark);
for (String l : baseLabel) { for (String l : baseLabel) {
if (label.size() > 0 && label.contains(l)) { if (label.size() > 0 && label.contains(l)) {

@ -116,7 +116,11 @@ public class ExportExcelUtil {
List<String> head6 = new ArrayList<>(); List<String> head6 = new ArrayList<>();
head6.add("平均通话时长(秒)"); head6.add("平均通话时长(秒)");
List<String> head7 = new ArrayList<>(); List<String> head7 = new ArrayList<>();
head7.add("备注"); head7.add("线索创建时间");
List<String> head9 = new ArrayList<>();
head9.add("线索阶段");
List<String> head10 = new ArrayList<>();
head10.add("备注");
headList.add(head0); headList.add(head0);
headList.add(head1); headList.add(head1);
headList.add(head8); headList.add(head8);
@ -126,6 +130,8 @@ public class ExportExcelUtil {
headList.add(head5); headList.add(head5);
headList.add(head6); headList.add(head6);
headList.add(head7); headList.add(head7);
headList.add(head9);
headList.add(head10);
for (String s : list) { for (String s : list) {
List<String> head = new ArrayList<>(); List<String> head = new ArrayList<>();
head.add(s); head.add(s);

@ -1,5 +1,6 @@
package com.baiye; package com.baiye;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@ -17,8 +18,10 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableFeignClients @EnableFeignClients
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableScheduling @EnableScheduling
@Slf4j
public class AdPlatformSourceApplication { public class AdPlatformSourceApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(AdPlatformSourceApplication.class, args); SpringApplication.run(AdPlatformSourceApplication.class, args);
log.info("--------------------------------启动成功--------------------------------------");
} }
} }

Loading…
Cancel
Save