Commit 6992c352 authored by 田涛's avatar 田涛

代码合并

parent 4a95ea97
......@@ -26,4 +26,6 @@ public interface IPlanEquipmentDao extends BaseDao<PlanEquipment, Long> {
List<PlanEquipment> findAllByIsDelete(Boolean isDelete);
List<PlanEquipment> findAllByPlanIdIn(List<Long> planId);
List<PlanEquipment> findAllByFireEquipmentIdIn(List<Long> id);
}
......@@ -252,17 +252,17 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
ContingencyPlanParamVo vo = null;
if (EquipmentRiskTypeEnum.HZGJ.getCode().equals(riskType)) {
List<EquipmentFireEquipment> equipmentFireEquipmentList = equipmentFireEquipmentDao.findAllByFireEquipmentId(equipmentId);
if (equipmentFireEquipmentList.size() > 0) {
Equipment equipment = equipmentDao.findById(equipmentFireEquipmentList.get(0).getEquipmentId()).orElse(null);
if (equipment != null) {
PlanEquipment planEquipment = planEquipmentDao.findByFireEquipmentId(equipment.getId());
if (planEquipment != null) {
vo = new ContingencyPlanParamVo();
vo.setPlanId(planEquipment.getPlanId().toString());
vo.setStatus(ContingencyPlanStatusEnum.ONGOING.getCode());
vo.setRiskType(riskType);
return vo;
}
if (!equipmentFireEquipmentList.isEmpty()) {
List<Long> ids = new ArrayList<>();
equipmentFireEquipmentList.forEach(e -> ids.add(e.getEquipmentId()));
List<PlanEquipment> all = planEquipmentDao.findAllByFireEquipmentIdIn(ids);
PlanEquipment planEquipment = all.isEmpty() ? null : all.get(0);
if (planEquipment != null) {
vo = new ContingencyPlanParamVo();
vo.setPlanId(planEquipment.getPlanId().toString());
vo.setStatus(ContingencyPlanStatusEnum.ONGOING.getCode());
vo.setRiskType(riskType);
return vo;
}
}
}
......@@ -270,7 +270,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
@Override
public Page recordListByPage(Page page, Long planId, String planName, List<Long> classifyId, Date startTimeLeft, Date startTimeRight, Integer executionType, Integer planPattern) {
public Page recordListByPage(Page page, Long planId, String planName, List<Long> classifyId, Date
startTimeLeft, Date startTimeRight, Integer executionType, Integer planPattern) {
Map<String, Object> params = new HashMap<>();
params.put("planName", planName);
params.put("planId", planId);
......@@ -460,7 +461,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
@Override
public Page<PlanDetailVo> pageFilter(Page page, String planName, Long classifyId, List<String> planRange, String editOrgName, Date implementationTimeLeft, Date implementationTimeRight) {
public Page<PlanDetailVo> pageFilter(Page page, String planName, Long
classifyId, List<String> planRange, String editOrgName, Date implementationTimeLeft, Date
implementationTimeRight) {
List<Long> classifyIdList = new ArrayList<>();
if (classifyId != null) {
Collection<PlanClassifyTreeVo> classifyTreeList = planClassifyTreeService.getAllChildIncludeMe(classifyId);
......
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