Commit 76128b63 authored by suhuiguang's avatar suhuiguang

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

parent b99e2551
......@@ -16,7 +16,7 @@ public enum StatisticsErrorTypeEum {
/**
* 设备故障
*/
equip("equip", "设备故障"),
equip("equip", "故障告警"),
/**
* 火灾告警
*/
......
......@@ -49,6 +49,23 @@ public class FireEquipmentData extends BasicEntity {
@Column(name="is_invalid")
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() {
return fireEquipmentId;
}
......
......@@ -491,23 +491,6 @@ public class View3dServiceImpl implements IView3dService {
return view3dMapper.getCheckErrorTop5(orgCode);
case "fire":
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:
throw new YeeException("不支持的类型 -->"+ type);
}
......@@ -525,8 +508,6 @@ public class View3dServiceImpl implements IView3dService {
@Override
public List<SafetyExecuteBo> getEquipStatusList(String 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
......
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 {
ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon);
List<ContingencyPlanInstance> queryForTimeLine(String instanceNo,String recordType) 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 fire(String batchNo,String stepCode, String contingencyPlanId, String buttonCode,String buttonState,String stepStateOnbutton) throws Exception;
void updateStep(String step, String batchNo);
//
// ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon);
//
//
//
// List<ContingencyPlanInstance> queryForTimeLine(String instanceNo,String recordType) 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 fire(String batchNo,String stepCode, String contingencyPlanId, String buttonCode,String buttonState,String stepStateOnbutton) throws Exception;
//
// void updateStep(String step, String batchNo);
}
......@@ -451,34 +451,41 @@
<select id="getAllErrorRiskPoint" resultType="com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo" >
SELECT
b.id,
a.`name`,
a.risk_level_id as riskLevelId,
b.create_date as changeDate
FROM
f_risk_source a,
f_rpn_change_log b
WHERE
b.risk_source_id = a.id
AND b.type = '0'
b.id,
a.`name`,
a.risk_level_id as riskLevelId,
b.create_date as changeDate
FROM
f_risk_source a,
(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
b.risk_source_id = a.id
AND b.type = '0'
and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
</select>
<select id="getAllErrorPatrolPoint" resultType="com.yeejoin.amos.fas.business.bo.CheckErrorBo">
SELECT
a.id,
pc.id,
b.`name`,
a.`is_ok` as status,
a.check_time as changeDate
pc.`is_ok` as status,
pc.check_time as changeDate
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
WHERE
a.`is_ok` IN ('2', '3')
AND a.point_id = b.id
pc.point_id = b.id
and b.is_delete = false
and DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date}
and a.org_code = #{orgCode}
and b.org_code = #{orgCode}
</select>
<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