From 459296d64d24d8c7e291c0fdaf2d5ff917613f2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=B5=B7=E8=88=AA?= <1344638791@qq.com>
Date: Mon, 6 Nov 2023 10:57:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=94=B9=E8=AF=95?=
=?UTF-8?q?=E5=89=82=E8=80=97=E6=9D=90=E4=BD=8D=E7=BD=AE=E4=BF=A1=E6=81=AF?=
=?UTF-8?q?=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 12 +-
.../ReagentConsumableInventoryController.java | 69 +--
.../StandardReserveSolutionController.java | 7 +-
.../ReagentConsumableInventoryMapper.java | 18 +-
.../ReagentConsumableInventoryService.java | 6 +
.../service/impl/BatchDetailsServiceImpl.java | 14 -
.../impl/PurchaseCatalogueServiceImpl.java | 9 -
...ReagentConsumableInventoryServiceImpl.java | 397 +++++++++++++-----
.../StandardReserveSolutionServiceImpl.java | 2 +-
.../WarehousingRecordFormServiceImpl.java | 21 +-
.../vo/ReagentConsumableInventoryFullVO.java | 34 +-
src/main/resources/bootstrap.yml | 2 +-
.../ReagentConsumableInventoryMapper.xml | 27 ++
13 files changed, 421 insertions(+), 197 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1513f72..80bc989 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,12 +143,7 @@
spring-boot-starter-undertow
-
-
- com.deepoove
- poi-tl
- 1.12.0
-
+
@@ -201,13 +196,16 @@
RELEASE
compile
+
+
+
+
com.deepoove
poi-tl
1.12.0
-
diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
index 4f9f6cf..6f6a203 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
@@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -153,6 +154,12 @@ public class ReagentConsumableInventoryController {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, Wrappers.query()
+// .like(StrUtil.isNotBlank(category), "category", category)
+// .ne("category", "标准物质")
+// .ne("category", "标准储备溶液")
+// .and(qw -> qw.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
+// .or().like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName))
+// .like(warning != null && warning == 1, "warning_information", "库存不足"), warning);
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
.like(StrUtil.isNotBlank(category), "category", category)
@@ -196,22 +203,7 @@ public class ReagentConsumableInventoryController {
@GetMapping("/MList")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R> getReagentConsumablePage(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
-
IPage reagentConsumablePage = reagentConsumableInventoryMapper.getReagentConsumablePage(page, reagentConsumableName);
-
-// IPage allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper
-// .eq("category", "试剂")
-// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
-// .eq("category", "试剂")
-// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or()
-// .eq("category", "耗材")
-// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
-// .eq("category", "耗材")
-// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName));
return R.ok(reagentConsumablePage);
}
@@ -257,7 +249,6 @@ public class ReagentConsumableInventoryController {
throw new RuntimeException("未查询到相关信息");
}
-
String applyFileName = "标准物质一览表-" + id;
String pdfFilePath = "document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf";
@@ -283,7 +274,6 @@ public class ReagentConsumableInventoryController {
// @PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')")
public String getBarCodeImageBase64(String code, HttpServletResponse httpServletResponse) throws IOException {
-
return reagentConsumableInventoryService.buildCodeLabelContent(code);
}
@@ -297,7 +287,6 @@ public class ReagentConsumableInventoryController {
// @PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')")
public String printSolutionTag(String code, HttpServletResponse httpServletResponse) throws IOException {
-
return reagentConsumableInventoryService.printSolutionTag(code);
@@ -312,9 +301,7 @@ public class ReagentConsumableInventoryController {
@PutMapping("/code")
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R setCode(String id, String code, HttpServletResponse httpServletResponse) {
-
reagentConsumableInventoryService.setCode(id, code);
-
return R.ok("录入成功");
}
@@ -328,9 +315,7 @@ public class ReagentConsumableInventoryController {
@PutMapping("/RMCode")
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R setRMCode(String id, String code, HttpServletResponse httpServletResponse) {
-
reagentConsumableInventoryService.setRMCode(id, code);
-
return R.ok("录入成功");
}
@@ -343,16 +328,11 @@ public class ReagentConsumableInventoryController {
@GetMapping("/getByCode")
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get_by_code')")
public R getByCode(String id, String number, HttpServletResponse httpServletResponse) {
-
if (StrUtil.isNotBlank(number)) {
-
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.query().eq("number", number));
-
if (referenceMaterial != null) {
-
return R.ok(reagentConsumableInventoryService.getByCode(referenceMaterial.getId()));
} else {
-
return R.failed("未能查询到该标准物质的详细信息");
}
}
@@ -382,24 +362,19 @@ public class ReagentConsumableInventoryController {
@GetMapping("/userList")
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')")
public R> getUserList(HttpServletResponse httpServletResponse) {
-
return R.ok(reagentConsumableInventoryService.getUserList());
}
@PostMapping("inventory/entry")
public R inventoryEntry(@RequestBody List reagentConsumableInventoryDTOList, HttpServletResponse httpServletResponse) {
-
reagentConsumableInventoryService.inventoryEntry(reagentConsumableInventoryDTOList);
-
return R.ok("导入成功");
}
@PostMapping("org")
public R> getOrgList(HttpServletResponse httpServletResponse) {
-
List orgList = reagentConsumableInventoryService.getOrgList();
-
return R.ok(orgList);
}
@@ -420,4 +395,34 @@ public class ReagentConsumableInventoryController {
public R