zoukankan      html  css  js  c++  java
  • java基于xml配置的通用excel单表数据导入组件(五、Action处理类)

    package xxxxxx.manage.importexcel;
    
    import java.io.File;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.logging.Logger;
    
    import net.sf.json.JSONObject;
    
    import xxxxxx.supp.ACT_Common;
    
    /**
     * <p>
     * Title:excel数据导入
     * </p>
     * <p>
     * Description:excel数据导入
     * </p>
     * <p>
     * Copyright: Copyright (c) 2013
     * </p>
     * <p>
     * Company:
     * </p>
     * 
     * @author lxj
     * @version 1.0
     */
    
    public class ACT_ImportExcel extends ACT_Common {
    
        private static final Logger logger = Logger.getLogger(ACT_ImportExcel.class
                .getName());
    
        // 返回结果给客户端
        private JSONObject jsonResult;
        private File excel;
        private String excelContentType;
        private String excelFileName;
        private String tableTarget;
    
        /**
         * excel数据导入至"_import"临时表
         * 
         * @return
         */
        public String doImport() {
            DAO_ImportExcel importExcel = new DAO_ImportExcel(tableTarget, excel);
            jsonResult = JSONObject.fromObject(importExcel.doImport());
            return "doFormJSON";
        }
    
        public JSONObject getJsonResult() {
            return jsonResult;
        }
    
        public void setJsonResult(JSONObject jsonResult) {
            this.jsonResult = jsonResult;
        }
    
        public File getExcel() {
            return excel;
        }
    
        public void setExcel(File excel) {
            this.excel = excel;
        }
    
        public String getTableTarget() {
            return tableTarget;
        }
    
        public void setTableTarget(String tableTarget) {
            this.tableTarget = tableTarget;
        }
    
        public String getExcelContentType() {
            return excelContentType;
        }
    
        public void setExcelContentType(String excelContentType) {
            this.excelContentType = excelContentType;
        }
    
        public String getExcelFileName() {
            return excelFileName;
        }
    
        public void setExcelFileName(String excelFileName) {
            this.excelFileName = excelFileName;
        }
    
    }
  • 相关阅读:
    2-3树
    B树
    负载均衡的算法种类
    String源码分析
    实现一个List集合中的某个元素的求和
    就是通过事件方法,在window.loaction.href里追加了参数字符串
    九大内置对象及四个域对象的总结
    BigDecimal add方法问题:调用add后,求和结果没变
    java中List元素移除元素的那些坑
    Java序列化和反序列化,你该知道得更多
  • 原文地址:https://www.cnblogs.com/101key/p/3286533.html
Copyright © 2011-2022 走看看