From 06af2ffa26ed44bb2a8a60c0618f8d0490fdd6ed Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 05 三月 2025 08:38:22 +0800
Subject: [PATCH] 用量统计页面及导出 修改
---
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzStatisticServiceImpl.java | 5 +----
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatServiceImpl.java | 3 +++
hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzStatisticController.java | 4 ++--
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzSecientificServiceImpl.java | 20 ++++++++++----------
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzStatisticController.java b/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzStatisticController.java
index de8b68e..57bd491 100644
--- a/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzStatisticController.java
+++ b/hazmat-admin/src/main/java/com/gkhy/hazmat/admin/controller/web/HzStatisticController.java
@@ -1,6 +1,7 @@
package com.gkhy.hazmat.admin.controller.web;
+import com.gkhy.hazmat.common.annotation.Anonymous;
import com.gkhy.hazmat.common.api.CommonResult;
import com.gkhy.hazmat.system.service.HzStatisticService;
import io.swagger.annotations.Api;
@@ -9,6 +10,7 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -70,8 +72,6 @@
@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 = "startTime", dataType = "string", required = false, value = "开始时间,格式xxxx-xx-xx 00:00:00"),
@ApiImplicitParam(paramType = "query", name = "endTime", dataType = "string", required = false, value = "结束时间,格式xxxx-xx-xx 23:59:59")
})
diff --git a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatServiceImpl.java b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatServiceImpl.java
index ebb6530..570676a 100644
--- a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatServiceImpl.java
+++ b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatServiceImpl.java
@@ -195,6 +195,7 @@
HzWarehouseRecord warehouseRecord = new HzWarehouseRecord()
.setWarehouseId(hazmat.getWarehouseId())
.setBasicId(hazmat.getBasicId())
+ .setCupboardId(hazmat.getCupboardId())
.setCreateId(currentUser.getId())
.setNum(-1)
.setState(OperateStatusEnum.USING.getCode())
@@ -249,6 +250,7 @@
HzWarehouseRecord warehouseRecord = new HzWarehouseRecord()
.setWarehouseId(dbhazmat.getWarehouseId())
.setBasicId(dbhazmat.getBasicId())
+ .setCupboardId(hazmat.getCupboardId())
.setCreateId(currentUser.getId())
.setNum(1)
.setState(OperateStatusEnum.RETURN.getCode())
@@ -318,6 +320,7 @@
HzWarehouseRecord warehouseRecord = new HzWarehouseRecord()
.setWarehouseId(hazmat.getWarehouseId())
.setBasicId(hazmat.getBasicId())
+ .setCupboardId(hazmat.getCupboardId())
.setCreateId(currentUser.getId())
.setNum(-1)
.setState(OperateStatusEnum.DISCARD.getCode())
diff --git a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzSecientificServiceImpl.java b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzSecientificServiceImpl.java
index cbcc175..1976121 100644
--- a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzSecientificServiceImpl.java
+++ b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzSecientificServiceImpl.java
@@ -113,16 +113,16 @@
private void checkData(SecientificExcelData secientificExcelDatum) {
if(StringUtils.isBlank(secientificExcelDatum.getSecientificName())){
- throw new ApiException("序号"+secientificExcelDatum.getIndex()+"品名为空");
+ throw new ApiException("序号"+secientificExcelDatum.getIndex()+"品名为空"+"危险性类别:"+secientificExcelDatum.getRiskType());
}
- if(StringUtils.isBlank(secientificExcelDatum.getCas())){
- throw new ApiException("序号"+secientificExcelDatum.getIndex()+"CAS码为空");
- }
- if(StringUtils.isBlank(secientificExcelDatum.getRiskType())){
- throw new ApiException("序号"+secientificExcelDatum.getIndex()+"危险性类别为空");
- }
- if(secientificExcelDatum.getPeculiarityNumber() == null){
- throw new ApiException("序号"+secientificExcelDatum.getIndex()+"危化品特性编码为空");
- }
+// if(StringUtils.isBlank(secientificExcelDatum.getCas())){
+// throw new ApiException("序号"+secientificExcelDatum.getIndex()+"CAS码为空");
+// }
+// if(StringUtils.isBlank(secientificExcelDatum.getRiskType())){
+// throw new ApiException("序号"+secientificExcelDatum.getIndex()+"危险性类别为空");
+// }
+// if(secientificExcelDatum.getPeculiarityNumber() == null){
+// throw new ApiException("序号"+secientificExcelDatum.getIndex()+"危化品特性编码为空");
+// }
}
}
diff --git a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzStatisticServiceImpl.java b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzStatisticServiceImpl.java
index 109ba5f..c23f010 100644
--- a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzStatisticServiceImpl.java
+++ b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzStatisticServiceImpl.java
@@ -248,7 +248,7 @@
}
//设置分表id
IdTableNameHandler.setCurrentId(currentUser.getCompanyId());
- PageUtils.startPage();
+// PageUtils.startPage();
List<HzHazmatUseVO> hazmatUseVOList= hazmatMapper.useCountStatic(startDate, endDate,currentUser.getCompanyId());
IdTableNameHandler.removeCurrentId();
List<HazmatBasicUseExcelData> hazmatBasicUseExcelDatas = new ArrayList<>();
@@ -286,9 +286,6 @@
} catch (IOException e) {
throw new RuntimeException(e);
- }finally {
- outputStream.flush();
- outputStream.close();
}
--
Gitblit v1.9.2