From 0152278ce3c291d474a00203ac0896737dc3d7f5 Mon Sep 17 00:00:00 2001
From: Jay <csj123456>
Date: 星期六, 12 十月 2024 10:41:52 +0800
Subject: [PATCH] 修改update

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java
index 0408818..39fb790 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java
@@ -20,7 +20,6 @@
 import com.iailab.module.data.point.service.DaSequenceNumService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.List;
@@ -85,6 +84,16 @@
     public void update(IndItemSaveReqVO updateReqVO) {
         IndItemEntity entity = BeanUtils.toBean(updateReqVO, IndItemEntity.class);
         entity.setUpdateTime(new Date());
+        if (ItemTypeEnum.ATOM.getCode().equals(updateReqVO.getItemType())) {
+            IndItemAtomEntity atomEntity = BeanUtils.toBean(updateReqVO.getAtomItem(), IndItemAtomEntity.class);
+            indItemAtomService.updateById(atomEntity);
+        } else if (ItemTypeEnum.DER.getCode().equals(updateReqVO.getItemType())) {
+            IndItemDerEntity derEntity = BeanUtils.toBean(updateReqVO.getDerItem(), IndItemDerEntity.class);
+            indItemDerServiceImpl.updateById(derEntity);
+        } else if (ItemTypeEnum.CAL.getCode().equals(updateReqVO.getItemType())) {
+            IndItemCalEntity calEntity = BeanUtils.toBean(updateReqVO.getCalItem(), IndItemCalEntity.class);
+            indItemCalServiceImpl.updateById(calEntity);
+        }
         baseDao.updateById(entity);
     }
 

--
Gitblit v1.9.3