From 1cff3d96692e0b54c33f8c4a8309800f072f3c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Mon, 5 Jun 2023 08:24:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B3=A8=E9=87=8A=E7=9A=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TicketProcessServiceImpl.java | 10 +++---- .../hzims/ticket/twoTicket/utils/WordHelper.java | 1 - .../java/com/hnac/hzims/ticket/utils/PdfUtils.java | 32 ++-------------------- 3 files changed, 6 insertions(+), 37 deletions(-) diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java index da04670..73bd986 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java @@ -535,10 +535,10 @@ public class TicketProcessServiceImpl implements TicketProcessService { log.info("获取启动流程数据 : {}", processInstanceContainNameByKey); Duration between = Duration.between(start, Instant.now()); - System.out.println("================================================================"); - System.err.println("耗时: " + (between.getSeconds()) + "秒"); - System.err.println("耗时: " + (between.toMillis()) + "毫秒"); - System.out.println("================================================================"); + log.info("================================================================"); + log.info("耗时: " + (between.getSeconds()) + "秒"); + log.info("耗时: " + (between.toMillis()) + "毫秒"); + log.info("================================================================"); } @@ -774,8 +774,6 @@ public class TicketProcessServiceImpl implements TicketProcessService { String url = "template/" + workTicketStatus; XWPFDocument doc = WordExportUtil.exportWord07(url, workTicketInfoMap); log.info("当前系统版本是:{}", os); - //String name = "D:/导出excel/电气第一种工作票模版.docx"; - //FileOutputStream fos = new FileOutputStream(name); doc.write(response.getOutputStream()); } else { String url = TicketConstant.TICKET_LIUNX_PATH + "/" + workTicketStatus; diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/utils/WordHelper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/utils/WordHelper.java index 8240377..8147ea9 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/utils/WordHelper.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/utils/WordHelper.java @@ -216,7 +216,6 @@ public class WordHelper extends StringUtils { */ public static void isEntryMap(Map result, String fieldName, String key, Object value, int count) { if (fieldName.equals(key)) { - // Object newValue = Optional.ofNullable(value).orElse("\u00A0" + printSpace(count)); Object newValue = StringUtils.isNoneBlank(toString(value).trim()) ? value : "\u00A0" + printSpace(count); result.put(key, newValue); } else { diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java index 45251de..d9f32cc 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java @@ -257,36 +257,8 @@ public class PdfUtils { result.put(StringUtil.isNoneBlank(defaultValue.name()) ? defaultValue.name() : field.getName(), ObjectUtil.isNotEmpty(defaultValue.value()) ? defaultValue.value() : value); } else { - // if ("initialPrincipalName".equals(field.getName()) - // || "principalChangeTime".equals(field.getName()) - // || "principalName".equals(field.getName()) - // || "jobReceiver".equals(field.getName()) - // || "jobReceiverTime".equals(field.getName()) - // || "watchPrincipalEndTime".equals(field.getName()) - // || "licenseTime".equals(field.getName()) - // || "licensorName".equals(field.getName()) - // || "signerDateTime".equals(field.getName()) - // || "classGroupName".equals(field.getName()) - // || "code".equals(field.getName()) - // || "signerName".equals(field.getName()) - // || "watchPrincipalName".equals(field.getName()) - // || "projectName".equals(field.getName())) - // { - // result.put(field.getName(), Optional.ofNullable(value).orElse("\u00A0 ")); - // - // } else if ( - // "groundNum".equals(field.getName()) || - // "dismantleNum".equals(field.getName()) || - // "retainNum".equals(field.getName()) - // - // ) { - // result.put(field.getName(), Optional.ofNullable(value).orElse("\u00A0 ")); - // } else { - //如果导出word为null会出现{{ ,value设置"\u00A0" - result.put(field.getName(), Optional.ofNullable(value).orElse("")); - //} - - + //如果导出word为null会出现{{ ,value设置"\u00A0" + result.put(field.getName(), Optional.ofNullable(value).orElse("")); } }); }