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 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);

@ -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

Loading…
Cancel
Save