监测点分钟数据转日数据算法调整

This commit is contained in:
2023-11-10 15:27:15 +08:00
parent f6c962c050
commit 6e36430690
36 changed files with 1280 additions and 3794 deletions

View File

@@ -7,6 +7,7 @@ import lombok.Data;
import org.influxdb.annotation.Measurement;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -22,7 +23,7 @@ public class RStatDataFlickerDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataFlucDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmphasicIDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmphasicVDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmpowerPDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmpowerQDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmpowerSDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmrateIDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataHarmrateVDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import net.sf.cglib.core.Local;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +23,7 @@ public class RStatDataIDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataInharmIDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataInharmVDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@@ -21,7 +22,7 @@ public class RStatDataPltDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -6,7 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.time.LocalDate;
/**
* 类的介绍:
@@ -21,7 +21,7 @@ public class RStatDataVDPO implements Serializable {
@MppMultiId
@TableField(value = "time")
private Date time;
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")

View File

@@ -15,4 +15,6 @@ import java.util.List;
public interface DataFlickerMapper extends InfluxDbBaseMapper<DataFlicker> {
List<DataFlickerDTO> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
List<DataFlicker> getStatisticsByWraper2(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -2,6 +2,9 @@ package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataFluc;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
@@ -9,4 +12,6 @@ import com.njcn.influx.pojo.po.DataFluc;
* @date 2023年05月05日 08:56
*/
public interface DataFlucMapper extends InfluxDbBaseMapper<DataFluc> {
List<DataFluc> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -2,6 +2,9 @@ package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmPhasicI;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
@@ -9,4 +12,6 @@ import com.njcn.influx.pojo.po.DataHarmPhasicI;
* @date 2023年05月05日 08:56
*/
public interface DataHarmPhasicIMapper extends InfluxDbBaseMapper<DataHarmPhasicI> {
List<DataHarmPhasicI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -2,6 +2,9 @@ package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmPhasicV;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
@@ -9,4 +12,6 @@ import com.njcn.influx.pojo.po.DataHarmPhasicV;
* @date 2023年05月05日 08:56
*/
public interface DataHarmPhasicVMapper extends InfluxDbBaseMapper<DataHarmPhasicV> {
List<DataHarmPhasicV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -1,7 +1,6 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmPowerP;
import com.njcn.influx.pojo.po.DataHarmPowerQ;
import com.njcn.influx.query.InfluxQueryWrapper;
@@ -14,4 +13,6 @@ import java.util.List;
*/
public interface DataHarmPowerQMapper extends InfluxDbBaseMapper<DataHarmPowerQ> {
List<DataHarmPowerQ> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -1,8 +1,10 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmPowerQ;
import com.njcn.influx.pojo.po.DataHarmPowerS;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
@@ -11,4 +13,6 @@ import com.njcn.influx.pojo.po.DataHarmPowerS;
*/
public interface DataHarmPowerSMapper extends InfluxDbBaseMapper<DataHarmPowerS> {
List<DataHarmPowerS> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -0,0 +1,18 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmRateI;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年07月17日 11:03
*/
public interface DataHarmRateIMapper extends InfluxDbBaseMapper<DataHarmRateI> {
List<DataHarmRateI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -17,4 +17,7 @@ public interface DataHarmRateVMapper extends InfluxDbBaseMapper<DataHarmRateV> {
DataHarmRateV getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper);
List<HarmData> getHarmRateVHistoryData(InfluxQueryWrapper influxQueryWrapper);
List<DataHarmRateV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -0,0 +1,18 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataInHarmI;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年07月17日 11:03
*/
public interface DataInHarmIMapper extends InfluxDbBaseMapper<DataInHarmI> {
List<DataInHarmI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -0,0 +1,18 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataInHarmRateI;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年07月17日 11:03
*/
public interface DataInHarmRateIMapper extends InfluxDbBaseMapper<DataInHarmRateI> {
List<DataInHarmRateI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -0,0 +1,18 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataInHarmRateV;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 09:00
*/
public interface DataInHarmRateVMapper extends InfluxDbBaseMapper<DataInHarmRateV> {
List<DataInHarmRateV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -0,0 +1,18 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataInHarmV;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年07月17日 11:03
*/
public interface DataInHarmVMapper extends InfluxDbBaseMapper<DataInHarmV> {
List<DataInHarmV> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -1,14 +0,0 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmPowerQ;
import com.njcn.influx.pojo.po.DataInHarmV;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 09:00
*/
public interface DataInHarmVRateMapper extends InfluxDbBaseMapper<DataInHarmV> {
}

View File

@@ -0,0 +1,17 @@
package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataPlt;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 08:56
*/
public interface DataPltMapper extends InfluxDbBaseMapper<DataPlt> {
List<DataPlt> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -17,4 +17,6 @@ public interface IDataIMapper extends InfluxDbBaseMapper<DataI> {
DataI getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper);
List<HarmData> getIHistoryData(InfluxQueryWrapper influxQueryWrapper);
List<DataI> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -0,0 +1,13 @@
package com.njcn.influx.imapper.day;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.day.DayInHarmI;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 09:00
*/
public interface DayInHarmIMapper extends InfluxDbBaseMapper<DayInHarmI> {
}

View File

@@ -0,0 +1,13 @@
package com.njcn.influx.imapper.day;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.day.DayInHarmV;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 09:00
*/
public interface DayInHarmVMapper extends InfluxDbBaseMapper<DayInHarmV> {
}

View File

@@ -1,6 +1,10 @@
package com.njcn.prepare.executor;
import com.njcn.prepare.bo.CalculatedParam;
import com.njcn.prepare.harmonic.service.mysql.line.DayDataService;
import com.njcn.prepare.harmonic.service.mysql.line.RMpEventDetailDService;
import com.njcn.prepare.harmonic.service.mysql.line.RMpEventDetailService;
import com.njcn.prepare.harmonic.service.mysql.line.RMpMonitorEvaluateDService;
import com.njcn.prepare.harmonic.service.mysql.line.*;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.annotation.LiteflowMethod;
@@ -25,6 +29,8 @@ public class MeasurementExecutor extends BaseExecutor {
private final RMpEventDetailDService rMpEventDetailDService;
private final DayDataService dayDataService;
private final RStatAbnormalDService rStatAbnormalDService;
private final ROperatingMonitorService rOperatingMonitorService;
@@ -71,6 +77,20 @@ public class MeasurementExecutor extends BaseExecutor {
}
}
/**
* 算法名: 3.4.1.1-----监测点报表_日表
*
* @author xuyang
* @date 2023年11月09日 10:08
*/
@LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "dataToDay", nodeType = NodeTypeEnum.COMMON)
public boolean dataToDayAccess(NodeComponent bindCmp) {
return isAccess(bindCmp);
}
@LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "dataToDay", nodeType = NodeTypeEnum.COMMON)
public void dataToDayProcess(NodeComponent bindCmp) {
dayDataService.dataToDayHandler(bindCmp.getRequestData());
}
/**
* 3.3.1.2. 监测点数据异常_日表
* @param bindCmp

View File

@@ -102,10 +102,10 @@ public class DayDataController extends BaseController {
log.info(item+"-->开始执行");
startTime = item+" "+"00:00:00";
endTime = item+" "+"23:59:59";
dayDataService.dataToDayHandler(indexLists,startTime,endTime,jobParam.getLineType());
// dayDataService.dataToDayHandler(indexLists,startTime,endTime,jobParam.getLineType());
}
} else {
dayDataService.dataToDayHandler(indexLists,jobParam.getBeginTime(),jobParam.getEndTime(),jobParam.getLineType());
// dayDataService.dataToDayHandler(indexLists,jobParam.getBeginTime(),jobParam.getEndTime(),jobParam.getLineType());
}
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
}

View File

@@ -1,10 +1,11 @@
package com.njcn.prepare.harmonic.service.mysql.day;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerPDPO;
import java.util.List;
public interface IRStatDataHarmpowerPDService {
public interface IRStatDataHarmpowerPDService extends IMppService<RStatDataHarmpowerPDPO> {
void insert(List<RStatDataHarmpowerPDPO> list);
}

View File

@@ -1,6 +1,6 @@
package com.njcn.prepare.harmonic.service.mysql.line;
import java.util.List;
import com.njcn.prepare.bo.CalculatedParam;
/**
* Description:
@@ -11,21 +11,13 @@ import java.util.List;
* @version V1.0.0
*/
public interface DayDataService {
/**
* @Description: 生成day表相关数据
* @Param: [indexLists, startTime, endTime]
* @return: void
* @Author: clam
* @Date: 2022/10/24
*/
//void dayDataJobHandler(List<String> indexLists, String startTime, String endTime);
/**
* 处理day表并将数据入MySQL库中
* @param indexLists
* @param startTime
* @param endTime
* @param calType 0.mysql 1.influxb 2.两个都处理
/***
* 监测点报表_日表
* @author xuyang
* @date 2023/11/09 10:08
* @param calculatedParam 查询条件
*/
void dataToDayHandler(List<String> indexLists, String startTime, String endTime,Integer calType);
void dataToDayHandler(CalculatedParam calculatedParam);
}