Commit 0cac382c authored by 李秀明's avatar 李秀明

fix: BUG#30730 应急预案,点击启动按钮,弹出的场景设定弹窗的演练地点字段,不是换流变所在的位置

parent 6f18ef81
......@@ -323,4 +323,10 @@ public class ContingencyPlanController extends BaseController {
return CommonResponseUtil2.success(contingencyPlanService.selectTaskActionPage(current, size, batchNo, runState, updateDate, list, steps));
}
@ApiOperation(value = "获取当前登录人待处置任务及预案信息")
@GetMapping(value = "/getPlanInfo")
public ResponseModel getPlanInfo(@RequestParam(value = "planId") Long planId ) {
return CommonResponseUtil2.success(contingencyPlanService.getPlanInfo(planId));
}
}
package com.yeejoin.amos.fas.business.dao.mapper;
import com.yeejoin.amos.fas.dao.entity.PlanEquipment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -23,4 +24,6 @@ public interface PlanEquipmentMapper {
int updateIsDeleteByPlanIdList(@Param("planIdList") List<Long> idList, @Param("isDelete") Boolean isDelete);
int logicDeleteByEquipIdList(@Param("equipIdList") List<Long> idList);
PlanEquipment getOneByPlanId(@Param("planId") Long planId);
}
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.business.action.model.ContingencyRo;
import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent;
import com.yeejoin.amos.fas.business.dao.mapper.*;
import com.yeejoin.amos.fas.business.dao.repository.*;
import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity;
import com.yeejoin.amos.fas.business.param.AlarmParam;
import com.yeejoin.amos.fas.business.service.intfc.*;
import com.yeejoin.amos.fas.business.service.model.ToipResponse;
......@@ -118,6 +119,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Autowired
IPlanReportService planReportService;
private FireEquipMapper fireEquipMapper;
private EquipmentFireEquipmentServiceImpl equipmentFireEquipmentServiceImpl;
@Autowired
public ContingencyPlanServiceImpl(IPlanDetailDao planDetailDao, IPlanDocDao planDocDao, IPlanEquipmentDao planEquipmentDao,
......@@ -948,6 +951,22 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
@Override
public Map<String, Object> getPlanInfo(Long planId) {
PlanEquipment planEquipment = planEquipmentMapper.getOneByPlanId(planId);
if (ObjectUtils.isEmpty(planEquipment)) {
return null;
}
// PlanDetailVo planDetail = planDetailMapper.getPlanDetailById(String.valueOf(planEquipment.getPlanId()));
Equipment equipment = equipmentService.queryOne(planEquipment.getFireEquipmentId());
HashMap<String, Object> result = new HashMap<>();
result.put("planId", planId);
result.put("drillEquipId", planEquipment.getFireEquipmentId());
result.put("drillEquipName", equipment.getName());
result.put("drillEquipAddress", equipment.getAddress());
return result;
}
@Override
public Map<String, Object> getUserOperateCountAndPlanName(List<RoleModel> roleModelList) {
Map<String, Object> map = new HashMap<>();
List<PlanOperationRecord> recordList = planOperationRecordDao.findByStatus(0);
......
......@@ -145,4 +145,6 @@ public interface IContingencyPlanService {
String getPlanBatchNo();
Page<ContingencyPlanInstanceVO> selectTaskActionPage(int current, int size, String batchNo, String runState, String updateDate, List<String> roleList, List<String> steps);
Map<String, Object> getPlanInfo(Long planId);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.PlanEquipmentMapper">
<update id="updateIsDeleteByPlanIdList" parameterType="list">
UPDATE c_plan_equipment SET is_delete = #{isDelete} WHERE plan_id IN
<foreach collection="planIdList" separator="," item="planId" open="(" close=")">
#{planId}
</foreach>
</update>
<update id="logicDeleteByEquipIdList" parameterType="list">
UPDATE c_plan_equipment SET is_delete = 1 WHERE fire_equipment_id IN
<foreach collection="equipIdList" separator="," item="equipId" open="(" close=")">
#{equipId}
</foreach>
</update>
<select id="getOneByPlanId" resultType="com.yeejoin.amos.fas.dao.entity.PlanEquipment">
SELECT * FROM c_plan_equipment WHERE plan_id = #{planId}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment