From 8fd6e34a70f0b5cc8b288eaef464f3ae025941ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Mon, 26 Aug 2024 19:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcSdhsEventServiceImpl.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java index a2ef4fca..63cd2afe 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java @@ -745,7 +745,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { int maxVehicleTypes = 5; // 创建一个具有最大车辆类型数量的列的表格 XWPFTable table = doc.createTable(result.size() + 1, maxVehicleTypes); - + CTTblWidth infoTableWidth = table.getCTTbl().addNewTblPr().addNewTblW(); + infoTableWidth.setType(STTblWidth.DXA); + infoTableWidth.setW(BigInteger.valueOf(UniversalEnum.NINE_THOUSAND_AND_SEVENTY_TWO.getNumber())); // 提取所有不同的车辆类型作为列标题 Set vehicleTypes = new HashSet<>(); vehicleTypes.add("货车"); @@ -842,7 +844,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { // 换行 createLineBreak(doc); -} +}else { + addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue()); + } } /** @@ -1197,6 +1201,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { //换行 createLineBreak(doc); + }else { + addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue()); } } @@ -1976,6 +1982,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { } //换行 createLineBreak(doc); + }else { + addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue()); } } @@ -2086,7 +2094,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { } //换行 createLineBreak(doc); -} +}else { + addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue()); + } }