From eeca78908a4eb25f145519b0886d28ee80f97fd8 Mon Sep 17 00:00:00 2001 From: limingyu Date: Tue, 9 Apr 2024 10:37:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=98=B2=E7=AE=A1=E7=90=86=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E3=80=81=E7=82=B9=E4=BD=8D=E7=BB=B4=E6=8A=A4=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BF=AE=E6=94=B9=E5=90=8E=EF=BC=8C=E4=B8=8B=E7=BA=A7?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=83=A8=E9=97=A8=E4=B9=9F=E4=BC=9A?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../firemanager/FireDeviceMapper.java | 2 ++ .../firemanager/FirePointMapper.java | 2 ++ .../service/firemanager/FireDeviceService.java | 2 ++ .../service/firemanager/FirePointService.java | 2 ++ .../impl/FireDeviceServiceImpl.java | 5 +++++ .../firemanager/impl/FirePointServiceImpl.java | 5 +++++ .../impl/FireRegionServiceImpl.java | 11 +++++++++++ .../firemanager/FireDeviceMapper.xml | 14 ++++++++++++++ .../datasource/firemanager/FirePonitMapper.xml | 18 ++++++++++++++++++ 9 files changed, 61 insertions(+) diff --git a/src/main/java/com/zcloud/mapper/datasource/firemanager/FireDeviceMapper.java b/src/main/java/com/zcloud/mapper/datasource/firemanager/FireDeviceMapper.java index ae8154ea..f6dd86a0 100644 --- a/src/main/java/com/zcloud/mapper/datasource/firemanager/FireDeviceMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/firemanager/FireDeviceMapper.java @@ -112,4 +112,6 @@ public interface FireDeviceMapper { void deleteAll(PageData pd); List exportDataList(PageData pd); + + void batchUpdPointDepAuserByRegId(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/firemanager/FirePointMapper.java b/src/main/java/com/zcloud/mapper/datasource/firemanager/FirePointMapper.java index 8a362a16..e7883038 100644 --- a/src/main/java/com/zcloud/mapper/datasource/firemanager/FirePointMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/firemanager/FirePointMapper.java @@ -84,4 +84,6 @@ public interface FirePointMapper { void batchEditFirePointUser(PageData pd); List findByIds(@Param("pointIds") List pointIds); + + void batchUpdPointDepAuserByRegId(PageData pd); } diff --git a/src/main/java/com/zcloud/service/firemanager/FireDeviceService.java b/src/main/java/com/zcloud/service/firemanager/FireDeviceService.java index 488b0c1e..96f0ba5e 100644 --- a/src/main/java/com/zcloud/service/firemanager/FireDeviceService.java +++ b/src/main/java/com/zcloud/service/firemanager/FireDeviceService.java @@ -58,4 +58,6 @@ public interface FireDeviceService { void removeFireDeviceByIds(PageData pd); List exportDataList(PageData pd) throws Exception; + + void batchUpdPointDepAuserByRegId(PageData pd); } diff --git a/src/main/java/com/zcloud/service/firemanager/FirePointService.java b/src/main/java/com/zcloud/service/firemanager/FirePointService.java index c8a46342..cf771000 100644 --- a/src/main/java/com/zcloud/service/firemanager/FirePointService.java +++ b/src/main/java/com/zcloud/service/firemanager/FirePointService.java @@ -49,4 +49,6 @@ public interface FirePointService { void batchEditFirePointUser(PageData pd); List findByIds(List pointIds); + + void batchUpdPointDepAuserByRegId(PageData pd); } diff --git a/src/main/java/com/zcloud/service/firemanager/impl/FireDeviceServiceImpl.java b/src/main/java/com/zcloud/service/firemanager/impl/FireDeviceServiceImpl.java index f8e544ba..011e17c2 100644 --- a/src/main/java/com/zcloud/service/firemanager/impl/FireDeviceServiceImpl.java +++ b/src/main/java/com/zcloud/service/firemanager/impl/FireDeviceServiceImpl.java @@ -268,5 +268,10 @@ public class FireDeviceServiceImpl implements FireDeviceService { return fireDeviceMapper.exportDataList(pd); } + @Override + public void batchUpdPointDepAuserByRegId(PageData pd) { + fireDeviceMapper.batchUpdPointDepAuserByRegId(pd); + } + } diff --git a/src/main/java/com/zcloud/service/firemanager/impl/FirePointServiceImpl.java b/src/main/java/com/zcloud/service/firemanager/impl/FirePointServiceImpl.java index 1a6f0dd9..3643bc02 100644 --- a/src/main/java/com/zcloud/service/firemanager/impl/FirePointServiceImpl.java +++ b/src/main/java/com/zcloud/service/firemanager/impl/FirePointServiceImpl.java @@ -166,4 +166,9 @@ public class FirePointServiceImpl implements FirePointService { public List findByIds(List pointIds) { return firePointMapper.findByIds(pointIds); } + + @Override + public void batchUpdPointDepAuserByRegId(PageData pd) { + firePointMapper.batchUpdPointDepAuserByRegId(pd); + } } diff --git a/src/main/java/com/zcloud/service/firemanager/impl/FireRegionServiceImpl.java b/src/main/java/com/zcloud/service/firemanager/impl/FireRegionServiceImpl.java index b35e78ca..a3f4b2b2 100644 --- a/src/main/java/com/zcloud/service/firemanager/impl/FireRegionServiceImpl.java +++ b/src/main/java/com/zcloud/service/firemanager/impl/FireRegionServiceImpl.java @@ -7,6 +7,8 @@ import java.util.Map; import javax.annotation.Resource; +import com.zcloud.service.firemanager.FireDeviceService; +import com.zcloud.service.firemanager.FirePointService; import com.zcloud.service.system.UsersService; import com.zcloud.util.*; import org.springframework.stereotype.Service; @@ -25,6 +27,10 @@ public class FireRegionServiceImpl implements FireRegionService { @Resource private FireRegionMapper fireRegionMapper; @Resource + private FirePointService firePointService; + @Resource + private FireDeviceService fireDeviceService; + @Resource private InitPageDataUtil initPageDataUtil; /** @@ -189,6 +195,11 @@ public class FireRegionServiceImpl implements FireRegionService { pd.put("ArrayDATA_IDS", ArrayDATA_IDS); initPageDataUtil.initEdit(pd); fireRegionMapper.editDeptByIds(pd); + // 点位 + firePointService.batchUpdPointDepAuserByRegId(pd); + // 器材 + fireDeviceService.batchUpdPointDepAuserByRegId(pd); + map.put("msg", "这些消防区域下所有消防点位的负责人已置空"); map.put("result", "success"); } } diff --git a/src/main/resources/mybatis/datasource/firemanager/FireDeviceMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireDeviceMapper.xml index 5b958cc6..f5abc175 100644 --- a/src/main/resources/mybatis/datasource/firemanager/FireDeviceMapper.xml +++ b/src/main/resources/mybatis/datasource/firemanager/FireDeviceMapper.xml @@ -80,6 +80,20 @@ + + update bus_fire_device + set DEPARTMENT_ID = #{DEPARTMENT_ID}, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where FIRE_REGION_ID in + + #{item} + + + and CORPINFO_ID = #{CORPINFO_ID} + + + SELECT p.FIRE_POINT_ID,