Commit 91b765a7 authored by maoying's avatar maoying

Merge branch 'dev_upgrade-1225' of 172.16.10.76:station/YeeAmosFireAutoSysRoot…

Merge branch 'dev_upgrade-1225' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into dev_upgrade-1225
parents e6a00bfc d1e2b661
......@@ -281,6 +281,30 @@ public class View3dController extends BaseController {
}
@Permission
@PostMapping(value = "/retrieve3/all",produces = "application/json;charset=UTF-8")
@ApiOperation(value = "右侧边栏搜索", notes = "右侧边栏搜索")
public CommonResponse retrieve3All(
@RequestBody RetrieveParams params
) {
ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams);
String token = this.getToken();
String appKey = this.getAppKey();
String product = this.getProduct();
return view3dService.retrieve3All(params.getType(),
params.getRiskSourceId(),
params.getAreaId(),
params.getEquipmentId(),
params.getInputText(),
params.getCurrent(),
params.getPageSize(),
orgCode,
params.getDataLevel(),
token,appKey,product);
}
@Permission
@ApiOperation(value = "等级查询",notes = "等级查询")
@GetMapping(value = "point/level")
public CommonResponse pointLevel(@ApiParam(value = "点类型") @RequestParam String type){
......
......@@ -26,7 +26,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
int deletPointBuFmeaId(@Param("fmeaId")Long fmeaId,@Param("importantEquipId")Long importantEquipId);
List<AssoEquipsVo>getAssoEquips(@Param("fmeaId")Long fmeaId, @Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize);
List<AssoEquipsVo>getAssoEquips(@Param("fmeaId")Long fmeaId, @Param("indexIds")List<Long> indexIds, @Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize);
/**
* 查询设备指标
* @param fmeaId
......@@ -83,4 +83,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
int getOneByQrcode(@Param("qrCode") String qrCode);
EquipmentSpecific getSpecificById(@Param("id") Long id);
Long getIndexByIndexId(@Param("indexId") Long indexId);
}
......@@ -32,4 +32,6 @@ public interface FmeaEquipmentPointMapper extends BaseMapper {
@Param("ids") List<Long> ids);
List<FmeaEquipmentPoint> listFmeaByEquipIndexIdAndEquipId(@Param("specificIndexId") long specificIndexId, @Param("equipId") long equipId);
List<FmeaEquipmentPoint> getOneByFmeaId(@Param("fmeaId") Long fmeaId);
}
package com.yeejoin.amos.fas.business.dao.mapper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.fas.business.bo.CheckErrorBo;
import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo;
import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo;
import com.yeejoin.amos.fas.business.vo.View3dNodeVo;
import com.yeejoin.amos.fas.dao.entity.RiskSource;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import org.apache.ibatis.annotations.Param;
public interface View3dMapper extends BaseMapper{
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface View3dMapper extends BaseMapper {
/**
* 按类型查询点
*
* @param type
* @param orgCode
* @return
*/
List<RegionTreeResponse> getPointByType(@Param("type")String type,@Param("orgCode")String orgCode,@Param("channelType") String channelType);
List<RegionTreeResponse> getPointByType(@Param("type") String type, @Param("orgCode") String orgCode, @Param("channelType") String channelType);
/**
* 获取点详情
*
* @param type
* @param pointId
* @return map
*/
HashMap<String, Object> getPointDetailByTypeAndId(@Param("type")String type, @Param("pointId")Long pointId);
HashMap<String, Object> getPointDetailByTypeAndId(@Param("type") String type, @Param("pointId") Long pointId);
/**
* 统计风险上升异常数量(风险点)-日期+机构
*
* @param param:{type,orgCode}
* @return Long
*/
Long countUpperRiskPoint(Map<String,Object> param);
Long countUpperRiskPoint(Map<String, Object> param);
/**
* 统计巡检异常数量(不合格、漏检)-日期+机构
*
* @param param{}
* @return Long
*/
Long countCheckException(Map<String,Object> param);
Long countCheckException(Map<String, Object> param);
/**
* 统计故障告警数量(不合格、漏检)-日期+机构
*
* @param param
* @return
*/
Long countFireException(Map<String,Object> param);
Long countFireException(Map<String, Object> param);
/**
* 今日安全指数详情
*
* @param params orgCode,date
* @return list
*/
......@@ -61,13 +65,15 @@ public interface View3dMapper extends BaseMapper{
/**
* 一周安全指数趋势查询
*
* @param orgCode
* @return
*/
List<HashMap<String, Object>> getSafetyIndexWeek(@Param("orgCode")String orgCode);
List<HashMap<String, Object>> getSafetyIndexWeek(@Param("orgCode") String orgCode);
/**
* 今日安全指数详情
*
* @param params orgCode,date
* @return list
*/
......@@ -76,6 +82,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 今日安全指数故障告警详情
*
* @param params orgCode,date
* @return list
*/
......@@ -83,6 +90,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 今日巡检统计接口
*
* @param orgCode
* @return
*/
......@@ -90,6 +98,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 风险异常显示最新5条
*
* @param orgCode
* @return
*/
......@@ -97,6 +106,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 巡检异常示最新5条
*
* @param orgCode
* @return
*/
......@@ -104,6 +114,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 火灾告警最新5条
*
* @param orgCode
* @return
*/
......@@ -111,6 +122,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 设备状态最新5条
*
* @param orgCode
* @return
*/
......@@ -118,6 +130,7 @@ public interface View3dMapper extends BaseMapper{
/**
* 按照类型查询点
*
* @param params {orgCode,type}
* @return 列表
*/
......@@ -130,27 +143,34 @@ public interface View3dMapper extends BaseMapper{
/**
* 重点模式设备
*
* @return
*/
List<View3dNodeVo> getImpEqu3dPoints(String orgCode);
/**
* 异常点
*
* @param type
* @param orgCode
* @param riskSourceId 区域id
* @return
*/
List<View3dNodeVo> initViewErrorNode(String type,Long riskSourceId, String orgCode);
List<View3dNodeVo> initViewErrorNode(String type, Long riskSourceId, String orgCode);
List<Node3DVoResponse> findViewDataByType(@Param("type") String type, @Param("riskSourceId") Long riskSourceId, @Param("orgCode") String orgCode, @Param("abnormalStatus") Boolean abnormalStatus);
Long retrieveAllCount(String type, Long riskSourceId, String inputText, String orgCode, String dataLevel, String protectObjName);
List<Node3DVoResponse> findViewDataByType(@Param("type")String type,@Param("riskSourceId")Long riskSourceId,@Param("orgCode")String orgCode,@Param("abnormalStatus")Boolean abnormalStatus);
List<HashMap<String, Object>> retrieveAll(String type, Long riskSourceId, String inputText, long start, int length, String orgCode, String dataLevel, String protectObjName);
Long retrieveAllCount(String type, Long riskSourceId, String inputText,String orgCode,String dataLevel,String protectObjName);
Long retrieve3AllCount(String type, Long riskSourceId, Long areaId, Long equipmentId, String inputText, String orgCode, String dataLevel);
List<HashMap<String, Object>> retrieveAll(String type, Long riskSourceId, String inputText, long start, int length,String orgCode,String dataLevel,String protectObjName);
List<HashMap<String, Object>> retrieve3All(String type, Long riskSourceId, Long areaId, Long equipmentId, String inputText, long start, int length, String orgCode, String dataLevel);
/**
* 查询区域下点
*
* @param ids 区域ids
* @return list
*/
......
......@@ -9,6 +9,8 @@ public class RetrieveParams {
private String dataLevel;
private String protectObjName;
private String riskSourceId;
private Long areaId;
private Long equipmentId;
public String getRiskSourceId() {
return riskSourceId;
......@@ -55,6 +57,19 @@ public class RetrieveParams {
this.protectObjName = protectObjName;
}
public Long getAreaId() {
return areaId;
}
public void setAreaId(Long areaId) {
this.areaId = areaId;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
}
package com.yeejoin.amos.fas.business.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificMapper;
import com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper;
import com.yeejoin.amos.fas.business.param.FmeaBindParam;
import com.yeejoin.amos.fas.business.service.intfc.EquipmentSpecificService;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentCategoryService;
import com.yeejoin.amos.fas.business.service.intfc.IFmeaService;
import com.yeejoin.amos.fas.business.util.TreeUtil;
import com.yeejoin.amos.fas.business.vo.AssoEquipsVo;
import com.yeejoin.amos.fas.business.vo.EquipmentPointVo;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificVo;
import com.yeejoin.amos.fas.dao.entity.EquipmentCategory;
import com.yeejoin.amos.fas.dao.entity.EquipmentSpecific;
import com.yeejoin.amos.fas.dao.entity.Fmea;
import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -29,6 +35,8 @@ public class EquipmentSpecificServiceImpl implements EquipmentSpecificService {
EquipmentSpecificMapper equipmentSpecificMapper;
@Autowired
IEquipmentCategoryService categoryService;
@Autowired
FmeaEquipmentPointMapper equipmentPointMapper;
@Override
public List<FmeaEquipmentPoint> upDateEquimentPoint(FmeaBindParam fmeaBindParam) {
......@@ -53,7 +61,15 @@ public class EquipmentSpecificServiceImpl implements EquipmentSpecificService {
public Map<String, Object> getAssoEquips(Long fmeaId, int pageNumber, int pageSize) {
Map<String, Object> map = new HashMap<>();
pageNumber = pageNumber*pageSize;
List<AssoEquipsVo> assoEquips = equipmentSpecificMapper.getAssoEquips(fmeaId, pageNumber, pageSize);
List<FmeaEquipmentPoint> fmeas = equipmentPointMapper.getOneByFmeaId(fmeaId);
List<Long> indexIds = new ArrayList<>();
if (0 < fmeas.size()) {
for (FmeaEquipmentPoint point : fmeas) {
Long indexId = equipmentSpecificMapper.getIndexByIndexId(point.getEquipmentPointId());
indexIds.add(indexId);
}
}
List<AssoEquipsVo> assoEquips = equipmentSpecificMapper.getAssoEquips(fmeaId, indexIds, pageNumber, pageSize);
map.put("content",assoEquips);
return map;
}
......
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.dao.entity.Fmea;
import org.springframework.data.domain.Page;
import java.util.HashMap;
......@@ -29,4 +30,5 @@ public interface IFmeaService {
* 查询关联的关联对象个数
*/
int queryControlObjCount(String[] ids);
}
package com.yeejoin.amos.fas.business.service.intfc;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo;
import com.yeejoin.amos.fas.business.vo.ExceptionRegionVo;
......@@ -15,6 +11,10 @@ import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author DELL
*/
......@@ -160,11 +160,26 @@ public interface IView3dService {
CommonResponse retrieveAll(String type, String riskRourceId, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product);
/**
* 检索
*
* @param type 类型
* @param riskRourceId
* @param inputText 关键字
* @param dataLevel 风险等级
* @param current
* @param pageSize
* @param orgCode
* @return
*/
CommonResponse retrieve3All(String type, String riskRourceId, Long areaId, Long equipmentId, String inputText, int current, int pageSize, String orgCode, String dataLevel, String token, String appKey, String product);
/**
* 等级查询
*
* @param type
* @return
*/
List<Map<String,String>> pointLevelList(String type);
List<Map<String, String>> pointLevelList(String type);
/**
* 查询区域下的各类点
......
......@@ -27,4 +27,7 @@ public class EquipmentSpecificVo {
//系统名称
private String systemName;
// 指标id
private String indexId;
}
......@@ -56,7 +56,8 @@
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join wl_equipment_category as cate on equ.category_id = cate.id
where sto.amount <![CDATA[>]]> 0
left join wl_stock_detail as wsd on wsd.equipment_detail_id = det.id
where sto.amount <![CDATA[>]]> 0 and wsd.status != 7
and spe.id is not null
<if test="name != null and name!='null' ">
and (det.name like CONCAT('%',#{name},'%') or ware.full_name like CONCAT('%',#{name},'%') or spe.iot_code like CONCAT('%',#{name},'%') or spe.code like CONCAT('%',#{name},'%'))
......@@ -94,7 +95,8 @@
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join wl_equipment_category as cate on equ.category_id = cate.id
where sto.amount <![CDATA[>]]> 0
left join wl_stock_detail as wsd on wsd.equipment_detail_id = det.id
where sto.amount <![CDATA[>]]> 0 and wsd.status != 7
and spe.id is not null
<if test="name != null and name!='null' ">
and (det.name like CONCAT('%',#{name},'%') or ware.full_name like CONCAT('%',#{name},'%') or spe.iot_code like CONCAT('%',#{name},'%') or spe.code like CONCAT('%',#{name},'%'))
......@@ -113,8 +115,8 @@
</if>
</select>
<select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo">
select
sto.equipment_specific_id as id ,
select DISTINCT
sto.equipment_specific_id as id,
spec.code as f_code,
det.name as f_name
from
......@@ -164,12 +166,16 @@
</if>
</select>
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select
select DISTINCT
sto.id as equipmentId,
spe.code as equipmentCode,
det.name as equipmentName ,
fqe.name as importantEquipName ,
(select group_concat(concat( name, '##', state )) from wl_equipment_index as equindex where equip.id = equindex.equipment_id and type_code = 'BREAKDOWN' group by equindex.equipment_id) as equipmentPointNames,
(select group_concat(concat( name, '##', state )) from wl_equipment_index as equindex where equip.id = equindex.equipment_id and type_code = 'BREAKDOWN' AND equindex.id IN
<foreach collection="indexIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
group by equindex.equipment_id) as equipmentPointNames,
poin.important_equipment_id as importantEquipId,
fmea_id as fmeaId
from
......@@ -248,4 +254,13 @@
wl_equipment_specific wes
WHERE wes.id=#{id}
</select>
<select id="getIndexByIndexId" resultType="Long">
SELECT
equipment_index_id
FROM
wl_equipment_specific_index wesi
WHERE wesi.id=#{indexId}
limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -181,4 +181,17 @@
equipment_point_id = #{specificIndexId} and important_equipment_id = #{equipId}
</select>
<select id="getOneByFmeaId" resultType="com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint">
select
id,
fmea_id as fmeaId,
equipment_point_id as equipmentPointId,
state,
important_equipment_id as importantEquipmentId
from
f_fmea_equipment_point
where
fmea_id = #{fmeaId}
</select>
</mapper>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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