From 9c4cd9c77bb92b22a2099c56afb0b5dc3c898470 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期四, 06 三月 2025 08:25:04 +0800
Subject: [PATCH] 修改

---
 hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 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..6ff2ff0 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
@@ -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