关于CheckBox勾选隐藏和显示,以及导出勾选的复选框的excel文档

该博客介绍了如何在网页中使用CheckBox实现内容的显示与隐藏,并记录用户的勾选状态。点击翻译会保留之前的选择,同时支持将任意勾选的内容导出为Excel文档。涉及到的前端技术包括CheckBox控制和样式,后端涉及数据处理和Excel文件生成。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前台显示页面:

然后点击展开按钮:

勾选展开或者收起里的复选框,或者勾选序号里的复选框,点击翻译后还会记住之前的勾选,点击excel导出,可以导出你任意勾选的复选框的数据,下面是对应的前台jsp,后台java处理代码。

前台jsp:

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="com.sunline.jraf.util.*"%>
<%@ page import="com.sunline.jraf.web.*"%>
<%@ taglib uri="http://www.sunline.cn/jsp/common" prefix="sc"%>
<%@ include file="/jui_tag.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<style>
.butshow {
    background-color: #97CBFF;
    border: none;
    color: white;
    padding: 2px 2px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    margin: 4px 2px;
    cursor: pointer;
}
.buthid {
    background-color: #97CBFF;
    border: none;
    color: white;
    padding: 2px 2px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    margin: 4px,2px;
    cursor: pointer;
    margin-left:45px;
}
</style>
<!--财务回收冲成本明细表(确认日期)-->
<div class="pageHeader">
    <form id="pagerForm" οnsubmit="return navTabSearch(this);"
        action="/httpprocesserservlet" method="post">
        <sc:hidden name="pageNum" value="1" />
        <input type="hidden" name="sysName"
            value="<%=Crypto.encode(request, "gdfamc")%>" /> <input
            type="hidden" name="oprID"
            value="<%=Crypto.encode(request, "AssetturnoverStatisticalAction")%>" /> <input
            type="hidden" name="actions"
            value="<%=Crypto.encode(request, "queryAssetturnoverStatisticallist")%>" />
        <input type="hidden" name="forward"
            value="<sc:fmt value='/gdfamc/statisticalQuery/turnoverDetaillist.jsp' type='crypto'/>" />
        <sc:hidden name="jraf_initsubmit" />
        <sc:hidden name="checktextsum" id="checktextsum" value="${jrafrpu.rspPkg.rspRcdDataMapsResults4[0].checktextsum}"/>
        <sc:hidden name="checkbool" id="checkbool" value="${jrafrpu.rspPkg.rspRcdDataMapsResults4[0].checkbool}"/>
        <sc:hidden name="assetidval" id="assetidval" value="${jrafrpu.rspPkg.rspRcdDataMapsResults4[0].assetidval}"/>
        <div class="searchBar">
            <table class="searchContent" cellpadding="0" cellspacing="0">
                <!-- <tr>
                    
                    <td class="form-label">产品</td>
                    <td>
                        <sc:hidden id="asset_detail_type" name="asset_detail_type"    /> 
                         <sc:text id="asset_detail_name" name="asset_detail_name"     readonly="true" /> 
                         <a class="btnLook" title="选择-产品" lookupGroup="" width="900"    height="520" 
                            href="/gdfamc/public/productClassifySelectList.jsp?lookupcd=asset_detail_type&lookupname=asset_detail_name&lookuptype=prodtype&lookupinttype=interest_type&lookuptradobj=deal_purpose"></a>
                                </td>
                    </td>
                    <td class="form-label">资产状态</td>
                    <td>
                        <sc:select name="asset_status" id="asset_status" nullOption="-----请选择-----" 
                            type="knp" key="ast,gdfamc_ast_aststatus" excludes="%"/> 
                    </td>
                    <td align="right"><input type="submit" class="button"
                        jraf_initsubmit value="查询" /> <input type="reset" class="button"
                        value="清空" /></td>
                </tr> -->
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" value="document_number" traget="document_number" οnclick="checkboxshow()"/><span>项目台账编号</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" value="project_name" traget="project_name" οnclick="checkboxshow()"/><span>项目名称</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" value="fin_date" traget="fin_date" οnclick="checkboxshow()"/><span>业务发生日</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="term" value="term" οnclick="checkboxshow()"/><span>期限</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="owner_name" value="owner_name" οnclick="checkboxshow()"/><span>经办人</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="owning_business_unit_name" style="margin-left:45px;" value="owning_business_unit_name" οnclick="checkboxshow()"/><span>部门</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="asset_main_type" value="asset_main_type" οnclick="checkboxshow()"/><span>业务类型</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="asset_detail_name" style="margin-left:45px;" value="asset_detail_name" οnclick="checkboxshow()"/><span>产品</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="prodtype" value="prodtype" οnclick="checkboxshow()"/><span>产品类型</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="investment_type" style="margin-left:45px;" value="investment_type" οnclick="checkboxshow()"/><span>投资产品分类</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="deal_purpose" value="deal_purpose" οnclick="checkboxshow()"/><span>交易目的</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="asset_type" value="asset_type" οnclick="checkboxshow()"/><span>持有方式</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="share_assets" value="share_assets" οnclick="checkboxshow()"/><span>资产占有份额(%)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="initial_investment" style="margin-left:45px;" value="initial_investment" οnclick="checkboxshow()"/><span>首次付款金额(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="cost" value="cost" οnclick="checkboxshow()"/><span>成本(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="interest_receivable" style="margin-left:45px;" value="interest_receivable" οnclick="checkboxshow()"/><span>应收利息(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="transaction_expense" class="" value="transaction_expense" οnclick="checkboxshow()"/><span>交易费用(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="contract_loan_amt" style="margin-left:45px;" value="contract_loan_amt" οnclick="checkboxshow()"/><span>合同金额(原币)</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" traget="accumulated_amount" class="" value="accumulated_amount" οnclick="checkboxshow()"/><span>累计投放金额(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="contract_effective_date" style="margin-left:45px;" value="contract_effective_date" οnclick="checkboxshow()"/><span>合同开始日期</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="contract_due_date" class="" value="contract_due_date" οnclick="checkboxshow()"/><span>合同结束日期</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" traget="payment_day" style="margin-left:45px;" value="payment_day" οnclick="checkboxshow()"/><span>期间赎回日</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="deal_date" value="deal_date" οnclick="checkboxshow()"/><span>交易日期</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="liquidity" value="liquidity" οnclick="checkboxshow()"/><span>流动性</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="security" value="security" οnclick="checkboxshow()"/><span>安全性</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="interest_type" value="interest_type" οnclick="checkboxshow()"/><span>计息类型</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="interest_method" value="interest_method" οnclick="checkboxshow()"/><span>计息方式</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="interest_start_date" value="interest_start_date" οnclick="checkboxshow()"/><span>起息日</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="interest_end_date" value="interest_end_date" οnclick="checkboxshow()"/><span>到期日</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="latest_interest_day" value="latest_interest_day" οnclick="checkboxshow()"/><span>最新计息日</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="income_type" value="income_type" οnclick="checkboxshow()"/><span>收益类型</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="share_way" value="share_way" οnclick="checkboxshow()"/><span>付息方式/分红方式</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="share_frequency" value="share_frequency" οnclick="checkboxshow()"/><span>付息频率/分红频率</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="share_frequency_remark" value="share_frequency_remark" οnclick="checkboxshow()"/><span>付息说明</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="tax_yield" value="tax_yield" οnclick="checkboxshow()"/><span>税前收益率(%)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="annual_rate" value="annual_rate" οnclick="checkboxshow()"/><span>税后收益率(%)</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="correspondingamount_back" value="correspondingamount_back" οnclick="checkboxshow()"/><span>收回原始投资成本(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="correspondingamount_close" value="correspondingamount_close" οnclick="checkboxshow()"/><span>收投资收益金额(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="correspondingamount_total" value="correspondingamount_total" οnclick="checkboxshow()"/><span>合计</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="asset_status" value="asset_status" οnclick="checkboxshow()"/><span>资产状态</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="counterparty" value="counterparty" οnclick="checkboxshow()"/><span>合作机构</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="basic_financiers" value="basic_financiers" οnclick="checkboxshow()"/><span>基础资产融资人</span>
                    </td>
                </tr>
                <tr name="spanpublic">
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="industry_of_financiers" value="industry_of_financiers" οnclick="checkboxshow()"/><span>基础资产所属行业</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="gb_trade" value="gb_trade" οnclick="checkboxshow()"/><span>国标行业</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="number_bal_orig1" value="number_bal_orig1" οnclick="checkboxshow()"/><span>本金余额</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="number_bal_orig5" value="number_bal_orig5" οnclick="checkboxshow()"/><span>应计利息余额</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" class="" traget="number_bal_orig7" value="number_bal_orig7" οnclick="checkboxshow()"/><span>投资收益余额(原币)</span>
                    </td>
                    <td>
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="number_bal_orig9" value="number_bal_orig9" οnclick="checkboxshow()"/><span>其他资本公积余额(原币)</span>
                    </td>
                </tr>
                <tr>
                    <td name="spanpublic">
                        <input type="checkbox" name="checktext" class="" traget="number_bal_orig11" value="number_bal_orig11" οnclick="checkboxshow()"/><span>销项税余额(原币)</span>
                    </td>
                    <td name="spanpublic">
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="number_bal_orig2" value="number_bal_orig2" οnclick="checkboxshow()"/><span>资金往来余额</span>
                    </td>
                    <td name="spanpublic">
                        <input type="checkbox" name="checktext" class="" traget="number_bal_orig3" value="number_bal_orig3" οnclick="checkboxshow()"/><span>公允价值变动余额(原币)</span>
                    </td>
                    <td name="spanpublic">
                        <input type="checkbox" name="checktext" style="margin-left:45px;" traget="number_bal_orig4" value="number_bal_orig4" οnclick="checkboxshow()"/><span>公允价值变动损益余额(原币)</span>
                    </td>
                    <td name="spanpublic">
                        <input type="checkbox" name="checktext" traget="number_bal_orig19" value="number_bal_orig19" οnclick="checkboxshow()"/><span>应收利息余额(原币)</span>
                    </td>
                    <!-- 
                    <td name="checkshow">
                        <input type="button" class="butshow" οnclick="checkshow1()" value="《展开更多》"/>
                    </td>
                    <td name="checkedshow">
                        <input type="button" class="buthid" οnclick="checkedshow1()" value="《收起更多》" />
                    </td> -->
                </tr>
                <tr>
                        <td align="right">产品</td>
                        <td>
                            <sc:hidden id="asset_detail_type" name="asset_detail_type"    /> 
                            <sc:text id="asset_detail_name" name="asset_detail_name"     readonly="true" /> 
                            <a class="btnLook" title="选择-产品" lookupGroup="" width="900"    height="520" 
                                href="/gdfamc/public/productClassifySelectList.jsp?lookupcd=asset_detail_type&lookupname=asset_detail_name&lookuptype=prodtype&lookupinttype=interest_type&lookuptradobj=deal_purpose"></a>
                        </td>
                        <td align="right">项目名称</td>
                        <td>
                            <sc:text name="project_name" id="project_name"/>
                        </td>
                        <td align="right">投资产品类型</td>
                        <td>
                            <sc:select name="investment_type" id="investment_type" type="knp" key="ast,ast_investment_type"
                                nullOption="---请选择----"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">业务发生日</td>
                        <td>
                            <sc:date name="fin_date" id="fin_date" dateFmt="yyyy-MM-dd" readonly="true"/> --
                            <sc:date name="fin_date_end" id="fin_date_end" dateFmt="yyyy-MM-dd" readonly="true"/>
                        </td>
                        <td align="right">实际到期日</td>
                        <td>
                            <sc:date name="interest_end_date" id="interest_end_date" dateFmt="yyyy-MM-dd" readonly="true"/> --
                            <sc:date name="interest_end_date_end" id="interest_end_date_end" dateFmt="yyyy-MM-dd" readonly="true"/>
                        </td>
                        <td align="right">资产状态</td>
                        <td>
                            <sc:select name="asset_status" id="asset_status" nullOption="-----请选择-----" 
                            type="knp" key="ast,gdfamc_ast_aststatus" excludes="%"/> 
                        </td>
                    </tr>
                    <tr>
                        <td align="right">基础融资人</td>
                        <td>
                            <sc:text name="basic_financiers" id="basic_financiers" />
                        </td>
                        <td align="right">国标行业</td>
                        <td>
                            <sc:select name="gb_trade" id="gb_trade" nullOption="-------------------请选择-------------------" 
                            type="knp" key="cus,industry" excludes="%"/> 
                        </td>
                        <td align="right">合作机构</td>
                        <td>
                            <sc:text name="counterparty" id="counterparty" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">经办人</td>
                        <td>
                            <sc:text name="owner_name" id="owner_name" />
                        </td>
                        <td align="right">部门</td>
                        <td>
                            <sc:text name="owning_business_unit" id="owning_business_unit" />
                        </td>
                        <td align="right" colspan="2">
                            <input type="submit" class="button" jraf_initsubmit value="查询" />
                            <button type="reset" class="resetbtn" jraf_initsubmit>重置</button>
                        </td>
                    </tr>
            </table>
        </div>
    </form>
</div>

<div id="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="export" href="javascript:uploadBeginTurnStatis()"><span>Excel导出</span></a></li>
            <li name="checkshow"><a class="add" href="javascript:checkshow1()"><span>展开</span></a></li>
            <li name="checkedshow"><a class="delete" href="javascript:checkedshow1()"><span>收起</span></a></li>
        </ul>
    </div>
    <table class="table" style="table-layout: fixed; width: 100%;"
        id="zqdbrtable">
        <thead>
            <tr>
                <th width="25px"><input type="checkbox" class="checkboxCtrl" group="paramp" /></th>
                <th style="text-align: center;width: 30px;">序号</th>
                <th style="text-align: center;width: 160px;" class="document_number">项目台账编号</th>
                <th style="text-align: center;width: 100px;" class="project_name">项目名称</th>
                <th style="text-align: center;width: 100px;" class="fin_date">业务发生日</th>
                <th style="text-align: center;width: 100px;" class="term" >期限</th>
                <th style="text-align: center;width: 120px;" class="owner_name">经办人</th>
                <th style="text-align: center;width: 120px;" class="owning_business_unit_name">部门</th>
                <th style="text-align: center;width: 100px;" class="asset_main_type">业务类型</th>
                <th style="text-align: center;width: 100px;" class="asset_detail_name">产品</th>
                <th style="text-align: center;width: 120px;" class="prodtype">产品类型</th>
                <th style="text-align: center;width: 100px;" class="investment_type">投资产品分类</th>
                <th style="text-align: center;width: 100px;" class="deal_purpose">交易目的</th>
                <th style="text-align: center;width: 160px;" class="asset_type">持有方式    </th>
                <th style="text-align: center;width: 160px;" class="share_assets">资产占有份额(%)</th>
                <th style="text-align: center;width: 100px;" class="initial_investment">首次付款金额(原币)</th>
                <th style="text-align: center;width: 100px;" class="cost">成本(原币)</th>
                <th style="text-align: center;width: 100px;" class="interest_receivable">应收利息(原币)</th>
                <th style="text-align: center;width: 160px;" class="transaction_expense">交易费用(原币)</th>
                <th style="text-align: center;width: 100px;" class="contract_loan_amt">合同金额(原币)</th>
                <th style="text-align: center;width: 100px;" class="accumulated_amount">累计投放金额(原币)</th>
                <th style="text-align: center;width: 100px;" class="contract_effective_date">合同开始日期</th>
                <th style="text-align: center;width: 100px;" class="contract_due_date">合同结束日期</th>
                <th style="text-align: center;width: 100px;" class="payment_day">期间赎回日</th>
                <th style="text-align: center;width: 100px;" class="deal_date">交易日期</th>
                <th style="text-align: center;width: 100px;" class="liquidity">流动性</th>
                <th style="text-align: center;width: 100px;" class="security">安全性</th>
                <th style="text-align: center;width: 100px;" class="interest_type">计息类型</th>
                <th style="text-align: center;width: 100px;" class="interest_method">计息方式</th>
                <th style="text-align: center;width: 100px;" class="interest_start_date">起息日</th>
                <th style="text-align: center;width: 100px;" class="interest_end_date">到期日</th>
                <th style="text-align: center;width: 100px;" class="latest_interest_day">最新计息日</th>
                <th style="text-align: center;width: 100px;" class="income_type">收益类型</th>
                <th style="text-align: center;width: 100px;" class="share_way">付息方式/分红方式</th>
                <th style="text-align: center;width: 100px;" class="share_frequency">付息频率/分红频率</th>
                <th style="text-align: center;width: 100px;" class="share_frequency_remark">付息说明</th>
                <th style="text-align: center;width: 100px;" class="tax_yield">税前收益率(%)</th>
                <th style="text-align: center;width: 100px;" class="annual_rate">税后收益率(%)</th>
                <th style="text-align: center;width: 100px;" class="correspondingamount_back">收回原始投资成本(原币)</th>
                <th style="text-align: center;width: 100px;" class="correspondingamount_close">收投资收益金额(原币)</th>
                <th style="text-align: center;width: 100px;" class="correspondingamount_total">合计</th>
                <th style="text-align: center;width: 100px;" class="asset_status">资产状态</th>
                <th style="text-align: center;width: 100px;" class="counterparty">合作机构</th>
                <th style="text-align: center;width: 100px;" class="basic_financiers">基础资产融资人</th>
                <th style="text-align: center;width: 100px;" class="industry_of_financiers">基础资产所属行业</th>
                <th style="text-align: center;width: 100px;" class="gb_trade">国标行业</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig1">本金余额</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig5">应计利息余额</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig7">投资收益余额(原币)</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig9">其他资本公积余额(原币)</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig11">销项税余额(原币)</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig2">资金往来余额</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig3">公允价值变动余额(原币)</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig4">公允价值变动损益余额(原币)</th>
                <th style="text-align: center;width: 100px;" class="number_bal_orig19">应收利息余额(原币)</th>
            </tr>
        </thead>
        <tbody>
            <c:choose>
                <c:when test="${empty jrafrpu.rspPkg.rspRcdDataMaps}">
                    <tr>
                        <td class="empty" colspan="10">查询无数据。</td>
                    </tr>
                </c:when>
                <c:otherwise>
                    <c:forEach var="para" items="${jrafrpu.rspPkg.rspRcdDataMaps}"
                        varStatus="status">
                        <tr <c:if test="${status.index%2 != 0}"> class="evenrow"</c:if>>
                            <td><input type="checkbox" name="paramp" pkval="${record.asset_turnover_Id}"
                                value="${para.asset_turnover_Id}" οnchange="checkedchange()"/></td>
                            <td style="text-align: center;">${status.index + 1 + (jrafrpu.rspPkg.rspPageNo -1)*10}</td>
                            <td style="text-align: center;" class="document_number">${para.document_number}</td>
                            <td style="text-align: center;" class="project_name">${para.project_name}</td>
                            <td style="text-align: center;" class="fin_date">${para.fin_date}</td>
                            <td style="text-align: center;" class="term">${para.term}</td>
                            <td style="text-align: center;" class="owner_name">${para.owner_name}</td>
                            <td style="text-align: center;" class="owning_business_unit_name">${para.owning_business_unit_name}</td>
                            <td style="text-align: center;" class="asset_main_type">
                                <sc:optd name="asset_main_type" type="knp" key="ast,gdfamc_ast_mainType" value="${para.asset_main_type}" />
                            </td>
                            <td style="text-align: center;" class="asset_detail_name">${para.asset_detail_name}</td>
                            <td style="text-align: center;" class="prodtype">
                                <sc:optd name="prodtype" type="knp" key="ast,product_type" value="${para.prodtype}" />
                            </td>
                            <td style="text-align: center;" class="investment_type">
                                <sc:optd name="investment_type" type="knp" key="ast,ast_investment_type" value="${para.investment_type}" />
                            </td>
                            <td style="text-align: center;" class="deal_purpose">
                                <sc:optd name="deal_purpose" type="knp" key="amc,trading_objective" value="${para.deal_purpose}" />
                            </td>
                            <td style="text-align: center;" class="asset_type">
                                <sc:optd name="asset_type" type="knp" key="amc,assettype" value="${para.asset_type}" />
                            </td>
                            <td style="text-align: center;" class="share_assets">${para.share_assets}</td>
                            <td style="text-align: center;" class="initial_investment">
                                <sc:fmt value="${para.initial_investment}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="cost">
                                <sc:fmt value="${para.cost}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="interest_receivable">
                                <sc:fmt value="${para.interest_receivable}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="transaction_expense">
                                <sc:fmt value="${para.transaction_expense}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="contract_loan_amt">
                                <sc:fmt value="${para.contract_loan_amt}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="accumulated_amount">
                                <sc:fmt value="${para.accumulated_amount}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="contract_effective_date">${para.contract_effective_date}</td>
                            <td style="text-align: center;" class="contract_due_date">${para.contract_due_date}</td>
                            <td style="text-align: center;" class="payment_day">${para.payment_day}</td>
                            <td style="text-align: center;" class="deal_date">${para.deal_date}</td>
                            <td style="text-align: center;" class="liquidity">${para.liquidity}</td>
                            <td style="text-align: center;" class="security">
                                <sc:optd name="security" type="knp" key="ast,safety" value="${para.security}" />
                            </td>
                            <td style="text-align: center;" class="interest_type">
                                <sc:optd name="interest_type" type="knp" key="atv,interest_type" value="${para.interest_type}" />
                            </td>
                            <td style="text-align: center;"  class="interest_method">
                                <sc:optd name="interest_method" type="knp" key="atv,gdfamc_interest_accrual_way" value="${para.interest_method}" />
                            </td>
                            <td style="text-align: center;" class="interest_start_date">${para.interest_start_date}</td>
                            <td style="text-align: center;" class="interest_end_date">${para.interest_end_date}</td>
                            <td style="text-align: center;" class="latest_interest_day">${para.latest_interest_day}</td>
                            <td style="text-align: center;" class="income_type">
                                <sc:optd name="income_type" type="knp" key="ast,income_type" value="${para.income_type}" />
                            </td>
                            <td style="text-align: center;" class="share_way">
                                <c:if test="${para.prodtype eq '01'}"> 
                                    <sc:optd name="share_way" type="knp" key="ast,share_way" value="${para.share_way}" />
                                </c:if>
                                <c:if test="${para.prodtype ne '01'}"> 
                                    <sc:optd name="interest_way" type="knp" key="ast,interest_way" value="${para.share_way}" />
                                </c:if>
                            </td>
                            <td style="text-align: center;" class="share_frequency">
                                <c:if test="${para.prodtype eq '01'}"> 
                                    <sc:optd name="share_frequency" type="knp" key="ast,share_frequency" value="${para.share_frequency}" />
                                </c:if>
                                <c:if test="${para.prodtype ne '01'}"> 
                                    <sc:optd name="interest_frequency" type="knp" key="ast,interest_frequency" value="${para.share_frequency}" />
                                </c:if>
                            </td>
                            <td style="text-align: center;" class="share_frequency_remark">${para.share_frequency_remark}</td>
                            <td style="text-align: center;" class="tax_yield">${para.tax_yield}</td>
                            <td style="text-align: center;" class="annual_rate">${para.annual_rate}</td>
                            <td style="text-align: center;" class="correspondingamount_back">
                                <sc:fmt value="${para.correspondingamount_back}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="correspondingamount_close">
                                <sc:fmt value="${para.correspondingamount_close}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="correspondingamount_total">
                                <sc:fmt value="${para.correspondingamount_total}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="asset_status">
                                <sc:optd name="asset_status" type="knp" key="ast,gdfamc_ast_aststatus" value="${para.asset_status}" />
                            </td>
                            <td style="text-align: center;" class="counterparty">${para.counterparty}</td>
                            <td style="text-align: center;" class="basic_financiers">${para.basic_financiers}</td>
                            <td style="text-align: center;" class="industry_of_financiers">${para.industry_of_financiers}</td>
                            <td style="text-align: center;" class="gb_trade">
                                <sc:optd name="gb_trade" type="knp" key="cus,industry" value="${para.gb_trade}" />
                            <td style="text-align: center;" class="number_bal_orig1">
                                <sc:fmt value="${para.number_bal_orig1}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig5">
                                <sc:fmt value="${para.number_bal_orig5}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig7">
                                <sc:fmt value="${para.number_bal_orig7}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig9">
                                <sc:fmt value="${para.number_bal_orig9}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig11">
                                <sc:fmt value="${para.number_bal_orig11}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig2">
                                <sc:fmt value="${para.number_bal_orig2}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig3">
                                <sc:fmt value="${para.number_bal_orig3}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig4">
                                <sc:fmt value="${para.number_bal_orig4}" type="money" pattern="comm" />
                            </td>
                            <td style="text-align: center;" class="number_bal_orig19">
                                <sc:fmt value="${para.number_bal_orig19}" type="money" pattern="comm" />
                            </td>
                        </tr>
                    </c:forEach>
                </c:otherwise>
            </c:choose>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pagination" targetType="navTab"
            totalCount="${jrafrpu.rspPkg.rspRecordCount}"
            numPerPage="${jrafrpu.rspPkg.rspPageSize}"
            currentPage="${jrafrpu.rspPkg.rspPageNo}"></div>
    </div>
</div>
<script type="text/javascript">
var checkbool = false;
function checkboxshow(){//复选框
    var checktextsum = $("#checktextsum",navTab.getCurrentPanel()).val();
    var aa = checktextsum.split(",");
    var checktext = [];
    $('input:checkbox[name=checktext]', navTab.getCurrentPanel()).each(function(k){
        if($(this).is(':checked')){
            //$(this).show();
            $("."+$(this).attr("traget")).show();
            checktext.push(this.value);
        }else{
            //$(this).hide();
            $("."+$(this).attr("traget")).hide();
            for(var i=0;i<aa.length;i++){
                if(aa[i].indexOf($(this).val())>=0){
                    aa.splice(i,1);
                }
            }
        }
    });
    if(aa != ''){
        checktext.push(aa);
    }
    checkbool = true;
    $("#checkbool",navTab.getCurrentPanel()).val(checkbool);
    $("#checktextsum",navTab.getCurrentPanel()).val(checktext);
}
//var assetidbool = false;
function checkedchange(){//序号复选框
    var assetidval = $("#assetidval",navTab.getCurrentPanel()).val();
    var asset_id = assetidval.split(",");
    var check_val = [];
    $("input[name='paramp']",navTab.getCurrentPanel()).each(function() { // 遍历checkbox 
        if($(this).is(':checked')){
            check_val.push(this.value);
        }else{
            for(var j=0;j<asset_id.length;j++){
                if(asset_id[j].indexOf($(this).val())>=0){
                    asset_id.splice(j,1);
                }
            }
        }
    });
    if(asset_id !=''){
        check_val.push(asset_id);
    }
    /**assetidbool = true;
    $("#assetidbool",navTab.getCurrentPanel()).val(assetidbool);*/
    $("#assetidval",navTab.getCurrentPanel()).val(check_val);
}
$(function (){
    checkedshow1();
    var checkbool = $("#checkbool",navTab.getCurrentPanel()).val();
    var checktextsum = $("#checktextsum",navTab.getCurrentPanel()).val();
    var assetidval = $("#assetidval",navTab.getCurrentPanel()).val();
    if(checkbool=='true'){
        $("input[name='checktext']",navTab.getCurrentPanel()).each(function() { // 遍历选中的checkbox 
            if(checktextsum.indexOf($(this).val())>=0){
                $(this).attr("checked","checked");
                $("."+$(this).attr("traget")).show();
            }else{
                $("."+$(this).attr("traget")).hide();
            }
        });
    }
    $("input[name='paramp']",navTab.getCurrentPanel()).each(function() { // 遍历选中的checkbox 
        if(assetidval.indexOf($(this).val())>=0){
            $(this).attr("checked","checked");
        }
    });
});

function checkshow1(){
    $("input[name='checktext']").css("display", "");
    $("li[name='checkshow']").css("display", "none");//展开
    $("li[name='checkedshow']").css("display", "");//收起
    $("tr[name='spanpublic']").css("display", "");
    $("td[name='spanpublic']").css("display", "");
}
function checkedshow1(){
    $("input[name='checktext']").css("display", "none");
    $("li[name='checkedshow']").css("display", "none");
    $("li[name='checkshow']").css("display", "");//展开
    $("tr[name='spanpublic']").css("display", "none");
    $("td[name='spanpublic']").css("display", "none");
}

/**function checktextsum(){
    var checktextsum = $("#checktextsum",navTab.getCurrentPanel()).val();
    $("input[name='checktext']",navTab.getCurrentPanel()).each(function() { // 遍历选中的checkbox 
        var a = checktextsum.indexOf($(this).val());
        if(checktextsum.indexOf($(this).val())>=0){
            $(this).attr("checked","checked");
            $("."+$(this).attr("traget")).show();
        }else{
            $("."+$(this).attr("traget")).hide();
        }
    });
};*/
    function uploadBeginTurnStatis() {
        var assetidval = $("#assetidval",navTab.getCurrentPanel()).val();
        var checktextsum = $("#checktextsum",navTab.getCurrentPanel()).val();
        var asset_detail_type = $("#asset_detail_type",navTab.getCurrentPanel()).val();
        var asset_status = $("#asset_status",navTab.getCurrentPanel()).val();
        var project_name = $("#project_name",navTab.getCurrentPanel()).val();
        var fin_date = $("#fin_date",navTab.getCurrentPanel()).val();
        var investment_type = $("#investment_type",navTab.getCurrentPanel()).val();
        var interest_end_date = $("#interest_end_date",navTab.getCurrentPanel()).val();
        var basic_financiers = $("#basic_financiers",navTab.getCurrentPanel()).val();
        var gb_trade = $("#gb_trade",navTab.getCurrentPanel()).val();
        var counterparty = $("#counterparty",navTab.getCurrentPanel()).val();
        var owner_name = $("#owner_name",navTab.getCurrentPanel()).val();
        var owning_business_unit = $("#owning_business_unit",navTab.getCurrentPanel()).val();
        alertMsg.warn("请稍候..正在导出数据,请勿重复操作");
        var url = "/download?sysName=<sc:fmt value='gdfamc' type='crypto'/>"
                + "&oprID=<sc:fmt value='AssetturnoverStatisticalAction' type='crypto'/>"
                + "&actions=<sc:fmt value='exportAssetturnoverStatisticallist' type='crypto'/>"
                + "&asset_detail_type="+asset_detail_type
                + "&asset_status="+asset_status
                + "&project_name="+encodeURI(encodeURI(project_name))
                + "&fin_date="+fin_date
                + "&investment_type="+investment_type
                + "&interest_end_date="+interest_end_date
                + "&basic_financiers="+encodeURI(encodeURI(basic_financiers))
                + "&gb_trade="+gb_trade
                + "&counterparty="+encodeURI(encodeURI(counterparty))
                + "&owner_name="+encodeURI(encodeURI(owner_name))
                + "&owning_business_unit="+encodeURI(encodeURI(owning_business_unit))
                + "&asset_turnover_id="+assetidval
                + "&check_type="+checktextsum;
        location.href = url;

    }
</script>

后台java:

package com.sunline.gdfamc.actor.statisticalQuery;

import java.io.File;
import java.io.FileOutputStream;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.jdom.Element;
import org.jdom.JDOMException;

import com.sunline.funcpub.util.poi.ExcelUtil;
import com.sunline.gdfamc.bean.PageInfo;
import com.sunline.gdfamc.util.ExcelStyleUtil;
import com.sunline.jraf.BimisException;
import com.sunline.jraf.services.Actor;
import com.sunline.jraf.util.DatetimeUtil;
import com.sunline.jraf.util.StringUtil;
import com.sunline.jraf.util.XmlUtil;

public class AssetturnoverStatisticalAction extends Actor{
    //项目台账明细报表
    private static final String APPSTATISTIC = "com.sunline.gdfamc.mybatis.public.queryStatistical.";
    public void queryAssetturnoverStatisticallist() throws BimisException, JDOMException, UnsupportedEncodingException{
        //查询条件
        String checktextsum = req.getReqDataStr("checktextsum");//勾选标志
        String checkbool = req.getReqDataStr("checkbool");//是否加载
        String assetidval = req.getReqDataStr("assetidval");//序号勾选标志
        
        String asset_status = req.getReqDataStr("asset_status");//资产状态
        String asset_detail_type = req.getReqDataStr("asset_detail_type");//产品
        String project_name = req.getReqDataStr("project_name");//项目名称
        String fin_date = req.getReqDataStr("fin_date");//购买日
        String fin_date_end = req.getReqDataStr("fin_date_end");//购买日
        String investment_type = req.getReqDataStr("investment_type");//投资产品类型 
        String interest_end_date = req.getReqDataStr("interest_end_date");//实际到期日
        String interest_end_date_end = req.getReqDataStr("interest_end_date_end");//实际到期日
        String customer_name = req.getReqDataStr("basic_financiers");//基础融资人
        String gb_trade = req.getReqDataStr("gb_trade");//国标行业
        String counterparty = req.getReqDataStr("counterparty");//国标行业
        String owner_name = req.getReqDataStr("owner_name");//经办人
        String owning_business_unit = req.getReqDataStr("owning_business_unit");//部门
        HashMap<String,Object> param = new HashMap<String, Object>();
        if (!StringUtil.isNullOrEmpty(asset_status)) {
            param.put("asset_status",asset_status);
        }
        if (!StringUtil.isNullOrEmpty(asset_detail_type)) {
            param.put("asset_detail_type",asset_detail_type);
        }
        if (!StringUtil.isNullOrEmpty(project_name)) {
            param.put("project_name","%"+project_name+"%");
        }
        if (!StringUtil.isNullOrEmpty(fin_date)) {
            param.put("fin_date",DatetimeUtil.convertStrToDate(fin_date, "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(fin_date_end)) {
            param.put("fin_date_end",DatetimeUtil.convertStrToDate(fin_date_end, "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(investment_type)) {
            param.put("investment_type",investment_type);
        }
        if (!StringUtil.isNullOrEmpty(interest_end_date)) {
            param.put("interest_end_date",DatetimeUtil.convertStrToDate(interest_end_date, "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(interest_end_date_end)) {
            param.put("interest_end_date_end",DatetimeUtil.convertStrToDate(interest_end_date_end, "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(customer_name)) {
            param.put("customer_name","%"+customer_name+"%");
        }
        if (!StringUtil.isNullOrEmpty(gb_trade)) {
            param.put("gb_trade",gb_trade);
        }
        if (!StringUtil.isNullOrEmpty(counterparty)) {
            param.put("counterparty","%"+counterparty+"%");
        }
        if (!StringUtil.isNullOrEmpty(owner_name)) {
            param.put("owner_name","%"+owner_name+"%");
        }
        if (!StringUtil.isNullOrEmpty(owning_business_unit)) {
            param.put("owning_business_unit","%"+owning_business_unit+"%");
        }
        List<HashMap<String,Object>> maplist = new ArrayList<HashMap<String,Object>>();
        HashMap<String,Object> map = new HashMap<String, Object>();
        HashMap<String,Object> mapbak = new HashMap<String, Object>();
        String tempString = "";
        String asset_tempString = "";
        if(!StringUtil.isAllNullOrEmpty(checktextsum)){
            if(checktextsum.length()>0){
                String[] checktextsumid = new String[checktextsum.length()];
                checktextsumid = checktextsum.split(",");
                for(int i=0;i<checktextsumid.length;i++){//去重
                    mapbak.put(checktextsumid[i], checktextsumid[i]);
                }
                for(String key : mapbak.keySet()){
                    tempString += mapbak.get(key)+",";
                }
                if(tempString.length()>0){
                    checktextsum = tempString.substring(0, tempString.length()-1);
                }
            }
            map.put("checktextsum", checktextsum);
            map.put("checkbool", checkbool);
        }
        if(!StringUtil.isAllNullOrEmpty(assetidval)){
            if(assetidval.length()>0){
                String comma = assetidval.substring(assetidval.length()-1);//如果后缀有逗号则不截取
                if(",".equals(comma)){
                    assetidval = assetidval.substring(0, assetidval.length()-1);
                }
                String[] assetidvalbak = new String[assetidval.length()];
                assetidvalbak = assetidval.split(",");
                for(int i=0;i<assetidvalbak.length;i++){//去重
                    mapbak.put(assetidvalbak[i], assetidvalbak[i]);
                }
                for(String key : mapbak.keySet()){
                    asset_tempString += mapbak.get(key)+",";
                }
                if(asset_tempString.length()>0){
                    assetidval = asset_tempString.substring(0, asset_tempString.length()-1);
                }
            }
            map.put("assetidval", assetidval);
        }
        maplist.add(map);
        Element e = XmlUtil.createDataObjectElement(maplist);
            Element element = commonDao.queryByNamedSqlWithPage(
                    APPSTATISTIC+ "queryAssetturnoverStatisticallistPage", req.getReqPageInfo(), param);
            req.addRspData(element.removeContent());
            req.addRspData("Results4",e.removeContent());
    }
    //导出
    public void exportAssetturnoverStatisticallist() throws Exception {
        try {
            Map<String, String> Map =new  HashMap<String, String>();
            //查询条件
            String asset_status = req.getReqDataStr("asset_status");//资产状态
            String asset_detail_type = req.getReqDataStr("asset_detail_type");//产品
            String project_name = req.getReqDataStr("project_name");//项目名称
            String fin_date = req.getReqDataStr("fin_date");//购买日
            String fin_date_end = req.getReqDataStr("fin_date_end");//购买日
            String investment_type = req.getReqDataStr("investment_type");//投资产品类型 
            String interest_end_date = req.getReqDataStr("interest_end_date");//实际到期日
            String interest_end_date_end = req.getReqDataStr("interest_end_date_end");//实际到期日
            String customer_name = req.getReqDataStr("basic_financiers");//基础融资人
            String gb_trade = req.getReqDataStr("gb_trade");//国标行业
            String counterparty = req.getReqDataStr("counterparty");//合作机构
            String owner_name = req.getReqDataStr("owner_name");//经办人
            String owning_business_unit = req.getReqDataStr("owning_business_unit");//部门
            String asset_turnover_id = req.getReqDataStr("asset_turnover_id");//项目台账ID
            String check_type = req.getReqDataStr("check_type");//勾选CheckBox的value值
            HashMap<String,Object> param = new HashMap<String, Object>();
            if (!StringUtil.isNullOrEmpty(asset_status)) {
                param.put("asset_status",asset_status);
            }
            if (!StringUtil.isNullOrEmpty(asset_detail_type)) {
                param.put("asset_detail_type",asset_detail_type);
            }
            if (!StringUtil.isNullOrEmpty(project_name)) {
                project_name=URLDecoder.decode(project_name, "UTF-8");
//                project_name = new String(project_name.getBytes("ISO8859-1"), "UTF-8");
                param.put("project_name","%"+project_name+"%");
            }
            if (!StringUtil.isNullOrEmpty(fin_date)) {
                param.put("fin_date",DatetimeUtil.convertStrToDate(fin_date, "yyyy-MM-dd"));
            }
            if (!StringUtil.isNullOrEmpty(fin_date_end)) {
                param.put("fin_date_end",DatetimeUtil.convertStrToDate(fin_date_end, "yyyy-MM-dd"));
            }
            if (!StringUtil.isNullOrEmpty(investment_type)) {
                param.put("investment_type",investment_type);
            }
            if (!StringUtil.isNullOrEmpty(interest_end_date)) {
                param.put("interest_end_date",DatetimeUtil.convertStrToDate(interest_end_date, "yyyy-MM-dd"));
            }
            if (!StringUtil.isNullOrEmpty(interest_end_date_end)) {
                param.put("interest_end_date_end",DatetimeUtil.convertStrToDate(interest_end_date_end, "yyyy-MM-dd"));
            }
            if (!StringUtil.isNullOrEmpty(customer_name)) {
                customer_name=URLDecoder.decode(customer_name, "UTF-8");
                param.put("customer_name","%"+customer_name+"%");
            }
            if (!StringUtil.isNullOrEmpty(gb_trade)) {
                param.put("gb_trade",gb_trade);
            }
            if (!StringUtil.isNullOrEmpty(counterparty)) {
                counterparty=URLDecoder.decode(counterparty, "UTF-8");
                param.put("counterparty","%"+counterparty+"%");
            }
            if (!StringUtil.isNullOrEmpty(owner_name)) {
                owner_name=URLDecoder.decode(owner_name, "UTF-8");
//                owner_name = new String(owner_name.getBytes("ISO8859-1"), "UTF-8");
                param.put("owner_name","%"+owner_name+"%");
            }
            if (!StringUtil.isNullOrEmpty(owning_business_unit)) {
                owning_business_unit=URLDecoder.decode(owning_business_unit, "UTF-8");
//                owning_business_unit = new String(owning_business_unit.getBytes("ISO8859-1"), "UTF-8");
                param.put("owning_business_unit","%"+owning_business_unit+"%");
            }
            Element dataElement = null;
            Element element = null;
            List<Element> lists = new ArrayList<Element>();
            List<HashMap> selvalue = new ArrayList<HashMap>();
            List<HashMap> exprotvalue = new ArrayList<HashMap>();
            HashMap<String,Object> exprot= new HashMap<String,Object>();
            String tempString = "";
            String tempStr = "";
            //选择编号导出
            if(!StringUtil.isObjNullOrEmpty(asset_turnover_id)){
                if(asset_turnover_id.length()>0){
                    String[] asset_turnoverid = new String[asset_turnover_id.length()];
                    asset_turnoverid = asset_turnover_id.split(",");
                    for(int i=0;i<asset_turnoverid.length;i++){
                        tempString += "'"+asset_turnoverid[i] + "',";
                    }
                }
                if(tempString.length()>1){
                    tempString=tempString.substring(0, tempString.length()-1);
                    Map.put("asset_turnover_id", tempString);
                    selvalue =(List<HashMap>) commonDao.queryByNamedSqlForList(APPSTATISTIC+"exportAssetturnoverStatisticallist", Map);
                    if(check_type.length()>0){
                        for(int j=0;j<selvalue.size();j++){
                            HashMap<String, Object> chaeck = selvalue.get(j);
                            exprot = exportValue(chaeck,check_type);
                            exprotvalue.add(exprot);
                        }
//                        element = XmlUtil.createDataObjectElement(exprotvalue);
                    }else{
                        element = XmlUtil.createDataObjectElement(selvalue);
                    }
                }
            }else{
                selvalue =(List<HashMap>) commonDao.queryByNamedSqlForList(APPSTATISTIC+"exportAssetturnoverStatisticallist", param);
                if(check_type.length()>0){
                    for(int j=0;j<selvalue.size();j++){
                        HashMap<String, Object> chaeck = selvalue.get(j);
                        exprot = exportValue(chaeck,check_type);
                        exprotvalue.add(exprot);
                    }
//                    element = XmlUtil.createDataObjectElement(exprotvalue);
                }else{
                    element = XmlUtil.createDataObjectElement(selvalue);
                }
            }
            if(check_type.length()>0){
                String filePathexprot = filePathExport(exprotvalue,check_type);//画excel表
                req.addRspFilePathName(filePathexprot, DatetimeUtil.getCurrentDate("yyyyMMddHHmmss")+"项目台账明细报表.xlsx");
            }else{
                lists.add(element);
                List<List<Element>> exportObject = new ArrayList<List<Element>>();
                exportObject.add(lists);
                String filePath = ExcelUtil.exportExcel(exportObject, null,
                        "exportturnoverdetailstatistical", "项目台账明细报表");
                String fileName = "项目台账明细报表"
                        + filePath.substring(filePath.lastIndexOf("."));
                req.addRspFilePathName(filePath, fileName);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
            req.addRspData("errMsg", "error");
        }
    }
    private String filePathExport(List<HashMap> exprotvalue, String check_type) {
        // TODO Auto-generated method stub
        HashMap<String,Object> mapbak = new HashMap<String, Object>();
        List<String> liststr = new ArrayList<String>();
        String tempString = "";
        if(!StringUtil.isAllNullOrEmpty(check_type)){
            if(check_type.length()>0){
                String[] checktextsumid = new String[check_type.length()];
                checktextsumid = check_type.split(",");
                for(int i=0;i<checktextsumid.length;i++){//去重
                    mapbak.put(checktextsumid[i], checktextsumid[i]);
                }
            }
        }
        String filePath = null;
        filePath = ExcelUtil.getExcelPath()+File.separator+DatetimeUtil.getCurrentDate("yyyyMMddHHSSmm")+"_资产管理总部业务收益表.xlsx";
        Workbook wb = new XSSFWorkbook();
        
        Sheet sheet = wb.createSheet();
        
        //合并单元格
        CellRangeAddress cra1 = new CellRangeAddress(0, 0, 0, mapbak.size()-1);
//        CellRangeAddress cra2 = new CellRangeAddress(0, 0, 0, mapbak.size());
        
        sheet.addMergedRegion(cra1);
//        sheet.addMergedRegion(cra2);
        
        //自适应
        sheet.autoSizeColumn(1);
        for(int i=0;i<mapbak.size();i++){
            sheet.setColumnWidth(i, 15*256);
        }
        /**
        sheet.setColumnWidth(0, 20*256);
        sheet.setColumnWidth(1, 20*256);
        sheet.setColumnWidth(3, 15*256);
        sheet.setColumnWidth(4, 15*256);
        sheet.setColumnWidth(5, 15*256);
        sheet.setColumnWidth(6, 15*256);
        sheet.setColumnWidth(7, 15*256);
        sheet.setColumnWidth(9, 15*256);
        sheet.setColumnWidth(11, 15*256);
        */
        //创建第一行:标题
//        String title = AssetsAcquisitionAndDisposalListActor.assemblyTitel("2018-07-16","2018-07-17");
        Row row1 = sheet.createRow(0);
        Cell cell11 = row1.createCell(0);
        cell11.setCellValue("项目台账明细报表");
        ExcelStyleUtil excelStyleUtil = new ExcelStyleUtil(wb);
        CellStyle cellStyle = excelStyleUtil.setCellStyle1();
        cellStyle.setFont(excelStyleUtil.setFontStyle("仿宋", (short)16));
        cell11.setCellStyle(cellStyle);
        
        CellStyle cellStyle3 = excelStyleUtil.setCellStyle3();
        cellStyle3.setFont(excelStyleUtil.setFontStyle("仿宋", (short)11));
        //第二行:表头
        Row row4= sheet.createRow(1);
        row4.setHeight((short) (50 * 20));
        int j=0;
        for(String key : mapbak.keySet()){
            if("document_number".equals(key)){
                Cell cell41 = row4.createCell(j);
                cell41.setCellValue("项目台账编号");
                cell41.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("project_name".equals(key)){
                Cell cell42 = row4.createCell(j);
                cell42.setCellValue("项目名称");
                cell42.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("fin_date".equals(key)){
                Cell cell43 = row4.createCell(j);
                cell43.setCellValue("业务发生日");
                cell43.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("term".equals(key)){
                Cell cell44 = row4.createCell(j);
                cell44.setCellValue("期限");
                cell44.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("owner_name".equals(key)){
                Cell cell45 = row4.createCell(j);
                cell45.setCellValue("经办人");
                cell45.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("owning_business_unit_name".equals(key)){
                Cell cell46 = row4.createCell(j);
                cell46.setCellValue("部门");
                cell46.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("asset_main_type".equals(key)){
                Cell cell47 = row4.createCell(j);
                cell47.setCellValue("业务类型");
                cell47.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("asset_detail_name".equals(key)){
                Cell cell93 = row4.createCell(j);
                cell93.setCellValue("产品");
                cell93.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("prodtype".equals(key)){
                Cell cell48 = row4.createCell(j);
                cell48.setCellValue("产品类型");
                cell48.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("investment_type".equals(key)){
                Cell cell49 = row4.createCell(j);
                cell49.setCellValue("投资产品分类");
                cell49.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("deal_purpose".equals(key)){
                Cell cell50 = row4.createCell(j);
                cell50.setCellValue("交易目的");
                cell50.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("asset_type".equals(key)){
                Cell cell51 = row4.createCell(j);
                cell51.setCellValue("持有方式");
                cell51.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("share_assets".equals(key)){
                Cell cell52 = row4.createCell(j);
                cell52.setCellValue("资产占有份额(%)");
                cell52.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("initial_investment".equals(key)){
                Cell cell53 = row4.createCell(j);
                cell53.setCellValue("首次付款金额(原币)");
                cell53.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("cost".equals(key)){
                Cell cell54 = row4.createCell(j);
                cell54.setCellValue("成本");
                cell54.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("interest_receivable".equals(key)){
                Cell cell55 = row4.createCell(j);
                cell55.setCellValue("应收利息(原币)");
                cell55.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("transaction_expense".equals(key)){
                Cell cell56 = row4.createCell(j);
                cell56.setCellValue("交易费用(原币)");
                cell56.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("contract_loan_amt".equals(key)){
                Cell cell57 = row4.createCell(j);
                cell57.setCellValue("合同金额(原币)");
                cell57.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("accumulated_amount".equals(key)){
                Cell cell58 = row4.createCell(j);
                cell58.setCellValue("累计投放金额(原币)");
                cell58.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("contract_effective_date".equals(key)){
                Cell cell59 = row4.createCell(j);
                cell59.setCellValue("合同开始日期");
                cell59.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("contract_due_date".equals(key)){
                Cell cell60 = row4.createCell(j);
                cell60.setCellValue("合同结束日期");
                cell60.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("payment_day".equals(key)){
                Cell cell61 = row4.createCell(j);
                cell61.setCellValue("期间赎回日");
                cell61.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("deal_date".equals(key)){
                Cell cell62 = row4.createCell(j);
                cell62.setCellValue("交易日期");
                cell62.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("liquidity".equals(key)){
                Cell cell63 = row4.createCell(j);
                cell63.setCellValue("流动性");
                cell63.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("security".equals(key)){
                Cell cell64 = row4.createCell(j);
                cell64.setCellValue("安全性");
                cell64.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("interest_type".equals(key)){
                Cell cell65 = row4.createCell(j);
                cell65.setCellValue("计息类型");
                cell65.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("interest_method".equals(key)){
                Cell cell66 = row4.createCell(j);
                cell66.setCellValue("计息方式");
                cell66.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("interest_start_date".equals(key)){
                Cell cell67 = row4.createCell(j);
                cell67.setCellValue("起息日");
                cell67.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("interest_end_date".equals(key)){
                Cell cell68 = row4.createCell(j);
                cell68.setCellValue("到息日");
                cell68.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("latest_interest_day".equals(key)){
                Cell cell69 = row4.createCell(j);
                cell69.setCellValue("最新计息日");
                cell69.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("income_type".equals(key)){
                Cell cell70 = row4.createCell(j);
                cell70.setCellValue("收益类型");
                cell70.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("share_way".equals(key)){
                Cell cell71 = row4.createCell(j);
                cell71.setCellValue("付息方式/分红方式");
                cell71.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("share_frequency".equals(key)){
                Cell cell72 = row4.createCell(j);
                cell72.setCellValue("付息频率/分红频率");
                cell72.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("share_frequency_remark".equals(key)){
                Cell cell73 = row4.createCell(j);
                cell73.setCellValue("付息说明");
                cell73.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("tax_yield".equals(key)){
                Cell cell74 = row4.createCell(j);
                cell74.setCellValue("税前收益率(%)");
                cell74.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("annual_rate".equals(key)){
                Cell cell75 = row4.createCell(j);
                cell75.setCellValue("税后收益率(%)");
                cell75.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("correspondingamount_back".equals(key)){
                Cell cell76 = row4.createCell(j);
                cell76.setCellValue("收回原始投资成本(原币)");
                cell76.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("correspondingamount_close".equals(key)){
                Cell cell77 = row4.createCell(j);
                cell77.setCellValue("收投资收益金额(原币)");
                cell77.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("correspondingamount_total".equals(key)){
                Cell cell78 = row4.createCell(j);
                cell78.setCellValue("合计");
                cell78.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("asset_status".equals(key)){
                Cell cell79 = row4.createCell(j);
                cell79.setCellValue("资产状态");
                cell79.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("counterparty".equals(key)){
                Cell cell80 = row4.createCell(j);
                cell80.setCellValue("合作机构");
                cell80.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("basic_financiers".equals(key)){
                Cell cell81 = row4.createCell(j);
                cell81.setCellValue("基础资产融资人");
                cell81.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("industry_of_financiers".equals(key)){
                Cell cell82 = row4.createCell(j);
                cell82.setCellValue("基础资产所属行业");
                cell82.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("gb_trade".equals(key)){
                Cell cell83 = row4.createCell(j);
                cell83.setCellValue("国标行业");
                cell83.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig1".equals(key)){
                Cell cell84 = row4.createCell(j);
                cell84.setCellValue("本金余额");
                cell84.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig5".equals(key)){
                Cell cell85 = row4.createCell(j);
                cell85.setCellValue("应付利息余额");
                cell85.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig7".equals(key)){
                Cell cell86 = row4.createCell(j);
                cell86.setCellValue("投资收益余额(原币)");
                cell86.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig9".equals(key)){
                Cell cell87 = row4.createCell(j);
                cell87.setCellValue("其他资本公积余额(原币)");
                cell87.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig11".equals(key)){
                Cell cell88= row4.createCell(j);
                cell88.setCellValue("销项税余额(原币)");
                cell88.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig2".equals(key)){
                Cell cell89= row4.createCell(j);
                cell89.setCellValue("资金往来余额");
                cell89.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig3".equals(key)){
                Cell cell90= row4.createCell(j);
                cell90.setCellValue("公允价值变动余额(原币)");
                cell90.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig4".equals(key)){
                Cell cell91= row4.createCell(j);
                cell91.setCellValue("公允价值变动损益余额(原币)");
                cell91.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        for(String key : mapbak.keySet()){
            if("number_bal_orig19".equals(key)){
                Cell cell92= row4.createCell(j);
                cell92.setCellValue("应收利息余额(原币)");
                cell92.setCellStyle(cellStyle3);
                j++;
                break;
            }
        }
        //开始循环数据到excel
        int k = 2;//从第2行开始
        for(j=0;j<exprotvalue.size();j++){//循环list
            HashMap<String, Object> result2 = exprotvalue.get(j);//获取第j个list的值
            int y = 0;//列
            Row rowi= sheet.createRow(k);//行
            for(String key : result2.keySet()){//遍历
                if("document_number".equals(key)){
                    Cell cell41 = rowi.createCell(y);//列
                    cell41.setCellValue((String) result2.get(key));
                    cell41.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("project_name".equals(key)){
                    Cell cell42 = rowi.createCell(y);
                    cell42.setCellValue((String) result2.get(key));
                    cell42.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("fin_date".equals(key)){
                    Cell cell43 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell43.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell43.setCellValue("");
                    }
                    cell43.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("term".equals(key)){
                    Cell cell44 = rowi.createCell(y);
                    cell44.setCellValue((String) result2.get(key));
                    cell44.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("owner_name".equals(key)){
                    Cell cell45 = rowi.createCell(y);
                    cell45.setCellValue((String) result2.get(key));
                    cell45.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("owning_business_unit_name".equals(key)){
                    Cell cell46 = rowi.createCell(y);
                    cell46.setCellValue((String) result2.get(key));
                    cell46.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("asset_main_type".equals(key)){
                    Cell cell47 = rowi.createCell(y);
                    cell47.setCellValue((String) result2.get(key));
                    cell47.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("asset_detail_name".equals(key)){
                    Cell cell93 = rowi.createCell(y);
                    cell93.setCellValue((String) result2.get(key));
                    cell93.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("prodtype".equals(key)){
                    Cell cell48 = rowi.createCell(y);
                    cell48.setCellValue((String) result2.get(key));
                    cell48.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("investment_type".equals(key)){
                    Cell cell49 = rowi.createCell(y);
                    cell49.setCellValue((String) result2.get(key));
                    cell49.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("deal_purpose".equals(key)){
                    Cell cell50 = rowi.createCell(y);
                    cell50.setCellValue((String) result2.get(key));
                    cell50.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("asset_type".equals(key)){
                    Cell cell51 = rowi.createCell(y);
                    cell51.setCellValue((String) result2.get(key));
                    cell51.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("share_assets".equals(key)){
                    Cell cell52 = rowi.createCell(y);
                    cell52.setCellValue((String) result2.get(key));
                    cell52.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("initial_investment".equals(key)){
                    Cell cell53 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell53.setCellValue(doubleVal);
                    cell53.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("cost".equals(key)){
                    Cell cell54 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell54.setCellValue(doubleVal);
                    cell54.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("interest_receivable".equals(key)){
                    Cell cell55 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell55.setCellValue(doubleVal);
                    cell55.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("transaction_expense".equals(key)){
                    Cell cell56 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell56.setCellValue(doubleVal);
                    cell56.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("contract_loan_amt".equals(key)){
                    Cell cell57 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell57.setCellValue(doubleVal);
                    cell57.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("accumulated_amount".equals(key)){
                    Cell cell58 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell58.setCellValue(doubleVal);
                    cell58.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("contract_effective_date".equals(key)){
                    Cell cell59 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell59.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell59.setCellValue("");
                    }
                    cell59.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("contract_due_date".equals(key)){
                    Cell cell60 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell60.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell60.setCellValue("");
                    }
                    cell60.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("payment_day".equals(key)){
                    Cell cell61 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell61.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell61.setCellValue("");
                    }
                    cell61.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("deal_date".equals(key)){
                    Cell cell62 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell62.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell62.setCellValue("");
                    }
                    cell62.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("liquidity".equals(key)){
                    Cell cell63 = rowi.createCell(y);
                    cell63.setCellValue((String) result2.get(key));
                    cell63.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("security".equals(key)){
                    Cell cell64 = rowi.createCell(y);
                    cell64.setCellValue((String) result2.get(key));
                    cell64.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("interest_type".equals(key)){
                    Cell cell65 = rowi.createCell(y);
                    cell65.setCellValue((String) result2.get(key));
                    cell65.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("interest_method".equals(key)){
                    Cell cell66 = rowi.createCell(y);
                    cell66.setCellValue((String) result2.get(key));
                    cell66.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("interest_start_date".equals(key)){
                    Cell cell67 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell67.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell67.setCellValue("");
                    }
                    cell67.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("interest_end_date".equals(key)){
                    Cell cell68 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell68.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell68.setCellValue("");
                    }
                    cell68.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("latest_interest_day".equals(key)){
                    Cell cell69 = rowi.createCell(y);
                    if(!StringUtil.isObjNullOrEmpty(result2.get(key))){
                        cell69.setCellValue(DatetimeUtil.convertDateToStr((Date) result2.get(key), "yyyy-MM-dd"));
                    }else{
                        cell69.setCellValue("");
                    }
                    cell69.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("income_type".equals(key)){
                    Cell cell70 = rowi.createCell(y);
                    cell70.setCellValue((String) result2.get(key));
                    cell70.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("share_way".equals(key)){
                    Cell cell71 = rowi.createCell(y);
                    cell71.setCellValue((String) result2.get(key));
                    cell71.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("share_frequency".equals(key)){
                    Cell cell72 = rowi.createCell(y);
                    cell72.setCellValue((String) result2.get(key));
                    cell72.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("share_frequency_remark".equals(key)){
                    Cell cell73 = rowi.createCell(y);
                    cell73.setCellValue((String) result2.get(key));
                    cell73.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("tax_yield".equals(key)){
                    Cell cell74 = rowi.createCell(y);
                    cell74.setCellValue((String) result2.get(key));
                    cell74.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("annual_rate".equals(key)){
                    Cell cell75 = rowi.createCell(y);
                    cell75.setCellValue((String) result2.get(key));
                    cell75.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("correspondingamount_back".equals(key)){
                    Cell cell76 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell76.setCellValue(doubleVal);
                    cell76.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("correspondingamount_close".equals(key)){
                    Cell cell77 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell77.setCellValue(doubleVal);
                    cell77.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("correspondingamount_total".equals(key)){
                    Cell cell78 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell78.setCellValue(doubleVal);
                    cell78.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("asset_status".equals(key)){
                    Cell cell79 = rowi.createCell(y);
                    cell79.setCellValue((String) result2.get(key));
                    cell79.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("counterparty".equals(key)){
                    Cell cell80 = rowi.createCell(y);
                    cell80.setCellValue((String) result2.get(key));
                    cell80.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("basic_financiers".equals(key)){
                    Cell cell81 = rowi.createCell(y);
                    cell81.setCellValue((String) result2.get(key));
                    cell81.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("industry_of_financiers".equals(key)){
                    Cell cell82 = rowi.createCell(y);
                    cell82.setCellValue((String) result2.get(key));
                    cell82.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("gb_trade".equals(key)){
                    Cell cell83 = rowi.createCell(y);
                    cell83.setCellValue((String) result2.get(key));
                    cell83.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig1".equals(key)){
                    Cell cell84 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell84.setCellValue(doubleVal);
                    cell84.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig5".equals(key)){
                    Cell cell85 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell85.setCellValue(doubleVal);
                    cell85.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig7".equals(key)){
                    Cell cell86 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell86.setCellValue(doubleVal);
                    cell86.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig9".equals(key)){
                    Cell cell87 = rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell87.setCellValue(doubleVal);
                    cell87.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig11".equals(key)){
                    Cell cell88= rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell88.setCellValue(doubleVal);
                    cell88.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig2".equals(key)){
                    Cell cell89= rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell89.setCellValue(doubleVal);
                    cell89.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig3".equals(key)){
                    Cell cell90= rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell90.setCellValue(doubleVal);
                    cell90.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig4".equals(key)){
                    Cell cell91= rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell91.setCellValue(doubleVal);
                    cell91.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            for(String key : result2.keySet()){
                if("number_bal_orig19".equals(key)){
                    Cell cell92= rowi.createCell(y);
                    BigDecimal correspondingamount_total = (BigDecimal) result2.get(key);
                    if(StringUtil.isObjNullOrEmpty(correspondingamount_total)){
                        correspondingamount_total = BigDecimal.ZERO;
                    }
                    double doubleVal = correspondingamount_total.doubleValue();
                    cell92.setCellValue(doubleVal);
                    cell92.setCellStyle(cellStyle3);
                    y++;
                    break;
                }
            }
            k++;
        }
        try {
            FileOutputStream os = new FileOutputStream(filePath);
            wb.write(os);
            os.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return filePath;
    }
    private HashMap<String, Object> exportValue(HashMap<String, Object> chaeck, String check_type) {
        // TODO Auto-generated method stub
        String tempString = "";
        Boolean type=false;
        HashMap<String,Object> paramvalue = new HashMap<String, Object>();
        for(String key : chaeck.keySet()){
             //将CheckBox勾选的值拿出来与查出来check_type的key做比较
                HashMap<String,Object> paramtpye = new HashMap<String, Object>();
                if(!StringUtil.isObjNullOrEmpty(check_type)){
                    if(check_type.length()>0){
                        String[] checktext_type = new String[check_type.length()];
                        checktext_type = check_type.split(",");
                        //循环比较
                        for(int i=0;i<checktext_type.length;i++){
                            tempString = checktext_type[i];
                            if(tempString.equals(key)){
                                paramvalue.put(key, chaeck.get(key));
                                type = true;
                            }
                        }
                    }
                }
              }
        return paramvalue;
    }
}
 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值