update一些接口的更新 以及提供了一些统计的接口

This commit is contained in:
2024-01-17 11:20:05 +08:00
parent 1df6b6e3e4
commit eea58efd8b
5 changed files with 24 additions and 25 deletions
@@ -172,7 +172,7 @@ public class ReagentConsumableInventoryController {
String applyFileName = "标准物质一览表-" + id;
String pdfFilePath = "document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf";
String pdfFilePath = "document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".docx";
try {
//直接调用pdf方法
reagentConsumableInventoryService.referenceMaterialTablePDF(voList, id, theHttpServletRequest, httpServletResponse);
@@ -340,6 +340,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
public void referenceMaterialTablePDF(List<ReferenceMaterialVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
System.out.println("referenceMaterialTablePDF.................");
for (ReferenceMaterialVO referenceMaterialVO : voList) {
referenceMaterialVO.setTime(LocalDateTimeUtil.format(referenceMaterialVO.getCreateTime(),"yyyy-MM-dd"));
}
int x = 1;
for (ReferenceMaterialVO referenceMaterialVO : voList) {
@@ -381,25 +384,27 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
//------------
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
fosWord.close();
ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".docx",fisWord);
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
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());
outPDF.close();
ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
isPDF.close();
System.out.println(String.format("转换为 PDF 结束"));
// MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
// 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());
// outPDF.close();
//
//
// ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
// isPDF.close();
//
//
// System.out.println(String.format("转换为 PDF 结束"));
}
@@ -53,12 +53,9 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
warehousingContentVO.setUnitPrice(byId.getUnitPrice());
if (warehousingContentVO.getWarningValue() == null) {
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId()));
if (one != null) {
warehousingContentVO.setWarningValue(one.getWarningValue());
}
warehousingContentVO.setWarningValue(one.getWarningValue());}
}
}
return warehousingContentVOList;
}
@@ -78,6 +75,4 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
}
return warehousingContentVOPage;
}
}
@@ -100,7 +100,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
@GlobalTransactional//查看采购入库
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) {
WarehousingRecordForm byId = this.getById(warehousingFormId);
WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO();
BeanUtils.copyProperties(byId, warehousingRecordFormVO);
+1 -1
View File
@@ -58,7 +58,7 @@ spring:
# 文件上传相关 支持阿里云、华为云、腾讯、minio
oss:
endpoint: http://192.168.5.106:9000
endpoint: http://127.0.0.1:9000
accessKey: dlp
secretKey: 87990016
bucket-name: dlpfiles