From 982b73a12233b10f8c5fac9024a9ca4442cf4c39 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Thu, 19 Nov 2026 13:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=A2=9E=E5=8A=A0qc=E5=92=8C?= =?UTF-8?q?=E5=B7=A5=E5=8E=82=E8=81=94=E7=B3=BB=E6=96=B9=E5=BC=8F=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionController.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/xujie/modules/inspection/controller/InspectionController.java b/src/main/java/com/xujie/modules/inspection/controller/InspectionController.java index c5e439c..7d9d3ff 100644 --- a/src/main/java/com/xujie/modules/inspection/controller/InspectionController.java +++ b/src/main/java/com/xujie/modules/inspection/controller/InspectionController.java @@ -537,22 +537,22 @@ public class InspectionController { // Row 1: 空行 sheet.createRow(1).setHeightInPoints(10); - // Row 2-8: 基本信息区(模仿验货结果模板:标签/值合并单元格横向铺满明细表宽度) + // Row 2-9: 基本信息区(模仿验货结果模板:标签/值合并单元格横向铺满明细表宽度) writeBasicInfo(sheet, header, labelStyle, valueStyle); - // Row 9: 空行 - sheet.createRow(9).setHeightInPoints(10); + // Row 10: 空行 + sheet.createRow(10).setHeightInPoints(10); - // Row 10: PO明细标题 - Row row10 = sheet.createRow(10); + // Row 11: PO明细标题 + Row row10 = sheet.createRow(11); row10.setHeightInPoints(22); Cell poTitleCell = row10.createCell(0); poTitleCell.setCellValue("PO明细列表"); poTitleCell.setCellStyle(titleStyle); - sheet.addMergedRegion(new CellRangeAddress(10, 10, 0, 12)); + sheet.addMergedRegion(new CellRangeAddress(11, 11, 0, 12)); - // Row 11: PO表头 - Row row11 = sheet.createRow(11); + // Row 12: PO表头 + Row row11 = sheet.createRow(12); row11.setHeightInPoints(22); String[] poHeaders = {"序号", "PO号", "PO行号", "产品编码", "Item", "物料名称", "SKU", "一级物料分类", "二级物料分类", "验货数量", "检验通过数量", "运输方式", "CRD日期"}; for (int i = 0; i < poHeaders.length; i++) { @@ -561,11 +561,11 @@ public class InspectionController { cell.setCellStyle(headerStyle); } - // Row 12+: PO数据行 + // Row 13+: PO数据行 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); for (int i = 0; i < detailList.size(); i++) { InspectionRequestDetailSub detail = detailList.get(i); - Row dataRow = sheet.createRow(12 + i); + Row dataRow = sheet.createRow(13 + i); dataRow.setHeightInPoints(22); createCell(dataRow, 0, String.valueOf(i + 1), dataStyle); @@ -644,7 +644,7 @@ public class InspectionController { } /** - * 写入基本信息区 (Row 2-8,模仿验货结果模板:每行两组「标签|值」,单元格合并后横向铺满明细表宽度) + * 写入基本信息区 (Row 2-9,模仿验货结果模板:每行两组「标签|值」,单元格合并后横向铺满明细表宽度) * 每行四段:左标签(0-2列) | 左值(3-5列) | 右标签(6-8列) | 右值(9-12列) */ private void writeBasicInfo(Sheet sheet, InspectionRequestHeader header, CellStyle labelStyle, CellStyle valueStyle) { @@ -657,7 +657,8 @@ public class InspectionController { {"计划验货日期", header.getPlanStartDate() != null ? sdf.format(header.getPlanStartDate()) : "", "申请人员", header.getCreateBy()}, {"验货地址", header.getInspectAddress(), "城市简称", header.getInspectCityShort()}, {"联系人", header.getInspectContract(), "状态", header.getStatus()}, - {"QC人员", header.getQcOperator(), "备注", header.getRemark()} + {"QC人员", header.getQcOperator(), "备注", header.getRemark()}, + {"工厂联系人电话", header.getInspectPhone(), "QC电话", header.getQcContact()} }; for (int i = 0; i < rows.length; i++) {