Commit db55fa38 authored by caotao's avatar caotao

1.重构请求算法。新增光伏工况变量区间划分、相关性分析、中心值计算业务侧接口

parent 68a7706e
......@@ -27,22 +27,40 @@ public class AnalyseController extends BaseController {
CommonServiceImpl commonServiceImpl;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "工况测点区间划分", notes = "工况测点区间划分")
@GetMapping(value = "/getConditionVariablesByTime")
public void getConditionVariablesByTime(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getConditionVariablesByTime(startTime, endTime);
@ApiOperation(httpMethod = "GET", value = "工况测点区间划分-风机", notes = "工况测点区间划分-风机")
@GetMapping(value = "/getFanConditionVariablesByTime")
public void getFanConditionVariablesByTime(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getFanConditionVariablesByTime(startTime, endTime);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "相关性分析", notes = "相关性分析")
@GetMapping(value = "/getConditionVariablesByTimeAnalyse")
public void getConditionVariablesByTimeAnalyse(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getConditionVariablesByTimeAnalyse(startTime, endTime);
@ApiOperation(httpMethod = "GET", value = "工况测点区间划分-光伏", notes = "工况测点区间划分-光伏")
@GetMapping(value = "/getPvConditionVariablesByTime")
public void getPvConditionVariablesByTime(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getPvConditionVariablesByTime(startTime, endTime);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "中心值计算", notes = "中心值计算")
@GetMapping(value = "/getConditionVariablesByTimeAnalyse1")
public void getConditionVariablesByTimeAnalyse1(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getConditionVariablesByTimeAnalyse1(startTime, endTime);
@ApiOperation(httpMethod = "GET", value = "相关性分析-风机", notes = "相关性分析-风机")
@GetMapping(value = "/getFanConditionVariablesByTimeAnalyse")
public void getFanConditionVariablesByTimeAnalyse(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getFanConditionVariablesByTimeAnalyse(startTime, endTime);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "相关性分析-风机", notes = "相关性分析-风机")
@GetMapping(value = "/getPvConditionVariablesByTimeAnalyse")
public void getPvConditionVariablesByTimeAnalyse(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getPvConditionVariablesByTimeAnalyse(startTime, endTime);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "中心值计算-风机", notes = "中心值计算-风机")
@GetMapping(value = "/getFanConditionVariablesByTimeAnalyse1")
public void getFanConditionVariablesByTimeAnalyse1(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getFanConditionVariablesByTimeAnalyse1(startTime, endTime);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "中心值计算-光伏", notes = "中心值计算-光伏")
@GetMapping(value = "/getPvConditionVariablesByTimeAnalyse1")
public void getPvConditionVariablesByTimeAnalyse1(@RequestParam String startTime, @RequestParam String endTime) {
commonServiceImpl.getPvConditionVariablesByTimeAnalyse1(startTime, endTime);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
......
......@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.Date;
/**
*
......@@ -39,7 +40,7 @@ public class IdxBizFanPointProcessVariableClassification{
*
*/
@TableField("REC_DATE")
private LocalDateTime recDate;
private Date recDate;
/**
*
......
......@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.Date;
/**
*
......@@ -39,7 +40,7 @@ public class IdxBizFanPointVarCorrelation{
*
*/
@TableField("REC_DATE")
private LocalDateTime recDate;
private Date recDate;
/**
*
......
......@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.Date;
/**
*
......@@ -39,7 +40,7 @@ public class IdxBizPvPointProcessVariableClassification{
*
*/
@TableField("REC_DATE")
private LocalDateTime recDate;
private Date recDate;
/**
*
......@@ -141,7 +142,7 @@ public class IdxBizPvPointProcessVariableClassification{
*
*/
@TableField("GATEWAY_ID")
private Integer gatewayId;
private Long gatewayId;
/**
* 点表地址
......
......@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.Date;
/**
*
......@@ -39,7 +40,7 @@ public class IdxBizPvPointVarCorrelation{
*
*/
@TableField("REC_DATE")
private LocalDateTime recDate;
private Date recDate;
/**
*
......
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification;
import java.util.List;
/**
* Mapper 接口
*
......@@ -10,5 +12,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariab
* @date 2023-08-15
*/
public interface IdxBizFanPointProcessVariableClassificationMapper extends BaseMapper<IdxBizFanPointProcessVariableClassification> {
List<IdxBizFanPointProcessVariableClassification> getInfluxDBData();
List<String> gateWayIdListFan();
}
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification;
import java.util.List;
/**
* Mapper 接口
*
......@@ -10,5 +12,5 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariabl
* @date 2023-08-15
*/
public interface IdxBizPvPointProcessVariableClassificationMapper extends BaseMapper<IdxBizPvPointProcessVariableClassification> {
List<String> gateWayIdListPv();
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper">
<select id="getInfluxDBData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification">
SELECT b.*,
ibfpvcv.PROCESS_POINT1_ID as pointOneId,
ibfpvcv.PROCESS_POINT2_ID as pointTwoId,
ibfpvcv.PROCESS_POINT3_ID as pointThreeId,
ibfpvcv.ANALYSIS_POINT_ID as pointId
FROM (
SELECT *
FROM idx_biz_uxfv uxfv
WHERE uxfv.SEQUENCE_NBR IN (
SELECT PROCESS_POINT1_ID
FROM `idx_biz_fan_point_var_central_value`
WHERE ANALYSIS_POINT_ID IS NOT NULL
GROUP BY ANALYSIS_POINT_ID,
PROCESS_POINT1_ID,
PROCESS_POINT3_ID,
PROCESS_POINT2_ID
UNION ALL
SELECT PROCESS_POINT2_ID
FROM `idx_biz_fan_point_var_central_value`
WHERE ANALYSIS_POINT_ID IS NOT NULL
GROUP BY ANALYSIS_POINT_ID,
PROCESS_POINT1_ID,
PROCESS_POINT3_ID,
PROCESS_POINT2_ID
UNION ALL
SELECT PROCESS_POINT3_ID
FROM `idx_biz_fan_point_var_central_value`
WHERE ANALYSIS_POINT_ID IS NOT NULL
GROUP BY ANALYSIS_POINT_ID,
PROCESS_POINT1_ID,
PROCESS_POINT3_ID,
PROCESS_POINT2_ID
UNION ALL
SELECT ANALYSIS_POINT_ID
FROM `idx_biz_fan_point_var_central_value`
WHERE ANALYSIS_POINT_ID IS NOT NULL
GROUP BY ANALYSIS_POINT_ID,
PROCESS_POINT1_ID,
PROCESS_POINT3_ID,
PROCESS_POINT2_ID
)) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
WHERE b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
GROUP BY b.SEQUENCE_NBR
</select>
<select id="gateWayIdListFan" resultType="java.lang.String">
select GATEWAY_ID from idx_biz_fan_point_process_variable_classification group by GATEWAY_ID;
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointProcessVariableClassificationMapper">
<select id="gateWayIdListPv" resultType="java.lang.String">
select GATEWAY_ID from idx_biz_pv_point_process_variable_classification group by GATEWAY_ID;
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment