mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	Excel支持导入Boolean型数据
This commit is contained in:
		@@ -274,6 +274,10 @@ public class ExcelUtil<T>
 | 
			
		||||
                            val = DateUtil.getJavaDate((Double) val);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (Boolean.TYPE == fieldType || Boolean.class == fieldType)
 | 
			
		||||
                    {
 | 
			
		||||
                        val = Convert.toBool(val, false);
 | 
			
		||||
                    }
 | 
			
		||||
                    if (StringUtils.isNotNull(fieldType))
 | 
			
		||||
                    {
 | 
			
		||||
                        Excel attr = field.getAnnotation(Excel.class);
 | 
			
		||||
 
 | 
			
		||||
@@ -204,6 +204,10 @@ public class ReflectUtils
 | 
			
		||||
                            args[i] = DateUtil.getJavaDate((Double) args[i]);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (cs[i] == boolean.class || cs[i] == Boolean.class)
 | 
			
		||||
                    {
 | 
			
		||||
                        args[i] = Convert.toBool(args[i]);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return (E) method.invoke(obj, args);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user