Commit fb648675 authored by KeYong's avatar KeYong

修改报表下载文件名

parent 13101fb3
...@@ -78,17 +78,18 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService { ...@@ -78,17 +78,18 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
analysisReportLog.setStartDate(startDate); analysisReportLog.setStartDate(startDate);
analysisReportLog.setEndDate(endDate); analysisReportLog.setEndDate(endDate);
Map<String, Object> report = analysisReportLogMapper.getReport(analysisReportLog); Map<String, Object> report = analysisReportLogMapper.getReport(analysisReportLog);
SimpleDateFormat dateStat = new SimpleDateFormat("yyyy年MM月dd日");
// 文档编号 // 文档编号
String timeStr1 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); String timeStr1 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
String documentNumber = "ZD-XFSBXC" + timeStr1; String documentNumber = "ZD-XFSBXC" + timeStr1;
String documentNameTime = dateStat.format(startDate);
map.put("document_number", documentNumber); map.put("document_number", documentNumber);
// 设置文档文件名 // 设置文档文件名
map.put("document_name", "消防巡查报表" + timeStr1); map.put("document_name", "消防巡查报表" + documentNameTime);
// 换流站名称 // 换流站名称
String stationName=(String) station.get("biz_org_name"); String stationName=(String) station.get("biz_org_name");
map.put("station_name", stationName); map.put("station_name", stationName);
// 统计时间 // 统计时间
SimpleDateFormat dateStat = new SimpleDateFormat("yyyy年MM月dd日");
String statisticalTime = dateStat.format(startDate) + "-" + dateStat.format(endDate); String statisticalTime = dateStat.format(startDate) + "-" + dateStat.format(endDate);
if (statisticalTime.contains("年0")) { if (statisticalTime.contains("年0")) {
statisticalTime = statisticalTime.replaceAll("年0", "年"); statisticalTime = statisticalTime.replaceAll("年0", "年");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment