From 03bf540b2948bb681adf1cae89848a5a1b0d5640 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Thu, 24 Apr 2025 17:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E9=80=9F=E4=BA=91=E6=8B=A5=E5=A0=B5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/service/impl/DcSdhsEventServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 cd4f7fc5..a34199b8 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 @@ -397,6 +397,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { if (!"交通拥堵".equals(eventType)){ continue; } + if (event.getStakeMark() == null||"无".equals(event.getStakeMark())) { + continue;//格式不符合,跳过 + } String kmStr = event.getStakeMark().substring(1); // 假设总是以"K"开头 if (org.apache.commons.lang3.StringUtils.isBlank(kmStr)) { continue; @@ -915,7 +918,7 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { String description = String.format(template,thisTimeFormat,thisTimeTotal,lastTimeFormat,lastTimeTotal,ratio,maxTypeName,maxType,typeRatio); PoiUtil.addText(doc,description); - + }else { addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue()); }