添砖-JAVA\Administrator
7 months ago
23 changed files with 641 additions and 62 deletions
@ -0,0 +1,21 @@ |
|||
package com.win.framework.excel.core.annotations; |
|||
|
|||
import org.apache.poi.ss.usermodel.IndexedColors; |
|||
|
|||
import java.lang.annotation.*; |
|||
|
|||
/** |
|||
* 导出excel头部颜色设置 |
|||
*/ |
|||
@Target({ElementType.FIELD}) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
@Inherited |
|||
public @interface Colour { |
|||
|
|||
/** |
|||
* 颜色值 |
|||
* |
|||
* @return 颜色字典类型 |
|||
*/ |
|||
IndexedColors value(); |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.win.framework.excel.core.annotations; |
|||
|
|||
import java.lang.annotation.ElementType; |
|||
import java.lang.annotation.Retention; |
|||
import java.lang.annotation.RetentionPolicy; |
|||
import java.lang.annotation.Target; |
|||
|
|||
/** |
|||
* 导入必填字段 |
|||
*/ |
|||
@Target(ElementType.FIELD) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
public @interface ExcelValid { |
|||
|
|||
String message() default "导入有未填入的字段"; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.eam.controller.item.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Builder; |
|||
import lombok.Data; |
|||
import lombok.ToString; |
|||
|
|||
@Data |
|||
@Builder |
|||
@ToString(callSuper = true) |
|||
public class ItemImportErrorVO extends ItemImportExcelVo { |
|||
|
|||
|
|||
@ExcelProperty(value = "导入状态", index = 0) |
|||
private String importStatus; |
|||
|
|||
@ExcelProperty(value = "导入说明", index = 2) |
|||
private String importRemark; |
|||
|
|||
@ExcelProperty(value = "行号", index = 1) |
|||
private String rowNumber; |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.win.module.eam.controller.item.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.ExcelValid; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
|||
public class ItemImportExcelVo { |
|||
|
|||
@ExcelProperty("零件编码") |
|||
@ExcelValid(message = "必填") |
|||
private String number; |
|||
|
|||
@ExcelProperty("零件名称") |
|||
private String name; |
|||
|
|||
@ExcelProperty("规格型号") |
|||
private String specifications; |
|||
|
|||
@ExcelProperty("单位") |
|||
private String uom; |
|||
|
|||
@ExcelProperty("供应商名称") |
|||
private String supplierName; |
|||
|
|||
@ExcelProperty("生产厂家(品牌)") |
|||
private String brand; |
|||
|
|||
@ExcelProperty("最高库存") |
|||
private Integer maxInventory; |
|||
|
|||
@ExcelProperty("最低库存") |
|||
private Integer minInventory; |
|||
|
|||
@ExcelProperty("采购周期(周)") |
|||
private Integer procurementCycle; |
|||
|
|||
@ExcelProperty("ABC分类") |
|||
private String classification; |
|||
|
|||
@ExcelProperty("使用地点") |
|||
private String usePlace; |
|||
|
|||
@ExcelProperty("项目") |
|||
private String project; |
|||
|
|||
@ExcelProperty("价格") |
|||
private BigDecimal price; |
|||
|
|||
@ExcelProperty("描述") |
|||
private String describes; |
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.win.module.eam.controller.item.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
|
|||
/** |
|||
* 采购索赔申请子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
|||
public class ItemImportVO { |
|||
|
|||
@ExcelProperty("零件编码") |
|||
private String number; |
|||
|
|||
@ExcelProperty("零件名称") |
|||
private String name; |
|||
|
|||
@ExcelProperty("规格型号") |
|||
private String specifications; |
|||
|
|||
@ExcelProperty("单位") |
|||
private String uom; |
|||
|
|||
@ExcelProperty("供应商名称") |
|||
private String supplierName; |
|||
|
|||
@ExcelProperty("生产厂家(品牌)") |
|||
private String brand; |
|||
|
|||
@ExcelProperty("最高库存") |
|||
private Integer maxInventory; |
|||
|
|||
@ExcelProperty("最低库存") |
|||
private Integer minInventory; |
|||
|
|||
@ExcelProperty("采购周期(周)") |
|||
private Integer procurementCycle; |
|||
|
|||
@ExcelProperty("ABC分类") |
|||
private String classification; |
|||
|
|||
@ExcelProperty("使用地点") |
|||
private String usePlace; |
|||
|
|||
@ExcelProperty("项目") |
|||
private String project; |
|||
|
|||
@ExcelProperty("价格") |
|||
private BigDecimal price; |
|||
|
|||
@ExcelProperty("描述") |
|||
private String describes; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.eam.controller.location.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Builder; |
|||
import lombok.Data; |
|||
import lombok.ToString; |
|||
|
|||
@Data |
|||
@Builder |
|||
@ToString(callSuper = true) |
|||
public class LocationImportErrorVO extends LocationImportExcelVo { |
|||
|
|||
|
|||
@ExcelProperty(value = "导入状态", index = 0) |
|||
private String importStatus; |
|||
|
|||
@ExcelProperty(value = "导入说明", index = 2) |
|||
private String importRemark; |
|||
|
|||
@ExcelProperty(value = "行号", index = 1) |
|||
private String rowNumber; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.win.module.eam.controller.location.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.win.framework.excel.core.annotations.ExcelValid; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
|||
public class LocationImportExcelVo { |
|||
|
|||
@ExcelProperty("库位编码") |
|||
@ExcelValid(message = "必填") |
|||
private String number; |
|||
|
|||
@ExcelProperty("库位名称") |
|||
@ColumnWidth(value = 20) |
|||
private String name; |
|||
|
|||
@ExcelProperty("库区编号") |
|||
@ColumnWidth(value = 20) |
|||
private String areaNumber; |
|||
|
|||
@ExcelProperty("描述") |
|||
@ColumnWidth(value = 30) |
|||
private String description; |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.win.module.eam.controller.location.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
|
|||
/** |
|||
* 采购索赔申请子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
|||
public class LocationImportVO { |
|||
|
|||
@ExcelProperty("库位编号") |
|||
@ColumnWidth(value = 20) |
|||
private String number; |
|||
|
|||
@ExcelProperty("库位名称") |
|||
@ColumnWidth(value = 20) |
|||
private String name; |
|||
|
|||
@ExcelProperty("库区编号") |
|||
@ColumnWidth(value = 20) |
|||
private String areaNumber; |
|||
|
|||
@ExcelProperty("描述") |
|||
@ColumnWidth(value = 30) |
|||
private String description; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.eam.controller.locationarea.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Builder; |
|||
import lombok.Data; |
|||
import lombok.ToString; |
|||
|
|||
@Data |
|||
@Builder |
|||
@ToString(callSuper = true) |
|||
public class LocationAreaImportErrorVO extends LocationAreaImportExcelVO { |
|||
|
|||
|
|||
@ExcelProperty(value = "导入状态", index = 0) |
|||
private String importStatus; |
|||
|
|||
@ExcelProperty(value = "导入说明", index = 2) |
|||
private String importRemark; |
|||
|
|||
@ExcelProperty(value = "行号", index = 1) |
|||
private String rowNumber; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.win.module.eam.controller.locationarea.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
|||
public class LocationAreaImportExcelVO { |
|||
|
|||
@ExcelProperty("库区编号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("库区名称") |
|||
private String name; |
|||
|
|||
@ExcelProperty("描述") |
|||
private String description; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.win.module.eam.controller.locationarea.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
|
|||
/** |
|||
* 采购索赔申请子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
|||
public class LocationAreaImportVO { |
|||
|
|||
@ExcelProperty("库区编号") |
|||
@ColumnWidth(value = 20) |
|||
private String number; |
|||
|
|||
@ExcelProperty("库区名称") |
|||
@ColumnWidth(value = 20) |
|||
private String name; |
|||
|
|||
@ExcelProperty("描述") |
|||
@ColumnWidth(value = 30) |
|||
private String description; |
|||
|
|||
} |
Loading…
Reference in new issue