From 17648ac0fd53da5ba045fafb0139993b1edcb879 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Fri, 3 Jan 2025 14:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tc/controller/AssetAppController.java | 1 + .../tc/controller/AssetCurrentController.java | 118 +++++++++--------- .../tc/controller/AssetEmailController.java | 1 + .../AssetMiniProgramsController.java | 2 + .../AssetOfficialAccountController.java | 2 + .../ruoyi/tc/entity/po/AssetCurrentJyPo.java | 2 +- .../tc/service/impl/AssetAppServiceImpl.java | 2 + .../service/impl/AssetEmailServiceImpl.java | 5 +- .../impl/AssetMiniProgramsServiceImpl.java | 5 +- .../impl/AssetOfficialAccountServiceImpl.java | 2 + .../src/main/resources/application.yml | 4 +- 11 files changed, 82 insertions(+), 62 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java index a60a79d..f0d8392 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java @@ -156,6 +156,7 @@ public class AssetAppController extends BaseController { //如果有任务也修改任务这边 AssetAppJyPo one = assetAppJyService.lambdaQuery() .isNotNull(AssetAppJyPo::getTaskId) + .eq(AssetAppJyPo::getStatus,"1") .eq(AssetAppJyPo::getAssetId, byId.getAssetId()).one(); if(one!=null){ Integer taskId = one.getTaskId(); 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 b39f7fd..52f566e 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 @@ -442,6 +442,7 @@ public class AssetCurrentController extends BaseController { //如果有任务也修改任务这边 AssetCurrentCpPo one = assetCurrentCpService.lambdaQuery() .isNotNull(AssetCurrentCpPo::getTaskId) + .eq(AssetCurrentCpPo::getStatus,"1") .eq(AssetCurrentCpPo::getId, byId.getId()).one(); if(one!=null){ Integer taskId = one.getTaskId(); @@ -453,22 +454,20 @@ public class AssetCurrentController extends BaseController { one.setAuditYy(null); assetCurrentCpService.updateById(one); - - QueryWrapper queryWrapper2 = new QueryWrapper<>(); queryWrapper2.eq("asset_id", one.getId()); - queryWrapper2.isNull("task_id"); + queryWrapper2.eq("task_id",taskId); assetSupplyChainCpService.remove(queryWrapper2); QueryWrapper queryWrapper3 = new QueryWrapper<>(); queryWrapper3.eq("asset_id", one.getId()); - queryWrapper3.isNull("task_id"); + queryWrapper3.eq("task_id",taskId); assetBasicNetworkCpService.remove(queryWrapper3); QueryWrapper queryWrapper4 = new QueryWrapper<>(); queryWrapper4.eq("asset_id", one.getId()); - queryWrapper4.isNull("task_id"); + queryWrapper4.eq("task_id",taskId); assetBusinessFormCpService.remove(queryWrapper4); QueryWrapper queryWrapper5 = new QueryWrapper<>(); - queryWrapper5.isNull("task_id"); + queryWrapper5.eq("task_id",taskId); queryWrapper5.eq("asset_id", one.getId()); unitOtherConcatCpService.remove(queryWrapper5); list.forEach(x -> { @@ -560,64 +559,69 @@ public class AssetCurrentController extends BaseController { } //================================ - QueryWrapper queryWrapper1 = new QueryWrapper<>(); - queryWrapper1.eq("id", assetCurrent.getId()); - assetCurrentCpService.remove(queryWrapper1); - Integer i = unitService.selectTaskId(assetCurrent.getDwmc(), "0"); - AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo(); - BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo); - assetCurrentCpPo.setTaskId(i); - assetCurrentCpService.save(assetCurrentCpPo); + if(i!=null){ - QueryWrapper queryWrapper2 = new QueryWrapper<>(); - queryWrapper2.eq("asset_id", assetCurrent.getId()); - queryWrapper2.isNotNull("task_id"); - assetSupplyChainCpService.remove(queryWrapper2); - QueryWrapper queryWrapper3 = new QueryWrapper<>(); - queryWrapper3.isNotNull("task_id"); - queryWrapper3.eq("asset_id", assetCurrent.getId()); - assetBasicNetworkCpService.remove(queryWrapper3); - QueryWrapper queryWrapper4 = new QueryWrapper<>(); - queryWrapper4.isNotNull("task_id"); - queryWrapper4.eq("asset_id", assetCurrent.getId()); - assetBusinessFormCpService.remove(queryWrapper4); - QueryWrapper queryWrapper5 = new QueryWrapper<>(); - queryWrapper5.eq("asset_id", assetCurrent.getId()); - queryWrapper5.isNotNull("task_id"); - unitOtherConcatCpService.remove(queryWrapper5); + QueryWrapper queryWrapper1 = new QueryWrapper<>(); + queryWrapper1.eq("id", assetCurrent.getId()); + queryWrapper1.eq("status","1"); + queryWrapper1.eq("task_id",i); + assetCurrentCpService.remove(queryWrapper1); - if (assetCurrent.getXjgywxt() != null) { - assetCurrentCpPo.getXjgywxt().setAssetId(assetCurrent.getId()); - assetCurrentCpPo.getXjgywxt().setTaskId(i); - assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt()); - } - if (assetCurrent.getGylxxList() != null) { - for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) { - items.setAssetId(assetCurrent.getId()); - items.setTaskId(i); + AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo(); + BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo); + assetCurrentCpPo.setTaskId(i); + assetCurrentCpPo.setStatus(1); + assetCurrentCpService.save(assetCurrentCpPo); + + QueryWrapper queryWrapper2 = new QueryWrapper<>(); + queryWrapper2.eq("asset_id", assetCurrent.getId()); + queryWrapper2.eq("task_id",i); + assetSupplyChainCpService.remove(queryWrapper2); + QueryWrapper queryWrapper3 = new QueryWrapper<>(); + queryWrapper3.eq("task_id",i); + queryWrapper3.eq("asset_id", assetCurrent.getId()); + assetBasicNetworkCpService.remove(queryWrapper3); + QueryWrapper queryWrapper4 = new QueryWrapper<>(); + queryWrapper4.eq("task_id",i); + queryWrapper4.eq("asset_id", assetCurrent.getId()); + assetBusinessFormCpService.remove(queryWrapper4); + QueryWrapper queryWrapper5 = new QueryWrapper<>(); + queryWrapper5.eq("asset_id", assetCurrent.getId()); + queryWrapper5.eq("task_id",i); + unitOtherConcatCpService.remove(queryWrapper5); + + if (assetCurrent.getXjgywxt() != null) { + assetCurrentCpPo.getXjgywxt().setAssetId(assetCurrent.getId()); + assetCurrentCpPo.getXjgywxt().setTaskId(i); + assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt()); } - //新增供应链 - assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList()); - } - if (assetCurrent.getJcwlList() != null) { - for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) { - items.setAssetId(assetCurrent.getId()); - items.setTaskId(i); + if (assetCurrent.getGylxxList() != null) { + for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) { + items.setAssetId(assetCurrent.getId()); + items.setTaskId(i); + } + //新增供应链 + assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList()); } - //新增基础网络 - assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList()); - } - if (assetCurrent.getOtherConcat() != null) { - for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) { - items.setAssetId(assetCurrent.getId()); - items.setTaskId(i); + if (assetCurrent.getJcwlList() != null) { + for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) { + items.setAssetId(assetCurrent.getId()); + items.setTaskId(i); + } + //新增基础网络 + assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList()); + } + if (assetCurrent.getOtherConcat() != null) { + for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) { + items.setAssetId(assetCurrent.getId()); + items.setTaskId(i); + } + //新增其他联系人 + unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat()); } - //新增其他联系人 - unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat()); - } - + } return success(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java index 2420a88..d32f802 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java @@ -150,6 +150,7 @@ public class AssetEmailController extends BaseController { //如果有任务也修改任务这边 AssetEmailJyPo one = assetEmailJyService.lambdaQuery() .isNotNull(AssetEmailJyPo::getTaskId) + .eq(AssetEmailJyPo::getStatus,"1") .eq(AssetEmailJyPo::getAssetId, byId.getAssetId()).one(); if(one!=null){ Integer taskId = one.getTaskId(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java index 6360e09..fb5bbd6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java @@ -12,6 +12,7 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.tc.entity.AssetEmail; import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.po.AssetAppCpPo; import com.ruoyi.tc.entity.po.AssetEmailJyPo; import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo; import com.ruoyi.tc.entity.request.AssetAuditPageRequest; @@ -151,6 +152,7 @@ public class AssetMiniProgramsController extends BaseController { //如果有任务也修改任务这边 AssetMiniProgramsJyPo one = assetMiniProgramsJyService.lambdaQuery() .isNotNull(AssetMiniProgramsJyPo::getTaskId) + .eq(AssetMiniProgramsJyPo::getStatus,"1") .eq(AssetMiniProgramsJyPo::getAssetId, byId.getAssetId()).one(); if(one!=null){ Integer taskId = one.getTaskId(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java index f8e6616..86a2119 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java @@ -11,6 +11,7 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.tc.entity.AssetMiniPrograms; import com.ruoyi.tc.entity.AssetOfficialAccount; +import com.ruoyi.tc.entity.po.AssetAppJyPo; import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo; import com.ruoyi.tc.entity.po.AssetOfficialAccountJyPo; import com.ruoyi.tc.entity.request.AssetAuditPageRequest; @@ -165,6 +166,7 @@ public class AssetOfficialAccountController { //如果有任务也修改任务这边 AssetOfficialAccountJyPo one = assetOfficialAccountJyService.lambdaQuery() .isNotNull(AssetOfficialAccountJyPo::getTaskId) + .eq(AssetOfficialAccountJyPo::getStatus,"1") .eq(AssetOfficialAccountJyPo::getAssetId, byId.getAssetId()).one(); if(one!=null){ Integer taskId = one.getTaskId(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetCurrentJyPo.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetCurrentJyPo.java index cb7a5a4..c8dc85d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetCurrentJyPo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetCurrentJyPo.java @@ -31,7 +31,7 @@ public class AssetCurrentJyPo extends BaseClass implements Serializable { private static final long serialVersionUID = 1L; - AssetCurrentCpPo + /** * 主键id */ @TableId(type = IdType.AUTO,value = "current_id") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java index b8aaa07..f46ab1b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.tc.entity.AssetApp; import com.ruoyi.tc.entity.po.AssetAppCpPo; +import com.ruoyi.tc.entity.po.AssetAppJyPo; import com.ruoyi.tc.entity.po.AssetEmailCpPo; import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo; import com.ruoyi.tc.entity.request.AssetAppPageRequest; @@ -110,6 +111,7 @@ public class AssetAppServiceImpl extends ServiceImpl i updateById(assetApp); AssetAppCpPo one = assetAppCpService.lambdaQuery() .eq(AssetAppCpPo::getAssetId, assetApp.getId()) + .eq(AssetAppCpPo::getStatus,"1") .isNotNull(AssetAppCpPo::getTaskId) .one(); if (one != null) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java index 2a43be4..ac12acb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.tc.entity.AssetEmail; import com.ruoyi.tc.entity.po.AssetEmailCpPo; +import com.ruoyi.tc.entity.po.AssetEmailJyPo; import com.ruoyi.tc.entity.po.AssetMiniProgramsCpPo; import com.ruoyi.tc.entity.request.AssetEmailPageRequest; import com.ruoyi.tc.mapper.AssetEmailMapper; @@ -107,7 +108,9 @@ public class AssetEmailServiceImpl extends ServiceImpl