From 5b18c5a8c26194474b65b180c6e87e180a03c646 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: Fri, 18 Apr 2025 14:08:03 +0800
Subject: [PATCH] sharding版本
---
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzProductBasicServiceImpl.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzProductBasicServiceImpl.java b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzProductBasicServiceImpl.java
index 877a54f..a759119 100644
--- a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzProductBasicServiceImpl.java
+++ b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzProductBasicServiceImpl.java
@@ -79,6 +79,7 @@
HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(productBasic.getName());
productBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
productBasic.setPeculiarityNumber(hzSecientificVo!=null ? hzSecientificVo.getPeculiarityNumber() : 0);
+ productBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
if (!checkProductSnUnique(productBasic)) {
throw new ApiException("产品编号已存在");
@@ -99,6 +100,10 @@
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
checkUserAllowed(productBasic,currentUser);
productBasic.setUpdateBy(currentUser.getUsername());
+ HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(productBasic.getName());
+ productBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
+ productBasic.setPeculiarityNumber(hzSecientificVo!=null ? hzSecientificVo.getPeculiarityNumber() : 0);
+ productBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
int row=baseMapper.updateById(productBasic);
if(row<1){
throw new ApiException("更新成品基础信息失败");
@@ -169,6 +174,7 @@
HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(productBasic.getName());
productBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
productBasic.setPeculiarityNumber(hzSecientificVo!=null ? hzSecientificVo.getPeculiarityNumber() : 0);
+ productBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
productBasic.setKind(kind);
productBasic.setMinPackage(minPackage);
productBasic.setCompanyId(currentUser.getCompanyId());
--
Gitblit v1.9.2