|
|
|
@ -43,10 +43,7 @@ import java.text.SimpleDateFormat; |
|
|
|
|
import java.time.LocalDate; |
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
|
import java.util.Calendar; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* (标准储备溶液配制及使用记录表)服务实现类 |
|
|
|
@ -379,6 +376,25 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese |
|
|
|
|
solutionUseFormVO.setFormat(format); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (voList.size()<7){ |
|
|
|
|
int s = 7-voList.size(); |
|
|
|
|
for (int i = 0; i < s; i++) { |
|
|
|
|
SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO(); |
|
|
|
|
solutionUseFormVO.setOrderOfUse(voList.size()+1); |
|
|
|
|
voList.add(solutionUseFormVO); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
int s = 7-voList.size()%7; |
|
|
|
|
for (int i = 0; i < s; i++) { |
|
|
|
|
SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO(); |
|
|
|
|
voList.add(solutionUseFormVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HashMap<String, String > solutionUseFormVOMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
List<HashMap> solutionUseFormVOMapList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
String applyFileName = "标准储备溶液配制及使用记录表-" + id; |
|
|
|
|
//-----------------------------
|
|
|
|
|
// 生成 word 版本的 验收记录表
|
|
|
|
@ -419,8 +435,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese |
|
|
|
|
put("validityPeriod", standardReserveSolutionVO.getValidityPeriod()); |
|
|
|
|
put("remarks", standardReserveSolutionVO.getRemarks()); |
|
|
|
|
put("configurationDate", LocalDateTimeUtil.format(standardReserveSolutionVO.getConfigurationDate(), "yyyy年MM月dd日")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}} |
|
|
|
|
); |
|
|
|
|
bis.close(); |
|
|
|
@ -438,7 +452,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese |
|
|
|
|
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile); |
|
|
|
|
fisWord.close(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ByteArrayOutputStream outPDF = new ByteArrayOutputStream(); |
|
|
|
|
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE); |
|
|
|
|
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray()); |
|
|
|
@ -448,7 +461,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese |
|
|
|
|
ossFile.fileSave("document" + "/" + "standardReserveSolution" + "/" + id + "/" + applyFileName + ".pdf", isPDF); |
|
|
|
|
isPDF.close(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(String.format("转换为 PDF 结束")); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|