自己封装的POI + Struts2 实现Excel导出工具包

转自:http://merrygrass.iteye.com/blog/558274


1、注解 

Java代码   收藏代码
  1. package lml.excel.annotation;  
  2.   
  3. import java.lang.annotation.Retention;  
  4. import java.lang.annotation.RetentionPolicy;  
  5.   
  6. /** 
  7.  * @author MerryGrass 
  8.  * 自定义注解 
  9.  */  
  10.   
  11. @Retention(RetentionPolicy.RUNTIME)  
  12. public @interface PropertyAnnotation  
  13. {  
  14.     /** 
  15.      * 属性名称描述 (默认值为 "Unknown") 
  16.      * @return String 
  17.      */  
  18.     String PropertyName() default "Unknown";  
  19.       
  20.     /** 
  21.      * 属性索引键 (默认值为 "-1") 
  22.      * @return int 
  23.      */  
  24.     int PropertySortKey() default -1;  
  25. }  

2、接口 
Java代码   收藏代码
  1. /** 
  2.  *  
  3.  */  
  4. package lml.excel.service;  
  5.   
  6. import java.util.List;  
  7.   
  8.   
  9. public interface CreateExcel {  
  10.       
  11.     /** 
  12.      * 创建一个sheet 
  13.      * @param sheetName 
  14.      *          sheet名字 
  15.      */  
  16.     public void createSheet(String sheetName);  
  17.       
  18.     /** 
  19.      * 创建一行  
  20.      */  
  21.     public void createRow();  
  22.       
  23.     /** 
  24.      * 创建一个单元格 
  25.      * @param cellNum 
  26.      *          单元格所属位置 
  27.      */  
  28.     public void createCell(int cellNum);  
  29.       
  30.     /** 
  31.      * 设置一个单元格内容 
  32.      * @param data 
  33.      *          单元格内容 
  34.      * @param cellNum 
  35.      *          单元格所属位置 
  36.      */  
  37.     public void setCell(String data, int cellNum);  
  38.       
  39.     /** 
  40.      * 设置标题内容 
  41.      * @param title 
  42.      *          标题 
  43.      * @return CreateExcel 
  44.      */  
  45.     public CreateExcel setTitle(String title);  
  46.       
  47.     /** 
  48.      * 设置表头内容 
  49.      * @return CreateExcel 
  50.      */  
  51.     public CreateExcel setHead();  
  52.       
  53.     /** 
  54.      * 设置单元格内容 
  55.      * @param datas 
  56.      *          单元格数据 
  57.      * @return CreateExcel 
  58.      */  
  59.     public CreateExcel setCellData(List<?> datas) throws Exception;  
  60. }  

Java代码   收藏代码
  1. /** 
  2.  *  
  3.  */  
  4. package lml.excel.service;  
  5.   
  6. import java.util.List;  
  7.   
  8. public interface ExcelInfo {  
  9.       
  10.       
  11.     /** 
  12.      * 获取表头数据 
  13.      * @return String[] 表头数据所组成的数组 
  14.      */  
  15.     public List<String> getHeaders();  
  16.       
  17.     /** 
  18.      * 获取有效属性所对应的值 
  19.      * @param obj 
  20.      *          对象 
  21.      * @param methodName 
  22.      *          方法名 
  23.      * @return String 
  24.      */  
  25.     public String getContent(Object obj, String methodName) throws Exception;  
  26.       
  27. }  


Java代码   收藏代码
  1. package lml.excel.service;  
  2.   
  3. import java.io.InputStream;  
  4. import java.util.List;  
  5.   
  6. import org.apache.poi.hssf.usermodel.HSSFWorkbook;  
  7.   
  8.   
  9. public interface ExcelService {  
  10.       
  11.     /** 
  12.      * 获取Excel 
  13.      * @param clazz 
  14.      *          类名 
  15.      * @param datas 
  16.      *          数据 
  17.      * @param title 
  18.      *          标题 
  19.      * @return 
  20.      */  
  21.     public InputStream getExcelInputStream(String clazz, List<?> datas, String title,List<String> fieldsName) throws Exception;  
  22.       
  23.     /** 
  24.      * 创建Excel 
  25.      * @param clazz 
  26.      *          类名 
  27.      * @param datas 
  28.      *          数据 
  29.      * @param title 
  30.      *          标题 
  31.      * @return 
  32.      */  
  33.     public HSSFWorkbook createExcel(String clazz, List<?> datas, String title,List<String> fieldsName) throws Exception;  
  34. }  


