From c4b3f52ecc70b8a7bb48c3ba8da2bba9fac8cc3b Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Tue, 14 Jan 2025 09:38:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E5=8F=AF=E5=9C=A8?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=B5=84=E4=BA=A7=E6=89=80=E5=B1=9E=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=B9=B6=E5=90=8C=E6=AD=A5=E8=87=B3?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/tc/controller/AssetAppController.java | 17 +---------------- .../tc/controller/AssetCurrentController.java | 2 +- .../tc/service/impl/AssetAppServiceImpl.java | 3 +-- .../tc/service/impl/AssetEmailServiceImpl.java | 2 +- .../impl/AssetMiniProgramsServiceImpl.java | 2 +- .../impl/AssetOfficialAccountServiceImpl.java | 2 +- 6 files changed, 6 insertions(+), 22 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 77dfb41..736ebcc 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 @@ -222,22 +222,7 @@ public class AssetAppController extends BaseController { @Log(title = "编辑app数据", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody AssetApp assetApp) { - //根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态 - AssetAppCpPo assetAppCpPo = assetAppCpService.findDwmc(assetApp.getId()); - if (assetAppCpPo != null) { - //查询任务是否为进行中 - AssetTask assetTask = assetTaskService.findByTaskId(assetAppCpPo.getTaskId()); - if (assetTask.getTaskStatus().equals(1)) { - if (assetAppCpPo.getStatus()==5 ) { - //修改任务中资产状态 - assetAppCpPo.setStatus(0); - assetAppCpPo.setBtgyy(null); - assetTask.setTaskStatus(1); - assetTaskService.update(assetTask); - assetAppCpService.updateById(assetAppCpPo); - } - } - } + return success(assetAppService.edit(assetApp)); } 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 64896ad..fed4a26 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 @@ -682,7 +682,7 @@ public class AssetCurrentController extends BaseController { }); //根据修改的单位名称查询任务表中是否有此单位的任务,如果有修改资产中的任务id,如果没有删除 AssetTask assetTask = assetTaskService.findByDwmc(assetCurrent.getDwmc()); - if (assetTask != null) { + if (assetTask == null) { delete(assetCurrent); } else { //根据资产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 ef3b3ce..1aa1416 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 @@ -125,7 +125,6 @@ public class AssetAppServiceImpl extends ServiceImpl i */ @Override public Boolean edit(AssetApp assetApp) { - AssetApp byId = getById(assetApp.getId()); List list2 = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw()).eq(Unit::getDelFlag, 0).list(); if (list2 == null || list2.isEmpty()) { @@ -156,7 +155,7 @@ public class AssetAppServiceImpl extends ServiceImpl i //根据修改的单位名称查询任务表中是否有此单位的任务,如果有修改资产中的任务id,如果没有删除 AssetTask assetTask = assetTaskService.findByDwmc(assetApp.getAppName()); - if (assetTask != null) { + if (assetTask == null) { assetAppCpService.deletByAssetId(assetApp.getId()); } else { //根据资产id查询旧资产 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 959a0f2..c0d9f55 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 @@ -155,7 +155,7 @@ public class AssetEmailServiceImpl extends ServiceImpl