Merge remote-tracking branch 'origin/pet' into pet

liujun-2024-05-23-接口漏洞修复
liujun 2024-04-09 11:41:14 +08:00
commit d810ec399a
9 changed files with 61 additions and 0 deletions

View File

@ -112,4 +112,6 @@ public interface FireDeviceMapper {
void deleteAll(PageData pd);
List<PageData> exportDataList(PageData pd);
void batchUpdPointDepAuserByRegId(PageData pd);
}

View File

@ -84,4 +84,6 @@ public interface FirePointMapper {
void batchEditFirePointUser(PageData pd);
List<PageData> findByIds(@Param("pointIds") List<String> pointIds);
void batchUpdPointDepAuserByRegId(PageData pd);
}

View File

@ -58,4 +58,6 @@ public interface FireDeviceService {
void removeFireDeviceByIds(PageData pd);
List<PageData> exportDataList(PageData pd) throws Exception;
void batchUpdPointDepAuserByRegId(PageData pd);
}

View File

@ -49,4 +49,6 @@ public interface FirePointService {
void batchEditFirePointUser(PageData pd);
List<PageData> findByIds(List<String> pointIds);
void batchUpdPointDepAuserByRegId(PageData pd);
}

View File

@ -268,5 +268,10 @@ public class FireDeviceServiceImpl implements FireDeviceService {
return fireDeviceMapper.exportDataList(pd);
}
@Override
public void batchUpdPointDepAuserByRegId(PageData pd) {
fireDeviceMapper.batchUpdPointDepAuserByRegId(pd);
}
}

View File

@ -166,4 +166,9 @@ public class FirePointServiceImpl implements FirePointService {
public List<PageData> findByIds(List<String> pointIds) {
return firePointMapper.findByIds(pointIds);
}
@Override
public void batchUpdPointDepAuserByRegId(PageData pd) {
firePointMapper.batchUpdPointDepAuserByRegId(pd);
}
}

View File

@ -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");
}
}

View File

@ -80,6 +80,20 @@
</foreach>
</update>
<update id="batchUpdPointDepAuserByRegId">
update bus_fire_device
set DEPARTMENT_ID = #{DEPARTMENT_ID},
OPERATOR = #{OPERATOR},
OPERATTIME = #{OPERATTIME}
where FIRE_REGION_ID in
<foreach collection="ArrayDATA_IDS" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
</update>
<select id="datalistPage" parameterType="page" resultType="pd">
SELECT
fp.USER_ID,

View File

@ -113,6 +113,24 @@
</foreach>
</update>
<update id="batchUpdPointDepAuserByRegId">
update bus_fire_point
SET DEPARTMENT_ID = #{DEPARTMENT_ID},
<if test="QUALIFIED_PHOTOS_ID != null and QUALIFIED_PHOTOS_ID != ''">
QUALIFIED_PHOTOS_ID = #{QUALIFIED_PHOTOS_ID},
</if>
USER_ID = null,
OPERATOR = #{OPERATOR},
OPERATTIME = #{OPERATTIME}
WHERE FIRE_REGION_ID in
<foreach collection="ArrayDATA_IDS" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
</update>
<select id="datalistPage" parameterType="page" resultType="pd">
SELECT
p.FIRE_POINT_ID,