3、实现类 
Java代码   收藏代码
  1. package lml.excel.service.impl;  
  2.   
  3. import java.util.List;  
  4.   
  5. import lml.excel.service.CreateExcel;  
  6.   
  7. import org.apache.poi.hssf.usermodel.HSSFCell;  
  8. import org.apache.poi.hssf.usermodel.HSSFCellStyle;  
  9. import org.apache.poi.hssf.usermodel.HSSFFont;  
  10. import org.apache.poi.hssf.usermodel.HSSFRow;  
  11. import org.apache.poi.hssf.usermodel.HSSFSheet;  
  12. import org.apache.poi.hssf.usermodel.HSSFWorkbook;  
  13. import org.apache.poi.hssf.util.Region;  
  14.   
  15. public class CreateExcelImpl implements CreateExcel {  
  16.   
  17.     private HSSFWorkbook wb = null;  
  18.     private HSSFSheet sheet = null;  
  19.     private HSSFRow row = null;  
  20.     private HSSFCell cell = null;  
  21.     private ExcelInfoImpl excelInfo = null;  
  22.     private int rowNum = 0//当前需要创建的行数,初始化为0  
  23.       
  24.     /** 
  25.      * 初始化HSSFWorkbook,并默认创建一个sheet 
  26.      * @param className 
  27.      *          类的全路径 
  28.      */  
  29.     public CreateExcelImpl(String className,List<String> fieldsName){  
  30.         wb = new HSSFWorkbook();  
  31.         createSheet("sheet1");  
  32.         excelInfo = new ExcelInfoImpl(className,fieldsName);  
  33.     }  
  34.       
  35.     /** 
  36.      * 创建一个单元格 
  37.      * @param cellNum 
  38.      *          单元格所属位置 
  39.      */  
  40.     public void createCell(int cellNum) {  
  41.         cell = row.createCell((short)cellNum);  
  42.   
  43.     }  
  44.   
  45.     /** 
  46.      * 创建一行,并把当前行加1  
  47.      */  
  48.     public void createRow() {  
  49.         row = sheet.createRow(rowNum);  
  50.         rowNum++;  
  51.     }  
  52.   
  53.     /** 
  54.      * 创建一个sheet 
  55.      * @param sheetName 
  56.      *          sheet名字 
  57.      */  
  58.     public void createSheet(String sheetName) {  
  59.         sheet = wb.createSheet(sheetName);  
  60.   
  61.     }  
  62.   
  63.     /** 
  64.      * 设置一个单元格内容 
  65.      * @param data 
  66.      *          单元格内容 
  67.      * @param cellNum 
  68.      *          单元格所属位置 
  69.      */  
  70.     public void setCell(String data, int cellNum) {  
  71.         createCell(cellNum);  
  72.         cell.setEncoding(HSSFCell.ENCODING_UTF_16);  
  73.         cell.setCellValue(data);  
  74.     }  
  75.   
  76.     /** 
  77.      * 设置单元格内容 
  78.      * @param datas 
  79.      *          单元格数据 
  80.      * @return 当前对象 
  81.      */  
  82.     public CreateExcelImpl setCellData(List<?> datas) throws Exception{  
  83.         List<String> list = excelInfo.getPropertys();  
  84.           
  85.         for(int j = 0; j < datas.size(); j++){  
  86.             Object obj = datas.get(j);  
  87.             createRow();  
  88.             for(int i = 0; i < list.size(); i++){  
  89.                 setCell(excelInfo.getContent(obj, list.get(i)),i);  
  90.             }  
  91.         }  
  92.         return this;  
  93.     }  
  94.   
  95.     /** 
  96.      * 设置表头内容 
  97.      * @return 当前对象 
  98.      */  
  99.     public CreateExcelImpl setHead() {  
  100.         List<String> datas = excelInfo.getPropertyNames();  
  101.         if(datas.size() == 0){  
  102.             datas = excelInfo.getHeaders();  
  103.         }  
  104.         createRow();  
  105.         for(int i = 0; i < datas.size(); i++){  
  106.             setCell((String)datas.get(i), i);  
  107.         }  
  108.         return this;  
  109.     }  
  110.   
  111.     /** 
  112.      * 设置标题内容 
  113.      * @param title 
  114.      *          标题 
  115.      * @return 当前对象 
  116.      */  
  117.     public CreateExcelImpl setTitle(String title) {  
  118.         this.createRow();  
  119.         this.createCell(0);  
  120.           
  121.         HSSFFont titlefont = wb.createFont();  
  122.         titlefont.setFontName("Arial");  
  123.         titlefont.setBoldweight(titlefont.BOLDWEIGHT_BOLD);  
  124.         titlefont.setFontHeight((short)400);  
  125.         HSSFCellStyle titleStyle = wb.createCellStyle();  
  126.         titleStyle.setFont(titlefont);  
  127.         titleStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);  
  128.         cell.setCellStyle(titleStyle);  
  129.         cell.setEncoding(HSSFCell.ENCODING_UTF_16);  
  130.           
  131.         cell.setCellValue(title);  
  132.         sheet.addMergedRegion(new Region(0, (short)01, (short)(excelInfo.getNum()-1)));  
  133.         rowNum++;  
  134.         return this;  
  135.     }  
  136.   
  137.     /** 
  138.      * 获取HSSFWorkbook 
  139.      * @return HSSFWorkbook 
  140.      */  
  141.     public HSSFWorkbook getWb() {  
  142.         return wb;  
  143.     }  
  144.   
  145. }  

