Commit 35b4f1f9 authored by KeYong's avatar KeYong

调试接口

parent e6d15810
......@@ -362,6 +362,7 @@ public class EquipmentSpecificController extends AbstractBaseController {
}
@GetMapping(value = "/index/normal")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询非告警指标list", notes = "查询非告警指标list")
public ResponseModel normalIndexInfoList(@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate){
......@@ -369,6 +370,7 @@ public class EquipmentSpecificController extends AbstractBaseController {
}
@GetMapping(value = "/info/fire")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询火报系统指标", notes = "查询火报系统指标")
public ResponseModel getFireAutoSysInfo(@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate){
......@@ -376,6 +378,7 @@ public class EquipmentSpecificController extends AbstractBaseController {
}
@GetMapping(value = "/info/paomo")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询泡沫系统指标", notes = "查询泡沫系统指标")
public ResponseModel getPaomoSysInfo(@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate){
......@@ -383,6 +386,7 @@ public class EquipmentSpecificController extends AbstractBaseController {
}
@GetMapping(value = "/info/water")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询给水系统指标", notes = "查询给水系统指标")
public ResponseModel getWaterSysInfo(@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate){
......
......@@ -891,4 +891,15 @@ public class FireFightingSystemController extends AbstractBaseController {
public Object getSystemInfoList() throws Exception {
return fireFightingSystemService.getSystemInfoList();
}
/**
* 获取消防系统告警状态信息
* @throws Exception
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取消防系统告警状态信息", notes = "获取消防系统告警状态信息")
@GetMapping(value = "/alarm/num")
public Object getSystemAlarmInfoList(@RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate) throws Exception {
return fireFightingSystemService.getSystemAlarmInfoList(startDate, endDate);
}
}
......@@ -231,7 +231,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Integer getAllEquipNum(@Param("bizOrgCode") String bizOrgCode);
Map<String, Object> normalIndexInfoList(@Param("startDate") String startDate, @Param("endDate") String endDate);
List<Map<String, Object>> normalIndexInfoList(@Param("startDate") String startDate, @Param("endDate") String endDate);
Map<String, Object> getFireAutoSysInfo();
......
......@@ -615,4 +615,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<Map<String, Integer>> getStockEquipStatistics(@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getSystemInfoList();
List<Map<String, Object>> getSystemAlarmInfoList(@Param("startDate") String startDate, @Param("endDate") String endDate);
}
......@@ -237,7 +237,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
*/
List<IotIndexInfoVo> getIndexInfoList(String iotCode, ResponseModel entity, Integer isTrend, String fieldKey);
Map<String, Object> normalIndexInfoList(String startDate, String endDate);
List<Map<String, Object>> normalIndexInfoList(String startDate, String endDate);
Map<String, Object> getFireAutoSysInfo(String startDate, String endDate);
......
......@@ -291,4 +291,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
List<Map<String, Integer>> getStockEquipStatistics(String bizOrgCode);
List<Map<String, Object>> getSystemInfoList();
List<Map<String, Object>> getSystemAlarmInfoList(String startDate, String endDate);
}
......@@ -1893,8 +1893,26 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
@Override
public Map<String, Object> normalIndexInfoList(String startDate, String endDate) {
return equipmentSpecificMapper.normalIndexInfoList(startDate, endDate);
public List<Map<String, Object>> normalIndexInfoList(String startDate, String endDate) {
List<Map<String, Object>> list = equipmentSpecificMapper.normalIndexInfoList(startDate, endDate);
List<Map<String, Object>> results = new ArrayList<>();
if (0 < list.size()) {
int i = 0;
for (Map<String, Object> map : list) {
Map<String, Object> map1 = new HashMap<>();
map1.put("key", i + 1);
map1.put("sb", map.get("equipName"));
map1.put("cs", map.get("equipmentIndexName"));
map1.put("zz", map.get("value"));
map1.put("yz", map.get("standardValue"));
map1.put("sj", map.get("time"));
map1.put("zrr", map.get("chargePersonName"));
map1.put("szqy", map.get("areaName"));
map1.put("ssxt", map.get("fightSysName"));
results.add(map1);
}
}
return results;
}
@Override
......
......@@ -35,6 +35,7 @@ import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*;
import org.apache.commons.beanutils.BeanUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
......@@ -2021,6 +2022,22 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public List<Map<String, Object>> getSystemInfoList() {
return fireFightingSystemMapper.getSystemInfoList();
List<Map<String, Object>> list = fireFightingSystemMapper.getSystemInfoList();
if (0 < list.size()) {
list.forEach(x -> {
List<Map<String, Object>> list1 = new ArrayList();
Map<String, Object> map = new HashMap<>();
map.put("name", x.get("status"));
map.put("level", "success");
list1.add(map);
x.put("status", list1);
});
}
return list;
}
@Override
public List<Map<String, Object>> getSystemAlarmInfoList(String startDate, String endDate) {
return fireFightingSystemMapper.getSystemAlarmInfoList(startDate, endDate);
}
}
......@@ -5174,10 +5174,10 @@
</select>
<select id="getSystemInfoList" resultType="java.util.Map">
SELECT
fs.id,
fs.id AS `key`,
fs.`code`,
fs.`name`,
fs.system_type_code as 'sysTypeCode',
fs.system_type_code AS systemTypeCode,
CASE WHEN (SELECT
count(1)
FROM
......@@ -5188,5 +5188,32 @@
END as 'status'
FROM
f_fire_fighting_system fs
where system_type_code IS NOT NULL
</select>
<select id="getSystemAlarmInfoList" resultType="java.util.Map">
SELECT
`fs`.`id` AS `id`,
`fs`.`code` AS `code`,
`fs`.`name` AS `name`,
(
SELECT
count( 1 )
FROM
`wl_equipment_specific_alarm_log`
WHERE
`wl_equipment_specific_alarm_log`.`status` = 1
AND
0 <![CDATA[<>]]> find_in_set(`fs`.`id`, `wl_equipment_specific_alarm_log`.`system_ids`)
<if test="startDate!=null">
AND DATE_FORMAT(`wl_equipment_specific_alarm_log`.update_date,'%y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{startDate},'%y-%m-%d')
</if>
<if test="endDate!=null">
AND DATE_FORMAT(`wl_equipment_specific_alarm_log`.update_date,'%y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{endDate},'%y-%m-%d')
</if>
) AS `value`
FROM
`f_fire_fighting_system` `fs`
-- where
-- fs.system_type_code IS NOT NULL
</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