新增算法分析日志模块功能
This commit is contained in:
parent
7bc871cac7
commit
c3bec10f87
@ -1,10 +1,17 @@
|
|||||||
package com.yfd.platform.modules.algorithm.controller;
|
package com.yfd.platform.modules.algorithm.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.yfd.platform.config.ResponseResult;
|
||||||
|
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
||||||
|
import com.yfd.platform.modules.algorithm.service.IAlgorithmLogsService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 前端控制器
|
* 前端控制器
|
||||||
@ -15,6 +22,21 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/algorithm/algorithm-logs")
|
@RequestMapping("/algorithm/algorithm-logs")
|
||||||
|
@Api(value = "AlgorithmLogsController", tags = "算法分析日志")
|
||||||
public class AlgorithmLogsController {
|
public class AlgorithmLogsController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IAlgorithmLogsService algorithmLogsService;
|
||||||
|
|
||||||
|
// 算法分类,区域,间隔,部件
|
||||||
|
@GetMapping("/getAlgorithmLogsPage")
|
||||||
|
@ApiOperation("分页查询算法分析日志")
|
||||||
|
public ResponseResult getAlgorithmLogsPage(String stationCode, String algorithmId, String areaId, String bayId,
|
||||||
|
String mainDeviceId, String componentId, String componentName,
|
||||||
|
Page<AlgorithmLogs> page) {
|
||||||
|
Page<AlgorithmLogs> pageMaps = algorithmLogsService.getAlgorithmLogsPage(stationCode, algorithmId, areaId,
|
||||||
|
bayId, mainDeviceId, componentId, componentName, page);
|
||||||
|
return ResponseResult.successData(pageMaps);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.yfd.platform.modules.algorithm.mapper;
|
package com.yfd.platform.modules.algorithm.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface AlgorithmLogsMapper extends BaseMapper<AlgorithmLogs> {
|
public interface AlgorithmLogsMapper extends BaseMapper<AlgorithmLogs> {
|
||||||
|
|
||||||
|
Page<AlgorithmLogs> getAlgorithmLogsPage(String stationCode,String algorithmId, String areaId, String bayId, String mainDeviceId, String componentId,String componentName, Page<AlgorithmLogs> page);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.yfd.platform.modules.algorithm.service;
|
package com.yfd.platform.modules.algorithm.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
@ -13,4 +14,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IAlgorithmLogsService extends IService<AlgorithmLogs> {
|
public interface IAlgorithmLogsService extends IService<AlgorithmLogs> {
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* 用途说明: 分页查询算法分析日志
|
||||||
|
* 参数说明 stationCode 变电站编码
|
||||||
|
* 参数说明 algorithmId 算法分类
|
||||||
|
* 参数说明 areaId 区域Id
|
||||||
|
* 参数说明 bayId 间隔Id
|
||||||
|
* 参数说明 mainDeviceId 主设备Id
|
||||||
|
* 参数说明 componentId 部件Id
|
||||||
|
* 参数说明 page 分页参数
|
||||||
|
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.algorithm.domain.AlgorithmLogs>
|
||||||
|
***********************************/
|
||||||
|
Page<AlgorithmLogs> getAlgorithmLogsPage(String stationCode,String algorithmId, String areaId, String bayId, String mainDeviceId, String componentId,String componentName, Page<AlgorithmLogs> page);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.yfd.platform.modules.algorithm.service.impl;
|
package com.yfd.platform.modules.algorithm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
|
||||||
import com.yfd.platform.modules.algorithm.mapper.AlgorithmLogsMapper;
|
import com.yfd.platform.modules.algorithm.mapper.AlgorithmLogsMapper;
|
||||||
import com.yfd.platform.modules.algorithm.service.IAlgorithmLogsService;
|
import com.yfd.platform.modules.algorithm.service.IAlgorithmLogsService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 服务实现类
|
* 服务实现类
|
||||||
@ -17,4 +20,13 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class AlgorithmLogsServiceImpl extends ServiceImpl<AlgorithmLogsMapper, AlgorithmLogs> implements IAlgorithmLogsService {
|
public class AlgorithmLogsServiceImpl extends ServiceImpl<AlgorithmLogsMapper, AlgorithmLogs> implements IAlgorithmLogsService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AlgorithmLogsMapper algorithmLogsMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<AlgorithmLogs> getAlgorithmLogsPage(String stationCode,String algorithmId, String areaId, String bayId,
|
||||||
|
String mainDeviceId, String componentId,String componentName, Page<AlgorithmLogs> page) {
|
||||||
|
return algorithmLogsMapper.getAlgorithmLogsPage(stationCode,algorithmId, areaId, bayId,
|
||||||
|
mainDeviceId, componentId,componentName, page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,9 +51,6 @@ public class DeviceSignalController {
|
|||||||
@ApiOperation("分页查询变电站辅控设备信号")
|
@ApiOperation("分页查询变电站辅控设备信号")
|
||||||
public ResponseResult getDeviceSignalPage(String systemcode,String meterDeviceId,String mainDeviceId, String mainComponentId, String signalName, Page<DeviceSignal> page) {
|
public ResponseResult getDeviceSignalPage(String systemcode,String meterDeviceId,String mainDeviceId, String mainComponentId, String signalName, Page<DeviceSignal> page) {
|
||||||
//参数校验 辅控设备ID不能为空
|
//参数校验 辅控设备ID不能为空
|
||||||
if (StrUtil.isBlank(mainComponentId)) {
|
|
||||||
return ResponseResult.error("参数为空");
|
|
||||||
}
|
|
||||||
Page<DeviceSignal> deviceSignalPage = deviceSignalService.getDeviceSignalPage(systemcode,meterDeviceId,mainDeviceId,mainComponentId, signalName, page);
|
Page<DeviceSignal> deviceSignalPage = deviceSignalService.getDeviceSignalPage(systemcode,meterDeviceId,mainDeviceId,mainComponentId, signalName, page);
|
||||||
return ResponseResult.successData(deviceSignalPage);
|
return ResponseResult.successData(deviceSignalPage);
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,34 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yfd.platform.modules.algorithm.mapper.AlgorithmLogsMapper">
|
<mapper namespace="com.yfd.platform.modules.algorithm.mapper.AlgorithmLogsMapper">
|
||||||
|
|
||||||
|
<select id="getAlgorithmLogsPage" resultType="com.yfd.platform.modules.algorithm.domain.AlgorithmLogs">
|
||||||
|
SELECT
|
||||||
|
ac.algorithm_class_name,
|
||||||
|
al.*
|
||||||
|
FROM
|
||||||
|
iis_algorithm_logs al
|
||||||
|
INNER JOIN iis_algorithm_class ac ON al.algorithm_id = ac.id
|
||||||
|
WHERE 1=1
|
||||||
|
<if test="stationCode != null and stationCode != ''">
|
||||||
|
AND al.station_code = #{stationCode}
|
||||||
|
</if>
|
||||||
|
<if test="algorithmId != null and algorithmId != ''">
|
||||||
|
AND al.algorithm_id = #{algorithmId}
|
||||||
|
</if>
|
||||||
|
<if test="areaId != null and areaId != ''">
|
||||||
|
AND al.area_id = #{areaId}
|
||||||
|
</if>
|
||||||
|
<if test="bayId != null and bayId != ''">
|
||||||
|
AND al.bay_id = #{bayId}
|
||||||
|
</if>
|
||||||
|
<if test="mainDeviceId != null and mainDeviceId != ''">
|
||||||
|
AND al.main_device_id = #{mainDeviceId}
|
||||||
|
</if>
|
||||||
|
<if test="componentId != null and componentId != ''">
|
||||||
|
AND al.component_id = #{componentId}
|
||||||
|
</if>
|
||||||
|
<if test="componentName != null and componentName != ''">
|
||||||
|
AND al.component_name = #{componentName}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -910,6 +910,7 @@ ORDER BY
|
|||||||
<if test="endDate != null and endDate != ''">
|
<if test="endDate != null and endDate != ''">
|
||||||
AND t.patroldevice_date <= #{endDate}
|
AND t.patroldevice_date <= #{endDate}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY t.time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="getResultCurveData" resultType="com.yfd.platform.modules.patroltask.domain.TaskResult">
|
<select id="getResultCurveData" resultType="com.yfd.platform.modules.patroltask.domain.TaskResult">
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user