fix:修改和新增逻辑
优化了部分有问题的代码并新增了部分代码
This commit is contained in:
parent
659d162c11
commit
d8aeeb260b
@ -132,8 +132,8 @@ public class SubstationController {
|
||||
|
||||
@ApiOperation("获取变电站区域导航树")
|
||||
@GetMapping("/getSubstationAreaTree")
|
||||
public ResponseResult getSubstationAreaTree(String stationId) {
|
||||
List<Map<String, Object>> substationTree = substationService.getSubstationAreaTree(stationId);
|
||||
public ResponseResult getSubstationAreaTree(String stationId,String areaName) {
|
||||
List<Map<String, Object>> substationTree = substationService.getSubstationAreaTree(stationId,areaName);
|
||||
return ResponseResult.successData(substationTree);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public interface ISubstationService extends IService<Substation> {
|
||||
* 参数说明
|
||||
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||
***********************************/
|
||||
List<Map<String, Object>> getSubstationAreaTree(String stationId);
|
||||
List<Map<String, Object>> getSubstationAreaTree(String stationId,String areaName);
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 获取区域下所有间隔
|
||||
|
@ -157,10 +157,10 @@ public class SubstationServiceImpl extends ServiceImpl<SubstationMapper, Substat
|
||||
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||
***********************************/
|
||||
@Override
|
||||
public List<Map<String, Object>> getSubstationAreaTree(String stationId) {
|
||||
public List<Map<String, Object>> getSubstationAreaTree(String stationId,String areaName) {
|
||||
Substation substation = this.substationMapper.selectById(stationId);
|
||||
List<SubstationArea> list =
|
||||
substationAreaMapper.selectList(new LambdaQueryWrapper<SubstationArea>().eq(SubstationArea::getDatastatus, "1").eq(SubstationArea::getStationCode, substation.getStationCode()).orderByAsc(SubstationArea::getCustom1));
|
||||
substationAreaMapper.selectList(new LambdaQueryWrapper<SubstationArea>().eq(SubstationArea::getDatastatus, "1").like(StrUtil.isNotBlank(areaName),SubstationArea::getAreaName,areaName).eq(SubstationArea::getStationCode, substation.getStationCode()).orderByAsc(SubstationArea::getCustom1));
|
||||
return buildTreeArea(list);
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,13 @@ public class AlarmLogController {
|
||||
return ResponseResult.successData(maps);
|
||||
}
|
||||
|
||||
@GetMapping("/getAlarmDetail")
|
||||
@ApiOperation("查询故障诊断详情信息")
|
||||
public ResponseResult getAlarmDetail(String id) {
|
||||
Map<String, Object> map=alarmLogService.getAlarmDetail(id);
|
||||
return ResponseResult.successData(map);
|
||||
}
|
||||
|
||||
@GetMapping("/getNotCheckAlarmCount")
|
||||
@ApiOperation("查询未审核告警和数量")
|
||||
public ResponseResult getNotCheckAlarmCount(String stationId) {
|
||||
|
@ -61,4 +61,5 @@ public interface AlarmLogMapper extends BaseMapper<AlarmLog> {
|
||||
|
||||
Page<Map<String, Object>> getAlarmLogPage(Page<Map<String, Object>> page, String stationCode, String taskAlarmType, String alarmLevel, String checkFlag, String alarmSourceType, String startDate, String endDate);
|
||||
|
||||
Map<String, Object> getAlarmDetail(String id);
|
||||
}
|
||||
|
@ -92,4 +92,6 @@ public interface IAlarmLogService extends IService<AlarmLog> {
|
||||
***********************************/
|
||||
void doAlaramRecord(String from,String type,String slaveIp,String address,String value);
|
||||
|
||||
Map<String, Object> getAlarmDetail(String id);
|
||||
|
||||
}
|
||||
|
@ -2272,6 +2272,11 @@ public class AlarmLogServiceImpl extends ServiceImpl<AlarmLogMapper, AlarmLog> i
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getAlarmDetail(String id) {
|
||||
return alarmLogMapper.getAlarmDetail(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充告警记录表
|
||||
*
|
||||
|
@ -158,7 +158,7 @@
|
||||
|
||||
<select id="countDeviceTypeStatus" resultType="java.util.Map">
|
||||
SELECT
|
||||
md.device_type,
|
||||
IFNULL(md.device_type, 'all') AS device_type,
|
||||
COUNT(*) AS total,
|
||||
SUM(CASE WHEN md.`status` = '01' THEN 1 ELSE 0 END) AS online_count
|
||||
FROM
|
||||
@ -177,8 +177,8 @@
|
||||
AND md.device_type = #{type}
|
||||
</if>
|
||||
GROUP BY
|
||||
md.device_type
|
||||
md.device_type WITH ROLLUP
|
||||
ORDER BY
|
||||
md.device_type
|
||||
md.device_type;
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -247,6 +247,23 @@
|
||||
</if>
|
||||
ORDER BY al.alarm_date DESC
|
||||
</select>
|
||||
<select id="getAlarmDetail" resultType="java.util.Map">
|
||||
SELECT
|
||||
al.id,
|
||||
al.content,
|
||||
al.alarm_date,
|
||||
al.`value`,
|
||||
sm.device_type,
|
||||
sm.patroldevice_json,
|
||||
sm.file_url,
|
||||
sm.factory_lifespan,
|
||||
sm.run_time
|
||||
FROM
|
||||
iis_alarm_log al
|
||||
INNER JOIN iis_substation_maindevice sm ON al.main_device_id = sm.main_device_id
|
||||
WHERE
|
||||
al.id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- <select id="getDeviceAlarmRecordPage"-->
|
||||
<!-- resultType="com.yfd.platform.modules.auxcontrol.domain.DeviceAlarmRecord">-->
|
||||
|
Loading…
Reference in New Issue
Block a user