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

main
杨海航 1 year ago
parent 1df6b6e3e4
commit eea58efd8b
  1. 2
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  2. 37
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  3. 7
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingContentServiceImpl.java
  4. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java
  5. 2
      src/main/resources/bootstrap.yml

@ -172,7 +172,7 @@ public class ReagentConsumableInventoryController {
String applyFileName = "标准物质一览表-" + id; String applyFileName = "标准物质一览表-" + id;
String pdfFilePath = "document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf"; String pdfFilePath = "document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".docx";
try { try {
//直接调用pdf方法 //直接调用pdf方法
reagentConsumableInventoryService.referenceMaterialTablePDF(voList, id, theHttpServletRequest, httpServletResponse); 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 { public void referenceMaterialTablePDF(List<ReferenceMaterialVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
System.out.println("referenceMaterialTablePDF................."); System.out.println("referenceMaterialTablePDF.................");
for (ReferenceMaterialVO referenceMaterialVO : voList) {
referenceMaterialVO.setTime(LocalDateTimeUtil.format(referenceMaterialVO.getCreateTime(),"yyyy-MM-dd"));
}
int x = 1; int x = 1;
for (ReferenceMaterialVO referenceMaterialVO : voList) { for (ReferenceMaterialVO referenceMaterialVO : voList) {
@ -381,25 +384,27 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
//------------ //------------
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray()); ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
fosWord.close(); 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", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord); // MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile); // Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
fisWord.close(); // fisWord.close();
//
//
ByteArrayOutputStream outPDF = new ByteArrayOutputStream(); // ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE); // IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray()); // ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
outPDF.close(); // outPDF.close();
//
//
ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf", isPDF); // ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
isPDF.close(); // isPDF.close();
//
//
System.out.println(String.format("转换为 PDF 结束")); // System.out.println(String.format("转换为 PDF 结束"));
} }

@ -53,12 +53,9 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
warehousingContentVO.setUnitPrice(byId.getUnitPrice()); warehousingContentVO.setUnitPrice(byId.getUnitPrice());
if (warehousingContentVO.getWarningValue() == null) { if (warehousingContentVO.getWarningValue() == null) {
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId())); ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId()));
if (one != null) { if (one != null) {
warehousingContentVO.setWarningValue(one.getWarningValue()); warehousingContentVO.setWarningValue(one.getWarningValue());}
}
} }
} }
return warehousingContentVOList; return warehousingContentVOList;
} }
@ -78,6 +75,4 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
} }
return warehousingContentVOPage; return warehousingContentVOPage;
} }
} }

@ -100,7 +100,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
@GlobalTransactional//查看采购入库 @GlobalTransactional//查看采购入库
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) { public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) {
WarehousingRecordForm byId = this.getById(warehousingFormId); WarehousingRecordForm byId = this.getById(warehousingFormId);
WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO(); WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO();
BeanUtils.copyProperties(byId, warehousingRecordFormVO); BeanUtils.copyProperties(byId, warehousingRecordFormVO);

@ -58,7 +58,7 @@ spring:
# 文件上传相关 支持阿里云、华为云、腾讯、minio # 文件上传相关 支持阿里云、华为云、腾讯、minio
oss: oss:
endpoint: http://192.168.5.106:9000 endpoint: http://127.0.0.1:9000
accessKey: dlp accessKey: dlp
secretKey: 87990016 secretKey: 87990016
bucket-name: dlpfiles bucket-name: dlpfiles

Loading…
Cancel
Save