我有一个数据表,信息在oracle数据库中。
这是table
<script>
$(document).ready(function() {
$('#example').DataTable({
dom: 'Bfrtip',
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"searching": false,
"ordering": false,
buttons: [
'excelHtml5',
'pdfHtml5'
]
});
} );
</script>
但是,当尝试将信息导出到excel时,它只显示一条记录。
在道
ArrayList<Tabla> list = new ArrayList<>();
String sql = "SELECT APLICACION_ID,\n"
+ "SUM(CASE WHEN ESTADO_CASO = '6' THEN 1 END) as Pendiente,\n"
+ "SUM(CASE WHEN ESTADO_CASO = '7' THEN 1 END) as En_Proceso,\n"
+ "SUM(CASE WHEN ESTADO_CASO IN ('6', '7') THEN 1 ELSE 0 END) as total\n"
+ "FROM SERV_CASO\n"
+ "GROUP BY GROUPING SETS ( (APLICACION_ID), () )";
在实体中
public void setAPLICACION_ID(String APLICACION_ID) {
this.APLICACION_ID = APLICACION_ID;
}
public String getEN_PROCESO() {
return EN_PROCESO;
}
在html中
<%MostrarTablaDao tablaDao = new MostrarTablaDao();
List<Tabla> list = tablaDao.barCharData();
Iterator<Tabla> iter = list.iterator();
Tabla tabla = null;
int i = 0;
while (iter.hasNext()) {
tabla = iter.next();%>
<tbody>
<tr>
<td><%= tabla.getAPLICACION_ID()%></td>
<td><%= tabla.getEN_PROCESO()%></td>
</tr><%}%>
浏览器控制台
暂无答案!
目前还没有任何答案,快来回答吧!