From 9846a04006c6efa6dce77b1b9b385706a6fdea0c Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 2 Jun 2021 15:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Aagency,grid,dept?= =?UTF-8?q?=E7=9A=84del=5Fflag=E6=94=B9=E4=B8=BA1=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=EF=BC=8C=E6=8C=87=E6=A0=87=E5=BA=93=E7=9A=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=BB=B4=E5=BA=A6=E8=A1=A8=E4=B8=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?del=5Fflag=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/ScreenCustomerAgencyServiceImpl.java | 8 ++++++++ .../screen/impl/ScreenCustomerDeptServiceImpl.java | 8 ++++++++ .../screen/impl/ScreenCustomerGridServiceImpl.java | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java index 96019615ea..a3cfafae37 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; @@ -141,6 +142,13 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ exists.setAllParentNames(e.getAllParentName()); exists.setParentAreaCode(e.getParentAreaCode()); updateAgency(exists); + + // 已删除数据的处理 + if ("1".equals(e.getDelFlag())) { + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(ScreenCustomerAgencyEntity::getAgencyId, e.getId()); + screenCustomerAgencyDao.delete(w); + } } } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java index 2e12d83d45..e7409e2c9d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.utils.DateUtils; @@ -90,6 +91,13 @@ public class ScreenCustomerDeptServiceImpl extends BaseServiceImpl w = new LambdaQueryWrapper<>(); + w.eq(ScreenCustomerDeptEntity::getDeptId, dept.getId()); + screenCustomerDeptDao.delete(w); + } } } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java index 67dae90b1c..79591a5aab 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java @@ -18,6 +18,7 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.utils.DateUtils; @@ -94,6 +95,12 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl w = new LambdaQueryWrapper<>(); + w.eq(ScreenCustomerGridEntity::getGridId, grid.getId()); + screenCustomerGridDao.delete(w); + } } } }