Commit a361df30 authored by xukaiqiang's avatar xukaiqiang

添加风险点校验接口

parent d75f26fa
package com.yeejoin.amos.fas.business.dao.mapper; package com.yeejoin.amos.fas.business.dao.mapper;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.param.RiskSourceParam;
import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse;
import com.yeejoin.amos.fas.dao.entity.RiskSource;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.ibatis.annotations.Param; public interface RiskSourceMapper extends BaseMapper {
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; /**
import com.yeejoin.amos.fas.business.param.RiskSourceParam; * 风险点查询,分页查询统计用
import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse; *
import com.yeejoin.amos.fas.dao.entity.RiskSource; * @param param
* @return
*/
long countPageData(CommonPageInfoParam param);
/**
* 风险点分页查询queryForRiskSourceLevel
*
* @param param
* @return
*/
List<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
public interface RiskSourceMapper extends BaseMapper {
/** List<Map> queryForRegion();
* 风险点查询,分页查询统计用
* @param param
* @return
*/
long countPageData(CommonPageInfoParam param);
/**
* 风险点分页查询queryForRiskSourceLevel
* @param param
* @return
*/
List<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
List<Map> queryRPNReport();
List<Map> queryForRegion(); Map queryForRiseUp(@Param("startTime") String startTime, @Param("endTime") String endTime);
List<Map> queryRPNReport(); Long countByParentIdAndIsRegion(@Param("riskSourceId") Long riskSourceId, @Param("isRegion") String isRegion);
Map queryForRiseUp(@Param("startTime")String startTime,@Param("endTime")String endTime); List<Map> queryForMatrix();
List<RiskSourceTreeResponse> getRiskSources();
List<Map> queryForMatrix(); List<RiskSourceTreeResponse> getRiskSourcesEquipment();
List<RiskSourceTreeResponse> getRiskSources();
List<RiskSourceTreeResponse> getRiskSourcesEquipment();
List<HashMap<String, Object>> getRiskSourcePoints(RiskSourceParam param);
long getRiskSourcePointCount(RiskSourceParam param); List<HashMap<String, Object>> getRiskSourcePoints(RiskSourceParam param);
long getRiskSourcePointCount(RiskSourceParam param);
List<RiskSource> queryByFireEqument(@Param("fireEquipmentId") Long fireEquipmentId);
List<RiskSource> queryByPoint(@Param("pointId") Long pointId); List<RiskSource> queryByFireEqument(@Param("fireEquipmentId") Long fireEquipmentId);
List<RiskSource> queryByPoint(@Param("pointId") Long pointId);
//厂区rpn,重点设备个数,风险点个数,巡检点个数
Map statistics3dCount();
//消防设备按分类统计个数 //厂区rpn,重点设备个数,风险点个数,巡检点个数
List<Map>statisticsEquipClassify(); Map statistics3dCount();
//风险点按级别统计个数 //消防设备按分类统计个数
List<Map>statisticsRiskLevel(); List<Map> statisticsEquipClassify();
//巡检点按状态统计个数 //风险点按级别统计个数
List<Map>statisticsPointStatus(); List<Map> statisticsRiskLevel();
//巡检点按状态统计个数
List<Map> statisticsPointStatus();
RiskSourceTreeResponse findRiskSourceDetatil(@Param("id") Long id);
RiskSourceTreeResponse findRiskSourceDetatil(@Param("id") Long id);
//风险点详情和级别
Map queryForRiskSourceLevel(@Param("riskSourceId") Long riskSourceId);
//风险点详情和级别
Map queryForRiskSourceLevel(@Param("riskSourceId")Long riskSourceId);
List<Map> queryForUnqualified(@Param("riskSourceId") Long riskSourceId);
List<Map> queryForUnqualified(@Param("riskSourceId")Long riskSourceId);
/**
* 子节点的rpni
*
* @param parentId
* @return
*/
List<Map<String, BigDecimal>> queryForRiskSourceRpni(@Param("parentId") Long parentId);
/** List<HashMap<String, Object>> queryRiskAreaRpn();
* 子节点的rpni
* @param parentId
* @return
*/
List<Map<String, BigDecimal>> queryForRiskSourceRpni(@Param("parentId")Long parentId);
List<HashMap<String, Object>> queryRiskAreaRpn();
List<RiskSource> queryByFactor(@Param("factorId") Long factorId);
List<RiskSource> queryByFactor(@Param("factorId")Long factorId); List<HashMap<String, Object>> queryRiskSourceSecondLevel();
List<HashMap<String, Object>> queryRiskSourceSecondLevel();
List<RiskSourceTreeResponse> getRiskSourcesFireEquipmentByType(@Param("type") String[] type); List<RiskSourceTreeResponse> getRiskSourcesFireEquipmentByType(@Param("type") String[] type);
List<RiskSourceTreeResponse> getCheckPointRiskSource(); List<RiskSourceTreeResponse> getCheckPointRiskSource();
List<Map> queryContingencyWater(); List<Map> queryContingencyWater();
List<Map> queryFmeaByPointId(@Param("pointId") Long pointId); List<Map> queryFmeaByPointId(@Param("pointId") Long pointId);
} }
...@@ -1142,7 +1142,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1142,7 +1142,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
private void saveFireEquipmentData(FireEquipmentPoint fireEquipmentPoint, AlarmParam deviceData, String fireEquipmentPointType) { private void saveFireEquipmentData(FireEquipmentPoint fireEquipmentPoint, AlarmParam deviceData, String fireEquipmentPointType) {
FireEquipmentData fireEquipmentData = new FireEquipmentData(); FireEquipmentData fireEquipmentData = new FireEquipmentData();
fireEquipmentData.setEqPointCode(deviceData.getPointCode()); fireEquipmentData.setEqPointCode(deviceData.getPointCode());
...@@ -1344,4 +1343,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1344,4 +1343,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public List<Map> queryFmeaByPointId(Long pointId) { public List<Map> queryFmeaByPointId(Long pointId) {
return riskSourceMapper.queryFmeaByPointId(pointId); return riskSourceMapper.queryFmeaByPointId(pointId);
} }
@Override
public Integer getChildTypeByPid(Long riskSourceId) {
Long regionCount = riskSourceMapper.countByParentIdAndIsRegion(riskSourceId, "TRUE");
if (!regionCount.equals(0L)) {
//子节点有风险区域
return 1;
}
Long pointCount = riskSourceMapper.countByParentIdAndIsRegion(riskSourceId, "FALSE");
if (!pointCount.equals(0L)) {
//子节点有风险点
return 2;
}
return 3;
}
} }
...@@ -21,145 +21,149 @@ import java.util.Map; ...@@ -21,145 +21,149 @@ import java.util.Map;
public interface IRiskSourceService { public interface IRiskSourceService {
/** /**
* 新增及维护风险点 * 新增及维护风险点
* *
* @param map * @param map
* @return * @return
*/ */
RiskSource editRiskSource(HashMap<String, Object> map) throws Exception; RiskSource editRiskSource(HashMap<String, Object> map) throws Exception;
/** /**
* 删除风险点 * 删除风险点
* *
* @param riskSourceId * @param riskSourceId
*/ */
void deleteRiskSource(Long[] riskSourceId) throws Exception; void deleteRiskSource(Long[] riskSourceId) throws Exception;
/** /**
* 根据参数分页查询风险点信息 * 根据参数分页查询风险点信息
* *
* @param param * @param param
* @return * @return
*/ */
Page<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param); Page<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
List<Map> queryForRegion();
List<Map> queryForRegion( ); List<Map> queryRPNReport();
List<Map> queryRPNReport(); /**
* 上升率
*
* @return
*/
Map queryForRiseUp() throws Exception;
/**
* 上升率
* @return
*/
Map queryForRiseUp()throws Exception;
List<Map> queryForMatrix();
List<Map> queryForMatrix(); /**
* 获取所有风险点
/** *
* 获取所有风险点 * @return
* @return */
*/ List<RiskSourceTreeResponse> findRiskSourceTrees();
List<RiskSourceTreeResponse> findRiskSourceTrees();
List<RiskSourceEquipment> bindFireEquiment(Long riskSourceId, List<RiskSourceEquipment> riskSourceEquipments);
List<RiskSourceEquipment> bindFireEquiment(Long riskSourceId, List<RiskSourceEquipment> riskSourceEquipments); String[] removeBoundRelation(String[] idArray);
String [] removeBoundRelation(String [] idArray); //解除绑定
/**
* 查询所有已绑定的关系列表
*
* @param riskSourceId
* @return
*/
Page queryForView(CommonPageable commonPageable, String riskSourceId);
//解除绑定 /**
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
*
* @param equipmentId
* @return
*/
Page queryEquimentRelation(CommonPageable commonPageable, String riskSourceId, String equipmentId, String fname);
/** /**
* 查询所有已绑定的关系列表 * 获取
* @param riskSourceId *
* @return * @param param
*/ * @return
Page queryForView(CommonPageable commonPageable,String riskSourceId); */
Page<HashMap<String, Object>> getRiskSourcePoints(RiskSourceParam param);
/**
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
* @param equipmentId
* @return
*/
Page queryEquimentRelation(CommonPageable commonPageable, String riskSourceId,String equipmentId,String fname);
/**
* 获取
* @param param
* @return
*/
Page<HashMap<String, Object>> getRiskSourcePoints(RiskSourceParam param);
/** /**
* 绑定巡检点检查项 * 绑定巡检点检查项
* @param riskSourceId *
* @param pointInputitems * @param riskSourceId
* @return * @param pointInputitems
*/ * @return
List<RiskSourcePointInputitem> bindPointInputitem(Long riskSourceId, List<RiskSourcePointInputitem> pointInputitems); */
List<RiskSourcePointInputitem> bindPointInputitem(Long riskSourceId, List<RiskSourcePointInputitem> pointInputitems);
/** /**
* 处理巡检数据和设备数据 * 处理巡检数据和设备数据
* @param deviceData *
*/ * @param deviceData
String processFireEqumtData(FireEquimentDataRo deviceData) throws Exception; */
String processFireEqumtData(FireEquimentDataRo deviceData) throws Exception;
boolean processTaskData(ProtalDataRo taskData) throws Exception;
boolean processTaskData(ProtalDataRo taskData) throws Exception; /**
* 删除风险点巡检点检查项
*/
void removeByRSIdAndPId(List<HashMap<String, String>> list);
/**
* 删除风险点巡检点检查项
*
*/
void removeByRSIdAndPId(List<HashMap<String,String>> list);
boolean processProtalData(ProtalDataRo protalData) throws Exception;
boolean processProtalData(ProtalDataRo protalData) throws Exception; RiskSourceTreeResponse queryRiskSourceDetailById(Long id);
RiskSourceTreeResponse queryRiskSourceDetailById(Long id);
/**
* 三维图统计
*
* @return
*/
Map queryFor3DStatistics();
/**
* 三维图统计
* @return
*/
Map queryFor3DStatistics();
Map earlyWarning(Long riskSourceId);
Map earlyWarning(Long riskSourceId); BigDecimal updateRiskSourceRpni(Long riskSourceId) throws Exception;
BigDecimal updateRiskSourceRpni(Long riskSourceId) throws Exception;
List<HashMap<String,Object>> queryRiskAreaRpn(); List<HashMap<String, Object>> queryRiskAreaRpn();
String processFireEqumtData(AlarmParam deviceData) throws Exception; String processFireEqumtData(AlarmParam deviceData) throws Exception;
void saveData(List<AlarmParam> deviceDatas,String type); void saveData(List<AlarmParam> deviceDatas, String type);
List<HashMap<String,Object>> queryRiskSourceSecondLevel(); List<HashMap<String, Object>> queryRiskSourceSecondLevel();
List<RiskSourceTreeResponse> findRiskSourceEquipStatistics(); List<RiskSourceTreeResponse> findRiskSourceEquipStatistics();
List<RiskSourceTreeResponse> findRiskSourceEquipStatistics(String[] type); List<RiskSourceTreeResponse> findRiskSourceEquipStatistics(String[] type);
List<RiskSourceTreeResponse> getCheckPointRiskSources(); List<RiskSourceTreeResponse> getCheckPointRiskSources();
void queryContingencyDeviceStatus(ContingencyDeviceStatus contingencyDeviceStatus); void queryContingencyDeviceStatus(ContingencyDeviceStatus contingencyDeviceStatus);
List<Map> queryContingencyWater(); List<Map> queryContingencyWater();
List<Map> queryFmeaByPointId(Long pointId); List<Map> queryFmeaByPointId(Long pointId);
Integer getChildTypeByPid(Long riskSourceId);
} }
spring.application.name = Amos-autosys-tb spring.application.name = Amos-autosys-xkq
#environment #environment
spring.profiles.active = dev spring.profiles.active = dev
......
...@@ -645,4 +645,15 @@ ...@@ -645,4 +645,15 @@
EXISTS ( SELECT 1 FROM f_risk_source_point_inputitem frspi WHERE frspi.risk_source_id = frs.id AND frspi.point_id = ${pointId} ) EXISTS ( SELECT 1 FROM f_risk_source_point_inputitem frspi WHERE frspi.risk_source_id = frs.id AND frspi.point_id = ${pointId} )
</select> </select>
<select id="countByParentIdAndIsRegion" resultType="long">
select
count(1)
from
f_risk_source
where
is_region = #{isRegion}
and
parent_id = #{riskSourceId}
</select>
</mapper> </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