气象预警增加导出功能

master
徐杰盟 2024-07-17 16:59:18 +08:00
parent 97a4700dbf
commit 40ad7d5af0
2 changed files with 9 additions and 3 deletions

View File

@ -533,10 +533,16 @@ public class QXWarnController {
List<QXWarning> list = service.list(dto); List<QXWarning> list = service.list(dto);
ExcelCommon.exportExcel(list, if (CollectionUtils.isNotEmpty(list)){
ExcelCommon.exportExcel(list,
null, "历史气象预警", QXWarning.class, "历史气象预警.xlsx", null, "历史气象预警", QXWarning.class, "历史气象预警.xlsx",
response); response);
}else{
throw new MyException("没有查询到数据");
}
} }
/** /**

View File

@ -43,9 +43,9 @@
ORDER BY Q.WARNID DESC ORDER BY Q.WARNID DESC
</select> </select>
<select id="list" resultType="com.whdc.model.vo.QXWarningVO"> <select id="list" resultType="com.whdc.model.entity.QXWarning">
SELECT SELECT
Q.*,IF( WF.ID IS NOT NULL,1,0) STATUS Q.*
FROM FROM
FXKH_TXL.QXWARNING Q FXKH_TXL.QXWARNING Q
LEFT JOIN FXKH_TXL.WARNMSG_FEEDBACK WF ON WF.WARNID = Q.WARNID LEFT JOIN FXKH_TXL.WARNMSG_FEEDBACK WF ON WF.WARNID = Q.WARNID