mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	Excel注解支持设置BigDecimal精度&舍入规则
This commit is contained in:
		@@ -4,6 +4,7 @@ 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数据注解
 | 
			
		||||
@@ -30,7 +31,7 @@ public @interface Excel
 | 
			
		||||
    public String dateFormat() default "";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 如果是字典类型,请设置字典的type值
 | 
			
		||||
     * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
 | 
			
		||||
     */
 | 
			
		||||
    public String dictType() default "";
 | 
			
		||||
 | 
			
		||||
@@ -44,6 +45,16 @@ public @interface Excel
 | 
			
		||||
     */
 | 
			
		||||
    public String separator() default ",";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
 | 
			
		||||
     */
 | 
			
		||||
    public int scale() default -1;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
 | 
			
		||||
     */
 | 
			
		||||
    public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导出类型(0数字 1字符串)
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user