From 3d84084b6b75c8799bd26bfddb1933e094a28b17 Mon Sep 17 00:00:00 2001 From: Aug <17674666882@163.com> Date: Wed, 11 Dec 2024 16:41:10 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E5=BA=8F=E5=8D=A1=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=86=85=E5=AE=B9=E4=BF=AE=E5=A4=8D=201.1-=E5=B7=A5?= =?UTF-8?q?=E5=BA=8F=E5=8D=A11=E8=A1=A5=E5=85=85=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=201.2-=E5=B7=A5=E5=BA=8F=E5=8D=A12/3/4?= =?UTF-8?q?=E4=B8=AD=E8=AF=95=E7=A1=AE=E8=AE=A4=E5=AD=97=E6=AE=B5=E4=B8=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=201.3-?= =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E5=8D=A12/3/4=E6=97=B6=E9=97=B4=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=98=BE=E7=A4=BA=E6=A0=BC=E5=BC=8F=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WorkorderExcelServiceImpl.java | 74 ++++++++++++++++++---- .../modules/apiService/impl/ExcelServiceImpl.java | 59 ++++++++++++++++- 2 files changed, 119 insertions(+), 14 deletions(-) diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/workorderTemplate/service/impl/WorkorderExcelServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/workorderTemplate/service/impl/WorkorderExcelServiceImpl.java index 22441d9..f4ce1ba 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/workorderTemplate/service/impl/WorkorderExcelServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/workorderTemplate/service/impl/WorkorderExcelServiceImpl.java @@ -1,5 +1,6 @@ package org.jeecg.modules.workorderTemplate.service.impl; +import cn.hutool.core.date.DateTime; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.streaming.SXSSFWorkbook; @@ -43,8 +44,6 @@ import java.util.List; @Service public class WorkorderExcelServiceImpl implements WorkorderExcelService { - - //工单信息 @Resource private IWorkorderTemplateService workorderTemplateService; @@ -295,6 +294,59 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { cell47.setCellValue("中试作业员"); Cell cell48 = row4.createCell(7); cell48.setCellValue(generalStepone.getOperator()); + + //第五行 + Row row5 = sheet.createRow(4); + //第五行第n列 + Cell process = row5.createCell(0); + process.setCellValue("工序"); + Cell itemCheck = row5.createCell(1); + itemCheck.setCellValue("检查项目"); + Cell specs = row5.createCell(2); + specs.setCellValue("规格"); + Cell param1 = row5.createCell(3); + param1.setCellValue("1"); + Cell param2 = row5.createCell(4); + param2.setCellValue("2"); + Cell param3 = row5.createCell(5); + param3.setCellValue("3"); + Cell param4 = row5.createCell(6); + param4.setCellValue("4"); + Cell param5 = row5.createCell(7); + param5.setCellValue("5"); + Cell param6 = row5.createCell(8); + param6.setCellValue("6"); + Cell param7 = row5.createCell(9); + param7.setCellValue("7"); + Cell param8 = row5.createCell(10); + param8.setCellValue("8"); + Cell param9 = row5.createCell(11); + param9.setCellValue("9"); + Cell param10 = row5.createCell(12); + param10.setCellValue("10"); + Cell param11 = row5.createCell(13); + param11.setCellValue("11"); + Cell param12 = row5.createCell(14); + param12.setCellValue("12"); + Cell param13 = row5.createCell(15); + param13.setCellValue("13"); + Cell param14 = row5.createCell(16); + param14.setCellValue("14"); + Cell param15 = row5.createCell(17); + param15.setCellValue("15"); + Cell param16 = row5.createCell(18); + param16.setCellValue("16"); + Cell param17 = row5.createCell(19); + param17.setCellValue("17"); + Cell param18 = row5.createCell(20); + param18.setCellValue("18"); + Cell param19 = row5.createCell(21); + param19.setCellValue("19"); + Cell param20 = row5.createCell(22); + param20.setCellValue("20"); + Cell remark = row5.createCell(23); + remark.setCellValue("备注"); + return sheet.getLastRowNum(); } @@ -346,11 +398,11 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { Cell cell33 = row3.createCell(2); cell33.setCellValue("日期"); Cell cell34 = row3.createCell(3); - cell34.setCellValue(generalSteptwo.getCurrentdate()); + cell34.setCellValue(new DateTime(generalSteptwo.getCurrentdate()).toString("yyyy-MM-dd"));//日期格式处理 Cell cell35 = row3.createCell(4); cell35.setCellValue("中试确认"); Cell cell36 = row3.createCell(5); - cell36.setCellValue(generalSteptwo.getCreateBy()); + cell36.setCellValue(generalSteptwo.getConfirmTrial()); Cell cell37 = row3.createCell(6); cell37.setCellValue("品质确认"); Cell cell38 = row3.createCell(7); @@ -444,11 +496,11 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { Cell cell33 = row3.createCell(2); cell33.setCellValue("日期"); Cell cell34 = row3.createCell(3); - cell34.setCellValue(generalStepthree.getCurrentdate()); + cell34.setCellValue(new DateTime(generalStepthree.getCurrentdate()).toString("yyyy-MM-dd"));//日期格式处理 Cell cell35 = row3.createCell(4); cell35.setCellValue("中试确认"); Cell cell36 = row3.createCell(5); - cell36.setCellValue(generalStepthree.getCreateBy()); + cell36.setCellValue(generalStepthree.getConfirmTrial()); Cell cell37 = row3.createCell(6); cell37.setCellValue("品质确认"); Cell cell38 = row3.createCell(7); @@ -541,11 +593,11 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { Cell cell33 = row3.createCell(2); cell33.setCellValue("日期"); Cell cell34 = row3.createCell(3); - cell34.setCellValue(generalStepfour.getCurrentdate()); + cell34.setCellValue(new DateTime(generalStepfour.getCurrentdate()).toString("yyyy-MM-dd"));//日期格式处理 Cell cell35 = row3.createCell(4); cell35.setCellValue("中试确认"); Cell cell36 = row3.createCell(5); - cell36.setCellValue(generalStepfour.getCreateBy()); + cell36.setCellValue(generalStepfour.getComfirmTrial()); Cell cell37 = row3.createCell(6); cell37.setCellValue("品质确认"); Cell cell38 = row3.createCell(7); @@ -765,7 +817,7 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { param9.setCellValue(paramSteptwo.getParam9()); Cell param10 = row.createCell(12); param10.setCellValue(paramSteptwo.getParam10()); - Cell operator = row.createCell(23); + Cell operator = row.createCell(13); operator.setCellValue(paramSteptwo.getOperator()); } else { break; @@ -804,7 +856,7 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { param9.setCellValue(paramStepthree.getParam9()); Cell param10 = row.createCell(12); param10.setCellValue(paramStepthree.getParam10()); - Cell operator = row.createCell(23); + Cell operator = row.createCell(13); operator.setCellValue(paramStepthree.getOperator()); } else { break; @@ -843,7 +895,7 @@ public class WorkorderExcelServiceImpl implements WorkorderExcelService { param9.setCellValue(paramStepfour.getParam9()); Cell param10 = row.createCell(12); param10.setCellValue(paramStepfour.getParam10()); - Cell operator = row.createCell(23); + Cell operator = row.createCell(13); operator.setCellValue(paramStepfour.getOperator()); } else { break; diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ExcelServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ExcelServiceImpl.java index 43c57d2..2b6d198 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ExcelServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ExcelServiceImpl.java @@ -264,6 +264,59 @@ public class ExcelServiceImpl implements ExcelService { cell47.setCellValue("中试作业员"); Cell cell48 = row4.createCell(7); cell48.setCellValue(generalStepone.getOperator()); + + //第五行 + Row row5 = sheet.createRow(4); + //第五行第n列 + Cell process = row5.createCell(0); + process.setCellValue("工序"); + Cell itemCheck = row5.createCell(1); + itemCheck.setCellValue("检查项目"); + Cell specs = row5.createCell(2); + specs.setCellValue("规格"); + Cell param1 = row5.createCell(3); + param1.setCellValue("1"); + Cell param2 = row5.createCell(4); + param2.setCellValue("2"); + Cell param3 = row5.createCell(5); + param3.setCellValue("3"); + Cell param4 = row5.createCell(6); + param4.setCellValue("4"); + Cell param5 = row5.createCell(7); + param5.setCellValue("5"); + Cell param6 = row5.createCell(8); + param6.setCellValue("6"); + Cell param7 = row5.createCell(9); + param7.setCellValue("7"); + Cell param8 = row5.createCell(10); + param8.setCellValue("8"); + Cell param9 = row5.createCell(11); + param9.setCellValue("9"); + Cell param10 = row5.createCell(12); + param10.setCellValue("10"); + Cell param11 = row5.createCell(13); + param11.setCellValue("11"); + Cell param12 = row5.createCell(14); + param12.setCellValue("12"); + Cell param13 = row5.createCell(15); + param13.setCellValue("13"); + Cell param14 = row5.createCell(16); + param14.setCellValue("14"); + Cell param15 = row5.createCell(17); + param15.setCellValue("15"); + Cell param16 = row5.createCell(18); + param16.setCellValue("16"); + Cell param17 = row5.createCell(19); + param17.setCellValue("17"); + Cell param18 = row5.createCell(20); + param18.setCellValue("18"); + Cell param19 = row5.createCell(21); + param19.setCellValue("19"); + Cell param20 = row5.createCell(22); + param20.setCellValue("20"); + Cell remark = row5.createCell(23); + remark.setCellValue("备注"); + return sheet.getLastRowNum(); } @@ -734,7 +787,7 @@ public class ExcelServiceImpl implements ExcelService { param9.setCellValue(paramSteptwo.getParam9()); Cell param10 = row.createCell(12); param10.setCellValue(paramSteptwo.getParam10()); - Cell operator = row.createCell(23); + Cell operator = row.createCell(13); operator.setCellValue(paramSteptwo.getOperator()); } else { break; @@ -773,7 +826,7 @@ public class ExcelServiceImpl implements ExcelService { param9.setCellValue(paramStepthree.getParam9()); Cell param10 = row.createCell(12); param10.setCellValue(paramStepthree.getParam10()); - Cell operator = row.createCell(23); + Cell operator = row.createCell(13); operator.setCellValue(paramStepthree.getOperator()); } else { break; @@ -812,7 +865,7 @@ public class ExcelServiceImpl implements ExcelService { param9.setCellValue(paramStepfour.getParam9()); Cell param10 = row.createCell(12); param10.setCellValue(paramStepfour.getParam10()); - Cell operator = row.createCell(23); + Cell operator = row.createCell(13); operator.setCellValue(paramStepfour.getOperator()); } else { break;