From bd4ac56f3f09f2625b113648896eeb40329cbf6d Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 10 Nov 2025 16:25:15 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=A4=8D=E5=88=B6=E6=97=B6=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=BF=80=E6=B4=BB=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1551514936508416]组合工具复制时,只复制激活版本 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1551514936508416 --- .../api/combop/AutoexecCombopCopyApi.java | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopCopyApi.java b/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopCopyApi.java index ea817b01..41e2b2dc 100644 --- a/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopCopyApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopCopyApi.java @@ -134,19 +134,30 @@ public class AutoexecCombopCopyApi extends PrivateApiComponentBase { autoexecCombopVo.setIsActive(fromAutoexecCombopVo.getIsActive()); // autoexecCombopVo.setDescription(jsonObj.getString("description")); Long combopId = autoexecCombopVo.getId(); - List versionList = autoexecCombopVersionMapper.getAutoexecCombopVersionListByCombopId(id); - if (CollectionUtils.isNotEmpty(versionList)) { - for (AutoexecCombopVersionVo autoexecCombopVersionVo : versionList) { - autoexecCombopVersionVo.setId(null); - autoexecCombopVersionVo.setCombopId(combopId); - AutoexecCombopVersionConfigVo versionConfig = autoexecCombopVersionVo.getConfig(); - autoexecCombopService.resetIdAutoexecCombopVersionConfig(versionConfig); - autoexecCombopService.setAutoexecCombopPhaseGroupId(versionConfig); - autoexecCombopVersionVo.setConfigStr(null); - autoexecCombopVersionMapper.insertAutoexecCombopVersion(autoexecCombopVersionVo); - autoexecCombopService.saveDependency(autoexecCombopVersionVo); - } - } +// List versionList = autoexecCombopVersionMapper.getAutoexecCombopVersionListByCombopId(id); +// if (CollectionUtils.isNotEmpty(versionList)) { +// for (AutoexecCombopVersionVo autoexecCombopVersionVo : versionList) { +// autoexecCombopVersionVo.setId(null); +// autoexecCombopVersionVo.setCombopId(combopId); +// AutoexecCombopVersionConfigVo versionConfig = autoexecCombopVersionVo.getConfig(); +// autoexecCombopService.resetIdAutoexecCombopVersionConfig(versionConfig); +// autoexecCombopService.setAutoexecCombopPhaseGroupId(versionConfig); +// autoexecCombopVersionVo.setConfigStr(null); +// autoexecCombopVersionMapper.insertAutoexecCombopVersion(autoexecCombopVersionVo); +// autoexecCombopService.saveDependency(autoexecCombopVersionVo); +// } +// } + // 复制组合工具时,只复制激活版本,其他版本不需要复制 + AutoexecCombopVersionVo autoexecCombopVersionVo = autoexecCombopVersionMapper.getAutoexecCombopActiveVersionByCombopId(id); + autoexecCombopVersionVo.setId(null); + autoexecCombopVersionVo.setCombopId(combopId); + AutoexecCombopVersionConfigVo versionConfig = autoexecCombopVersionVo.getConfig(); + autoexecCombopService.resetIdAutoexecCombopVersionConfig(versionConfig); + autoexecCombopService.setAutoexecCombopPhaseGroupId(versionConfig); + autoexecCombopVersionVo.setConfigStr(null); + autoexecCombopVersionMapper.insertAutoexecCombopVersion(autoexecCombopVersionVo); + autoexecCombopService.saveDependency(autoexecCombopVersionVo); + autoexecCombopVo.setConfigStr(null); autoexecCombopMapper.insertAutoexecCombop(autoexecCombopVo); autoexecCombopService.saveDependency(autoexecCombopVo); -- Gitee