CRM:完善客户导入

This commit is contained in:
puhui999
2024-02-22 11:07:34 +08:00
parent b26eb6266f
commit 41b8575b8d
6 changed files with 108 additions and 28 deletions

View File

@ -37,7 +37,10 @@ import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@ -332,8 +335,6 @@ public class CrmCustomerController {
// 获取客户来源
List<String> customerSources = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_SOURCE);
selectMap.add(new KeyValue<>(10, customerSources));
// 升序不然创建下拉会报错
selectMap.sort(Comparator.comparing(item -> item.getValue().size()));
return selectMap;
}

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.AreaConvert;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
@ -39,14 +40,12 @@ public class CrmCustomerImportExcelVO {
@ExcelProperty("邮箱")
private String email;
// TODO @puhui999需要选择省市区需要研究下怎么搞合理点
@ExcelProperty("地区编号")
@ExcelProperty(value = "地区", converter = AreaConvert.class)
private Integer areaId;
@ExcelProperty("详细地址")
private String detailAddress;
// TODO @puhui999industryId、level、source 字段,可以研究下怎么搞下拉框
@ExcelProperty(value = "所属行业", converter = DictConvert.class)
@DictFormat(CRM_CUSTOMER_INDUSTRY)
private Integer industryId;