From 437f8e2b89a18363a1073fdbb3ab99bcd840a757 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Mon, 21 Apr 2025 10:51:36 +0800
Subject: [PATCH] 危化品新版修改
---
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java
index 5a41154..e1a62de 100644
--- a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java
+++ b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java
@@ -50,7 +50,7 @@
@Override
public CommonPage selectHazmatBasicList(HzHazmatBasic hazmatBasic) {
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
- if (!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())) {
+ if (!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode()) && !currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())) {
hazmatBasic.setCompanyId(currentUser.getCompanyId());
}
PageUtils.startPage();
@@ -83,6 +83,7 @@
HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(hazmatBasic.getName());
hazmatBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
hazmatBasic.setPeculiarityNumber(hzSecientificVo!=null? hzSecientificVo.getPeculiarityNumber() : 0);
+ hazmatBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
int row = baseMapper.insert(hazmatBasic);
if (row < 1) {
@@ -99,6 +100,10 @@
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
checkUserAllowed(hazmatBasic,currentUser);
hazmatBasic.setUpdateBy(currentUser.getUsername());
+ HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(hazmatBasic.getName());
+ hazmatBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
+ hazmatBasic.setPeculiarityNumber(hzSecientificVo!=null? hzSecientificVo.getPeculiarityNumber() : 0);
+ hazmatBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
int row=baseMapper.updateById(hazmatBasic);
if(row<1){
throw new ApiException("更新危化品基础信息失败");
@@ -170,6 +175,7 @@
HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(hazmatBasic.getName());
hazmatBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : "");
hazmatBasic.setPeculiarityNumber(hzSecientificVo!=null? hzSecientificVo.getPeculiarityNumber() : 0);
+ hazmatBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
hazmatBasic.setKind(kind);
hazmatBasic.setMinPackage(minPackage);
--
Gitblit v1.9.2