Commit a361df30 authored by xukaiqiang's avatar xukaiqiang

添加风险点校验接口

parent d75f26fa
......@@ -21,8 +21,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.repository.query.Param;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
......@@ -34,139 +34,143 @@ import java.util.List;
@RestController
@RequestMapping("/api/riskModel")
@Api(tags="风险模型api")
@Api(tags = "风险模型api")
public class RiskModelController extends BaseController {
private final Logger log = LoggerFactory.getLogger(RiskLevelController.class);
@Autowired
private IRiskSourceService riskSourceService;
@Autowired
private IFmeaService fmeaService;
/**
* 风险模型新增及维护
* @param param
* @return
*/
@ApiOperation(httpMethod = "POST", value = "风险模型新增及维护", notes = "风险模型新增及维护")
@RequestMapping(value = "/riskSource/editRiskSource", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse editRiskSource(@ApiParam(value = "风险模型对象", required = true) @RequestBody RiskSource param) {
try {
User user = getUserInfo();
HashMap<String,Object> map = new HashMap<String,Object>();
map.put("org_code", user.getOrgCode());
map.put("user_id", user.getId());
map.put("param", param);
riskSourceService.editRiskSource(map);
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure("风险模型新增及维护失败:"+e.getMessage());
}
}
/**
* 风险模型删除
* @param param
* @return
*/
@ApiOperation(httpMethod = "POST", value = "风险模型删除", notes = "风险模型删除")
@Authorization(ingore = true)
@RequestMapping(value = "/riskSource/deleteRiskSource", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteRiskSource(@ApiParam(value = "风险模型id", required = true) @RequestBody Long[] riskSourceId) {
try {
riskSourceService.deleteRiskSource(riskSourceId);
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure("风险模型删除失败:"+e.getMessage());
}
}
/**
* 风险点列表分页查询
*
* @param id
* @return
*/
@ApiOperation(httpMethod = "POST",value = "风险点列表分页查询", notes = "风险点列表分页查询")
@RequestMapping(value = "/riskSource/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRiskSourceByPage(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<HashMap<String, Object>> riskSourceList = riskSourceService.queryRiskSourceByPage(param);
return CommonResponseUtil.success(riskSourceList);
}
/**
* Fmea模型新增及维护
* @param param
* @return
*/
@ApiOperation(httpMethod = "POST", value = "Fmea模型新增及维护", notes = "Fmea模型新增及维护")
@RequestMapping(value = "/fmea/editFmea", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse editFmea(@ApiParam(value = "Fmea模型对象", required = true) @RequestBody Fmea param) {
try {
User user = getUserInfo();
HashMap<String,Object> map = new HashMap<String,Object>();
map.put("user_id", user.getId());
map.put("fmea", param);
fmeaService.editFmea(map);
RsDataQueue rs = RsDataQueue.getInstance();
if (!ObjectUtils.isEmpty(param.getRiskSourceId())) {
rs.add(param.getRiskSourceId());
}
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure("Fmea模型新增及维护失败:"+e.getMessage());
}
}
/**
* Fmea模型删除
* @param param
* @return
*/
@ApiOperation(httpMethod = "POST", value = "Fmea模型删除", notes = "Fmea模型删除")
@RequestMapping(value = "/fmea/deleteFmea", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteFmea(@ApiParam(value = "Fmea模型id", required = true) @RequestBody RiskFmeaParam param) {
try {
Long[] fmeaIds = param.getFmeaIds();
Long riskSourceId = param.getRiskSourceId();
fmeaService.deleteFmea(fmeaIds);
fmeaService.updateRpniInfo(riskSourceId);
RsDataQueue rs = RsDataQueue.getInstance();
if (!ObjectUtils.isEmpty(riskSourceId)) {
rs.add(riskSourceId);
}
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure("Fmea模型删除失败:"+e.getMessage());
}
}
/**
* Fmea列表分页查询
*
* @param id
* @return
*/
@ApiOperation(httpMethod = "POST",value = "Fmea列表分页查询", notes = "Fmea列表分页查询")
@RequestMapping(value = "/fmea/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryFmeaByPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<HashMap<String, Object>> fmeaList = fmeaService.queryFmeaList(param);
return CommonResponseUtil.success(fmeaList);
}
private final Logger log = LoggerFactory.getLogger(RiskLevelController.class);
@Autowired
private IRiskSourceService riskSourceService;
@Autowired
private IFmeaService fmeaService;
@ApiOperation(value = "根据父类编号获取子类风险点类型", notes = "根据父类编号获取子类风险点类型")
@GetMapping(value = "/riskSource/getChildTypeByPid")
public CommonResponse getChildTypeByPid(@ApiParam(value = "风险模型对象", required = true) @RequestParam Long riskSourceId) {
try {
Integer type = riskSourceService.getChildTypeByPid(riskSourceId);
return CommonResponseUtil.success(type);
} catch (Exception e) {
log.error("根据父类编号获取子类风险点类型异常", e);
return CommonResponseUtil.failure("系统繁忙,请稍后再试");
}
}
/**
* 风险模型新增及维护
*/
@ApiOperation(httpMethod = "POST", value = "风险模型新增及维护", notes = "风险模型新增及维护")
@RequestMapping(value = "/riskSource/editRiskSource", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse editRiskSource(@ApiParam(value = "风险模型对象", required = true) @RequestBody RiskSource param) {
try {
Integer type = riskSourceService.getChildTypeByPid(param.getParentId());
String isRegion = param.getIsRegion();
if (type.equals(1) && isRegion.equals("FALSE")) {
return CommonResponseUtil.failure("该区域下只能添加区域");
}
if (type.equals(2) && isRegion.equals("TRUE")) {
return CommonResponseUtil.failure("该区域下只能添加风险点");
}
User user = getUserInfo();
HashMap<String, Object> map = new HashMap<>();
map.put("org_code", user.getOrgCode());
map.put("user_id", user.getId());
map.put("param", param);
riskSourceService.editRiskSource(map);
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("风险模型新增及维护失败:" + e.getMessage());
}
}
/**
* 风险模型删除
*/
@ApiOperation(httpMethod = "POST", value = "风险模型删除", notes = "风险模型删除")
@Authorization(ingore = true)
@RequestMapping(value = "/riskSource/deleteRiskSource", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteRiskSource(@ApiParam(value = "风险模型id", required = true) @RequestBody Long[] riskSourceId) {
try {
riskSourceService.deleteRiskSource(riskSourceId);
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("风险模型删除失败:" + e.getMessage());
}
}
/**
* 风险点列表分页查询
*/
@ApiOperation(httpMethod = "POST", value = "风险点列表分页查询", notes = "风险点列表分页查询")
@RequestMapping(value = "/riskSource/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRiskSourceByPage(
@ApiParam(value = "查询条件") @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<HashMap<String, Object>> riskSourceList = riskSourceService.queryRiskSourceByPage(param);
return CommonResponseUtil.success(riskSourceList);
}
/**
* Fmea模型新增及维护
*/
@ApiOperation(httpMethod = "POST", value = "Fmea模型新增及维护", notes = "Fmea模型新增及维护")
@RequestMapping(value = "/fmea/editFmea", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse editFmea(@ApiParam(value = "Fmea模型对象", required = true) @RequestBody Fmea param) {
try {
User user = getUserInfo();
HashMap<String, Object> map = new HashMap<>();
map.put("user_id", user.getId());
map.put("fmea", param);
fmeaService.editFmea(map);
RsDataQueue rs = RsDataQueue.getInstance();
if (!ObjectUtils.isEmpty(param.getRiskSourceId())) {
rs.add(param.getRiskSourceId());
}
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("Fmea模型新增及维护失败:" + e.getMessage());
}
}
/**
* Fmea模型删除
*/
@ApiOperation(httpMethod = "POST", value = "Fmea模型删除", notes = "Fmea模型删除")
@RequestMapping(value = "/fmea/deleteFmea", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteFmea(@ApiParam(value = "Fmea模型id", required = true) @RequestBody RiskFmeaParam param) {
try {
Long[] fmeaIds = param.getFmeaIds();
Long riskSourceId = param.getRiskSourceId();
fmeaService.deleteFmea(fmeaIds);
fmeaService.updateRpniInfo(riskSourceId);
RsDataQueue rs = RsDataQueue.getInstance();
if (!ObjectUtils.isEmpty(riskSourceId)) {
rs.add(riskSourceId);
}
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("Fmea模型删除失败:" + e.getMessage());
}
}
/**
* Fmea列表分页查询
*/
@ApiOperation(httpMethod = "POST", value = "Fmea列表分页查询", notes = "Fmea列表分页查询")
@RequestMapping(value = "/fmea/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryFmeaByPage(@ApiParam(value = "查询条件") @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<HashMap<String, Object>> fmeaList = fmeaService.queryFmeaList(param);
return CommonResponseUtil.success(fmeaList);
}
}
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.util.HashMap;
import java.util.List;
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 {
/**
* 风险点查询,分页查询统计用
* @param param
* @return
*/
long countPageData(CommonPageInfoParam param);
/**
* 风险点分页查询queryForRiskSourceLevel
* @param param
* @return
*/
List<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
List<Map> queryForRegion();
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> getRiskSources();
List<RiskSourceTreeResponse> getRiskSourcesEquipment();
List<HashMap<String, Object>> getRiskSourcePoints(RiskSourceParam param);
List<RiskSourceTreeResponse> getRiskSourcesEquipment();
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();
//消防设备按分类统计个数
List<Map>statisticsEquipClassify();
//厂区rpn,重点设备个数,风险点个数,巡检点个数
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);
/**
* 子节点的rpni
* @param parentId
* @return
*/
List<Map<String, BigDecimal>> queryForRiskSourceRpni(@Param("parentId")Long parentId);
List<HashMap<String, Object>> queryRiskAreaRpn();
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);
}
......@@ -1142,7 +1142,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
private void saveFireEquipmentData(FireEquipmentPoint fireEquipmentPoint, AlarmParam deviceData, String fireEquipmentPointType) {
FireEquipmentData fireEquipmentData = new FireEquipmentData();
fireEquipmentData.setEqPointCode(deviceData.getPointCode());
......@@ -1344,4 +1343,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public List<Map> queryFmeaByPointId(Long 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;
public interface IRiskSourceService {
/**
* 新增及维护风险点
*
* @param map
* @return
*/
RiskSource editRiskSource(HashMap<String, Object> map) throws Exception;
/**
* 新增及维护风险点
*
* @param map
* @return
*/
RiskSource editRiskSource(HashMap<String, Object> map) throws Exception;
/**
* 删除风险点
*
* @param riskSourceId
*/
void deleteRiskSource(Long[] riskSourceId) throws Exception;
/**
* 删除风险点
*
* @param riskSourceId
*/
void deleteRiskSource(Long[] riskSourceId) throws Exception;
/**
* 根据参数分页查询风险点信息
*
* @param param
* @return
*/
Page<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
/**
* 根据参数分页查询风险点信息
*
* @param param
* @return
*/
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
*/
List<RiskSourceTreeResponse> findRiskSourceTrees();
/**
* 获取所有风险点
*
* @return
*/
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
*/
Page queryForView(CommonPageable commonPageable,String riskSourceId);
/**
* 获取
*
* @param param
* @return
*/
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
* @return
*/
List<RiskSourcePointInputitem> bindPointInputitem(Long riskSourceId, List<RiskSourcePointInputitem> pointInputitems);
/**
* 绑定巡检点检查项
*
* @param riskSourceId
* @param pointInputitems
* @return
*/
List<RiskSourcePointInputitem> bindPointInputitem(Long riskSourceId, List<RiskSourcePointInputitem> pointInputitems);
/**
* 处理巡检数据和设备数据
* @param deviceData
*/
String processFireEqumtData(FireEquimentDataRo deviceData) throws Exception;
/**
* 处理巡检数据和设备数据
*
* @param deviceData
*/
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
spring.profiles.active = dev
......
......@@ -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} )
</select>
<select id="countByParentIdAndIsRegion" resultType="long">
select
count(1)
from
f_risk_source
where
is_region = #{isRegion}
and
parent_id = #{riskSourceId}
</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