给接口增加注释

This commit is contained in:
weitang 2025-05-20 09:57:52 +08:00
parent 13900a0c4b
commit 19a3df435e
9 changed files with 144 additions and 23 deletions

View File

@ -16,6 +16,12 @@ import java.util.Map;
*/
public interface AlgorithmDeviceMapper extends BaseMapper<AlgorithmDevice> {
/**********************************
* 用途说明: 查询算法部件的参数
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
List<Map<String, Object>> getAlgorithmDeviceParams(String algorithmId, String componentId);
List<Map<String, Object>> getAlgorithmDeviceType(String algorithmId, String componentId);

View File

@ -16,6 +16,12 @@ import java.util.Map;
*/
public interface AlgorithmParamsMapper extends BaseMapper<AlgorithmParams> {
/**********************************
* 用途说明: 查询算法参数
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
List<Map<String, Object>> getAlgorithmParamsList(String algorithmId,String componentId);
List<Map<String, Object>> getAlgorithmParamsNameList(String algorithmId,String componentId);

View File

@ -23,8 +23,20 @@ public interface IAlgorithmDeviceService extends IService<AlgorithmDevice> {
***********************************/
boolean batchAddAlgorithmDevice(List<AlgorithmDevice> algorithmDeviceList);
/**********************************
* 用途说明: 查询算法部件的参数
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
List<Map<String, Object>> getAlgorithmDeviceParams(String algorithmId, String componentId);
/**********************************
* 用途说明: 查询算法部件的参数曲线
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
List<Map<String, Object>> getAlgorithmDeviceCurve(String algorithmId, String componentId);
}

View File

@ -17,18 +17,56 @@ import java.util.Map;
*/
public interface IAlgorithmParamsService extends IService<AlgorithmParams> {
/**********************************
* 用途说明: 查询算法参数
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
List<Map<String, Object>> getAlgorithmParamsList(String algorithmId,String componentId);
/**********************************
* 用途说明: 新增算法参数
* 参数说明 algorithmParams 算法参数
* 返回值说明: boolean 操作状态
***********************************/
boolean addAlgorithmParams(AlgorithmParams algorithmParams);
/**********************************
* 用途说明: 批量新增算法参数
* 参数说明 algorithmParamsList 算法参数集合
* 返回值说明: boolean 操作状态
***********************************/
boolean batchAddAlgorithmParams(List<AlgorithmParams> algorithmParamsList);
/**********************************
* 用途说明: 批量修改算法参数
* 参数说明 algorithmParamsList 算法参数集合
* 返回值说明: boolean 操作状态
***********************************/
boolean batchUpdateAlgorithmParams(List<AlgorithmParams> algorithmParamsList);
/**********************************
* 用途说明: 删除算法参数
* 参数说明 id 参数id
* 返回值说明: boolean
***********************************/
boolean deleteAlgorithmParams(String id);
/**********************************
* 用途说明:
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
List<Map<String, Object>> getAlgorithmParamsNameList(String algorithmId,String componentId);
/**********************************
* 用途说明:
* 参数说明 id 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: com.alibaba.fastjson.JSONObject
***********************************/
JSONObject callAlgorithmAnalyse(String id, String componentId);
}

View File

@ -65,11 +65,23 @@ public class AlgorithmDeviceServiceImpl extends ServiceImpl<AlgorithmDeviceMappe
return this.saveOrUpdateBatch(algorithmDeviceList);
}
/**********************************
* 用途说明: 查询算法部件的参数
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
@Override
public List<Map<String, Object>> getAlgorithmDeviceParams(String algorithmId, String componentId) {
return algorithmDeviceMapper.getAlgorithmDeviceParams(algorithmId, componentId);
}
/**********************************
* 用途说明: 查询算法部件的参数曲线
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
@Override
public List<Map<String, Object>> getAlgorithmDeviceCurve(String algorithmId, String componentId) {
List<Map<String, Object>> list = algorithmDeviceMapper.getAlgorithmDeviceType(algorithmId, componentId);

View File

@ -42,11 +42,22 @@ public class AlgorithmParamsServiceImpl extends ServiceImpl<AlgorithmParamsMappe
@Resource
private HttpRESTfulUtils httpRESTfulUtils;
/**********************************
* 用途说明: 查询算法参数
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
@Override
public List<Map<String, Object>> getAlgorithmParamsList(String algorithmId, String componentId) {
return algorithmParamsMapper.getAlgorithmParamsList(algorithmId, componentId);
}
/**********************************
* 用途说明: 新增算法参数
* 参数说明 algorithmParams 算法参数
* 返回值说明: boolean 操作状态
***********************************/
@Override
public boolean addAlgorithmParams(AlgorithmParams algorithmParams) {
return this.saveOrUpdate(algorithmParams);
@ -57,11 +68,21 @@ public class AlgorithmParamsServiceImpl extends ServiceImpl<AlgorithmParamsMappe
return this.saveBatch(algorithmParamsList);
}
/**********************************
* 用途说明: 批量修改算法参数
* 参数说明 algorithmParamsList 算法参数集合
* 返回值说明: boolean 操作状态
***********************************/
@Override
public boolean batchUpdateAlgorithmParams(List<AlgorithmParams> algorithmParamsList) {
return this.saveOrUpdateBatch(algorithmParamsList);
}
/**********************************
* 用途说明: 删除算法参数
* 参数说明 id 参数id
* 返回值说明: boolean
***********************************/
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deleteAlgorithmParams(String id) {
@ -71,11 +92,23 @@ public class AlgorithmParamsServiceImpl extends ServiceImpl<AlgorithmParamsMappe
return this.removeById(id);
}
/**********************************
* 用途说明:
* 参数说明 algorithmId 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
***********************************/
@Override
public List<Map<String, Object>> getAlgorithmParamsNameList(String algorithmId, String componentId) {
return algorithmParamsMapper.getAlgorithmParamsNameList(algorithmId, componentId);
}
/**********************************
* 用途说明:
* 参数说明 id 算法分类Id
* 参数说明 componentId 部件Id
* 返回值说明: com.alibaba.fastjson.JSONObject
***********************************/
@Override
public JSONObject callAlgorithmAnalyse(String id, String componentId) {
AlgorithmClass algorithmClass = algorithmClassMapper.selectById(id);

View File

@ -207,9 +207,36 @@ public interface TaskResultMapper extends BaseMapper<TaskResult> {
List<Map<String, Object>> getValueByDeviceId(String deviceId);
Page<Map<String, Object>> getResultByPatroldevice(Page<Map<String, Object>> page, String internationalId,String mainDeviceId, String taskName, String recognitionType, String valid,String isReport,String startDate,String endDate);
/**********************************
* 用途说明: 获取到不同相位的最新数据
* 参数说明 areaId 区域Id
* 参数说明 bayId 间隔Id
* 参数说明 mainDeviceId 主设备Id
* 参数说明 componentId 部件Id
* 参数说明 recognitionTypeList 识别类型
* 参数说明 meterType 表计类型
* 参数说明 resultId 结果Id
* 参数说明 taskTodoId 待执行Id
* 参数说明 phase 相位
* 返回值说明: java.util.List<com.yfd.platform.modules.patroltask.domain.TaskResult>
***********************************/
List<TaskResult> getNonCoherentResult(String areaId,String bayId,String mainDeviceId,String componentId,String recognitionTypeList,String meterType,String resultId,String taskTodoId,String phase);
/**********************************
* 用途说明: 获取历史点位
* 参数说明 startDate 开始时间
* 参数说明 endDate 结束时间
* 参数说明 deviceId 点位id
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<java.util.Map<java.lang.String,java.lang
* .Object>>
***********************************/
Page<Map<String, Object>> getHistoryDevice(Page<Map<String, Object>> page, String startDate, String endDate, String deviceId);
/**********************************
* 用途说明: 获取点位历史数据
* 参数说明 deviceIdList
* 返回值说明: java.util.List<com.yfd.platform.modules.patroltask.domain.TaskResult>
***********************************/
List<TaskResult> getResultCurveData(List<String> deviceIdList);
}

View File

@ -473,6 +473,11 @@ public interface ITaskTodoService extends IService<TaskTodo> {
void sendTaskResultById(String id);
/**********************************
* 用途说明: 单点识别
* 参数说明 id 点位Id
* 返回值说明: boolean
***********************************/
boolean onceAnalyse(String id) throws Exception;
void exportMeterDataByTaskTodoId(String taskTodoId, HttpServletResponse response);

View File

@ -1983,29 +1983,6 @@ public class TaskTodoServiceImpl extends ServiceImpl<TaskTodoMapper, TaskTodo> i
@Override
public Page<Map<String, Object>> getHistoryDevice(Page<Map<String, Object>> page, String startDate,
String endDate, String deviceId) {
// LambdaQueryWrapper<TaskResult> queryWrapper = new LambdaQueryWrapper<>();
// String startFormat = "";
// queryWrapper.ne(TaskResult::getFlag, "0");
// if (StrUtil.isNotBlank(startDate)) {
// Date parseStart = DateUtil.parse(startDate);
// //一天的开始
// Date beginOfDay = DateUtil.beginOfDay(parseStart);
// startFormat = DateUtil.format(beginOfDay, "yyyy-MM-dd HH:mm:ss");
// queryWrapper.ge(TaskResult::getPatroldeviceDate, startFormat);
// }
// String endFormat = "";
// if (StrUtil.isNotBlank(startDate)) {
// Date parseEnd = DateUtil.parse(endDate);
// //一天的结束
// Date endOfDay = DateUtil.endOfDay(parseEnd);
// endFormat = DateUtil.format(endOfDay, "yyyy-MM-dd HH:mm:ss");
// queryWrapper.le(TaskResult::getPatroldeviceDate, endFormat);
// }
// if (StrUtil.isNotBlank(deviceId)) {
// queryWrapper.eq(TaskResult::getDeviceId, deviceId);
// }
// queryWrapper.orderByAsc(TaskResult::getPatroldeviceDate);
// return taskResultMapper.selectMapsPage(page, queryWrapper);
return taskResultMapper.getHistoryDevice(page, startDate, endDate, deviceId);
}
@ -2550,6 +2527,11 @@ public class TaskTodoServiceImpl extends ServiceImpl<TaskTodoMapper, TaskTodo> i
this.sendTaskResult(taskTodo, taskResult);
}
/**********************************
* 用途说明: 单点识别
* 参数说明 id 点位Id
* 返回值说明: boolean
***********************************/
@Override
public boolean onceAnalyse(String id) throws Exception {
SubstationDevice substationDevice = substationDeviceService.getById(id);