Из приведенной ниже таблицы я хочу получить данные. Все значения, которые я получаю, но второй foreach l oop генерирует повторяющиеся значения для полей внутри l oop
Пожалуйста, дайте мне знать любое предложение
<div><table class="stt">
<thead>
<tr class="shade">
<th>Dep Ver</th>
<th >Order In Document Version</th>
<th>DEP Number</th>
<th>DEP Title</th>
<th>DEP Revision Date</th>
<th>Heading Hierarchy</th>
<th>Section Item No</th>
<th>SHALL[PS] Statement</th>
<th>Requirement Type</th>
<th>Discipline</th>
<th>Risk Rating (P)</th>
<th>Risk Rating (A)</th>
<th>Risk Rating (C)</th>
<th>Risk Rating (E)</th>
</thead>
</tr>
Второй foreach l oop генерирует повторяющиеся значения
#foreach($workitem in $workitems) #set($wiType = $workitem.fields().type().optionId())
<tr>
<td> $projectId</td>
<td></td>
<td>$workitem.fields.docNumber.render </td>
#if($wiType.equals("document"))
<td>$workitem.fields().description.render()</td>
#else
<td></td>
#end
<td></td>
<td></td>
<td></td>
#if($wiType.equals("requirement"))
<td>$workitem.fields().description.render()</td>
#else
<td></td>
#end
<td>$workitem.fields().type().render()</td>
<td>$workitem.fields.discipline.render</td>
#foreach($rs in $risks)
<td>$rs.fields.P.render</td>
<td>$rs.fields.A.render</td>
<td>$rs.fields.C.render</td>
<td>$rs.fields.E.render</td>
#end
</tr>
#end
</table>
</div>