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