1、核心代码
package cn.doofen.service.impl;
import java.io.OutputStream;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.ss.util.CellRangeAddress;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cicada.seo.query.impl.QryIntegReportImpl;
import com.doofen.ctrl.rpt.RptConst;
import com.doofen.ctrl.rpt.Impl.RptBase;
import com.zxt.framework.export.RptExcelDomain;
/**
*
* @author Andrew
*
* PulishDate: 2015年9月28日
* Function: 各科平均分比较表
* ChangeLog:
*/
public class ExportRpt10012Impl extends RptBase{
DecimalFormat df=new DecimalFormat("#.00");
private Object[] joHeads = null;
private Object[] joHeads2 = null;
/**
* 构建excel
* @param os
* @param examId
* @throws Exception
*/
public void createRptExcel_10012( OutputStream os, Long schId, Long examId , Long clsId, Long gradeId, JSONArray jarr, Long xueke, Long leibie) throws Exception{
QryIntegReportImpl opr = new QryIntegReportImpl();
String title = null;
if(leibie == 10){
title = "行政班——"+RptConst.RPT_2000_NAME;
}else if (leibie == 11){
title = "选课班——"+RptConst.RPT_2000_NAME;
}
try{
JSONArray ja = new JSONArray();
ja = opr.getExecutiveTable(schId, examId, clsId, gradeId, jarr, xueke, leibie);
RptExcelDomain rptDo = new RptExcelDom