提交 23f53cb9 作者: 张开石

1、导出统计会议纪要使用情况接口,当数据量为空时导出空文件

父级 02640ce6
...@@ -343,7 +343,16 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -343,7 +343,16 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
public void exportRecordTemplateUsingInfo(String searchValue, Date createTimeStart, Date createTimeEnd, HttpServletResponse response) { public void exportRecordTemplateUsingInfo(String searchValue, Date createTimeStart, Date createTimeEnd, HttpServletResponse response) {
List<Map<String, String>> statistics = statistics(searchValue, createTimeStart, createTimeEnd, false); List<Map<String, String>> statistics = statistics(searchValue, createTimeStart, createTimeEnd, false);
if (statistics.isEmpty()) { if (statistics.isEmpty()) {
throw new RobotBaseException("暂无数据"); List<String> dateList = DateUtil.rangeToList(createTimeStart, createTimeEnd, DateField.DAY_OF_YEAR).stream()
.map(date -> DateUtil.format(date, "yyyy-MM-dd"))
.collect(Collectors.toList());
Map<String, String> map = new LinkedHashMap<>();
map.put("部门", "");
map.put("姓名", "");
map.put("工号", "");
dateList.forEach(date -> map.put(date, ""));
map.put("总计", "");
statistics.add(map);
} }
int column = statistics.get(0).keySet().size(); int column = statistics.get(0).keySet().size();
List<Map<String, String>> finalStatistics = new ArrayList<>(); List<Map<String, String>> finalStatistics = new ArrayList<>();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论