From e3a19da34eadf8f7c766800e6d73c73c893a2282 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 21 Jan 2025 13:44:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../njcn/gather/result/service/impl/ResultServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java index dffde8cd..41f4f369 100644 --- a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java @@ -1,5 +1,6 @@ package com.njcn.gather.result.service.impl; +import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; @@ -15,6 +16,7 @@ import com.njcn.gather.device.script.service.IPqScriptCheckDataService; import com.njcn.gather.device.script.service.IPqScriptDtlsService; import com.njcn.gather.device.script.util.ScriptDtlsDesc; import com.njcn.gather.plan.pojo.po.AdPlan; +import com.njcn.gather.plan.pojo.vo.AdPlanExcel; import com.njcn.gather.plan.service.IAdPlanService; import com.njcn.gather.result.pojo.enums.ResultResponseEnum; import com.njcn.gather.result.pojo.enums.ResultUnitEnum; @@ -822,10 +824,10 @@ public class ResultServiceImpl implements IResultService { if (CollUtil.isNotEmpty(rawDataVOList)) { if (isTPhase(rawDataVOList)) { List rawDataExcelList = BeanUtil.copyToList(rawDataVOList, RawDataExcel.TRawDataExcel.class); - ExcelUtil.exportExcel("原始数据.xlsx", RawDataExcel.TRawDataExcel.class, ObjectUtil.isEmpty(rawDataExcelList) ? new ArrayList<>() : rawDataExcelList); + ExcelUtil.exportExcel("原始数据.xlsx", "sheet1", param.getCurrentCheckItem(), RawDataExcel.TRawDataExcel.class, ObjectUtil.isEmpty(rawDataExcelList) ? new ArrayList<>() : rawDataExcelList); } else { List rawDataExcelList = BeanUtil.copyToList(rawDataVOList, RawDataExcel.NotTRawDataExcel.class); - ExcelUtil.exportExcel("原始数据.xlsx", RawDataExcel.NotTRawDataExcel.class, ObjectUtil.isEmpty(rawDataExcelList) ? new ArrayList<>() : rawDataExcelList); + ExcelUtil.exportExcel("原始数据.xlsx", "sheet1", param.getCurrentCheckItem(), RawDataExcel.NotTRawDataExcel.class, ObjectUtil.isEmpty(rawDataExcelList) ? new ArrayList<>() : rawDataExcelList); } } else { throw new BusinessException(ResultResponseEnum.RAW_DATA_NOT_EXIST);