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/PrizeRecordServiceImpl.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeRecordServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeRecordServiceImpl.java index 5b28dcf..d2bb6af 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeRecordServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeRecordServiceImpl.java @@ -31,6 +31,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; @@ -76,6 +77,11 @@ for (PrizeRecordVO vo : list){ PrizeRecordExportDetailDTO detailDtO = new PrizeRecordExportDetailDTO(); 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); } XSSFWorkbook workbook = new XSSFWorkbook(); @@ -85,7 +91,7 @@ Row header = sheet.createRow(0); String[] headers = { "鐢ㄦ埛鏄电О", "娲诲姩鍚�","涓鐘舵��", - "涓鍐呭","濂栧搧鍙戞斁鐘舵��" + "涓鍐呭","濂栧搧鍙戞斁鐘舵��","鎶藉鏃堕棿" }; for(int i= 0 ;i< headers.length;i++){ Cell cell = header.createCell(i); @@ -113,7 +119,7 @@ }else { row.createCell(4).setCellValue(PrizeDistributeStatusEnum.WAIT.getDescription()); } - + row.createCell(5).setCellValue(dto.getCreateTime()); } return workbook; -- Gitblit v1.8.0