diff --git a/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java b/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java index cd578d8d..b40ed73a 100644 --- a/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java @@ -17,7 +17,7 @@ public interface FireCheckStandardMapper { void updById(PageData pd); - void delByIds(PageData pd); + void delByIds(String[] ArrayDATA_IDS); void saveInfo(PageData pd); diff --git a/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java b/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java index b9f5ebf2..574ccc83 100644 --- a/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java +++ b/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java @@ -64,8 +64,21 @@ public class FireCheckStandardServiceImpl implements FireCheckStandardService { @Transactional(rollbackFor = Exception.class) public boolean delCheckStandardByIds(PageData pd) { PageData data = fireCheckStandardMapper.tryDel(pd); + String data_ids = pd.getString("DATA_IDS"); + String[] ArrayDATA_IDS = data_ids.split(","); + /*String newIds = ""; + for (int i = 0 ; i < split.length ; i++) { + if (i == 0) { + newIds = split[i]+"',"; + }else if (i == split.length-1) { + newIds = newIds + "'"+split[i]; + }else { + newIds = newIds + "'"+split[i]+"',"; + } + } + pd.put("DATA_IDS",newIds);*/ if ("0".equals(String.valueOf(data.get("sum")))) { - fireCheckStandardMapper.delByIds(pd); + fireCheckStandardMapper.delByIds(ArrayDATA_IDS); return true; } return false; diff --git a/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml index 1c1c5137..72068872 100644 --- a/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml +++ b/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml @@ -24,11 +24,14 @@ WHERE FIRE_CHECK_STANDARD_ID = #{FIRE_CHECK_STANDARD_ID} - + UPDATE bus_fire_check_standard SET ISDELETE = 1 - WHERE FIRE_CHECK_STANDARD_ID in (#{DATA_IDS}) - + WHERE FIRE_CHECK_STANDARD_ID in + + #{item} + + insert into bus_fire_check_standard diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index b28c23b8..fe485a08 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -791,6 +791,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from where DEPARTMENT_ID=#{DEPARTMENT_ID} + and ISDELETE = '0'