From 65ca50935315a89e219b7c974caf95dc28895ffc Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Thu, 16 Oct 2025 08:37:56 +0800
Subject: [PATCH] 修改
---
hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzHazmatFlowController.java | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzHazmatFlowController.java b/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzHazmatFlowController.java
index 175986e..b6dd8e0 100644
--- a/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzHazmatFlowController.java
+++ b/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzHazmatFlowController.java
@@ -35,7 +35,9 @@
@ApiOperation(value = "流向列表(分页)")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
- @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10")
+ @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
+ @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "long", required = false, value = "公司id"),
+
})
@GetMapping("/list")
public CommonResult list(HzHazmatFlow hazmatFlow){
@@ -51,9 +53,14 @@
@ApiOperation(value = "根据危化品id查询危化品所有流向")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", name = "hazmatId", dataType = "long", required = false, value = "公司id"),
+ @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "long", required = false, value = "公司id"),
+
+ })
@GetMapping(value = { "/getAllHazmatFlowByHazmatId" })
- public CommonResult getAllHazmatFlowByHazmatId(Long hazmatId){
- return CommonResult.success(hazmatFlowService.getAllHazmatFlowByHazmatId(hazmatId));
+ public CommonResult getAllHazmatFlowByHazmatId(Long hazmatId,Long companyId){
+ return CommonResult.success(hazmatFlowService.getAllHazmatFlowByHazmatId(hazmatId,companyId));
}
@RepeatSubmit
@@ -64,14 +71,14 @@
return CommonResult.success(hazmatFlowService.deleteHazmatFlowById(hazmatFlowId));
}
- @PreAuthorize("hasAnyAuthority('hazmat:manage:company','hazmat:manage:common')")
+ @PreAuthorize("hasAnyAuthority('hazmat:manage:company','hazmat:manage:common','hazmat:manage:system')")
@ApiOperation(value = "根据条码code查询危化品所有流向")
@GetMapping(value = { "/getHazmatFlowByCode" })
- public CommonResult getAllHazmatFlowByCode(@RequestParam(required = true) String code){
+ public CommonResult getAllHazmatFlowByCode(@RequestParam(value = "code") String code,@RequestParam("companyId") Long companyId){
if(code.startsWith(CodePrexEnum.MATERIAL.getCode())){
- return CommonResult.success(hazmatFlowService.selectAllHazmatFlowByCode(code));
+ return CommonResult.success(hazmatFlowService.selectAllHazmatFlowByCode(code,companyId));
}else if(code.startsWith(CodePrexEnum.GOOD.getCode())){
- return CommonResult.success(productFlowService.selectAllProductFlowByCode(code));
+ return CommonResult.success(productFlowService.selectAllProductFlowByCode(code,companyId));
}else{
return CommonResult.failed("条码格式不正确");
}
--
Gitblit v1.9.2