Commit 76128b63 authored by suhuiguang's avatar suhuiguang

1.修改今日指数统计详情接口

parent b99e2551
...@@ -16,7 +16,7 @@ public enum StatisticsErrorTypeEum { ...@@ -16,7 +16,7 @@ public enum StatisticsErrorTypeEum {
/** /**
* 设备故障 * 设备故障
*/ */
equip("equip", "设备故障"), equip("equip", "故障告警"),
/** /**
* 火灾告警 * 火灾告警
*/ */
......
...@@ -49,6 +49,23 @@ public class FireEquipmentData extends BasicEntity { ...@@ -49,6 +49,23 @@ public class FireEquipmentData extends BasicEntity {
@Column(name="is_invalid") @Column(name="is_invalid")
private int isInvalid; // 是否有效 private int isInvalid; // 是否有效
/**
* 机构
*/
@Column(name="org_code")
private String orgCode;
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public FireEquipmentData() {
}
public Long getFireEquipmentId() { public Long getFireEquipmentId() {
return fireEquipmentId; return fireEquipmentId;
} }
......
...@@ -491,23 +491,6 @@ public class View3dServiceImpl implements IView3dService { ...@@ -491,23 +491,6 @@ public class View3dServiceImpl implements IView3dService {
return view3dMapper.getCheckErrorTop5(orgCode); return view3dMapper.getCheckErrorTop5(orgCode);
case "fire": case "fire":
return view3dMapper.getFireAlarmTop5(orgCode); return view3dMapper.getFireAlarmTop5(orgCode);
// return JSON.parseArray(" [\r\n" +
// " {\r\n" +
// " \"id\": 35781,\r\n" +
// " \"code\": \"s001\",\r\n" +
// " \"label\": \"设备test\",\r\n" +
// " \"pointId\": \"1\",\r\n" +
// " \"type\": \"check\",\r\n" +
// " \"changeDate\": \"2020-04-23 14:31:31\"\r\n" +
// " },\r\n" +
// " {\r\n" +
// " \"id\": 35780,\r\n" +
// " \"code\": \"s002\",\r\n" +
// " \"label\": \"设备002\",\r\n" +
// " \"pointId\": \"23123\",\r\n" +
// " \"type\": \"check\",\r\n" +
// " \"changeDate\": \"2020-04-23 14:31:27\"\r\n" +
// " }]", SafetyExecuteBo.class);
default: default:
throw new YeeException("不支持的类型 -->"+ type); throw new YeeException("不支持的类型 -->"+ type);
} }
...@@ -525,8 +508,6 @@ public class View3dServiceImpl implements IView3dService { ...@@ -525,8 +508,6 @@ public class View3dServiceImpl implements IView3dService {
@Override @Override
public List<SafetyExecuteBo> getEquipStatusList(String orgCode) { public List<SafetyExecuteBo> getEquipStatusList(String orgCode) {
return view3dMapper.getEquipStatusTop5(orgCode); return view3dMapper.getEquipStatusTop5(orgCode);
// return JSON.parseArray("[{\"id\":1,\"label\":\"设备1 label\",\"changeDate\":\"2020-04-26 10:00:00\"}"
// + ",{\"id\":2,\"label\":\"设备2 label\",\"changeDate\":\"2020-04-25 10:00:00\"}]");
} }
@Override @Override
......
package com.yeejoin.amos.fas.business.service.intfc; package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import java.util.List;
import java.util.Map;
public interface IContingencyInstance { public interface IContingencyInstance {
//
ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon); // ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon);
//
//
//
List<ContingencyPlanInstance> queryForTimeLine(String instanceNo,String recordType) throws Exception; // List<ContingencyPlanInstance> queryForTimeLine(String instanceNo,String recordType) throws Exception;
//
//
void setButtonExecuted(String batchNo,String contingencyPlanId,String code,String buttonState) throws Exception; // void setButtonExecuted(String batchNo,String contingencyPlanId,String code,String buttonState) throws Exception;
void setButtonWait(String batchNo,String contingencyPlanId,String buttonState) throws Exception; // void setButtonWait(String batchNo,String contingencyPlanId,String buttonState) throws Exception;
//
//
void fire(String batchNo,String stepCode, String contingencyPlanId, String buttonCode,String buttonState,String stepStateOnbutton) throws Exception; // void fire(String batchNo,String stepCode, String contingencyPlanId, String buttonCode,String buttonState,String stepStateOnbutton) throws Exception;
//
void updateStep(String step, String batchNo); // void updateStep(String step, String batchNo);
} }
...@@ -451,34 +451,41 @@ ...@@ -451,34 +451,41 @@
<select id="getAllErrorRiskPoint" resultType="com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo" > <select id="getAllErrorRiskPoint" resultType="com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo" >
SELECT SELECT
b.id, b.id,
a.`name`, a.`name`,
a.risk_level_id as riskLevelId, a.risk_level_id as riskLevelId,
b.create_date as changeDate b.create_date as changeDate
FROM FROM
f_risk_source a, f_risk_source a,
f_rpn_change_log b (SELECT a.id,a.type,a.risk_source_id,max(a.create_date) as create_date FROM `f_rpn_change_log` a GROUP BY a.risk_source_id) as b
WHERE WHERE
b.risk_source_id = a.id b.risk_source_id = a.id
AND b.type = '0' AND b.type = '0'
and a.org_code = #{orgCode} and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date} and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
</select> </select>
<select id="getAllErrorPatrolPoint" resultType="com.yeejoin.amos.fas.business.bo.CheckErrorBo"> <select id="getAllErrorPatrolPoint" resultType="com.yeejoin.amos.fas.business.bo.CheckErrorBo">
SELECT SELECT
a.id, pc.id,
b.`name`, b.`name`,
a.`is_ok` as status, pc.`is_ok` as status,
a.check_time as changeDate pc.check_time as changeDate
FROM FROM
p_check a, (select
a.id,
a.point_id,
a.`is_ok`,
max(a.check_time) as check_time
FROM
p_check a
where DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date}
and a.`is_ok` IN ('2', '3')
GROUP BY a.point_id) as pc,
p_point b p_point b
WHERE WHERE
a.`is_ok` IN ('2', '3') pc.point_id = b.id
AND a.point_id = b.id
and b.is_delete = false and b.is_delete = false
and DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date} and b.org_code = #{orgCode}
and a.org_code = #{orgCode}
</select> </select>
<select id="getAllFaultAlarm" resultType="com.yeejoin.amos.fas.business.bo.CheckErrorBo"> <select id="getAllFaultAlarm" resultType="com.yeejoin.amos.fas.business.bo.CheckErrorBo">
......
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