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;
        }
    
    }
  • 相关阅读:
    aps.net 图形验证码(转)
    js浮点数计算问题 + 金额大写转换
    meta标签总结
    Asp.net Session 保存到MySql中
    css3实现边框圆角样式
    iOS开发之NSOperation & NSOperationQueue
    iOS开发之多线程
    iOS开发之Block
    iOS开发之核心动画(Core Animation)
    iOS开发之CALayer
  • 原文地址:https://www.cnblogs.com/101key/p/3286533.html
Copyright © 2011-2022 走看看