修复用户信息查询时查出已删除用户的bug。修复消防安全管理-消防器材检查标准批量删除无效。

0927cmt
songwenxuan 2024-02-26 17:43:34 +08:00
parent 4f86924b15
commit b01b9ae03c
4 changed files with 22 additions and 5 deletions

View File

@ -17,7 +17,7 @@ public interface FireCheckStandardMapper {
void updById(PageData pd); void updById(PageData pd);
void delByIds(PageData pd); void delByIds(String[] ArrayDATA_IDS);
void saveInfo(PageData pd); void saveInfo(PageData pd);

View File

@ -64,8 +64,21 @@ public class FireCheckStandardServiceImpl implements FireCheckStandardService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean delCheckStandardByIds(PageData pd) { public boolean delCheckStandardByIds(PageData pd) {
PageData data = fireCheckStandardMapper.tryDel(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")))) { if ("0".equals(String.valueOf(data.get("sum")))) {
fireCheckStandardMapper.delByIds(pd); fireCheckStandardMapper.delByIds(ArrayDATA_IDS);
return true; return true;
} }
return false; return false;

View File

@ -24,11 +24,14 @@
WHERE FIRE_CHECK_STANDARD_ID = #{FIRE_CHECK_STANDARD_ID} WHERE FIRE_CHECK_STANDARD_ID = #{FIRE_CHECK_STANDARD_ID}
</update> </update>
<update id="delByIds" parameterType="pd"> <delete id="delByIds" parameterType="String">
UPDATE bus_fire_check_standard UPDATE bus_fire_check_standard
SET ISDELETE = 1 SET ISDELETE = 1
WHERE FIRE_CHECK_STANDARD_ID in (#{DATA_IDS}) WHERE FIRE_CHECK_STANDARD_ID in
</update> <foreach item="item" index="index" collection="array" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="saveInfo" parameterType="pd"> <insert id="saveInfo" parameterType="pd">
insert into bus_fire_check_standard insert into bus_fire_check_standard

View File

@ -791,6 +791,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from from
<include refid="tableName"></include> <include refid="tableName"></include>
where DEPARTMENT_ID=#{DEPARTMENT_ID} where DEPARTMENT_ID=#{DEPARTMENT_ID}
and ISDELETE = '0'
</select> </select>
<!-- 通过企业ID获取用户信息 --> <!-- 通过企业ID获取用户信息 -->