From 9dd29d440dc989123f521a82bb92df64afd049c2 Mon Sep 17 00:00:00 2001 From: tyty Date: Fri, 1 Sep 2023 20:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=9F=E8=AE=A1=E6=9C=88?= =?UTF-8?q?=E6=8A=A5-=E4=B8=AA=E4=BA=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OperPersonalMonthReportServiceImpl.java | 24 +++++++++++++++------ .../files/运维月度报表-个人报表.xlsx | Bin 0 -> 10199 bytes 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 hzims-service/operational/src/main/resources/files/运维月度报表-个人报表.xlsx diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperPersonalMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperPersonalMonthReportServiceImpl.java index 0bcc2e0..a401ebf 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperPersonalMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperPersonalMonthReportServiceImpl.java @@ -7,15 +7,14 @@ import com.hnac.hzims.operational.access.service.IOperAccessTaskService; import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity; import com.hnac.hzims.operational.defect.service.IOperPhenomenonService; import com.hnac.hzims.operational.duty.service.IImsDutyMainService; -import com.hnac.hzims.operational.main.common.ExcelData; import com.hnac.hzims.operational.main.vo.DutyPersonalReportVO; -import com.hnac.hzims.operational.report.vo.PersonalMonthReportVO; -import com.hnac.hzims.operational.report.vo.PersonalMonthsReportVO; import com.hnac.hzims.operational.maintenance.constants.MaintenanceConstant; import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity; import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService; import com.hnac.hzims.operational.report.constants.ReportConstant; import com.hnac.hzims.operational.report.service.IOperPersonalMonthReportService; +import com.hnac.hzims.operational.report.vo.PersonalMonthReportVO; +import com.hnac.hzims.operational.report.vo.PersonalMonthsReportVO; import com.hnac.hzinfo.inspect.gather.entity.TaskGatherEntity; import com.hnac.hzinfo.inspect.gather.feign.IInspectGatherClient; import com.hnac.hzinfo.inspect.task.TaskContants; @@ -28,6 +27,7 @@ import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.beans.BeanUtils; +import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; @@ -36,10 +36,14 @@ import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.io.InputStream; import java.net.URLEncoder; import java.text.DateFormat; import java.text.SimpleDateFormat; -import java.time.*; +import java.time.Duration; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.temporal.TemporalAdjusters; import java.util.*; @@ -119,8 +123,14 @@ public class OperPersonalMonthReportServiceImpl implements IOperPersonalMonthRep PersonalMonthReportVO personalMonthReportVO = this.getPersonalMonthReport(month, AuthUtil.getUserId()); if(ObjectUtil.isNotEmpty(personalMonthReportVO)){ int currentRowNum = 0; - ExcelData ed = new ExcelData(); - XSSFWorkbook readWb = ed.getWb(); + XSSFWorkbook readWb = new XSSFWorkbook(); + try { + ClassPathResource classPathResource = new ClassPathResource("files/运维月度报表-个人报表.xlsx"); + InputStream inputStream =classPathResource.getInputStream(); + readWb = new XSSFWorkbook(inputStream); + } catch (Exception e) { + e.printStackTrace(); + } XSSFSheet readSheet = readWb.getSheet("个人月度报告"); String title = Optional.ofNullable(personalMonthReportVO).map(PersonalMonthReportVO :: getStationName).orElse("")+month+"月个人月总结报告"; readSheet.getRow(currentRowNum).getCell(0).setCellValue(title); @@ -178,7 +188,7 @@ public class OperPersonalMonthReportServiceImpl implements IOperPersonalMonthRep RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes(); HttpServletResponse response = ((ServletRequestAttributes)requestAttributes).getResponse(); readWb.setSheetHidden(0,true); - readWb.setSheetHidden(1,true); +// readWb.setSheetHidden(1,true); String filename = "("+month+")个人月度报告"; // 设置头信息 response.setCharacterEncoding("UTF-8"); diff --git a/hzims-service/operational/src/main/resources/files/运维月度报表-个人报表.xlsx b/hzims-service/operational/src/main/resources/files/运维月度报表-个人报表.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..a5b74387ed21bafaa7b2c5746f343bfb19bb6c04 GIT binary patch literal 10199 zcma)i1ymeM(>5-_3GTAEJ1p)H+=2&pS=?O$1a}MW7Tnz}xI=J)1`UwlKiqupmArEP zK4*94%+%90Q#D;(-SsHSKtjC&dubu^TS70#e>M2$6JwB(q65gzkxB7c4CDC%+#g~b z>>2H1;9y|l5MW@ae-|^bvtx9#vCfF?egnyZA^s!a3AF|^gM~)JMicM>zdHO-z;vz7 zKNSF&$hktu=l!wTR2(Xpjd7pe@Dtb6RH*21WYx1d`EHzIN{C=@+fgo=y}&kzWy0PE$;ga@V{Qe<@!jah^3PF2^Z#zBb6 z_~hiXt>sI}7opdLa`f*Lh-vyzCw%9ltj=fWl@%F zIbJR~$W=Ldb+@&B&SNNCxn5drVKaW{=SnAv;}U5iG=>(W+Y{S^cy9v4Kz;%{;q<3_ zkJmV$+1XyMUUt0YQ|qxjo}3(xuLlkutm^@qD^x5KQf48_1 z$id{rXJwVVw4vCB+2*VX=1Wp)5; zccqHKdQaWz?t8MGxF1iQdXJ~ERa|nf_wW*;*p|d+$%nv)+0aJqu``hGP8c2P43w(? z@sr|glf~FJpkO`}x55n#6CUc@1Wh%=2ClG&7mbQgl(QiL6GImJyBv zOiMUb3R18|`YHPFH(%}V(vfMAKt+GO1hC_&L~jvSf+rpd;#-=Gr4E=T zt)ybvFDwOcZH@5Hos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