public void doExport(HttpServletResponse response, HttpServletRequest request,
                         StatisticsSearchModel searchModel) { id);
        String title = "检查情况统计"; 
        JSONArray jsonArr = new JSONArray();
        getTableResultJson(searchModel,jsonArr);
        //获取检查类型
        Map<String, List<TCheckType>> result =  OutMatchTaskServiceImpl.getAllCheckTypeMap();
        //开始拼装Excel表头
        List<ExcelExportEntity> entity = new ArrayList<ExcelExportEntity>();
        ExcelExportEntity excelentityNo = new ExcelExportEntity("序号", "No");
        excelentityNo.setNeedMerge(true);
        entity.add(excelentityNo);

        ExcelExportEntity excelExportEntity0 = new ExcelExportEntity("收样时间", "");
        excelExportEntity0.setNeedMerge(true);
        entity.add(excelExportEntity0);

        ExcelExportEntity excelExportEntity1 = new ExcelExportEntity("检查单位(TA)", "entrustUnit");
        excelExportEntity1.setNeedMerge(true);
        entity.add(excelExportEntity1);

        ExcelExportEntity excelExportEntity2 = new ExcelExportEntity("检查类别", "typeName");
        excelExportEntity2.setNeedMerge(true);
        entity.add(excelExportEntity2);

        ExcelExportEntity excelExportEntity3 = new ExcelExportEntity("检查类型", "types");
        excelExportEntity3.setNeedMerge(true);
        List<ExcelExportEntity> entity1 = new ArrayList<>();
        List<TCheckType> urine1= result.get("urine");
        for (TCheckType x:urine1){
            ExcelExportEntity excel = new ExcelExportEntity(x.getCnName(), "nj_"+x.getId());
            excel.setStatistics(true);
            entity1.add(excel);
        }
        List<TCheckType> blood1= result.get("blood");
        for (TCheckType y:blood1){
            ExcelExportEntity excel1 = new ExcelExportEntity(y.getCnName(), "xj_"+y.getId());
            excel1.setStatistics(true);
            entity1.add(excel1);
        }
        excelExportEntity3.setList(entity1);
        entity.add(excelExportEntity3);

        ExcelExportEntity excelExportEntity4 = new ExcelExportEntity("备注", "remarks");
        excelExportEntity4.setNeedMerge(true);
        entity.add(excelExportEntity4);




        int x = jsonArr.size();
        //进行检查类型拼装
        for (int i = 0; i < jsonArr.size(); i++) {
            JSONObject as  =  jsonArr.getJSONObject(i);
            List<Map<String,Object>>list1 = new ArrayList(); //检查类型
            Map<String,Object>map1 = new HashMap<>(); //收集检查类型的具体类型
            for (String a :as.keySet()) {
                if (a.split("nj_").length>1){
                    map1.put(a,as.get(a));
                }else if (a.split("xj_").length>1){
                    map1.put(a,as.get(a));
                }
            }
            list1.add(map1);
            as.put("types",list1);
        }

        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(title, "送样统计"),
                entity, jsonArr);

        Sheet sheet = workbook.getSheetAt(0);//取此Excel文件的第一个Sheet
        // ========================= 对合并行进行去小数点 ==================
        Row rowEnd = sheet.getRow( sheet.getLastRowNum()); //获取到最后一个单元格
        CellStyle cellStyle =workbook.createCellStyle();
        DataFormat format =  workbook.createDataFormat();
        cellStyle.setDataFormat(format.getFormat("@"));
        rowEnd.setRowStyle(cellStyle);
        for (int i = 0; i <rowEnd.getLastCellNum() ; i++) {
            try {
                Cell j =  rowEnd.getCell(i);
                String k =j.getStringCellValue();
                if (!StringUtils.isEmpty(k)){
                    String []klist= k.split("\\.");
                    if (klist.length>=2){
                        j.setCellValue( klist[0]);
                    }
                }
            }catch (NullPointerException e){
            }
        }
        //四个参数依次是:起始行,终止行,起始列,终止列
        CellRangeAddress craOne = new CellRangeAddress(x+3, x+3, 0, 3);//index从0开始
        sheet.addMergedRegion(craOne); //第一次合并

        downLoadExcel("送样统计.xls",response,request,workbook);
        LogManageUtils.recordLog("送样统计","/statistics/doExportSearchSampleStatistics","送样统计",
                UserCommon.getUserId(),UserCommon.getRealName(),
                null,null, ConstantsUtils.LOG_LEVEL_INFO);

    }
    /**
     * 实现Excel下载
     * @param fileName
     * @param response
     * @param workbook
     */
    private static void downLoadExcel(String fileName, HttpServletResponse response,HttpServletRequest request, Workbook workbook) {
        try {
            String browser = "";
            browser = request.getHeader("User-Agent");
            if (-1 < browser.indexOf("MSIE 6.0") || -1 < browser.indexOf("MSIE 7.0")) {
                // IE6, IE7 浏览器
                response.addHeader("content-disposition", "attachment;filename="
                        + new String(fileName.getBytes(), "ISO8859-1"));
            } else if (-1 < browser.indexOf("MSIE 8.0")) {
                // IE8
                response.addHeader("content-disposition", "attachment;filename="
                        + URLEncoder.encode(fileName, "UTF-8"));
            } else if (-1 < browser.indexOf("MSIE 9.0")) {
                // IE9
                response.addHeader("content-disposition", "attachment;filename="
                        + URLEncoder.encode(fileName, "UTF-8"));
            } else if (-1 < browser.indexOf("Chrome")) {
                // 谷歌
                response.addHeader("content-disposition",
                        "attachment;filename*=UTF-8''" + URLEncoder.encode(fileName, "UTF-8"));
            } else if (-1 < browser.indexOf("Safari")) {
                // 苹果
                response.addHeader("content-disposition", "attachment;filename="
                        + new String(fileName.getBytes(), "ISO8859-1"));
            } else {
                // 火狐或者其他的浏览器
                response.addHeader("content-disposition",
                        "attachment;filename*=UTF-8''" + URLEncoder.encode(fileName, "UTF-8"));
            }
            workbook.write(response.getOutputStream());
        } catch (IOException e) {
            throw  new ExcelExportException(e.getMessage());
        }
    }