添加线索导入与新增
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
package com.cool.store.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface Excel
|
||||
{
|
||||
/**
|
||||
* 导出时在excel中排序
|
||||
*/
|
||||
int sort() default Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* 导出到Excel中的名字.
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* 日期格式, 如: yyyy-MM-dd
|
||||
*/
|
||||
String dateFormat() default "";
|
||||
|
||||
/**
|
||||
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
||||
*/
|
||||
String readConverterExp() default "";
|
||||
|
||||
/**
|
||||
* 分隔符,读取字符串组内容
|
||||
*/
|
||||
String separator() default ",";
|
||||
|
||||
/**
|
||||
* BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
|
||||
*/
|
||||
int scale() default -1;
|
||||
|
||||
/**
|
||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||
*/
|
||||
int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||
|
||||
/**
|
||||
* 导出类型(0数字 1字符串)
|
||||
*/
|
||||
ColumnType cellType() default ColumnType.STRING;
|
||||
|
||||
/**
|
||||
* 导出时在excel中每个列的高度 单位为字符
|
||||
*/
|
||||
double height() default 14;
|
||||
|
||||
/**
|
||||
* 导出时在excel中每个列的宽 单位为字符
|
||||
*/
|
||||
double width() default 16;
|
||||
|
||||
/**
|
||||
* 文字后缀,如% 90 变成90%
|
||||
*/
|
||||
String suffix() default "";
|
||||
|
||||
/**
|
||||
* 当值为空时,字段的默认值
|
||||
*/
|
||||
String defaultValue() default "";
|
||||
|
||||
/**
|
||||
* 提示信息
|
||||
*/
|
||||
String prompt() default "";
|
||||
|
||||
/**
|
||||
* 设置只能选择不能输入的列内容.
|
||||
*/
|
||||
String[] combo() default {};
|
||||
|
||||
/**
|
||||
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
|
||||
*/
|
||||
boolean isExport() default true;
|
||||
|
||||
/**
|
||||
* 另一个类中的属性名称,支持多级获取,以小数点隔开
|
||||
*/
|
||||
String targetAttr() default "";
|
||||
|
||||
/**
|
||||
* 是否自动统计数据,在最后追加一行统计数据总和
|
||||
*/
|
||||
boolean isStatistics() default false;
|
||||
/**
|
||||
* 列颜色(列头与列内容) IndexedColors.SKY_BLUE.getIndex()
|
||||
*/
|
||||
short columnsColor() default 0;
|
||||
|
||||
/**
|
||||
* 须比较列 注解所在列顺序与比较列属性的值进行比较
|
||||
*/
|
||||
String compareColName() default "";
|
||||
/**
|
||||
* 导出错误信息
|
||||
*/
|
||||
String compareExportInfo() default "";
|
||||
/**
|
||||
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
|
||||
*/
|
||||
Type type() default Type.ALL;
|
||||
|
||||
enum Type
|
||||
{
|
||||
/**
|
||||
* 导出导入
|
||||
*/
|
||||
ALL(0),
|
||||
/**
|
||||
* 仅导出
|
||||
*/
|
||||
EXPORT(1),
|
||||
/**
|
||||
* 仅导入
|
||||
*/
|
||||
IMPORT(2);
|
||||
private final int value;
|
||||
|
||||
Type(int value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
enum ColumnType
|
||||
{
|
||||
/**
|
||||
* 数字
|
||||
*/
|
||||
NUMERIC(0),
|
||||
/**
|
||||
* 字符串
|
||||
*/
|
||||
STRING(1);
|
||||
private final int value;
|
||||
|
||||
ColumnType(int value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Excels
|
||||
{
|
||||
Excel[] value();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.constants;
|
||||
|
||||
/**
|
||||
* hxd
|
||||
*/
|
||||
public class ExcelErrorConstants {
|
||||
|
||||
public static final String NAME_LOSE = "姓名缺失";
|
||||
|
||||
public static final String MOBILE_LOSE= "手机号缺失";
|
||||
|
||||
public static final String MOBILE_ERROR= "手机号有误";
|
||||
|
||||
public static final String MOBILE_EXIST= "手机号已存在";
|
||||
|
||||
public static final String LIVEAREA_LOSE= "常驻区域缺失";
|
||||
|
||||
public static final String LIVEAREA_FORMAT_ERROR= "常驻区域格式错误";
|
||||
|
||||
public static final String WANTSHOPAREA_LOSE= "意向区域缺失";
|
||||
|
||||
public static final String WANTSHOPAREA_FORMAT_ERROR= "意向区域格式错误";
|
||||
|
||||
public static final String ACCEPTADJUSTTYPE_LOSE= "是否接受调剂缺失";
|
||||
|
||||
public static final String INVESTMENTMANAGER_LOSE= "未找到此招商经理,请核实";
|
||||
|
||||
}
|
||||
@@ -34,4 +34,30 @@ public enum AcceptAdjustTypeEnum {
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
public String getMessage(String enums) {
|
||||
return AcceptAdjustTypeEnum.valueOf(enums).getMessage();
|
||||
}
|
||||
|
||||
|
||||
public Integer getCode(String enums) {
|
||||
return AcceptAdjustTypeEnum.valueOf(enums).getCode();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据name查找
|
||||
* @param message 枚举message
|
||||
* @return 枚举对象
|
||||
*/
|
||||
public static Integer findEnumByName(String message) {
|
||||
for (AcceptAdjustTypeEnum statusEnum : AcceptAdjustTypeEnum.values()) {
|
||||
if (statusEnum.getMessage().equals(message)) {
|
||||
//如果需要直接返回code则更改返回类型为String,return statusEnum.code;
|
||||
return statusEnum.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public enum ErrorCodeEnum {
|
||||
INTENT_AREA_NOT_BING_ZONE(500007, "意向区域没有绑定战区 分配招商经理失败!", null),
|
||||
PUBLIC_LINE_NOT_OPERATE(500008, "公海线索不允许操作!", null),
|
||||
PARTNER_BASE_INFO_NOT_EXIST(500009, "加盟商信息不存在!", null),
|
||||
PARTNER_MOBILE_EXIST(500010, "手机号码已存在,请核实!", null),
|
||||
|
||||
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
|
||||
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
||||
|
||||
Reference in New Issue
Block a user