feat:新增逻辑
新增代码注释
This commit is contained in:
parent
094ee4012b
commit
8d5f129af6
@ -74,6 +74,10 @@ public class AlgorithmClassComponentController {
|
|||||||
@ApiOperation("设置算法关联主设备部件状态")
|
@ApiOperation("设置算法关联主设备部件状态")
|
||||||
public ResponseResult setAlgorithmClassComponentStatus(String id, String isenable) throws ParseException {
|
public ResponseResult setAlgorithmClassComponentStatus(String id, String isenable) throws ParseException {
|
||||||
boolean isOK = algorithmClassComponentService.setAlgorithmClassComponentStatus(id, isenable);
|
boolean isOK = algorithmClassComponentService.setAlgorithmClassComponentStatus(id, isenable);
|
||||||
return ResponseResult.success();
|
if (isOK) {
|
||||||
|
return ResponseResult.success();
|
||||||
|
} else {
|
||||||
|
return ResponseResult.error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,17 @@ public interface IAlgorithmClassComponentService extends IService<AlgorithmClass
|
|||||||
***********************************/
|
***********************************/
|
||||||
boolean setAlgorithmClassComponentStatus(String id, String isenable) throws ParseException;
|
boolean setAlgorithmClassComponentStatus(String id, String isenable) throws ParseException;
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 根据cron表达式设置定时任务
|
||||||
|
* 参数说明 algorithmClassComponent
|
||||||
|
* 返回值说明: boolean
|
||||||
|
***********************************/
|
||||||
boolean createAlgorithmTaskList(AlgorithmClassComponent algorithmClassComponent) throws ParseException;
|
boolean createAlgorithmTaskList(AlgorithmClassComponent algorithmClassComponent) throws ParseException;
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 获取主设备信息
|
||||||
|
* 参数说明 componentId
|
||||||
|
* 返回值说明: java.util.Map<java.lang.String,java.lang.Object>
|
||||||
|
***********************************/
|
||||||
Map<String, Object> getMainDeviceInfo(String componentId);
|
Map<String, Object> getMainDeviceInfo(String componentId);
|
||||||
}
|
}
|
||||||
|
@ -155,6 +155,11 @@ public class AlgorithmClassComponentServiceImpl extends ServiceImpl<AlgorithmCla
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 获取主设备信息
|
||||||
|
* 参数说明 componentId
|
||||||
|
* 返回值说明: java.util.Map<java.lang.String,java.lang.Object>
|
||||||
|
***********************************/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getMainDeviceInfo(String componentId) {
|
public Map<String, Object> getMainDeviceInfo(String componentId) {
|
||||||
return algorithmClassComponentMapper.getMainDeviceInfo(componentId);
|
return algorithmClassComponentMapper.getMainDeviceInfo(componentId);
|
||||||
|
@ -182,6 +182,16 @@ public class AlgorithmParamsServiceImpl extends ServiceImpl<AlgorithmParamsMappe
|
|||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建报警日志对象
|
||||||
|
*
|
||||||
|
* @param component 变电站组件信息,用于获取报警日志关联的变电站和设备信息
|
||||||
|
* @param desc 报警描述
|
||||||
|
* @param description 报警详细描述
|
||||||
|
* @param algorithmClass 算法类信息,用于确定报警类型
|
||||||
|
* @param senData 传感器数据,存储报警时采集的数据
|
||||||
|
* @return 返回构建好的报警日志对象
|
||||||
|
*/
|
||||||
private AlarmLog buildAlarmLog(SubstationComponent component, String desc, String description,
|
private AlarmLog buildAlarmLog(SubstationComponent component, String desc, String description,
|
||||||
AlgorithmClass algorithmClass, Map<String, Object> senData) {
|
AlgorithmClass algorithmClass, Map<String, Object> senData) {
|
||||||
|
|
||||||
@ -191,7 +201,6 @@ public class AlgorithmParamsServiceImpl extends ServiceImpl<AlgorithmParamsMappe
|
|||||||
AlarmLog alarmLog = new AlarmLog();
|
AlarmLog alarmLog = new AlarmLog();
|
||||||
alarmLog.setStationCode(component.getStationCode());
|
alarmLog.setStationCode(component.getStationCode());
|
||||||
if (substation != null) {
|
if (substation != null) {
|
||||||
// 注意:这里原代码用了 stationCode 当 stationId,可能需要修正
|
|
||||||
alarmLog.setStationId(substation.getStationId());
|
alarmLog.setStationId(substation.getStationId());
|
||||||
}
|
}
|
||||||
alarmLog.setStationName(component.getStationName());
|
alarmLog.setStationName(component.getStationName());
|
||||||
|
@ -14,6 +14,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface DeviceAlarmParameterMapper extends BaseMapper<DeviceAlarmParameter> {
|
public interface DeviceAlarmParameterMapper extends BaseMapper<DeviceAlarmParameter> {
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 分页查询变电站辅控设备告警参数设置
|
||||||
|
* 参数说明 meterDeviceId 辅控设备ID
|
||||||
|
* 参数说明 signalId 信号ID
|
||||||
|
* 参数说明 alarmType 告警类型
|
||||||
|
* 参数说明 alarmLevel 告警等级
|
||||||
|
* 参数说明 page
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.auxcontrol.domain.DeviceAlarmParameter>
|
||||||
|
***********************************/
|
||||||
Page<DeviceAlarmParameter> getDeviceAlarmParameterPage(String meterDeviceId, String signalId, String alarmType, String alarmLevel, Page<DeviceAlarmParameter> page);
|
Page<DeviceAlarmParameter> getDeviceAlarmParameterPage(String meterDeviceId, String signalId, String alarmType, String alarmLevel, Page<DeviceAlarmParameter> page);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,22 @@ public interface DeviceSignalMapper extends BaseMapper<DeviceSignal> {
|
|||||||
|
|
||||||
Map<String, Object> querySignalDataById(String signalId);
|
Map<String, Object> querySignalDataById(String signalId);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询遥信数据
|
||||||
|
* 参数说明 page
|
||||||
|
* 参数说明 areaId 区域ID
|
||||||
|
* 参数说明 type 类型
|
||||||
|
* 参数说明 stationId 站点ID
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
***********************************/
|
||||||
Page<Map<String, Object>> queryYxData(Page<Map<String, Object>> page, String areaId, String type, String stationId);
|
Page<Map<String, Object>> queryYxData(Page<Map<String, Object>> page, String areaId, String type, String stationId);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询遥信数据统计
|
||||||
|
* 参数说明 areaId 区域ID
|
||||||
|
* 参数说明 type 类型
|
||||||
|
* 参数说明 stationId 站点ID
|
||||||
|
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
***********************************/
|
||||||
List<Map<String, Object>> countDeviceTypeStatus(String areaId, String type, String stationId);
|
List<Map<String, Object>> countDeviceTypeStatus(String areaId, String type, String stationId);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,11 @@ public interface DeviceWorkDataMapper extends BaseMapper<DeviceWorkData> {
|
|||||||
***********************************/
|
***********************************/
|
||||||
List<DeviceWorkData> getHistoricalCurve(String signalId, String type);
|
List<DeviceWorkData> getHistoricalCurve(String signalId, String type);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询变电站设备运行数据
|
||||||
|
* 参数说明 stationId 变电站id
|
||||||
|
* 返回值说明: java.util.List<com.yfd.platform.modules.auxcontrol.domain.DeviceWorkData>
|
||||||
|
***********************************/
|
||||||
List<Map<String, Object>> getDeviceWorkData(String stationId);
|
List<Map<String, Object>> getDeviceWorkData(String stationId);
|
||||||
|
|
||||||
List<DeviceWorkData> getHistoricalCurveList(List<String> signalIdList,String type);
|
List<DeviceWorkData> getHistoricalCurveList(List<String> signalIdList,String type);
|
||||||
|
@ -28,6 +28,15 @@ public interface IDeviceAlarmParameterService extends IService<DeviceAlarmParame
|
|||||||
***********************************/
|
***********************************/
|
||||||
boolean updateDeviceAlarmParameter(DeviceAlarmParameter deviceAlarmParameter);
|
boolean updateDeviceAlarmParameter(DeviceAlarmParameter deviceAlarmParameter);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 分页查询变电站辅控设备告警参数设置
|
||||||
|
* 参数说明 meterDeviceId 辅控设备ID
|
||||||
|
* 参数说明 signalId 信号ID
|
||||||
|
* 参数说明 alarmType 告警类型
|
||||||
|
* 参数说明 alarmLevel 告警等级
|
||||||
|
* 参数说明 page
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.auxcontrol.domain.DeviceAlarmParameter>
|
||||||
|
***********************************/
|
||||||
Page<DeviceAlarmParameter> getDeviceAlarmParameterPage(String meterDeviceId, String signalId, String alarmType, String alarmLevel, Page<DeviceAlarmParameter> page);
|
Page<DeviceAlarmParameter> getDeviceAlarmParameterPage(String meterDeviceId, String signalId, String alarmType, String alarmLevel, Page<DeviceAlarmParameter> page);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,23 @@ public interface IDeviceSignalService extends IService<DeviceSignal> {
|
|||||||
***********************************/
|
***********************************/
|
||||||
Map<String, Object> querySignalDataById(String signalId);
|
Map<String, Object> querySignalDataById(String signalId);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询遥信数据
|
||||||
|
* 参数说明 page
|
||||||
|
* 参数说明 areaId 区域ID
|
||||||
|
* 参数说明 type 类型
|
||||||
|
* 参数说明 stationId 站点ID
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
***********************************/
|
||||||
Page<Map<String, Object>> queryYxData(Page<Map<String, Object>> page, String areaId, String type,String stationId);
|
Page<Map<String, Object>> queryYxData(Page<Map<String, Object>> page, String areaId, String type,String stationId);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询遥信数据统计
|
||||||
|
* 参数说明 areaId 区域ID
|
||||||
|
* 参数说明 type 类型
|
||||||
|
* 参数说明 stationId 站点ID
|
||||||
|
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
***********************************/
|
||||||
List<Map<String, Object>> countDeviceTypeStatus(String areaId, String type, String stationId);
|
List<Map<String, Object>> countDeviceTypeStatus(String areaId, String type, String stationId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,21 @@ public interface IDeviceWorkDataService extends IService<DeviceWorkData> {
|
|||||||
***********************************/
|
***********************************/
|
||||||
List<DeviceWorkData> getHistoricalCurveList(List<String> signalIdList,String type);
|
List<DeviceWorkData> getHistoricalCurveList(List<String> signalIdList,String type);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询变电站设备运行数据
|
||||||
|
* 参数说明 stationId 变电站id
|
||||||
|
* 返回值说明: java.util.List<com.yfd.platform.modules.auxcontrol.domain.DeviceWorkData>
|
||||||
|
***********************************/
|
||||||
List<Map<String, Object>> getDeviceWorkData(String stationId);
|
List<Map<String, Object>> getDeviceWorkData(String stationId);
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 导出环境历史数据
|
||||||
|
* 参数说明 stationId 变电站id
|
||||||
|
* 参数说明 signalId 信号id
|
||||||
|
* 参数说明 startDate 开始时间
|
||||||
|
* 参数说明 endDate 结束时间
|
||||||
|
* 响应参数说明: 无
|
||||||
|
***********************************/
|
||||||
void exportDeviceWorkData(String stationId,String signalId, String startDate, String endDate, HttpServletResponse response) throws IOException;
|
void exportDeviceWorkData(String stationId,String signalId, String startDate, String endDate, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,15 @@ public class DeviceAlarmParameterServiceImpl extends ServiceImpl<DeviceAlarmPara
|
|||||||
return this.saveOrUpdate(deviceAlarmParameter);
|
return this.saveOrUpdate(deviceAlarmParameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 分页查询变电站辅控设备告警参数设置
|
||||||
|
* 参数说明 meterDeviceId 辅控设备ID
|
||||||
|
* 参数说明 signalId 信号ID
|
||||||
|
* 参数说明 alarmType 告警类型
|
||||||
|
* 参数说明 alarmLevel 告警等级
|
||||||
|
* 参数说明 page
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.auxcontrol.domain.DeviceAlarmParameter>
|
||||||
|
***********************************/
|
||||||
@Override
|
@Override
|
||||||
public Page<DeviceAlarmParameter> getDeviceAlarmParameterPage(String meterDeviceId, String signalId,
|
public Page<DeviceAlarmParameter> getDeviceAlarmParameterPage(String meterDeviceId, String signalId,
|
||||||
String alarmType, String alarmLevel,
|
String alarmType, String alarmLevel,
|
||||||
|
@ -211,12 +211,27 @@ public class DeviceSignalServiceImpl extends ServiceImpl<DeviceSignalMapper, Dev
|
|||||||
return deviceSignalMapper.querySignalDataById(signalId);
|
return deviceSignalMapper.querySignalDataById(signalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询遥信数据
|
||||||
|
* 参数说明 page
|
||||||
|
* 参数说明 areaId 区域ID
|
||||||
|
* 参数说明 type 类型
|
||||||
|
* 参数说明 stationId 站点ID
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
***********************************/
|
||||||
@Override
|
@Override
|
||||||
public Page<Map<String, Object>> queryYxData(Page<Map<String, Object>> page, String areaId, String type,
|
public Page<Map<String, Object>> queryYxData(Page<Map<String, Object>> page, String areaId, String type,
|
||||||
String stationId) {
|
String stationId) {
|
||||||
return deviceSignalMapper.queryYxData(page, areaId, type, stationId);
|
return deviceSignalMapper.queryYxData(page, areaId, type, stationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询遥信数据统计
|
||||||
|
* 参数说明 areaId 区域ID
|
||||||
|
* 参数说明 type 类型
|
||||||
|
* 参数说明 stationId 站点ID
|
||||||
|
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
***********************************/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> countDeviceTypeStatus(String areaId, String type, String stationId) {
|
public List<Map<String, Object>> countDeviceTypeStatus(String areaId, String type, String stationId) {
|
||||||
return deviceSignalMapper.countDeviceTypeStatus(areaId, type, stationId);
|
return deviceSignalMapper.countDeviceTypeStatus(areaId, type, stationId);
|
||||||
|
@ -103,11 +103,24 @@ public class DeviceWorkDataServiceImpl extends ServiceImpl<DeviceWorkDataMapper,
|
|||||||
return deviceWorkDataMapper.getHistoricalCurveList(signalIdList,type);
|
return deviceWorkDataMapper.getHistoricalCurveList(signalIdList,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 查询变电站设备运行数据
|
||||||
|
* 参数说明 stationId 变电站id
|
||||||
|
* 返回值说明: java.util.List<com.yfd.platform.modules.auxcontrol.domain.DeviceWorkData>
|
||||||
|
***********************************/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getDeviceWorkData(String stationId) {
|
public List<Map<String, Object>> getDeviceWorkData(String stationId) {
|
||||||
return deviceWorkDataMapper.getDeviceWorkData(stationId);
|
return deviceWorkDataMapper.getDeviceWorkData(stationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 导出环境历史数据
|
||||||
|
* 参数说明 stationId 变电站id
|
||||||
|
* 参数说明 signalId 信号id
|
||||||
|
* 参数说明 startDate 开始时间
|
||||||
|
* 参数说明 endDate 结束时间
|
||||||
|
* 响应参数说明: 无
|
||||||
|
***********************************/
|
||||||
@Override
|
@Override
|
||||||
public void exportDeviceWorkData(String stationId,String signalId, String startDate, String endDate, HttpServletResponse response) throws IOException {
|
public void exportDeviceWorkData(String stationId,String signalId, String startDate, String endDate, HttpServletResponse response) throws IOException {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user