diff --git a/src/main/java/com/ann/service/impl/QueueService.java b/src/main/java/com/ann/service/impl/QueueService.java index c8fc751..a4d4268 100644 --- a/src/main/java/com/ann/service/impl/QueueService.java +++ b/src/main/java/com/ann/service/impl/QueueService.java @@ -15,6 +15,7 @@ import com.ann.utils.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.File; @@ -44,6 +45,17 @@ public class QueueService { @Autowired MessageService messageService; + public static String deptName; + + @Value("${dept.deptName}") + public void setDeptName(String deptName) { + QueueService.deptName = deptName; + } + + public static String getDeptName() { + return deptName; + } + //---------------------定时器 public void doSomething(List all) throws Exception { if (all.size() > 0) { @@ -209,8 +221,10 @@ public class QueueService { tempPath = messageDto.getDetailType() + "~" + messageDto.getCaptionDateTime() + "~"; } } - - File pdfFile = FileUtils.createFile("pdfs", messageDto.getInpNo(), messageDto.getVisitId(), archiveDetail.getId(), tempPath); + File pdfFile =null; + if(!Objects.equals(archiveMaster.getDeptName(),deptName)) { + pdfFile = FileUtils.createFile("pdfs", messageDto.getInpNo(), messageDto.getVisitId(), archiveDetail.getId(), tempPath); + } if (pdfFile != null) { if (address.endsWith(".pdf") || address.endsWith(".PDF")) { String path = DownloadUtils.downLoadPdfFile(pdfFile, address, messageDto.getType());