|
@@ -1,48 +1,17 @@
|
|
|
package com.sd.business.entity.excel.enums;
|
|
|
|
|
|
-import com.ruoyi.common.exception.ServiceException;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Getter;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
@Getter
|
|
|
@AllArgsConstructor
|
|
|
public enum ExcelTypeEnum {
|
|
|
|
|
|
- DOCUMENT_BY_WLN_ORDER(1, "万里牛订单对账单"),
|
|
|
- DOCUMENT_BY_PURCHASE_ORDER(2, "采购订单对账单"),
|
|
|
- DOCUMENT_BY_OUTSOURCE_ORDER(3, "委外订单对账单"),
|
|
|
- DOCUMENT_BY_AFTER_SALE_ORDER(4, "售后订单对账单"),
|
|
|
- DOCUMENT_BY_NO_REASON_ORDER(5, "无理由订单对账单"),
|
|
|
- STATISTICS_DOCUMENT_BY_WLN_ORDER(6, "万里牛订单对账报表"),
|
|
|
- STATISTICS_DOCUMENT_BY_PURCHASE_ORDER(7, "采购订单对账报表"),
|
|
|
- STATISTICS_DOCUMENT_BY_OUTSOURCE_ORDER(8, "委外订单对账报表"),
|
|
|
- STATISTICS_DOCUMENT_BY_AFTER_SALE_ORDER(9, "售后订单对账报表"),
|
|
|
- STATISTICS_DOCUMENT_BY_NO_REASON_ORDER(10, "无理由订单对账报表"),
|
|
|
+ DOCUMENT_BY_ORDER(1, "订单对账单"),
|
|
|
+ STATISTICS_DOCUMENT_BY_ORDER(2, "订单对账报表"),
|
|
|
;
|
|
|
|
|
|
private final Integer type;
|
|
|
private final String explain;
|
|
|
|
|
|
- private static final Map<Integer, ExcelTypeEnum> map = new HashMap<>();
|
|
|
-
|
|
|
- static {
|
|
|
- for (ExcelTypeEnum excelTypeEnum : values()) {
|
|
|
- map.put(excelTypeEnum.getType(), excelTypeEnum);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 通过key获取名称
|
|
|
- */
|
|
|
- public static ExcelTypeEnum get(Integer key) {
|
|
|
- ExcelTypeEnum excelTypeEnum = map.get(key);
|
|
|
- if (excelTypeEnum == null) {
|
|
|
- throw new ServiceException("未知导出状态:" + key);
|
|
|
- }
|
|
|
- return excelTypeEnum;
|
|
|
- }
|
|
|
-
|
|
|
}
|