From 28e3bf135f88c6a45a7bdfc927c323c08414e45d Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Mon, 25 Nov 2024 09:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/tc/controller/AssetCurrentController.java | 4 ++++ .../src/main/java/com/ruoyi/tc/controller/UnitController.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java index 005bee5..6ad9e81 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java @@ -178,11 +178,13 @@ public class AssetCurrentController extends BaseController { unitOtherConcatService.deleteByAssetIds(assetCurrent.getId()); if (assetCurrent.getXjgywxt() != null) { assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId()); + assetCurrent.getXjgywxt().setId(null); assetBusinessFormService.save(assetCurrent.getXjgywxt()); } if (!assetCurrent.getGylxxList().isEmpty()) { for (AssetSupplyChain items : assetCurrent.getGylxxList()) { items.setAssetId(assetCurrent.getId()); + items.setId(null); } //新增供应链 assetSupplyChainService.saveBatch(assetCurrent.getGylxxList()); @@ -190,6 +192,7 @@ public class AssetCurrentController extends BaseController { if (!assetCurrent.getJcwlList().isEmpty()) { for (AssetBasicNetwork items : assetCurrent.getJcwlList()) { items.setAssetId(assetCurrent.getId()); + items.setId(null); } //新增基础网络 assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList()); @@ -197,6 +200,7 @@ public class AssetCurrentController extends BaseController { if (!assetCurrent.getOtherConcat().isEmpty()) { for (UnitOtherConcat items : assetCurrent.getOtherConcat()) { items.setAssetId(assetCurrent.getId()); + items.setConcatId(null); } //新增其他联系人 unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat()); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java index c75ac69..8656f5f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java @@ -157,12 +157,14 @@ public class UnitController { if(!x.getOtherConcat().isEmpty()){ x.getOtherConcat().forEach(y->{ y.setUnitId(x.getId()); + y.setConcatId(null); }); unitOtherConcatService.saveBatch(x.getOtherConcat()); } if(!x.getJcxxList().isEmpty()){ x.getJcxxList().forEach(y->{ y.setUnitId(x.getId()); + y.setJcid(null); }); examineInfoService.saveBatch(x.getJcxxList()); }