Java代码   收藏代码
  1. package lml.excel.service.impl;  
  2.   
  3. import java.lang.reflect.Field;  
  4. import java.lang.reflect.Method;  
  5. import java.util.ArrayList;  
  6. import java.util.HashMap;  
  7. import java.util.List;  
  8. import java.util.Map;  
  9.   
  10. import lml.excel.annotation.PropertyAnnotation;  
  11. import lml.excel.service.ExcelInfo;  
  12.   
  13. /** 
  14.  * 获取相应类实例的有效信息 
  15.  * 
  16.  */  
  17. @SuppressWarnings("unchecked")  
  18. public class ExcelInfoImpl implements ExcelInfo {  
  19.   
  20.     private Class clazz = null;  
  21.       
  22.     //有效属性个数  
  23.     private int num = 0;  
  24.       
  25.     //有效属性数组  
  26.     private List<String> propertys = new ArrayList<String>();  
  27.       
  28.     //有效属性信息数组  
  29.     List<String> propertyNames = new ArrayList<String>();  
  30.       
  31. //  需导出字段  
  32.     List<String> fieldsName = new ArrayList<String>();  
  33.       
  34.     //有效属性排序键  
  35. //  List<Integer> sortKey = new ArrayList<Integer>();  
  36.       
  37.     /** 
  38.      * 得到类实例 
  39.      * @param className 
  40.      *          类的全路径 
  41.      */  
  42.     public ExcelInfoImpl(String className,List<String> fieldsName){  
  43.         this.fieldsName = fieldsName;  
  44.         try{  
  45.             clazz = Class.forName(className);  
  46.         }catch(Exception e){  
  47.             e.printStackTrace();  
  48.         }  
  49.           
  50.     }  
  51.       
  52.     /** 
  53.      * 获取有效属性所对应的值 
  54.      * @param methodName 
  55.      *          有效属性 
  56.      * @return String  
  57.      */  
  58.     @SuppressWarnings("unchecked")  
  59.     public String getContent(Object obj, String methodName) throws Exception {  
  60.         String realMethodName = "get" + methodName.substring(0,1).toUpperCase() + methodName.substring(1);  
  61.         Method method = clazz.getMethod(realMethodName, new Class[]{});  
  62.         if(null == method.invoke(obj, new Object[]{}) || "".equals(method.invoke(obj, new Object[]{}))){  
  63.             return "";  
  64.         }else{  
  65.             return method.invoke(obj, new Object[]{}).toString();  
  66.         }  
  67.     }  
  68.   
  69.     /** 
  70.      * 获取表头数据 
  71.      * @return String[] 表头数据所组成的数组 
  72.      */  
  73.     @SuppressWarnings("unchecked")  
  74.     public List<String> getHeaders() {  
  75.         //得到类实例的所有属性  
  76.         Field[] fields = clazz.getDeclaredFields();  
  77.         //属性信息  
  78.         String propertyName = "";  
  79.           
  80.         int PropertySortKey = 0;  
  81.           
  82.         Map mapPropertys = new HashMap();  
  83.           
  84.         Map mapPropertyNames = new HashMap();  
  85.           
  86.         boolean flag = false;  
  87.         //通过循环比较得到有效属性  
  88.           
  89.         if(0 != this.fieldsName.size()){  
  90.             for(int i = 0;i < fields.length;i++){  
  91.                 if(null == fields[i].getAnnotation(PropertyAnnotation.class)){  
  92.                     continue;  
  93.                 }  
  94.                 propertyName = fields[i].getAnnotation(PropertyAnnotation.class).PropertyName();  
  95.                 for(String str : fieldsName){  
  96.                     if(str.equals(propertyName)){  
  97.                         propertys.add(fields[i].getName());  
  98.                         propertyNames.add(propertyName);  
  99.                     }  
  100.                 }  
  101.             }  
  102.         }else{  
  103.             //通过循环比较得到有效属性  
  104.             for(int i = 0; i < fields.length; i++){    
  105.                 //得到相应属性的信息  
  106.                     if(null == fields[i].getAnnotation(PropertyAnnotation.class)){  
  107.                         continue;  
  108.                     }  
  109.                       
  110.                 propertyName = fields[i].getAnnotation(PropertyAnnotation.class).PropertyName();  
  111.                 PropertySortKey = fields[i].getAnnotation(PropertyAnnotation.class).PropertySortKey();  
  112.                 //判断是否为有效属性  
  113.                 if(null != propertyName){  
  114.                     if(!flag){  
  115.                         if(PropertySortKey == -1){  
  116.                             if("Unknown".equals(propertyName)){  
  117.                                 propertys.add(fields[i].getName());  
  118.                                 propertyNames.add(fields[i].getName());  
  119.                             }else{  
  120.                                 propertys.add(fields[i].getName());  
  121.                                 propertyNames.add(propertyName);  
  122.                             }  
  123.                         }else{  
  124.                             flag = true;  
  125.                         }  
  126.                     }  
  127.                     if(flag){  
  128.                         if("Unknown".equals(propertyName)){  
  129.                             mapPropertys.put(PropertySortKey, fields[i].getName());  
  130.                             mapPropertyNames.put(PropertySortKey, fields[i].getName());  
  131.                         }else{  
  132.                             mapPropertys.put(PropertySortKey, fields[i].getName());  
  133.                             mapPropertyNames.put(PropertySortKey, propertyName);  
  134.                         }  
  135.                     }  
  136.                       
  137.                 }  
  138.             }  
  139.             if(flag){  
  140.                 sortPropertys(mapPropertys,mapPropertyNames);  
  141.             }  
  142.         }  
  143.         return propertyNames;  
  144.     }  
  145.       
  146.     //有效属性排序  
  147.   
  148.     public void sortPropertys(Map mapPropertys, Map mapPropertyNames){  
  149.           
  150.         for(int i = 1; i <= mapPropertys.size(); i++){  
  151.             propertys.add((String)mapPropertys.get(i));  
  152.             propertyNames.add((String)mapPropertyNames.get(i));  
  153.         }  
  154.           
  155.     }  
  156.   
  157.     /** 
  158.      * 获取有效属性数组 
  159.      * @return 
  160.      */  
  161.     public List<String> getPropertys() {  
  162.         return propertys;  
  163.     }  
  164.   
  165.     /** 
  166.      * 获取有效属性信息 
  167.      * @return 
  168.      */  
  169.     public List<String> getPropertyNames() {  
  170.         return propertyNames;  
  171.     }  
  172.   
  173.     /** 
  174.      * 获取有效属性个数 
  175.      * @return 
  176.      */  
  177.     public int getNum() {  
  178.         num = getPropertys().size();  
  179.         if(num == 0){  
  180.             getHeaders();  
  181.             num = getPropertys().size();  
  182.         }  
  183.         return num;  
  184.     }  
  185.       
  186.       
  187.       
  188. }  


