From 74ae355248c0bccadc80fb37bdb36aee5318fee8 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 04 九月 2024 17:16:30 +0800 Subject: [PATCH] 考核指标导出优化 --- ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java index 0137fda..49f85e4 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java @@ -2,12 +2,14 @@ import annotation.DataScope; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.platform.domain.dto.CheckScoreDTO; import com.ycl.platform.domain.dto.CheckScoreIndexDTO; import com.ycl.platform.domain.dto.ScoreIndexDTO; import com.ycl.platform.domain.entity.*; +import com.ycl.platform.domain.vo.CheckIndexCarVO; +import com.ycl.platform.domain.vo.CheckIndexFaceVO; +import com.ycl.platform.domain.vo.CheckIndexVideoVO; import com.ycl.platform.domain.vo.CheckScoreDetailVO; import com.ycl.platform.mapper.CheckRuleMapper; import com.ycl.platform.mapper.CheckScoreMapper; @@ -270,28 +272,34 @@ checkIndexCar.setDate(date); checkIndexCar.setQuarter(checkScoreDTO.getQuarter()); List<CheckIndexCar> checkIndexCars = indexCarService.selectCheckIndexCarList(checkIndexCar); + List<CheckIndexCarVO> checkIndexCarVOS = new ArrayList<>(); for (CheckIndexCar indexCar : checkIndexCars) { - indexCar.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(indexCar.getExamineTag()) ? "鐪佸巺鑰冩牳" : "鍖哄幙鑰冩牳"); + CheckIndexCarVO excelVo = CheckIndexCar.getExcelVo(indexCar); + checkIndexCarVOS.add(excelVo); } - ExcelExp e1 = new ExcelExp("杞﹁締鑰冩牳鎸囨爣鏁版嵁", checkIndexCars, CheckIndexCar.class); + ExcelExp e1 = new ExcelExp("杞﹁締鑰冩牳鎸囨爣鏁版嵁", checkIndexCarVOS, CheckIndexCarVO.class); //浜鸿劯 CheckIndexFace checkIndexFace = new CheckIndexFace(); checkIndexFace.setDate(date); checkIndexFace.setQuarter(checkScoreDTO.getQuarter()); List<CheckIndexFace> checkIndexFaces = indexFaceService.selectCheckIndexFaceList(checkIndexFace); + List<CheckIndexFaceVO> checkIndexFaceVOS = new ArrayList<>(); for (CheckIndexFace indexFace : checkIndexFaces) { - indexFace.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(indexFace.getExamineTag()) ? "鐪佸巺鑰冩牳" : "鍖哄幙鑰冩牳"); + CheckIndexFaceVO excelVo = CheckIndexFace.getExcelVo(indexFace); + checkIndexFaceVOS.add(excelVo); } - ExcelExp e2 = new ExcelExp("浜鸿劯鑰冩牳鎸囨爣鏁版嵁", checkIndexFaces, CheckIndexFace.class); + ExcelExp e2 = new ExcelExp("浜鸿劯鑰冩牳鎸囨爣鏁版嵁", checkIndexFaceVOS, CheckIndexFaceVO.class); //瑙嗛 CheckIndexVideo checkIndexVideo = new CheckIndexVideo(); checkIndexVideo.setDate(date); checkIndexVideo.setQuarter(checkScoreDTO.getQuarter()); List<CheckIndexVideo> checkIndexVideos = indexVideoService.selectCheckIndexVideoList(checkIndexVideo); + List<CheckIndexVideoVO> checkIndexVideoVOS = new ArrayList<>(); for (CheckIndexVideo indexVideo : checkIndexVideos) { - indexVideo.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(indexVideo.getExamineTag()) ? "鐪佸巺鑰冩牳" : "鍖哄幙鑰冩牳"); + CheckIndexVideoVO excelVo = CheckIndexVideo.getExcelVo(indexVideo); + checkIndexVideoVOS.add(excelVo); } - ExcelExp e3 = new ExcelExp("瑙嗛鑰冩牳鎸囨爣鏁版嵁", checkIndexVideos, CheckIndexVideo.class); + ExcelExp e3 = new ExcelExp("瑙嗛鑰冩牳鎸囨爣鏁版嵁", checkIndexVideoVOS, CheckIndexVideoVO.class); List<ExcelExp> mysheet = new ArrayList<>(); mysheet.add(e1); -- Gitblit v1.8.0