Commit 523ef780 authored by 李秀明's avatar 李秀明

装备确警返回增加属性赋值

parent 84879fa1
...@@ -475,8 +475,12 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -475,8 +475,12 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
List<PlanEquipment> all = planEquipmentDao.findAllByFireEquipmentIdIn(ids); List<PlanEquipment> all = planEquipmentDao.findAllByFireEquipmentIdIn(ids);
PlanEquipment planEquipment = all.isEmpty() ? null : all.get(0); PlanEquipment planEquipment = all.isEmpty() ? null : all.get(0);
if (planEquipment != null) { if (planEquipment != null) {
Equipment equipment = equipmentService.queryOne(planEquipment.getFireEquipmentId());
vo = new ContingencyPlanParamVo(); vo = new ContingencyPlanParamVo();
vo.setFireEquipmentId(planEquipment.getFireEquipmentId()); vo.setFireEquipmentId(planEquipment.getFireEquipmentId());
if (Objects.nonNull(equipment)) {
vo.setFireEquipmentName(equipment.getName());
}
vo.setPlanId(planEquipment.getPlanId().toString()); vo.setPlanId(planEquipment.getPlanId().toString());
vo.setStatus(ContingencyPlanStatusEnum.ONGOING.getCode()); vo.setStatus(ContingencyPlanStatusEnum.ONGOING.getCode());
vo.setRiskType(riskType); vo.setRiskType(riskType);
......
...@@ -10,6 +10,7 @@ import lombok.Data; ...@@ -10,6 +10,7 @@ import lombok.Data;
public class ContingencyPlanParamVo { public class ContingencyPlanParamVo {
public Long fireEquipmentId; public Long fireEquipmentId;
public String fireEquipmentName;
public String planId; public String planId;
...@@ -22,7 +23,7 @@ public class ContingencyPlanParamVo { ...@@ -22,7 +23,7 @@ public class ContingencyPlanParamVo {
* 触发方式automatic(自动)manual(手动) * 触发方式automatic(自动)manual(手动)
*/ */
public String triggerMode = "manual"; public String triggerMode = "manual";
} }
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