Java代码   收藏代码
  1. package lml.excel.service.impl;  
  2.   
  3. import java.io.ByteArrayInputStream;  
  4. import java.io.ByteArrayOutputStream;  
  5. import java.io.IOException;  
  6. import java.io.InputStream;  
  7. import java.util.List;  
  8.   
  9. import org.apache.poi.hssf.usermodel.HSSFWorkbook;  
  10.   
  11. import lml.excel.service.ExcelService;  
  12.   
  13. /** 
  14.  * 创建并获取Excel的服务类 
  15.  * 
  16.  */  
  17. public class ExcelServiceImpl implements ExcelService {  
  18.   
  19.     /** 
  20.      * 创建Excel 
  21.      * @param clazz 
  22.      *          类名 
  23.      * @param datas 
  24.      *          数据 
  25.      * @param title 
  26.      *          标题 
  27.      * @return 
  28.      */  
  29.     public HSSFWorkbook createExcel(String clazz, List<?> datas, String title,List<String> fieldsName) throws Exception{  
  30.         CreateExcelImpl createExcel = new CreateExcelImpl(clazz,fieldsName);   
  31.         //创建标题、表头、以及单元格数据  
  32.         createExcel.setTitle(title).setHead().setCellData(datas);  
  33.           
  34.         return createExcel.getWb();  
  35.     }  
  36.   
  37.     /** 
  38.      * 获取Excel 
  39.      * @param clazz 
  40.      *          类名 
  41.      * @param datas 
  42.      *          数据 
  43.      * @param title 
  44.      *          标题 
  45.      * @return 
  46.      */  
  47.     public InputStream getExcelInputStream(String clazz, List<?> datas,  
  48.             String title,List<String> fieldsName) throws Exception {  
  49.           
  50.         ByteArrayOutputStream os = new ByteArrayOutputStream();  
  51.           
  52.         try  
  53.         {     
  54.             createExcel(clazz, datas, title,fieldsName).write(os);  
  55.         }  
  56.         catch (IOException e)  
  57.         {  
  58.             e.printStackTrace();  
  59.         }  
  60.           
  61.         byte[] content = os.toByteArray();  
  62.           
  63.         InputStream is = new ByteArrayInputStream(content);  
  64.           
  65.         return is;  
  66.     }  
  67.   
  68.       
  69. }  


