Compare commits
2 Commits
13900a0c4b
...
9ecebaac7d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9ecebaac7d | ||
![]() |
19a3df435e |
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
@ -141,7 +153,7 @@ public class AlgorithmDeviceServiceImpl extends ServiceImpl<AlgorithmDeviceMappe
|
||||
for (LocalDateTime slot : minuteSlots) {
|
||||
xAxisData.add(slot.format(formatter));
|
||||
String value = minuteDataMap.getOrDefault(slot, "0");
|
||||
if (!NumberUtil.isDouble(value)) {
|
||||
if (!NumberUtil.isNumber(value)) {
|
||||
value = "0";
|
||||
}
|
||||
seriesData.add(NumberUtil.parseDouble(value));
|
||||
|
@ -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);
|
||||
|
@ -83,7 +83,7 @@ public class DeviceWorkDataController {
|
||||
for (LocalDateTime slot : minuteSlots) {
|
||||
xAxisData.add(slot.format(formatter));
|
||||
String value = minuteDataMap.getOrDefault(slot, "0");
|
||||
if (!NumberUtil.isDouble(value)) {
|
||||
if (!NumberUtil.isNumber(value)) {
|
||||
value="0";
|
||||
}
|
||||
seriesData.add(NumberUtil.parseDouble(value));
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -1,11 +1,12 @@
|
||||
package com.yfd.platform.utils;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
|
||||
public class TestFileDir {
|
||||
public static void main(String[] args) throws Exception {
|
||||
double resultvalue = 50;
|
||||
double baseValue = 100;
|
||||
double abs = Math.abs((resultvalue - baseValue) / baseValue * 100);
|
||||
System.out.println(abs);
|
||||
if (NumberUtil.isNumber("23")) {
|
||||
System.out.println("是数字");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,12 @@
|
||||
FROM
|
||||
fk_device_signal ds
|
||||
INNER JOIN iis_substation_component sc ON ds.main_component_id = sc.component_id
|
||||
INNER JOIN iis_substation ss ON ss.station_code = sc.station_code
|
||||
WHERE
|
||||
sc.component_name = '微气象设备部件'
|
||||
<if test="stationId != null and stationId != ''">
|
||||
AND ss.station_id=#{stationId}
|
||||
</if>
|
||||
ORDER BY orderno
|
||||
</select>
|
||||
<select id="getHistoricalCurveList" resultType="com.yfd.platform.modules.auxcontrol.domain.DeviceWorkData">
|
||||
|
Loading…
Reference in New Issue
Block a user