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,