<style>
    .table {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
    }
    .table th, .table td {
        border: 1px solid #000;
        padding: 6px;
        text-align: center;
        vertical-align: middle;
    }
    .title {
        text-align: center;
        font-size: 24px;
        font-weight: bold;
        margin: 10px 0 20px 0;
    }
    .sig-img {
        height: 30px;
    }
</style>
<div class="title">驾驶员年度考核记录</div>
<table class="table">
    <colgroup>
        <col style="width: 15%;" />
        <col style="width: 55%;" />
        <col style="width: 15%;" />
        <col style="width: 15%;" />
    </colgroup>
    <thead>
    <tr>
        <th>身份证号</th><td style="text-align:left; white-space: nowrap;">$!{idCardNo}</td>
        <th>姓名</th><td style="text-align:left;">$!{name}</td>
    </tr>
    <tr>
        <th>考核项目</th>
        <th>考核内容</th>
        <th>分值</th>
        <th>得分</th>
    </tr>
    </thead>
    <tbody>
    #foreach($cat in $categories)
        #set($rowsize = $cat.details.size())
        #if($rowsize == 0)
        <tr>
            <td>$!{cat.name}</td>
            <td style="text-align:left;">无</td>
            <td>$!{cat.value}</td>
            <td>$!{cat.score}</td>
        </tr>
        #else
            #set($last = $rowsize - 1)
            #foreach($idx in [0..$last])
                #set($d = $cat.details.get($idx))
                <tr>
                    #if($idx == 0)
                    <td rowspan="$rowsize">$!{cat.name}</td>
                    #end
                    <td style="text-align:left;">$!{d.content}</td>
                    #if($idx == 0)
                    <td rowspan="$rowsize">$!{cat.value}</td>
                    <td rowspan="$rowsize">$!{cat.score}</td>
                    #end
                </tr>
            #end
        #end
    #end
    <tr>
        <td>考核项目合计</td>
        <td></td>
        <td>$!{totalValue}</td>
        <td>$!{totalScore}</td>
    </tr>
    </tbody>
    <tfoot>
    <tr>
        <td colspan="2" style="text-align:left;padding-left:10px;">考核结果：$!{result}</td>
        <td colspan="2" style="text-align:left;padding-left:10px;">考核时间：$!{assessTime}</td>
    </tr>
    <tr>
        <td colspan="2" style="text-align:left;padding-left:10px;">考核人签名：
            #if($evaluatorSignatureUrl)
            <img src="$!{evaluatorSignatureUrl}" class="sig-img" />
            #end
        </td>
        <td colspan="2" style="text-align:left;padding-left:10px;">被考核人签名：
            #if($assessedSignatureUrl)
            <img src="$!{assessedSignatureUrl}" class="sig-img" />
            #end
        </td>
    </tr>
    </tfoot>
</table>
