From d3f5a984360ae152369e6edf743cf8ace4e1d8ec Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 28 八月 2025 14:23:08 +0800 Subject: [PATCH] 导出时间 --- framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeGrantRecordServiceImpl.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeGrantRecordServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeGrantRecordServiceImpl.java index 8868c61..848f588 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeGrantRecordServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeGrantRecordServiceImpl.java @@ -24,6 +24,7 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.net.URLEncoder; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -67,6 +68,11 @@ for (PrizeGrantRecordVO vo : list){ PrizeGrantRecordExportDetailDtO detailDtO = new PrizeGrantRecordExportDetailDtO(); BeanUtils.copyProperties(vo,detailDtO); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + // 灏咲ate绫诲瀷杞崲涓烘寚瀹氭牸寮忕殑瀛楃涓� + String createTimeStr = sdf.format(vo.getCreateTime()); + // 璁剧疆鍒癉TO涓� + detailDtO.setCreateTime(createTimeStr); exportDetailDtOS.add(detailDtO); } @@ -78,7 +84,7 @@ String[] headers = { "鐢ㄦ埛鏄电О", "娲诲姩鍚�","鍟嗗搧鍚�", "鍟嗗搧鍐呭","鍙戞斁鐘舵��" - ,"鎻忚堪" + ,"鎻忚堪","鍙戝竷鏃堕棿" }; for(int i= 0 ;i< headers.length;i++){ Cell cell = header.createCell(i); @@ -99,6 +105,7 @@ } row.createCell(5).setCellValue(dto.getDes()); + row.createCell(6).setCellValue(dto.getCreateTime()); } return workbook; -- Gitblit v1.8.0