4、Demo Action 
Java代码   收藏代码
  1. package lml.sf.pojo.action;  
  2.   
  3. import java.io.InputStream;  
  4. import java.io.UnsupportedEncodingException;  
  5. import java.util.ArrayList;  
  6. import java.util.List;  
  7.   
  8. import lml.base.BaseDAO;  
  9. import lml.excel.service.impl.ExcelServiceImpl;  
  10. import lml.sf.pojo.V_SF_STUINFO;  
  11.   
  12. import com.opensymphony.xwork2.ActionSupport;  
  13.   
  14. public class STUINFOAction extends ActionSupport {  
  15.     private String filename;  
  16.     private String Tempstr;  
  17.     private List<String> fieldsName = new ArrayList<String>();  
  18.       
  19.     private InputStream downStream;  
  20.       
  21.     public String getFilename() {  
  22.         try {  
  23.             filename = new String(filename.getBytes(),"ISO8859-1");  
  24.         } catch (UnsupportedEncodingException e) {  
  25.             e.printStackTrace();  
  26.         }  
  27.         return filename + ".xls";  
  28.     }  
  29.     public void setFilename(String filename) {  
  30.         this.filename = filename;  
  31.     }  
  32.     public List<String> getFieldsName() {  
  33.         return fieldsName;  
  34.     }  
  35.     public void setFieldsName(List<String> fieldsName) {  
  36.         this.fieldsName = fieldsName;  
  37.     }  
  38.       
  39.     public InputStream getDownStream() throws Exception{  
  40.         return downStream;  
  41.     }  
  42.     public void setDownStream(InputStream downStream) {  
  43.         this.downStream = downStream;  
  44.     }  
  45.     public String getTempstr() {  
  46.         return Tempstr;  
  47.     }  
  48.     public void setTempstr(String tempstr) {  
  49.         Tempstr = tempstr;  
  50.     }  
  51.       
  52.       
  53.       
  54.     public String initExcel(){  
  55.         return SUCCESS;  
  56.     }  
  57.       
  58.     @Override  
  59.     public String execute() throws Exception {  
  60.         return "excelinit";  
  61.     }  
  62.       
  63.     public String doexport() throws Exception{  
  64.         if(null != Tempstr && !"".equals(Tempstr)){  
  65.             String[] strArray = Tempstr.split(",");  
  66.             for(int i=0;i<strArray.length;i++){  
  67.                 if(null != strArray[i] && !"".equals(strArray[i])){  
  68.                     this.fieldsName.add(strArray[i]);  
  69.                 }  
  70.             }  
  71.             this.filename = "收费学生信息";  
  72.             BaseDAO DAO = new BaseDAO();  
  73.             List<V_SF_STUINFO> datas = new ArrayList<V_SF_STUINFO>();  
  74.             datas = DAO.getAll(V_SF_STUINFO.class);  
  75.             ExcelServiceImpl excel = new ExcelServiceImpl();  
  76.             this.downStream = excel.getExcelInputStream("lml.sf.pojo.V_SF_STUINFO", datas, "收费学生信息导出Excel_Demo",fieldsName);  
  77.             return SUCCESS;  
  78.         }  
  79.         return ERROR;  
  80.     }  
  81.       
  82.     public String ioexport() throws Exception{  
  83.         this.filename = "收费学生信息";  
  84.         BaseDAO DAO = new BaseDAO();  
  85.         List<V_SF_STUINFO> datas = new ArrayList<V_SF_STUINFO>();  
  86.         datas = DAO.getAll(V_SF_STUINFO.class);  
  87.         ExcelServiceImpl excel = new ExcelServiceImpl();  
  88.         this.downStream = excel.getExcelInputStream("lml.sf.pojo.V_SF_STUINFO", datas, "收费学生信息导出Excel_Demo",new ArrayList<String>());  
  89.         return SUCCESS;  
  90.     }  
  91.       
  92.       
  93. }  


5、struts.xml 配置 
Java代码   收藏代码
  1. <?xml version="1.0" encoding="UTF-8" ?>  
  2. <!DOCTYPE struts PUBLIC  
  3.     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"  
  4.     "http://struts.apache.org/dtds/struts-2.0.dtd">  
  5. <struts>  
  6.     <constant name="struts.custom.il8n.resources" value="message"></constant>  
  7.     <constant name="struts.i18n.encoding" value="UTF-8"></constant>  
  8.     <package name="excel" extends="struts-default">  
  9.         <action name="Export" class="lml.sf.pojo.action.STUINFOAction">  
  10.             <result name="excelinit">/STUINFO.jsp</result>  
  11.         </action>  
  12.         <action name="Ioexport" class="lml.sf.pojo.action.STUINFOAction" method="doexport">  
  13.             <result name="success" type="stream">  
  14.                 <param name="contentType">application/vnd.ms-excel</param>  
  15.                 <param name="contentDisposition">attachment;filename=${filename}</param>  
  16.                 <param name="inputName">downStream</param>  
  17.             </result>  
  18.             <result name="error">/STUINFO.jsp</result>  
  19.         </action>  
  20.     </package>  
  21. </struts>  

Java代码   收藏代码
  1. package lml.sf.pojo;  
  2.   
  3. import lml.excel.annotation.PropertyAnnotation;  
  4.   
  5. /** 
  6.  * @author 报到收费学生信息视图 
  7.  * @hibernate.class table="V_SF_STUINFO" 
  8.  */  
  9. public class V_SF_STUINFO {  
  10.     /** 
  11.      * 学生ID 
  12.      *  
  13.      * @hibernate.id generator-class="assigned" 
  14.      */  
  15.     @PropertyAnnotation(PropertyName="学生ID",PropertySortKey=1)  
  16.     private String STUID;  
  17.   
  18.     /** 
  19.      * 学生姓名 
  20.      *  
  21.      * @hibernate.property 
  22.      */  
  23.     @PropertyAnnotation(PropertyName="学生姓名",PropertySortKey=2)  
  24.     private String XM;  
  25.   
  26.     /** 
  27.      * 学生学号 
  28.      *  
  29.      * @hibernate.property 
  30.      */  
  31.     @PropertyAnnotation(PropertyName="学生学号",PropertySortKey=3)  
  32.     private String XH;  
  33.     /** 
  34.      * 学生性别 
  35.      *  
  36.      * @hibernate.property 
  37.      */  
  38.     @PropertyAnnotation(PropertyName="学生性别",PropertySortKey=4)  
  39.     private Integer XB;  
  40.   
  41.     /** 
  42.      * 出生年月 
  43.      *  
  44.      * @hibernate.property 
  45.      */  
  46.     @PropertyAnnotation(PropertyName="出生年月",PropertySortKey=5)  
  47.     private String CSNY;  
  48.   
  49.     /** 
  50.      * 籍贯 
  51.      *  
  52.      * @hibernate.property 
  53.      */  
  54.     @PropertyAnnotation(PropertyName="籍贯",PropertySortKey=6)  
  55.     private String JG;  
  56.     /** 
  57.      * 民族 
  58.      *  
  59.      * @hibernate.property 
  60.      */  
  61.     @PropertyAnnotation(PropertyName="民族",PropertySortKey=7)  
  62.     private String MZ;  
  63.     /** 
  64.      * 政治面貌 
  65.      *  
  66.      * @hibernate.property 
  67.      */  
  68.     @PropertyAnnotation(PropertyName="政治面貌",PropertySortKey=8)  
  69.     private String ZZMM;  
  70.     /** 
  71.      * 家庭住址 
  72.      *  
  73.      * @hibernate.property 
  74.      */  
  75.     @PropertyAnnotation(PropertyName="家庭住址",PropertySortKey=9)  
  76.     private String JTZZ;  
  77.     /** 
  78.      * 邮政编码 
  79.      *  
  80.      * @hibernate.property 
  81.      */  
  82.     @PropertyAnnotation(PropertyName="邮政编码",PropertySortKey=10)  
  83.     private String YZBM;  
  84.     /** 
  85.      * 个人电话 
  86.      *  
  87.      * @hibernate.property 
  88.      */  
  89.     @PropertyAnnotation(PropertyName="个人电话",PropertySortKey=11)  
  90.     private String GRDH;  
  91.     /** 
  92.      * 家庭电话 
  93.      *  
  94.      * @hibernate.property 
  95.      */  
  96.     @PropertyAnnotation(PropertyName="家庭电话",PropertySortKey=12)  
  97.     private String JTDH;  
  98.   
  99.     /** 
  100.      * 是否走读 
  101.      *  
  102.      * @hibernate.property 
  103.      */  
  104.     @PropertyAnnotation(PropertyName="是否走读",PropertySortKey=13)  
  105.     private Integer ISZD = new Integer(0);  
  106.     /** 
  107.      * 年级代码 
  108.      *  
  109.      * @hibernate.property 
  110.      */  
  111.     @PropertyAnnotation(PropertyName="年级代码",PropertySortKey=14)  
  112.     private String NJDM;  
  113.     /** 
  114.      * 年级名称 
  115.      *  
  116.      * @hibernate.property 
  117.      */  
  118.     @PropertyAnnotation(PropertyName="年级名称",PropertySortKey=15)  
  119.     private String NJMC;  
  120.     /** 
  121.      * 所属班级ID 
  122.      *  
  123.      * @hibernate.property 
  124.      */  
  125.     @PropertyAnnotation(PropertyName="所属班级ID",PropertySortKey=16)  
  126.     private String BJDM;  
  127.   
  128.     /** 
  129.      * 所属班级名字 
  130.      *  
  131.      * @hibernate.property 
  132.      */  
  133.     @PropertyAnnotation(PropertyName="所属班级名称",PropertySortKey=17)  
  134.     private String BJMC;  
  135.   
  136.     /** 
  137.      * 所属专业ID 
  138.      *  
  139.      * @hibernate.property 
  140.      */  
  141.     @PropertyAnnotation(PropertyName="所属专业ID",PropertySortKey=18)  
  142.     private String ZYDM;  
  143.     /** 
  144.      * 所属专业名字 
  145.      *  
  146.      * @hibernate.property 
  147.      */  
  148.     @PropertyAnnotation(PropertyName="所属专业名字",PropertySortKey=19)  
  149.     private String ZYMC;  
  150.       
  151.   
  152.     public V_SF_STUINFO() {  
  153.     }  
  154.   
  155.     public String getSTUID() {  
  156.         return STUID;  
  157.     }  
  158.   
  159.     public void setSTUID(String stuid) {  
  160.         STUID = stuid;  
  161.     }  
  162.   
  163.     public String getXM() {  
  164.         return XM;  
  165.     }  
  166.   
  167.     public void setXM(String xm) {  
  168.         XM = xm;  
  169.     }  
  170.   
  171.     public String getXH() {  
  172.         return XH;  
  173.     }  
  174.   
  175.     public void setXH(String xh) {  
  176.         XH = xh;  
  177.     }  
  178.   
  179.     public String getCSNY() {  
  180.         return CSNY;  
  181.     }  
  182.   
  183.     public void setCSNY(String csny) {  
  184.         CSNY = csny;  
  185.     }  
  186.   
  187.     public String getJG() {  
  188.         return JG;  
  189.     }  
  190.   
  191.     public void setJG(String jg) {  
  192.         JG = jg;  
  193.     }  
  194.   
  195.     public String getMZ() {  
  196.         return MZ;  
  197.     }  
  198.   
  199.     public void setMZ(String mz) {  
  200.         MZ = mz;  
  201.     }  
  202.   
  203.     public String getGRDH() {  
  204.         return GRDH;  
  205.     }  
  206.   
  207.     public void setGRDH(String grdh) {  
  208.         GRDH = grdh;  
  209.     }  
  210.   
  211.     public String getJTDH() {  
  212.         return JTDH;  
  213.     }  
  214.   
  215.     public void setJTDH(String jtdh) {  
  216.         JTDH = jtdh;  
  217.     }  
  218.   
  219.     public Integer getISZD() {  
  220.         if (ISZD == null) {  
  221.             return 0;  
  222.         } else {  
  223.             return ISZD;  
  224.         }  
  225.     }  
  226.   
  227.     public void setISZD(Integer iszd) {  
  228.         ISZD = iszd;  
  229.     }  
  230.   
  231.     public String getNJDM() {  
  232.         return NJDM;  
  233.     }  
  234.   
  235.     public void setNJDM(String njdm) {  
  236.         NJDM = njdm;  
  237.     }  
  238.   
  239.     public String getNJMC() {  
  240.         return NJMC;  
  241.     }  
  242.   
  243.     public void setNJMC(String njmc) {  
  244.         NJMC = njmc;  
  245.     }  
  246.   
  247.     public String getBJDM() {  
  248.         return BJDM;  
  249.     }  
  250.   
  251.     public void setBJDM(String bjdm) {  
  252.         BJDM = bjdm;  
  253.     }  
  254.   
  255.     public String getBJMC() {  
  256.         return BJMC;  
  257.     }  
  258.   
  259.     public void setBJMC(String bjmc) {  
  260.         BJMC = bjmc;  
  261.     }  
  262.   
  263.     public String getZYDM() {  
  264.         return ZYDM;  
  265.     }  
  266.   
  267.     public void setZYDM(String zydm) {  
  268.         ZYDM = zydm;  
  269.     }  
  270.   
  271.     public String getZYMC() {  
  272.         return ZYMC;  
  273.     }  
  274.   
  275.     public void setZYMC(String zymc) {  
  276.         ZYMC = zymc;  
  277.     }  
  278.   
  279.     public String getZZMM() {  
  280.         return ZZMM;  
  281.     }  
  282.   
  283.     public void setZZMM(String zzmm) {  
  284.         ZZMM = zzmm;  
  285.     }  
  286.   
  287.     public String getJTZZ() {  
  288.         return JTZZ;  
  289.     }  
  290.   
  291.     public void setJTZZ(String jtzz) {  
  292.         JTZZ = jtzz;  
  293.     }  
  294.   
  295.     public String getYZBM() {  
  296.         return YZBM;  
  297.     }  
  298.   
  299.     public void setYZBM(String yzbm) {  
  300.         YZBM = yzbm;  
  301.     }  
  302.   
  303.     public Integer getXB() {  
  304.         return XB;  
  305.     }  
  306.   
  307.     public void setXB(Integer xb) {  
  308.         XB = xb;  
  309.     }  
  310.   
  311. }  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
