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
...@@ -279,6 +279,30 @@ public class View3dController extends BaseController { ...@@ -279,6 +279,30 @@ public class View3dController extends BaseController {
params.getProtectObjName(), params.getProtectObjName(),
token,appKey,product); token,appKey,product);
} }
@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 @Permission
@ApiOperation(value = "等级查询",notes = "等级查询") @ApiOperation(value = "等级查询",notes = "等级查询")
......
...@@ -26,7 +26,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo> ...@@ -26,7 +26,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
int deletPointBuFmeaId(@Param("fmeaId")Long fmeaId,@Param("importantEquipId")Long importantEquipId); 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 * @param fmeaId
...@@ -83,4 +83,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo> ...@@ -83,4 +83,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
int getOneByQrcode(@Param("qrCode") String qrCode); int getOneByQrcode(@Param("qrCode") String qrCode);
EquipmentSpecific getSpecificById(@Param("id") Long id); EquipmentSpecific getSpecificById(@Param("id") Long id);
Long getIndexByIndexId(@Param("indexId") Long indexId);
} }
...@@ -32,4 +32,6 @@ public interface FmeaEquipmentPointMapper extends BaseMapper { ...@@ -32,4 +32,6 @@ public interface FmeaEquipmentPointMapper extends BaseMapper {
@Param("ids") List<Long> ids); @Param("ids") List<Long> ids);
List<FmeaEquipmentPoint> listFmeaByEquipIndexIdAndEquipId(@Param("specificIndexId") long specificIndexId, @Param("equipId") long equipId); 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; package com.yeejoin.amos.fas.business.dao.mapper;
import java.util.HashMap; import com.yeejoin.amos.fas.business.bo.CheckErrorBo;
import java.util.List; import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo;
import java.util.Map; import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo;
import com.yeejoin.amos.fas.business.vo.View3dNodeVo;
import com.yeejoin.amos.fas.business.bo.CheckErrorBo; import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo; import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo; import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.fas.business.vo.View3dNodeVo;
import com.yeejoin.amos.fas.dao.entity.RiskSource; import java.util.HashMap;
import org.apache.ibatis.annotations.Param; import java.util.List;
import java.util.Map;
import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse; public interface View3dMapper extends BaseMapper {
/**
public interface View3dMapper extends BaseMapper{ * 按类型查询点
/** *
* 按类型查询点 * @param type
* @param type * @param orgCode
* @param orgCode * @return
* @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 type
* @param pointId * @param pointId
* @return map * @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 * @param param:{type,orgCode}
*/ * @return Long
Long countUpperRiskPoint(Map<String,Object> param); */
Long countUpperRiskPoint(Map<String, Object> param);
/**
* 统计巡检异常数量(不合格、漏检)-日期+机构 /**
* @param param{} * 统计巡检异常数量(不合格、漏检)-日期+机构
* @return Long *
*/ * @param param{}
Long countCheckException(Map<String,Object> param); * @return Long
*/
/** Long countCheckException(Map<String, Object> param);
* 统计故障告警数量(不合格、漏检)-日期+机构
* @param param /**
* @return * 统计故障告警数量(不合格、漏检)-日期+机构
*/ *
Long countFireException(Map<String,Object> param); * @param param
* @return
/** */
* 今日安全指数详情 Long countFireException(Map<String, Object> param);
* @param params orgCode,date
* @return list /**
*/ * 今日安全指数详情
List<RiskPointRpnChangeBo> getAllErrorRiskPoint(Map<String, Object> params); *
* @param params orgCode,date
/** * @return list
* 一周安全指数趋势查询 */
* @param orgCode List<RiskPointRpnChangeBo> getAllErrorRiskPoint(Map<String, Object> params);
* @return
*/ /**
List<HashMap<String, Object>> getSafetyIndexWeek(@Param("orgCode")String orgCode); * 一周安全指数趋势查询
*
/** * @param orgCode
* 今日安全指数详情 * @return
* @param params orgCode,date */
* @return list List<HashMap<String, Object>> getSafetyIndexWeek(@Param("orgCode") String orgCode);
*/
List<CheckErrorBo> getAllErrorPatrolPoint(Map<String, Object> params); /**
* 今日安全指数详情
*
/** * @param params orgCode,date
* 今日安全指数故障告警详情 * @return list
* @param params orgCode,date */
* @return list List<CheckErrorBo> getAllErrorPatrolPoint(Map<String, Object> params);
*/
List<CheckErrorBo> getAllFaultAlarm(Map<String, Object> params);
/**
/** * 今日安全指数故障告警详情
* 今日巡检统计接口 *
* @param orgCode * @param params orgCode,date
* @return * @return list
*/ */
List<HashMap<String, Object>> getStatisticsCheck(String orgCode); List<CheckErrorBo> getAllFaultAlarm(Map<String, Object> params);
/** /**
* 风险异常显示最新5条 * 今日巡检统计接口
* @param orgCode *
* @return * @param orgCode
*/ * @return
List<SafetyExecuteBo> getRiskErrorTop5(String orgCode); */
List<HashMap<String, Object>> getStatisticsCheck(String orgCode);
/**
* 巡检异常示最新5条 /**
* @param orgCode * 风险异常显示最新5条
* @return *
*/ * @param orgCode
List<SafetyExecuteBo> getCheckErrorTop5(String orgCode); * @return
*/
/** List<SafetyExecuteBo> getRiskErrorTop5(String orgCode);
* 火灾告警最新5条
* @param orgCode /**
* @return * 巡检异常示最新5条
*/ *
List<SafetyExecuteBo> getFireAlarmTop5(String orgCode); * @param orgCode
* @return
/** */
* 设备状态最新5条 List<SafetyExecuteBo> getCheckErrorTop5(String orgCode);
* @param orgCode
* @return /**
*/ * 火灾告警最新5条
List<SafetyExecuteBo> getEquipStatusTop5(String orgCode); *
* @param orgCode
/** * @return
* 按照类型查询点 */
* @param params {orgCode,type} List<SafetyExecuteBo> getFireAlarmTop5(String orgCode);
* @return 列表
*/ /**
List<HashMap<String, Object>> getPintsByType(Map<String, Object> params); * 设备状态最新5条
*
/** * @param orgCode
* 更新safetyIndexchangelog * @return
*/ */
void safetyIndexRefresh(); List<SafetyExecuteBo> getEquipStatusTop5(String orgCode);
/** /**
* 重点模式设备 * 按照类型查询点
* @return *
*/ * @param params {orgCode,type}
List<View3dNodeVo> getImpEqu3dPoints(String orgCode); * @return 列表
*/
/** List<HashMap<String, Object>> getPintsByType(Map<String, Object> params);
* 异常点
* @param type /**
* @param orgCode * 更新safetyIndexchangelog
* @param riskSourceId 区域id */
* @return void safetyIndexRefresh();
*/
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); *
* @return
Long retrieveAllCount(String type, Long riskSourceId, String inputText,String orgCode,String dataLevel,String protectObjName); */
List<View3dNodeVo> getImpEqu3dPoints(String orgCode);
List<HashMap<String, Object>> retrieveAll(String type, Long riskSourceId, String inputText, long start, int length,String orgCode,String dataLevel,String protectObjName);
/**
/** * 异常点
* 查询区域下点 *
* @param ids 区域ids * @param type
* @return list * @param orgCode
*/ * @param riskSourceId 区域id
List<Map<String, Object>> getAllPointInRegions(@Param("ids") List<Long> ids); * @return
} */
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<HashMap<String, Object>> retrieveAll(String type, Long riskSourceId, String inputText, long start, int length, 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>> retrieve3All(String type, Long riskSourceId, Long areaId, Long equipmentId, String inputText, long start, int length, String orgCode, String dataLevel);
/**
* 查询区域下点
*
* @param ids 区域ids
* @return list
*/
List<Map<String, Object>> getAllPointInRegions(@Param("ids") List<Long> ids);
}
...@@ -9,6 +9,8 @@ public class RetrieveParams { ...@@ -9,6 +9,8 @@ public class RetrieveParams {
private String dataLevel; private String dataLevel;
private String protectObjName; private String protectObjName;
private String riskSourceId; private String riskSourceId;
private Long areaId;
private Long equipmentId;
public String getRiskSourceId() { public String getRiskSourceId() {
return riskSourceId; return riskSourceId;
...@@ -54,7 +56,20 @@ public class RetrieveParams { ...@@ -54,7 +56,20 @@ public class RetrieveParams {
public void setProtectObjName(String protectObjName) { public void setProtectObjName(String protectObjName) {
this.protectObjName = protectObjName; 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; 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.EquipmentSpecificMapper;
import com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper;
import com.yeejoin.amos.fas.business.param.FmeaBindParam; 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.EquipmentSpecificService;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentCategoryService; 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.util.TreeUtil;
import com.yeejoin.amos.fas.business.vo.AssoEquipsVo; import com.yeejoin.amos.fas.business.vo.AssoEquipsVo;
import com.yeejoin.amos.fas.business.vo.EquipmentPointVo; import com.yeejoin.amos.fas.business.vo.EquipmentPointVo;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificVo; import com.yeejoin.amos.fas.business.vo.EquipmentSpecificVo;
import com.yeejoin.amos.fas.dao.entity.EquipmentCategory; 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 com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -29,6 +35,8 @@ public class EquipmentSpecificServiceImpl implements EquipmentSpecificService { ...@@ -29,6 +35,8 @@ public class EquipmentSpecificServiceImpl implements EquipmentSpecificService {
EquipmentSpecificMapper equipmentSpecificMapper; EquipmentSpecificMapper equipmentSpecificMapper;
@Autowired @Autowired
IEquipmentCategoryService categoryService; IEquipmentCategoryService categoryService;
@Autowired
FmeaEquipmentPointMapper equipmentPointMapper;
@Override @Override
public List<FmeaEquipmentPoint> upDateEquimentPoint(FmeaBindParam fmeaBindParam) { public List<FmeaEquipmentPoint> upDateEquimentPoint(FmeaBindParam fmeaBindParam) {
...@@ -53,7 +61,15 @@ public class EquipmentSpecificServiceImpl implements EquipmentSpecificService { ...@@ -53,7 +61,15 @@ public class EquipmentSpecificServiceImpl implements EquipmentSpecificService {
public Map<String, Object> getAssoEquips(Long fmeaId, int pageNumber, int pageSize) { public Map<String, Object> getAssoEquips(Long fmeaId, int pageNumber, int pageSize) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
pageNumber = pageNumber*pageSize; 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); map.put("content",assoEquips);
return map; return map;
} }
......
package com.yeejoin.amos.fas.business.service.intfc; package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.dao.entity.Fmea;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import java.util.HashMap; import java.util.HashMap;
...@@ -29,4 +30,5 @@ public interface IFmeaService { ...@@ -29,4 +30,5 @@ public interface IFmeaService {
* 查询关联的关联对象个数 * 查询关联的关联对象个数
*/ */
int queryControlObjCount(String[] ids); int queryControlObjCount(String[] ids);
} }
package com.yeejoin.amos.fas.business.service.intfc; 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.BindPointBo;
import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo; import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo;
import com.yeejoin.amos.fas.business.vo.ExceptionRegionVo; import com.yeejoin.amos.fas.business.vo.ExceptionRegionVo;
...@@ -15,6 +11,10 @@ import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse; ...@@ -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.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.util.CommonResponse; import com.yeejoin.amos.fas.core.util.CommonResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author DELL * @author DELL
*/ */
...@@ -84,7 +84,7 @@ public interface IView3dService { ...@@ -84,7 +84,7 @@ public interface IView3dService {
List<ExceptionRegionVo> getExceptionRegion(String orgCode); List<ExceptionRegionVo> getExceptionRegion(String orgCode);
/** /**
* 今日巡检统计接口 * 今日巡检统计接口
* @param orgCode * @param orgCode
...@@ -112,7 +112,7 @@ public interface IView3dService { ...@@ -112,7 +112,7 @@ public interface IView3dService {
* @return * @return
*/ */
List<SafetyExecuteBo> getEquipStatusList(String orgCode); List<SafetyExecuteBo> getEquipStatusList(String orgCode);
/** /**
* 左侧菜单(异常点) * 左侧菜单(异常点)
* @param type * @param type
...@@ -134,7 +134,7 @@ public interface IView3dService { ...@@ -134,7 +134,7 @@ public interface IView3dService {
* @param runData 日切日期 * @param runData 日切日期
*/ */
void safetyIndexLogGenJob(String runData); void safetyIndexLogGenJob(String runData);
/** /**
* 3维异常点查询 * 3维异常点查询
* @param type * @param type
...@@ -159,12 +159,27 @@ public interface IView3dService { ...@@ -159,12 +159,27 @@ 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); 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 *
* @return * @param type 类型
*/ * @param riskRourceId
List<Map<String,String>> pointLevelList(String type); * @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);
/** /**
* 查询区域下的各类点 * 查询区域下的各类点
......
...@@ -27,4 +27,7 @@ public class EquipmentSpecificVo { ...@@ -27,4 +27,7 @@ public class EquipmentSpecificVo {
//系统名称 //系统名称
private String systemName; private String systemName;
// 指标id
private String indexId;
} }
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id 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 as equ on det.equipment_id = equ.id
left join wl_equipment_category as cate on equ.category_id = cate.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 and spe.id is not null
<if test="name != null and name!='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},'%')) 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,8 +95,9 @@ ...@@ -94,8 +95,9 @@
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id 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 as equ on det.equipment_id = equ.id
left join wl_equipment_category as cate on equ.category_id = cate.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
and spe.id is not null where sto.amount <![CDATA[>]]> 0 and wsd.status != 7
and spe.id is not null
<if test="name != null and name!='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},'%')) 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},'%'))
</if> </if>
...@@ -113,14 +115,14 @@ ...@@ -113,14 +115,14 @@
</if> </if>
</select> </select>
<select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo"> <select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo">
select select DISTINCT
sto.equipment_specific_id as id , sto.equipment_specific_id as id,
spec.code as f_code, spec.code as f_code,
det.name as f_name det.name as f_name
from from
wl_stock_detail as sto wl_stock_detail as sto
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
left join wl_equipment_specific as spec on spec.equipment_detail_id = det.id left join wl_equipment_specific as spec on spec.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id left join wl_equipment as equ on det.equipment_id = equ.id
left join f_equipment_fire_equipment as fire on sto.equipment_specific_id = fire.fire_equipment_id left join f_equipment_fire_equipment as fire on sto.equipment_specific_id = fire.fire_equipment_id
where sto.amount <![CDATA[>]]> 0 where sto.amount <![CDATA[>]]> 0
...@@ -164,12 +166,16 @@ ...@@ -164,12 +166,16 @@
</if> </if>
</select> </select>
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo"> <select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select select DISTINCT
sto.id as equipmentId, sto.id as equipmentId,
spe.code as equipmentCode, spe.code as equipmentCode,
det.name as equipmentName , det.name as equipmentName ,
fqe.name as importantEquipName , 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, poin.important_equipment_id as importantEquipId,
fmea_id as fmeaId fmea_id as fmeaId
from from
...@@ -248,4 +254,13 @@ ...@@ -248,4 +254,13 @@
wl_equipment_specific wes wl_equipment_specific wes
WHERE wes.id=#{id} WHERE wes.id=#{id}
</select> </select>
<select id="getIndexByIndexId" resultType="Long">
SELECT
equipment_index_id
FROM
wl_equipment_specific_index wesi
WHERE wesi.id=#{indexId}
limit 1
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -181,4 +181,17 @@ ...@@ -181,4 +181,17 @@
equipment_point_id = #{specificIndexId} and important_equipment_id = #{equipId} equipment_point_id = #{specificIndexId} and important_equipment_id = #{equipId}
</select> </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> </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