|
|
|
@ -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<MessageSubordinate> 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());
|
|
|
|
|