Commit d2e662ce authored by chenzhao's avatar chenzhao

风机级仪表盘接口

parent ec5b5351
......@@ -127,4 +127,11 @@ public class IdxBizFanHealthIndexController extends BaseController {
return ResponseHelper.buildResponse(page);
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "预警监测风机层仪表盘", notes = "预警监测风机层仪表盘")
@GetMapping(value = "/queryForLeftTableListNum")
public ResponseModel<Map<String,Object>> queryForLeftTableListNum(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME) {
return ResponseHelper.buildResponse( idxBizFanHealthIndexServiceImpl.queryForLeftTableListNum(STATION, HEALTHLEVEL, EQUIPMENTNAME));
}
}
......@@ -102,4 +102,6 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List<Map<String,Object>> queryForLeftTableList(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,Integer current,Integer size);
int queryForLeftTableListCount(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME);
Map<String,Object> queryForLeftTableListNum(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME);
}
......@@ -40,4 +40,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
public int queryForLeftTableListCount(String STATION, String HEALTHLEVEL, String EQUIPMENTNAME){
return this.getBaseMapper().queryForLeftTableListCount(STATION,HEALTHLEVEL,EQUIPMENTNAME);
}
public Map<String,Object> queryForLeftTableListNum(String STATION, String HEALTHLEVEL, String EQUIPMENTNAME){
return this.getBaseMapper().queryForLeftTableListNum(STATION,HEALTHLEVEL,EQUIPMENTNAME);
}
}
\ No newline at end of file
......@@ -926,5 +926,37 @@
</where>
</select>
<select id="queryForLeftTableListNum" resultType="map">
SELECT
ibfhi.HEALTH_INDEX as value
FROM
(
SELECT
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
FROM
`idx_biz_fan_point_process_variable_classification`
WHERE
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
GROUP BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
ORDER BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
) b
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND DATE_FORMAT(ibfhi.REC_DATE,"%Y-%m-%d") = DATE_FORMAT(NOW(),"%Y-%m-%d")
<where>
<if test="STATION != '' AND STATION != null">
b.STATION = #{STATION}
</if>
<if test="HEALTH_LEVEL != '' AND HEALTH_LEVEL != null">
AND HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
<if test="EQUIPMENTNAME != '' AND EQUIPMENTNAME != null">
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
</where>
</select>
</mapper>
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