东南亚位于我国倡导推进的“一带一路”海陆交汇地带,作为当今全球发展最为迅速的地区之一,近年来区域内生产总值实现了显著且稳定的增长。根据东盟主要经济体公布的最新数据,印度尼西亚2023年国内生产总值(GDP)增长5.05%;越南2023年经济增长5.05%;马来西亚2023年经济增速为3.7%;泰国2023年经济增长1.9%;新加坡2023年经济增长1.1%;柬埔寨2023年经济增速预计为5.6%。 东盟国家在“一带一路”沿线国家中的总体GDP经济规模、贸易总额与国外直接投资均为最大,因此有着举足轻重的地位和作用。当前,东盟与中国已互相成为双方最大的交易伙伴。中国-东盟贸易总额已从2013年的443亿元增长至 2023年合计超逾6.4万亿元,占中国外贸总值的15.4%。在过去20余年中,东盟国家不断在全球多变的格局里面临挑战并寻求机遇。2023东盟国家主要经济体受到国内消费、国外投资、货币政策、旅游业复苏、和大宗商品出口价企稳等方面的提振,经济显现出稳步增长态势和强韧性的潜能。 本调研报告旨在深度挖掘东南亚市场的增长潜力与发展机会,分析东南亚市场竞争态势、销售模式、客户偏好、整体市场营商环境,为国内企业出海开展业务提供客观参考意见。 本文核心内容: 市场空间:全球行业市场空间、东南亚市场发展空间。 竞争态势:全球份额,东南亚市场企业份额。 销售模式:东南亚市场销售模式、本地代理商 客户情况:东南亚本地客户及偏好分析 营商环境:东南亚营商环境分析 本文纳入的企业包括国外及印尼本土企业,以及相关上下游企业等,部分名单 QYResearch是全球知名的大型咨询公司,行业涵盖各高科技行业产业链细分市场,横跨如半导体产业链(半导体设备及零部件、半导体材料、集成电路、制造、封测、分立器件、传感器、光电器件)、光伏产业链(设备、硅料/硅片、电池片、组件、辅料支架、逆变器、电站终端)、新能源汽车产业链(动力电池及材料、电驱电控、汽车半导体/电子、整车、充电桩)、通信产业链(通信系统设备、终端设备、电子元器件、射频前端、光模块、4G/5G/6G、宽带、IoT、数字经济、AI)、先进材料产业链(金属材料、高分子材料、陶瓷材料、纳米材料等)、机械制造产业链(数控机床、工程机械、电气机械、3C自动化、工业机器人、激光、工控、无人机)、食品药品、医疗器械、农业等。邮箱:market@qyresearch.com

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值