修复用户信息查询时查出已删除用户的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 delByIds(PageData pd);
void delByIds(String[] ArrayDATA_IDS);
void saveInfo(PageData pd);

View File

@ -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;

View File

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

View File

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