部分日表算法
This commit is contained in:
@@ -10,7 +10,9 @@ import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlickerDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.service.IDataFlicker;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -64,7 +66,22 @@ public class DataFlickerController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataFlickerQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataFlickerDto> dataFlickerDtoList) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataFlickerInsert.addList(dataFlickerDtoList);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlucDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPltDto;
|
||||
import com.njcn.dataProcess.service.IDataFluc;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -64,4 +64,22 @@ public class DataFlucController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataFlucQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataFlucDto> dataFlucDtoList) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataFlucInsert.addList(dataFlucDtoList);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,9 +6,12 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicIDto;
|
||||
import com.njcn.dataProcess.service.IDataHarmphasicI;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -53,7 +56,23 @@ public class DataHarmphasicIController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataHarmphasicIQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataHarmPhasicIDto> list) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataHarmphasicIInsert.addList(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicIDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicVDto;
|
||||
import com.njcn.dataProcess.service.IDataHarmphasicV;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -55,7 +58,6 @@ public class DataHarmphasicVController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getRawData")
|
||||
@ApiOperation("获取原始数据")
|
||||
@@ -65,6 +67,22 @@ public class DataHarmphasicVController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataHarmphasicVQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataHarmPhasicVDto> list) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataHarmphasicVInsert.addList(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicVDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPowerPDto;
|
||||
import com.njcn.dataProcess.service.IDataHarmpowerP;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -64,4 +67,22 @@ public class DataHarmpowerPController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataHarmpowerPQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataHarmPowerPDto> list) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataHarmpowerPInsert.addList(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerQDTO;
|
||||
import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerQDto;
|
||||
import com.njcn.dataProcess.service.IDataHarmpowerQ;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -53,7 +57,23 @@ public class DataHarmpowerQController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataHarmpowerQQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataHarmPowerQDto> list) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataHarmpowerQInsert.addList(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.service.IDataI;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -64,4 +65,22 @@ public class DataIController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getBaseData")
|
||||
@ApiOperation("获取算法基础数据")
|
||||
public HttpResult<List<CommonMinuteDto>> getBaseData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getBaseData");
|
||||
List<CommonMinuteDto> data = dataIQuery.getBaseData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("关系型数据库插入数据")
|
||||
public HttpResult<String> addList(@RequestBody List<DataIDto> dataIDtoList) {
|
||||
String methodDescribe = getMethodDescribe("addList");
|
||||
dataIInsert.addList(dataIDtoList);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlickerD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataFlickerRelationMapper extends MppBaseMapper<RStatDataFlickerD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlucD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataFlucRelationMapper extends MppBaseMapper<RStatDataFlucD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicID;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmPhasicIRelationMapper extends MppBaseMapper<RStatDataHarmPhasicID> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicVD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmPhasicVRelationMapper extends MppBaseMapper<RStatDataHarmPhasicVD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerPD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmPowerPRelationMapper extends MppBaseMapper<RStatDataHarmPowerPD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerQD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmPowerQRelationMapper extends MppBaseMapper<RStatDataHarmPowerQD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerSD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmPowerSRelationMapper extends MppBaseMapper<RStatDataHarmPowerSD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmRateID;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmRateIRelationMapper extends MppBaseMapper<RStatDataHarmRateID> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmRateVD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataHarmRateVRelationMapper extends MppBaseMapper<RStatDataHarmRateVD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataIRelationMapper extends MppBaseMapper<RStatDataID> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataInHarmID;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataInHarmIRelationMapper extends MppBaseMapper<RStatDataInHarmID> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataInHarmVD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataInHarmVRelationMapper extends MppBaseMapper<RStatDataInHarmVD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataPltD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface RStatDataPltRelationMapper extends MppBaseMapper<RStatDataPltD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlickerDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlickerD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,7 +16,7 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataFlicker {
|
||||
public interface IDataFlicker extends IMppService<RStatDataFlickerD> {
|
||||
void batchInsertion(List<DataFlickerDTO> dataIDTOList);
|
||||
|
||||
/**
|
||||
@@ -22,4 +25,15 @@ public interface IDataFlicker {
|
||||
* @return
|
||||
*/
|
||||
List<DataFlickerDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 获取监测点原始数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataFlickerDto> dataIDtoList);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlucDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlucD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,7 +16,7 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataFluc {
|
||||
public interface IDataFluc extends IMppService<RStatDataFlucD> {
|
||||
void batchInsertion(List<DataFlucDTO> dataIDTOList);
|
||||
|
||||
/**
|
||||
@@ -22,4 +25,15 @@ public interface IDataFluc {
|
||||
* @return
|
||||
*/
|
||||
List<DataFlucDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 获取监测点原始数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataFlucDto> dataFlucDtoList);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicIDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicID;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,6 +16,17 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataHarmphasicI {
|
||||
public interface IDataHarmphasicI extends IMppService<RStatDataHarmPhasicID> {
|
||||
void batchInsertion(List<DataHarmphasicIDTO> dataIDTOList);
|
||||
|
||||
/**
|
||||
* 获取监测点原始数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataHarmPhasicIDto> list);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicVD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,7 +17,7 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataHarmphasicV {
|
||||
public interface IDataHarmphasicV extends IMppService<RStatDataHarmPhasicVD> {
|
||||
void batchInsertion(List<DataHarmphasicVDTO> dataIDTOList);
|
||||
|
||||
/**
|
||||
@@ -22,4 +26,15 @@ public interface IDataHarmphasicV {
|
||||
* @return
|
||||
*/
|
||||
List<DataHarmDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 获取预处理数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataHarmPhasicVDto> list);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerPD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +17,7 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataHarmpowerP {
|
||||
public interface IDataHarmpowerP extends IMppService<RStatDataHarmPowerPD> {
|
||||
void batchInsertion(List<DataHarmpowerPDTO> dataIDTOList);
|
||||
|
||||
/**
|
||||
@@ -23,4 +26,15 @@ public interface IDataHarmpowerP {
|
||||
* @return
|
||||
*/
|
||||
List<DataPowerPDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 获取预处理数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataHarmPowerPDto> list);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerQDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerQDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerQD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,6 +16,17 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataHarmpowerQ {
|
||||
public interface IDataHarmpowerQ extends IMppService<RStatDataHarmPowerQD> {
|
||||
void batchInsertion(List<DataHarmpowerQDTO> dataIDTOList);
|
||||
|
||||
/**
|
||||
* 获取预处理数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataHarmPowerQDto> list);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataI;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataVD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,7 +17,7 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface IDataI {
|
||||
public interface IDataI extends IMppService<RStatDataID> {
|
||||
|
||||
void batchInsertion(List<DataIDTO> dataIDTOList);
|
||||
|
||||
@@ -25,4 +27,15 @@ public interface IDataI {
|
||||
* @return
|
||||
*/
|
||||
List<DataIDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 获取监测点原始数据
|
||||
* @param lineParam 监测点参数
|
||||
*/
|
||||
List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
*/
|
||||
void addList(List<DataIDto> dataIDtoList);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.imapper.DataFlickerMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataFlickerRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataFlicker;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlickerDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlickerD;
|
||||
import com.njcn.dataProcess.service.IDataFlicker;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
@@ -16,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -29,7 +35,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataFlickerImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataFlickerImpl implements IDataFlicker {
|
||||
public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRelationMapper, RStatDataFlickerD> implements IDataFlicker {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
|
||||
@@ -68,6 +74,54 @@ public class InfluxdbDataFlickerImpl implements IDataFlicker {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataFlicker> dataIList = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(dataIList)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataFlicker>> lineMap = dataIList.stream().collect(Collectors.groupingBy(DataFlicker::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataFlicker>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataFlicker::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(null);
|
||||
|
||||
//规定好集合指标参数
|
||||
List<Double> data1 = phasicTypeList.stream().map(DataFlicker::getFluc).collect(Collectors.toList());
|
||||
List<Double> data2 = phasicTypeList.stream().map(DataFlicker::getPlt).collect(Collectors.toList());
|
||||
List<Double> data3 = phasicTypeList.stream().map(DataFlicker::getPst).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data1,data2,data3);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataFlickerDto> dataIDtoList) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.imapper.DataFlucMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataFlucRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataFluc;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlucDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlucD;
|
||||
import com.njcn.dataProcess.service.IDataFluc;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
@@ -16,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -29,7 +35,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataFlucImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataFlucImpl implements IDataFluc {
|
||||
public class InfluxdbDataFlucImpl extends MppServiceImpl<RStatDataFlucRelationMapper, RStatDataFlucD> implements IDataFluc {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
|
||||
@@ -68,6 +74,53 @@ public class InfluxdbDataFlucImpl implements IDataFluc {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataFluc> dataIList = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(dataIList)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataFluc>> lineMap = dataIList.stream().collect(Collectors.groupingBy(DataFluc::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataFluc>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataFluc::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(null);
|
||||
|
||||
//规定好集合指标参数
|
||||
List<Double> data1 = phasicTypeList.stream().map(DataFluc::getFluc).collect(Collectors.toList());
|
||||
List<Double> data2 = phasicTypeList.stream().map(DataFluc::getFluccf).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data1,data2);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataFlucDto> dataFlucDtoList) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
|
||||
@@ -1,15 +1,30 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.dataProcess.dao.imapper.DataHarmphasicIMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPhasicIRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmphasicI;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicIDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicID;
|
||||
import com.njcn.dataProcess.service.IDataHarmphasicI;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -21,11 +36,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataHarmphasicIImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataHarmphasicIImpl implements IDataHarmphasicI {
|
||||
public class InfluxdbDataHarmphasicIImpl extends MppServiceImpl<RStatDataHarmPhasicIRelationMapper, RStatDataHarmPhasicID> implements IDataHarmphasicI {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
private final DataHarmphasicIMapper dataHarmphasicIMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataHarmphasicIDTO> dataHarmphasicIDTOList) {
|
||||
int totalCount = dataHarmphasicIDTOList.size();
|
||||
@@ -44,4 +59,156 @@ public class InfluxdbDataHarmphasicIImpl implements IDataHarmphasicI {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataHarmphasicI> data = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(data)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataHarmphasicI>> lineMap = data.stream().collect(Collectors.groupingBy(DataHarmphasicI::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataHarmphasicI>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataHarmphasicI::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
//以数据类型分组
|
||||
Map<String,List<DataHarmphasicI>> valueTypeMap = phasicTypeList.stream().collect(Collectors.groupingBy(DataHarmphasicI::getValueType));
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
valueTypeMap.forEach((valueType,valueTypeList)->{
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(valueType);
|
||||
//规定好集合指标参数
|
||||
List<Double> data12 = valueTypeList.stream().map(DataHarmphasicI::getI1).collect(Collectors.toList());
|
||||
List<Double> data13 = valueTypeList.stream().map(DataHarmphasicI::getI2).collect(Collectors.toList());
|
||||
List<Double> data14 = valueTypeList.stream().map(DataHarmphasicI::getI3).collect(Collectors.toList());
|
||||
List<Double> data15 = valueTypeList.stream().map(DataHarmphasicI::getI4).collect(Collectors.toList());
|
||||
List<Double> data16 = valueTypeList.stream().map(DataHarmphasicI::getI5).collect(Collectors.toList());
|
||||
List<Double> data17 = valueTypeList.stream().map(DataHarmphasicI::getI6).collect(Collectors.toList());
|
||||
List<Double> data18 = valueTypeList.stream().map(DataHarmphasicI::getI7).collect(Collectors.toList());
|
||||
List<Double> data19 = valueTypeList.stream().map(DataHarmphasicI::getI8).collect(Collectors.toList());
|
||||
List<Double> data20 = valueTypeList.stream().map(DataHarmphasicI::getI9).collect(Collectors.toList());
|
||||
List<Double> data21 = valueTypeList.stream().map(DataHarmphasicI::getI10).collect(Collectors.toList());
|
||||
List<Double> data22 = valueTypeList.stream().map(DataHarmphasicI::getI11).collect(Collectors.toList());
|
||||
List<Double> data23 = valueTypeList.stream().map(DataHarmphasicI::getI12).collect(Collectors.toList());
|
||||
List<Double> data24 = valueTypeList.stream().map(DataHarmphasicI::getI13).collect(Collectors.toList());
|
||||
List<Double> data25 = valueTypeList.stream().map(DataHarmphasicI::getI14).collect(Collectors.toList());
|
||||
List<Double> data26 = valueTypeList.stream().map(DataHarmphasicI::getI15).collect(Collectors.toList());
|
||||
List<Double> data27 = valueTypeList.stream().map(DataHarmphasicI::getI16).collect(Collectors.toList());
|
||||
List<Double> data28 = valueTypeList.stream().map(DataHarmphasicI::getI17).collect(Collectors.toList());
|
||||
List<Double> data29 = valueTypeList.stream().map(DataHarmphasicI::getI18).collect(Collectors.toList());
|
||||
List<Double> data30 = valueTypeList.stream().map(DataHarmphasicI::getI19).collect(Collectors.toList());
|
||||
List<Double> data31 = valueTypeList.stream().map(DataHarmphasicI::getI20).collect(Collectors.toList());
|
||||
List<Double> data32 = valueTypeList.stream().map(DataHarmphasicI::getI21).collect(Collectors.toList());
|
||||
List<Double> data33 = valueTypeList.stream().map(DataHarmphasicI::getI22).collect(Collectors.toList());
|
||||
List<Double> data34 = valueTypeList.stream().map(DataHarmphasicI::getI23).collect(Collectors.toList());
|
||||
List<Double> data35 = valueTypeList.stream().map(DataHarmphasicI::getI24).collect(Collectors.toList());
|
||||
List<Double> data36 = valueTypeList.stream().map(DataHarmphasicI::getI25).collect(Collectors.toList());
|
||||
List<Double> data37 = valueTypeList.stream().map(DataHarmphasicI::getI26).collect(Collectors.toList());
|
||||
List<Double> data38 = valueTypeList.stream().map(DataHarmphasicI::getI27).collect(Collectors.toList());
|
||||
List<Double> data39 = valueTypeList.stream().map(DataHarmphasicI::getI28).collect(Collectors.toList());
|
||||
List<Double> data40 = valueTypeList.stream().map(DataHarmphasicI::getI29).collect(Collectors.toList());
|
||||
List<Double> data41 = valueTypeList.stream().map(DataHarmphasicI::getI30).collect(Collectors.toList());
|
||||
List<Double> data42 = valueTypeList.stream().map(DataHarmphasicI::getI31).collect(Collectors.toList());
|
||||
List<Double> data43 = valueTypeList.stream().map(DataHarmphasicI::getI32).collect(Collectors.toList());
|
||||
List<Double> data44 = valueTypeList.stream().map(DataHarmphasicI::getI33).collect(Collectors.toList());
|
||||
List<Double> data45 = valueTypeList.stream().map(DataHarmphasicI::getI34).collect(Collectors.toList());
|
||||
List<Double> data46 = valueTypeList.stream().map(DataHarmphasicI::getI35).collect(Collectors.toList());
|
||||
List<Double> data47 = valueTypeList.stream().map(DataHarmphasicI::getI36).collect(Collectors.toList());
|
||||
List<Double> data48 = valueTypeList.stream().map(DataHarmphasicI::getI37).collect(Collectors.toList());
|
||||
List<Double> data49 = valueTypeList.stream().map(DataHarmphasicI::getI38).collect(Collectors.toList());
|
||||
List<Double> data50 = valueTypeList.stream().map(DataHarmphasicI::getI39).collect(Collectors.toList());
|
||||
List<Double> data51 = valueTypeList.stream().map(DataHarmphasicI::getI40).collect(Collectors.toList());
|
||||
List<Double> data52 = valueTypeList.stream().map(DataHarmphasicI::getI41).collect(Collectors.toList());
|
||||
List<Double> data53 = valueTypeList.stream().map(DataHarmphasicI::getI42).collect(Collectors.toList());
|
||||
List<Double> data54 = valueTypeList.stream().map(DataHarmphasicI::getI43).collect(Collectors.toList());
|
||||
List<Double> data55 = valueTypeList.stream().map(DataHarmphasicI::getI44).collect(Collectors.toList());
|
||||
List<Double> data56 = valueTypeList.stream().map(DataHarmphasicI::getI45).collect(Collectors.toList());
|
||||
List<Double> data57 = valueTypeList.stream().map(DataHarmphasicI::getI46).collect(Collectors.toList());
|
||||
List<Double> data58 = valueTypeList.stream().map(DataHarmphasicI::getI47).collect(Collectors.toList());
|
||||
List<Double> data59 = valueTypeList.stream().map(DataHarmphasicI::getI48).collect(Collectors.toList());
|
||||
List<Double> data60 = valueTypeList.stream().map(DataHarmphasicI::getI49).collect(Collectors.toList());
|
||||
List<Double> data61 = valueTypeList.stream().map(DataHarmphasicI::getI50).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data12,data13,data14,data15,data16
|
||||
,data17,data18,data19,data20,data21,data22,data23,data24,data25,data26
|
||||
,data27,data28,data29,data30,data31,data32,data33,data34,data35,data36
|
||||
,data37,data38,data39,data40,data41,data42,data43,data44,data45,data46
|
||||
,data47,data48,data49,data50,data51,data52,data53,data54,data55,data56
|
||||
,data57,data58,data59,data60,data61);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
});
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPhasicIDto> list) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
* 需要进行剔除异常数据时,这里会有三种情况判断
|
||||
* 1.无异常数据,则直接返回集合;
|
||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||
*/
|
||||
public List<DataHarmphasicI> getMinuteData(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
||||
List<DataHarmphasicI> result = new ArrayList<>();
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||
influxQueryWrapper.regular(DataHarmphasicI::getLineId, lineList)
|
||||
.select(DataHarmphasicI::getLineId)
|
||||
.select(DataHarmphasicI::getPhasicType)
|
||||
.select(DataHarmphasicI::getValueType)
|
||||
.select(DataHarmphasicI::getQualityFlag)
|
||||
.between(DataHarmphasicI::getTime, startTime, endTime)
|
||||
.eq(DataHarmphasicI::getQualityFlag,"0");
|
||||
List<DataHarmphasicI> list = dataHarmphasicIMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||
Map<String,List<DataHarmphasicI>> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmphasicI::getLineId));
|
||||
//有异常数据
|
||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
||||
lineMap.forEach((k,v)->{
|
||||
List<String> timeList = timeMap.get(k);
|
||||
//有异常数据,当前监测点自身的异常数据
|
||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||
List<DataHarmphasicI> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||
//1.过滤掉异常数据后还有正常数据,则用正常数据计算
|
||||
if (CollectionUtil.isNotEmpty(filterList)) {
|
||||
result.addAll(filterList);
|
||||
}
|
||||
//2.过滤掉异常数据后没有正常数据,则用所有异常数据计算,但是需要标记数据为异常的
|
||||
else {
|
||||
v.parallelStream().forEach(item -> item.setQualityFlag("1"));
|
||||
result.addAll(v);
|
||||
}
|
||||
}
|
||||
//没有异常数据,则使用原数据
|
||||
else {
|
||||
result.addAll(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
//没有异常数据,则使用原数据
|
||||
else {
|
||||
result.addAll(list);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.dataProcess.dao.imapper.DataHarmphasicVMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPhasicVRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmphasicI;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmphasicV;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicVD;
|
||||
import com.njcn.dataProcess.service.IDataHarmphasicV;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -17,9 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -31,7 +36,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataHarmphasicVImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataHarmphasicVImpl implements IDataHarmphasicV {
|
||||
public class InfluxdbDataHarmphasicVImpl extends MppServiceImpl<RStatDataHarmPhasicVRelationMapper, RStatDataHarmPhasicVD> implements IDataHarmphasicV {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
|
||||
@@ -70,6 +75,107 @@ public class InfluxdbDataHarmphasicVImpl implements IDataHarmphasicV {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataHarmphasicV> data = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(data)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataHarmphasicV>> lineMap = data.stream().collect(Collectors.groupingBy(DataHarmphasicV::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataHarmphasicV>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataHarmphasicV::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
//以数据类型分组
|
||||
Map<String,List<DataHarmphasicV>> valueTypeMap = phasicTypeList.stream().collect(Collectors.groupingBy(DataHarmphasicV::getValueType));
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
valueTypeMap.forEach((valueType,valueTypeList)->{
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(valueType);
|
||||
//规定好集合指标参数
|
||||
List<Double> data12 = valueTypeList.stream().map(DataHarmphasicV::getV1).collect(Collectors.toList());
|
||||
List<Double> data13 = valueTypeList.stream().map(DataHarmphasicV::getV2).collect(Collectors.toList());
|
||||
List<Double> data14 = valueTypeList.stream().map(DataHarmphasicV::getV3).collect(Collectors.toList());
|
||||
List<Double> data15 = valueTypeList.stream().map(DataHarmphasicV::getV4).collect(Collectors.toList());
|
||||
List<Double> data16 = valueTypeList.stream().map(DataHarmphasicV::getV5).collect(Collectors.toList());
|
||||
List<Double> data17 = valueTypeList.stream().map(DataHarmphasicV::getV6).collect(Collectors.toList());
|
||||
List<Double> data18 = valueTypeList.stream().map(DataHarmphasicV::getV7).collect(Collectors.toList());
|
||||
List<Double> data19 = valueTypeList.stream().map(DataHarmphasicV::getV8).collect(Collectors.toList());
|
||||
List<Double> data20 = valueTypeList.stream().map(DataHarmphasicV::getV9).collect(Collectors.toList());
|
||||
List<Double> data21 = valueTypeList.stream().map(DataHarmphasicV::getV10).collect(Collectors.toList());
|
||||
List<Double> data22 = valueTypeList.stream().map(DataHarmphasicV::getV11).collect(Collectors.toList());
|
||||
List<Double> data23 = valueTypeList.stream().map(DataHarmphasicV::getV12).collect(Collectors.toList());
|
||||
List<Double> data24 = valueTypeList.stream().map(DataHarmphasicV::getV13).collect(Collectors.toList());
|
||||
List<Double> data25 = valueTypeList.stream().map(DataHarmphasicV::getV14).collect(Collectors.toList());
|
||||
List<Double> data26 = valueTypeList.stream().map(DataHarmphasicV::getV15).collect(Collectors.toList());
|
||||
List<Double> data27 = valueTypeList.stream().map(DataHarmphasicV::getV16).collect(Collectors.toList());
|
||||
List<Double> data28 = valueTypeList.stream().map(DataHarmphasicV::getV17).collect(Collectors.toList());
|
||||
List<Double> data29 = valueTypeList.stream().map(DataHarmphasicV::getV18).collect(Collectors.toList());
|
||||
List<Double> data30 = valueTypeList.stream().map(DataHarmphasicV::getV19).collect(Collectors.toList());
|
||||
List<Double> data31 = valueTypeList.stream().map(DataHarmphasicV::getV20).collect(Collectors.toList());
|
||||
List<Double> data32 = valueTypeList.stream().map(DataHarmphasicV::getV21).collect(Collectors.toList());
|
||||
List<Double> data33 = valueTypeList.stream().map(DataHarmphasicV::getV22).collect(Collectors.toList());
|
||||
List<Double> data34 = valueTypeList.stream().map(DataHarmphasicV::getV23).collect(Collectors.toList());
|
||||
List<Double> data35 = valueTypeList.stream().map(DataHarmphasicV::getV24).collect(Collectors.toList());
|
||||
List<Double> data36 = valueTypeList.stream().map(DataHarmphasicV::getV25).collect(Collectors.toList());
|
||||
List<Double> data37 = valueTypeList.stream().map(DataHarmphasicV::getV26).collect(Collectors.toList());
|
||||
List<Double> data38 = valueTypeList.stream().map(DataHarmphasicV::getV27).collect(Collectors.toList());
|
||||
List<Double> data39 = valueTypeList.stream().map(DataHarmphasicV::getV28).collect(Collectors.toList());
|
||||
List<Double> data40 = valueTypeList.stream().map(DataHarmphasicV::getV29).collect(Collectors.toList());
|
||||
List<Double> data41 = valueTypeList.stream().map(DataHarmphasicV::getV30).collect(Collectors.toList());
|
||||
List<Double> data42 = valueTypeList.stream().map(DataHarmphasicV::getV31).collect(Collectors.toList());
|
||||
List<Double> data43 = valueTypeList.stream().map(DataHarmphasicV::getV32).collect(Collectors.toList());
|
||||
List<Double> data44 = valueTypeList.stream().map(DataHarmphasicV::getV33).collect(Collectors.toList());
|
||||
List<Double> data45 = valueTypeList.stream().map(DataHarmphasicV::getV34).collect(Collectors.toList());
|
||||
List<Double> data46 = valueTypeList.stream().map(DataHarmphasicV::getV35).collect(Collectors.toList());
|
||||
List<Double> data47 = valueTypeList.stream().map(DataHarmphasicV::getV36).collect(Collectors.toList());
|
||||
List<Double> data48 = valueTypeList.stream().map(DataHarmphasicV::getV37).collect(Collectors.toList());
|
||||
List<Double> data49 = valueTypeList.stream().map(DataHarmphasicV::getV38).collect(Collectors.toList());
|
||||
List<Double> data50 = valueTypeList.stream().map(DataHarmphasicV::getV39).collect(Collectors.toList());
|
||||
List<Double> data51 = valueTypeList.stream().map(DataHarmphasicV::getV40).collect(Collectors.toList());
|
||||
List<Double> data52 = valueTypeList.stream().map(DataHarmphasicV::getV41).collect(Collectors.toList());
|
||||
List<Double> data53 = valueTypeList.stream().map(DataHarmphasicV::getV42).collect(Collectors.toList());
|
||||
List<Double> data54 = valueTypeList.stream().map(DataHarmphasicV::getV43).collect(Collectors.toList());
|
||||
List<Double> data55 = valueTypeList.stream().map(DataHarmphasicV::getV44).collect(Collectors.toList());
|
||||
List<Double> data56 = valueTypeList.stream().map(DataHarmphasicV::getV45).collect(Collectors.toList());
|
||||
List<Double> data57 = valueTypeList.stream().map(DataHarmphasicV::getV46).collect(Collectors.toList());
|
||||
List<Double> data58 = valueTypeList.stream().map(DataHarmphasicV::getV47).collect(Collectors.toList());
|
||||
List<Double> data59 = valueTypeList.stream().map(DataHarmphasicV::getV48).collect(Collectors.toList());
|
||||
List<Double> data60 = valueTypeList.stream().map(DataHarmphasicV::getV49).collect(Collectors.toList());
|
||||
List<Double> data61 = valueTypeList.stream().map(DataHarmphasicV::getV50).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data12,data13,data14,data15,data16
|
||||
,data17,data18,data19,data20,data21,data22,data23,data24,data25,data26
|
||||
,data27,data28,data29,data30,data31,data32,data33,data34,data35,data36
|
||||
,data37,data38,data39,data40,data41,data42,data43,data44,data45,data46
|
||||
,data47,data48,data49,data50,data51,data52,data53,data54,data55,data56
|
||||
,data57,data58,data59,data60,data61);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
});
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPhasicVDto> list) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.dao.imapper.DataHarmpowerPMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPowerPRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmphasicV;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmpowerP;
|
||||
import com.njcn.dataProcess.po.influx.DataI;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerPD;
|
||||
import com.njcn.dataProcess.service.IDataHarmpowerP;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -19,10 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -34,7 +36,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataHarmpowerPImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataHarmpowerPImpl implements IDataHarmpowerP {
|
||||
public class InfluxdbDataHarmpowerPImpl extends MppServiceImpl<RStatDataHarmPowerPRelationMapper, RStatDataHarmPowerPD> implements IDataHarmpowerP {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
|
||||
@@ -72,8 +74,113 @@ public class InfluxdbDataHarmpowerPImpl implements IDataHarmpowerP {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataHarmpowerP> data = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(data)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataHarmpowerP>> lineMap = data.stream().collect(Collectors.groupingBy(DataHarmpowerP::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataHarmpowerP>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataHarmpowerP::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
//以数据类型分组
|
||||
Map<String,List<DataHarmpowerP>> valueTypeMap = phasicTypeList.stream().collect(Collectors.groupingBy(DataHarmpowerP::getValueType));
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
valueTypeMap.forEach((valueType,valueTypeList)->{
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(valueType);
|
||||
//规定好集合指标参数
|
||||
List<Double> data1 = valueTypeList.stream().map(DataHarmpowerP::getDf).collect(Collectors.toList());
|
||||
List<Double> data2 = valueTypeList.stream().map(DataHarmpowerP::getPf).collect(Collectors.toList());
|
||||
List<Double> data3 = valueTypeList.stream().map(DataHarmpowerP::getP).collect(Collectors.toList());
|
||||
|
||||
List<Double> data12 = valueTypeList.stream().map(DataHarmpowerP::getP1).collect(Collectors.toList());
|
||||
List<Double> data13 = valueTypeList.stream().map(DataHarmpowerP::getP2).collect(Collectors.toList());
|
||||
List<Double> data14 = valueTypeList.stream().map(DataHarmpowerP::getP3).collect(Collectors.toList());
|
||||
List<Double> data15 = valueTypeList.stream().map(DataHarmpowerP::getP4).collect(Collectors.toList());
|
||||
List<Double> data16 = valueTypeList.stream().map(DataHarmpowerP::getP5).collect(Collectors.toList());
|
||||
List<Double> data17 = valueTypeList.stream().map(DataHarmpowerP::getP6).collect(Collectors.toList());
|
||||
List<Double> data18 = valueTypeList.stream().map(DataHarmpowerP::getP7).collect(Collectors.toList());
|
||||
List<Double> data19 = valueTypeList.stream().map(DataHarmpowerP::getP8).collect(Collectors.toList());
|
||||
List<Double> data20 = valueTypeList.stream().map(DataHarmpowerP::getP9).collect(Collectors.toList());
|
||||
List<Double> data21 = valueTypeList.stream().map(DataHarmpowerP::getP10).collect(Collectors.toList());
|
||||
List<Double> data22 = valueTypeList.stream().map(DataHarmpowerP::getP11).collect(Collectors.toList());
|
||||
List<Double> data23 = valueTypeList.stream().map(DataHarmpowerP::getP12).collect(Collectors.toList());
|
||||
List<Double> data24 = valueTypeList.stream().map(DataHarmpowerP::getP13).collect(Collectors.toList());
|
||||
List<Double> data25 = valueTypeList.stream().map(DataHarmpowerP::getP14).collect(Collectors.toList());
|
||||
List<Double> data26 = valueTypeList.stream().map(DataHarmpowerP::getP15).collect(Collectors.toList());
|
||||
List<Double> data27 = valueTypeList.stream().map(DataHarmpowerP::getP16).collect(Collectors.toList());
|
||||
List<Double> data28 = valueTypeList.stream().map(DataHarmpowerP::getP17).collect(Collectors.toList());
|
||||
List<Double> data29 = valueTypeList.stream().map(DataHarmpowerP::getP18).collect(Collectors.toList());
|
||||
List<Double> data30 = valueTypeList.stream().map(DataHarmpowerP::getP19).collect(Collectors.toList());
|
||||
List<Double> data31 = valueTypeList.stream().map(DataHarmpowerP::getP20).collect(Collectors.toList());
|
||||
List<Double> data32 = valueTypeList.stream().map(DataHarmpowerP::getP21).collect(Collectors.toList());
|
||||
List<Double> data33 = valueTypeList.stream().map(DataHarmpowerP::getP22).collect(Collectors.toList());
|
||||
List<Double> data34 = valueTypeList.stream().map(DataHarmpowerP::getP23).collect(Collectors.toList());
|
||||
List<Double> data35 = valueTypeList.stream().map(DataHarmpowerP::getP24).collect(Collectors.toList());
|
||||
List<Double> data36 = valueTypeList.stream().map(DataHarmpowerP::getP25).collect(Collectors.toList());
|
||||
List<Double> data37 = valueTypeList.stream().map(DataHarmpowerP::getP26).collect(Collectors.toList());
|
||||
List<Double> data38 = valueTypeList.stream().map(DataHarmpowerP::getP27).collect(Collectors.toList());
|
||||
List<Double> data39 = valueTypeList.stream().map(DataHarmpowerP::getP28).collect(Collectors.toList());
|
||||
List<Double> data40 = valueTypeList.stream().map(DataHarmpowerP::getP29).collect(Collectors.toList());
|
||||
List<Double> data41 = valueTypeList.stream().map(DataHarmpowerP::getP30).collect(Collectors.toList());
|
||||
List<Double> data42 = valueTypeList.stream().map(DataHarmpowerP::getP31).collect(Collectors.toList());
|
||||
List<Double> data43 = valueTypeList.stream().map(DataHarmpowerP::getP32).collect(Collectors.toList());
|
||||
List<Double> data44 = valueTypeList.stream().map(DataHarmpowerP::getP33).collect(Collectors.toList());
|
||||
List<Double> data45 = valueTypeList.stream().map(DataHarmpowerP::getP34).collect(Collectors.toList());
|
||||
List<Double> data46 = valueTypeList.stream().map(DataHarmpowerP::getP35).collect(Collectors.toList());
|
||||
List<Double> data47 = valueTypeList.stream().map(DataHarmpowerP::getP36).collect(Collectors.toList());
|
||||
List<Double> data48 = valueTypeList.stream().map(DataHarmpowerP::getP37).collect(Collectors.toList());
|
||||
List<Double> data49 = valueTypeList.stream().map(DataHarmpowerP::getP38).collect(Collectors.toList());
|
||||
List<Double> data50 = valueTypeList.stream().map(DataHarmpowerP::getP39).collect(Collectors.toList());
|
||||
List<Double> data51 = valueTypeList.stream().map(DataHarmpowerP::getP40).collect(Collectors.toList());
|
||||
List<Double> data52 = valueTypeList.stream().map(DataHarmpowerP::getP41).collect(Collectors.toList());
|
||||
List<Double> data53 = valueTypeList.stream().map(DataHarmpowerP::getP42).collect(Collectors.toList());
|
||||
List<Double> data54 = valueTypeList.stream().map(DataHarmpowerP::getP43).collect(Collectors.toList());
|
||||
List<Double> data55 = valueTypeList.stream().map(DataHarmpowerP::getP44).collect(Collectors.toList());
|
||||
List<Double> data56 = valueTypeList.stream().map(DataHarmpowerP::getP45).collect(Collectors.toList());
|
||||
List<Double> data57 = valueTypeList.stream().map(DataHarmpowerP::getP46).collect(Collectors.toList());
|
||||
List<Double> data58 = valueTypeList.stream().map(DataHarmpowerP::getP47).collect(Collectors.toList());
|
||||
List<Double> data59 = valueTypeList.stream().map(DataHarmpowerP::getP48).collect(Collectors.toList());
|
||||
List<Double> data60 = valueTypeList.stream().map(DataHarmpowerP::getP49).collect(Collectors.toList());
|
||||
List<Double> data61 = valueTypeList.stream().map(DataHarmpowerP::getP50).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data1,data2,data3,data12,data13,data14
|
||||
,data15,data16,data17,data18,data19,data20,data21,data22,data23,data24
|
||||
,data25,data26,data27,data28,data29,data30,data31,data32,data33,data34
|
||||
,data35,data36,data37,data38,data39,data40,data41,data42,data43,data44
|
||||
,data45,data46,data47,data48,data49,data50,data51,data52,data53,data54
|
||||
,data55,data56,data57,data58,data59,data60,data61);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
});
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPowerPDto> list) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取dataI分钟数据
|
||||
* 按监测点集合、时间条件获取分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
* 需要进行剔除异常数据时,这里会有三种情况判断
|
||||
* 1.无异常数据,则直接返回集合;
|
||||
|
||||
@@ -1,15 +1,28 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerQDTO;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.dataProcess.dao.imapper.DataHarmpowerQMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPowerQRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerQDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmpowerP;
|
||||
import com.njcn.dataProcess.po.influx.DataHarmpowerQ;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerQDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerQD;
|
||||
import com.njcn.dataProcess.service.IDataHarmpowerQ;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -21,8 +34,9 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataHarmpowerQImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataHarmpowerQImpl implements IDataHarmpowerQ {
|
||||
public class InfluxdbDataHarmpowerQImpl extends MppServiceImpl<RStatDataHarmPowerQRelationMapper, RStatDataHarmPowerQD> implements IDataHarmpowerQ {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
private final DataHarmpowerQMapper dataHarmpowerQMapper;
|
||||
|
||||
|
||||
@@ -43,4 +57,160 @@ public class InfluxdbDataHarmpowerQImpl implements IDataHarmpowerQ {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataHarmpowerQ> data = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(data)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataHarmpowerQ>> lineMap = data.stream().collect(Collectors.groupingBy(DataHarmpowerQ::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataHarmpowerQ>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataHarmpowerQ::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
//以数据类型分组
|
||||
Map<String,List<DataHarmpowerQ>> valueTypeMap = phasicTypeList.stream().collect(Collectors.groupingBy(DataHarmpowerQ::getValueType));
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
valueTypeMap.forEach((valueType,valueTypeList)->{
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(valueType);
|
||||
//规定好集合指标参数
|
||||
List<Double> data1 = valueTypeList.stream().map(DataHarmpowerQ::getQ).collect(Collectors.toList());
|
||||
|
||||
List<Double> data12 = valueTypeList.stream().map(DataHarmpowerQ::getQ1).collect(Collectors.toList());
|
||||
List<Double> data13 = valueTypeList.stream().map(DataHarmpowerQ::getQ2).collect(Collectors.toList());
|
||||
List<Double> data14 = valueTypeList.stream().map(DataHarmpowerQ::getQ3).collect(Collectors.toList());
|
||||
List<Double> data15 = valueTypeList.stream().map(DataHarmpowerQ::getQ4).collect(Collectors.toList());
|
||||
List<Double> data16 = valueTypeList.stream().map(DataHarmpowerQ::getQ5).collect(Collectors.toList());
|
||||
List<Double> data17 = valueTypeList.stream().map(DataHarmpowerQ::getQ6).collect(Collectors.toList());
|
||||
List<Double> data18 = valueTypeList.stream().map(DataHarmpowerQ::getQ7).collect(Collectors.toList());
|
||||
List<Double> data19 = valueTypeList.stream().map(DataHarmpowerQ::getQ8).collect(Collectors.toList());
|
||||
List<Double> data20 = valueTypeList.stream().map(DataHarmpowerQ::getQ9).collect(Collectors.toList());
|
||||
List<Double> data21 = valueTypeList.stream().map(DataHarmpowerQ::getQ10).collect(Collectors.toList());
|
||||
List<Double> data22 = valueTypeList.stream().map(DataHarmpowerQ::getQ11).collect(Collectors.toList());
|
||||
List<Double> data23 = valueTypeList.stream().map(DataHarmpowerQ::getQ12).collect(Collectors.toList());
|
||||
List<Double> data24 = valueTypeList.stream().map(DataHarmpowerQ::getQ13).collect(Collectors.toList());
|
||||
List<Double> data25 = valueTypeList.stream().map(DataHarmpowerQ::getQ14).collect(Collectors.toList());
|
||||
List<Double> data26 = valueTypeList.stream().map(DataHarmpowerQ::getQ15).collect(Collectors.toList());
|
||||
List<Double> data27 = valueTypeList.stream().map(DataHarmpowerQ::getQ16).collect(Collectors.toList());
|
||||
List<Double> data28 = valueTypeList.stream().map(DataHarmpowerQ::getQ17).collect(Collectors.toList());
|
||||
List<Double> data29 = valueTypeList.stream().map(DataHarmpowerQ::getQ18).collect(Collectors.toList());
|
||||
List<Double> data30 = valueTypeList.stream().map(DataHarmpowerQ::getQ19).collect(Collectors.toList());
|
||||
List<Double> data31 = valueTypeList.stream().map(DataHarmpowerQ::getQ20).collect(Collectors.toList());
|
||||
List<Double> data32 = valueTypeList.stream().map(DataHarmpowerQ::getQ21).collect(Collectors.toList());
|
||||
List<Double> data33 = valueTypeList.stream().map(DataHarmpowerQ::getQ22).collect(Collectors.toList());
|
||||
List<Double> data34 = valueTypeList.stream().map(DataHarmpowerQ::getQ23).collect(Collectors.toList());
|
||||
List<Double> data35 = valueTypeList.stream().map(DataHarmpowerQ::getQ24).collect(Collectors.toList());
|
||||
List<Double> data36 = valueTypeList.stream().map(DataHarmpowerQ::getQ25).collect(Collectors.toList());
|
||||
List<Double> data37 = valueTypeList.stream().map(DataHarmpowerQ::getQ26).collect(Collectors.toList());
|
||||
List<Double> data38 = valueTypeList.stream().map(DataHarmpowerQ::getQ27).collect(Collectors.toList());
|
||||
List<Double> data39 = valueTypeList.stream().map(DataHarmpowerQ::getQ28).collect(Collectors.toList());
|
||||
List<Double> data40 = valueTypeList.stream().map(DataHarmpowerQ::getQ29).collect(Collectors.toList());
|
||||
List<Double> data41 = valueTypeList.stream().map(DataHarmpowerQ::getQ30).collect(Collectors.toList());
|
||||
List<Double> data42 = valueTypeList.stream().map(DataHarmpowerQ::getQ31).collect(Collectors.toList());
|
||||
List<Double> data43 = valueTypeList.stream().map(DataHarmpowerQ::getQ32).collect(Collectors.toList());
|
||||
List<Double> data44 = valueTypeList.stream().map(DataHarmpowerQ::getQ33).collect(Collectors.toList());
|
||||
List<Double> data45 = valueTypeList.stream().map(DataHarmpowerQ::getQ34).collect(Collectors.toList());
|
||||
List<Double> data46 = valueTypeList.stream().map(DataHarmpowerQ::getQ35).collect(Collectors.toList());
|
||||
List<Double> data47 = valueTypeList.stream().map(DataHarmpowerQ::getQ36).collect(Collectors.toList());
|
||||
List<Double> data48 = valueTypeList.stream().map(DataHarmpowerQ::getQ37).collect(Collectors.toList());
|
||||
List<Double> data49 = valueTypeList.stream().map(DataHarmpowerQ::getQ38).collect(Collectors.toList());
|
||||
List<Double> data50 = valueTypeList.stream().map(DataHarmpowerQ::getQ39).collect(Collectors.toList());
|
||||
List<Double> data51 = valueTypeList.stream().map(DataHarmpowerQ::getQ40).collect(Collectors.toList());
|
||||
List<Double> data52 = valueTypeList.stream().map(DataHarmpowerQ::getQ41).collect(Collectors.toList());
|
||||
List<Double> data53 = valueTypeList.stream().map(DataHarmpowerQ::getQ42).collect(Collectors.toList());
|
||||
List<Double> data54 = valueTypeList.stream().map(DataHarmpowerQ::getQ43).collect(Collectors.toList());
|
||||
List<Double> data55 = valueTypeList.stream().map(DataHarmpowerQ::getQ44).collect(Collectors.toList());
|
||||
List<Double> data56 = valueTypeList.stream().map(DataHarmpowerQ::getQ45).collect(Collectors.toList());
|
||||
List<Double> data57 = valueTypeList.stream().map(DataHarmpowerQ::getQ46).collect(Collectors.toList());
|
||||
List<Double> data58 = valueTypeList.stream().map(DataHarmpowerQ::getQ47).collect(Collectors.toList());
|
||||
List<Double> data59 = valueTypeList.stream().map(DataHarmpowerQ::getQ48).collect(Collectors.toList());
|
||||
List<Double> data60 = valueTypeList.stream().map(DataHarmpowerQ::getQ49).collect(Collectors.toList());
|
||||
List<Double> data61 = valueTypeList.stream().map(DataHarmpowerQ::getQ50).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data1,data12,data13,data14
|
||||
,data15,data16,data17,data18,data19,data20,data21,data22,data23,data24
|
||||
,data25,data26,data27,data28,data29,data30,data31,data32,data33,data34
|
||||
,data35,data36,data37,data38,data39,data40,data41,data42,data43,data44
|
||||
,data45,data46,data47,data48,data49,data50,data51,data52,data53,data54
|
||||
,data55,data56,data57,data58,data59,data60,data61);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
});
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPowerQDto> list) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
* 需要进行剔除异常数据时,这里会有三种情况判断
|
||||
* 1.无异常数据,则直接返回集合;
|
||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||
*/
|
||||
public List<DataHarmpowerQ> getMinuteData(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
||||
List<DataHarmpowerQ> result = new ArrayList<>();
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||
influxQueryWrapper.regular(DataHarmpowerQ::getLineId, lineList)
|
||||
.select(DataHarmpowerQ::getLineId)
|
||||
.select(DataHarmpowerQ::getPhasicType)
|
||||
.select(DataHarmpowerQ::getValueType)
|
||||
.select(DataHarmpowerQ::getQ)
|
||||
.select(DataHarmpowerQ::getQualityFlag)
|
||||
.between(DataHarmpowerQ::getTime, startTime, endTime)
|
||||
.eq(DataHarmpowerQ::getQualityFlag,"0");
|
||||
List<DataHarmpowerQ> list = dataHarmpowerQMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||
Map<String,List<DataHarmpowerQ>> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmpowerQ::getLineId));
|
||||
//有异常数据
|
||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
||||
lineMap.forEach((k,v)->{
|
||||
List<String> timeList = timeMap.get(k);
|
||||
//有异常数据,当前监测点自身的异常数据
|
||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||
List<DataHarmpowerQ> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||
//1.过滤掉异常数据后还有正常数据,则用正常数据计算
|
||||
if (CollectionUtil.isNotEmpty(filterList)) {
|
||||
result.addAll(filterList);
|
||||
}
|
||||
//2.过滤掉异常数据后没有正常数据,则用所有异常数据计算,但是需要标记数据为异常的
|
||||
else {
|
||||
v.parallelStream().forEach(item -> item.setQualityFlag("1"));
|
||||
result.addAll(v);
|
||||
}
|
||||
}
|
||||
//没有异常数据,则使用原数据
|
||||
else {
|
||||
result.addAll(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
//没有异常数据,则使用原数据
|
||||
else {
|
||||
result.addAll(list);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.dataProcess.dao.imapper.DataIMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataIRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataI;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
||||
import com.njcn.dataProcess.service.IDataI;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -18,6 +23,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -31,7 +37,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("InfluxdbDataIImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataIImpl implements IDataI {
|
||||
public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper, RStatDataID> implements IDataI {
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
|
||||
@@ -69,6 +75,115 @@ public class InfluxdbDataIImpl implements IDataI {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
List<CommonMinuteDto> result = new ArrayList<>();
|
||||
List<DataI> dataIList = getMinuteDataI(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
||||
if (CollectionUtil.isNotEmpty(dataIList)) {
|
||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||
//以监测点分组
|
||||
Map<String,List<DataI>> lineMap = dataIList.stream().collect(Collectors.groupingBy(DataI::getLineId));
|
||||
lineMap.forEach((line,lineList)->{
|
||||
CommonMinuteDto dto = new CommonMinuteDto();
|
||||
dto.setLineId(line);
|
||||
dto.setTime(time);
|
||||
dto.setQualityFlag(lineList.get(0).getQualityFlag());
|
||||
//以相别分组
|
||||
Map<String,List<DataI>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataI::getPhasicType));
|
||||
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
|
||||
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
|
||||
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
|
||||
type.setPhasicType(phasicType);
|
||||
//以数据类型分组
|
||||
Map<String,List<DataI>> valueTypeMap = phasicTypeList.stream().collect(Collectors.groupingBy(DataI::getValueType));
|
||||
List<CommonMinuteDto.ValueType> valueTypes = new ArrayList<>();
|
||||
valueTypeMap.forEach((valueType,valueTypeList)->{
|
||||
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
|
||||
value.setValueType(valueType);
|
||||
//规定好集合指标参数
|
||||
List<Double> data1 = valueTypeList.stream().map(DataI::getINeg).collect(Collectors.toList());
|
||||
List<Double> data2 = valueTypeList.stream().map(DataI::getIPos).collect(Collectors.toList());
|
||||
List<Double> data3 = valueTypeList.stream().map(DataI::getIThd).collect(Collectors.toList());
|
||||
List<Double> data4 = valueTypeList.stream().map(DataI::getIUnbalance).collect(Collectors.toList());
|
||||
List<Double> data5 = valueTypeList.stream().map(DataI::getIZero).collect(Collectors.toList());
|
||||
List<Double> data6 = valueTypeList.stream().map(DataI::getRms).collect(Collectors.toList());
|
||||
|
||||
List<Double> data12 = valueTypeList.stream().map(DataI::getI1).collect(Collectors.toList());
|
||||
List<Double> data13 = valueTypeList.stream().map(DataI::getI2).collect(Collectors.toList());
|
||||
List<Double> data14 = valueTypeList.stream().map(DataI::getI3).collect(Collectors.toList());
|
||||
List<Double> data15 = valueTypeList.stream().map(DataI::getI4).collect(Collectors.toList());
|
||||
List<Double> data16 = valueTypeList.stream().map(DataI::getI5).collect(Collectors.toList());
|
||||
List<Double> data17 = valueTypeList.stream().map(DataI::getI6).collect(Collectors.toList());
|
||||
List<Double> data18 = valueTypeList.stream().map(DataI::getI7).collect(Collectors.toList());
|
||||
List<Double> data19 = valueTypeList.stream().map(DataI::getI8).collect(Collectors.toList());
|
||||
List<Double> data20 = valueTypeList.stream().map(DataI::getI9).collect(Collectors.toList());
|
||||
List<Double> data21 = valueTypeList.stream().map(DataI::getI10).collect(Collectors.toList());
|
||||
List<Double> data22 = valueTypeList.stream().map(DataI::getI11).collect(Collectors.toList());
|
||||
List<Double> data23 = valueTypeList.stream().map(DataI::getI12).collect(Collectors.toList());
|
||||
List<Double> data24 = valueTypeList.stream().map(DataI::getI13).collect(Collectors.toList());
|
||||
List<Double> data25 = valueTypeList.stream().map(DataI::getI14).collect(Collectors.toList());
|
||||
List<Double> data26 = valueTypeList.stream().map(DataI::getI15).collect(Collectors.toList());
|
||||
List<Double> data27 = valueTypeList.stream().map(DataI::getI16).collect(Collectors.toList());
|
||||
List<Double> data28 = valueTypeList.stream().map(DataI::getI17).collect(Collectors.toList());
|
||||
List<Double> data29 = valueTypeList.stream().map(DataI::getI18).collect(Collectors.toList());
|
||||
List<Double> data30 = valueTypeList.stream().map(DataI::getI19).collect(Collectors.toList());
|
||||
List<Double> data31 = valueTypeList.stream().map(DataI::getI20).collect(Collectors.toList());
|
||||
List<Double> data32 = valueTypeList.stream().map(DataI::getI21).collect(Collectors.toList());
|
||||
List<Double> data33 = valueTypeList.stream().map(DataI::getI22).collect(Collectors.toList());
|
||||
List<Double> data34 = valueTypeList.stream().map(DataI::getI23).collect(Collectors.toList());
|
||||
List<Double> data35 = valueTypeList.stream().map(DataI::getI24).collect(Collectors.toList());
|
||||
List<Double> data36 = valueTypeList.stream().map(DataI::getI25).collect(Collectors.toList());
|
||||
List<Double> data37 = valueTypeList.stream().map(DataI::getI26).collect(Collectors.toList());
|
||||
List<Double> data38 = valueTypeList.stream().map(DataI::getI27).collect(Collectors.toList());
|
||||
List<Double> data39 = valueTypeList.stream().map(DataI::getI28).collect(Collectors.toList());
|
||||
List<Double> data40 = valueTypeList.stream().map(DataI::getI29).collect(Collectors.toList());
|
||||
List<Double> data41 = valueTypeList.stream().map(DataI::getI30).collect(Collectors.toList());
|
||||
List<Double> data42 = valueTypeList.stream().map(DataI::getI31).collect(Collectors.toList());
|
||||
List<Double> data43 = valueTypeList.stream().map(DataI::getI32).collect(Collectors.toList());
|
||||
List<Double> data44 = valueTypeList.stream().map(DataI::getI33).collect(Collectors.toList());
|
||||
List<Double> data45 = valueTypeList.stream().map(DataI::getI34).collect(Collectors.toList());
|
||||
List<Double> data46 = valueTypeList.stream().map(DataI::getI35).collect(Collectors.toList());
|
||||
List<Double> data47 = valueTypeList.stream().map(DataI::getI36).collect(Collectors.toList());
|
||||
List<Double> data48 = valueTypeList.stream().map(DataI::getI37).collect(Collectors.toList());
|
||||
List<Double> data49 = valueTypeList.stream().map(DataI::getI38).collect(Collectors.toList());
|
||||
List<Double> data50 = valueTypeList.stream().map(DataI::getI39).collect(Collectors.toList());
|
||||
List<Double> data51 = valueTypeList.stream().map(DataI::getI40).collect(Collectors.toList());
|
||||
List<Double> data52 = valueTypeList.stream().map(DataI::getI41).collect(Collectors.toList());
|
||||
List<Double> data53 = valueTypeList.stream().map(DataI::getI42).collect(Collectors.toList());
|
||||
List<Double> data54 = valueTypeList.stream().map(DataI::getI43).collect(Collectors.toList());
|
||||
List<Double> data55 = valueTypeList.stream().map(DataI::getI44).collect(Collectors.toList());
|
||||
List<Double> data56 = valueTypeList.stream().map(DataI::getI45).collect(Collectors.toList());
|
||||
List<Double> data57 = valueTypeList.stream().map(DataI::getI46).collect(Collectors.toList());
|
||||
List<Double> data58 = valueTypeList.stream().map(DataI::getI47).collect(Collectors.toList());
|
||||
List<Double> data59 = valueTypeList.stream().map(DataI::getI48).collect(Collectors.toList());
|
||||
List<Double> data60 = valueTypeList.stream().map(DataI::getI49).collect(Collectors.toList());
|
||||
List<Double> data61 = valueTypeList.stream().map(DataI::getI50).collect(Collectors.toList());
|
||||
|
||||
List<List<Double>> lists = Arrays.asList(data1,data2,data3,data4,data5,data6
|
||||
,data12,data13,data14,data15,data16,data17,data18,data19,data20
|
||||
,data21,data22,data23,data24,data25,data26,data27,data28,data29,data30
|
||||
,data31,data32,data33,data34,data35,data36,data37,data38,data39,data40
|
||||
,data41,data42,data43,data44,data45,data46,data47,data48,data49,data50
|
||||
,data51,data52,data53,data54,data55,data56,data57,data58,data59,data60
|
||||
,data61);
|
||||
value.setValueList(lists);
|
||||
valueTypes.add(value);
|
||||
});
|
||||
type.setValueTypeList(valueTypes);
|
||||
phasicTypes.add(type);
|
||||
});
|
||||
dto.setPhasicTypeList(phasicTypes);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataIDto> dataIDtoList) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按监测点集合、时间条件获取dataI分钟数据
|
||||
* timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataFlickerRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataFlickerRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataFlicker;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlickerDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlickerD;
|
||||
import com.njcn.dataProcess.service.IDataFlicker;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -26,9 +32,12 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("RelationDataFlickerImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataFlickerImpl implements IDataFlicker {
|
||||
public class RelationDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRelationMapper, RStatDataFlickerD> implements IDataFlicker {
|
||||
private final DataFlickerRelationMapper dataFlickerRelationMapper;
|
||||
|
||||
@Resource
|
||||
private IDataFlicker dataFlicker;
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataFlickerDTO> dataFlickerDTOList) {
|
||||
int totalCount = dataFlickerDTOList.size();
|
||||
@@ -61,4 +70,23 @@ public class RelationDataFlickerImpl implements IDataFlicker {
|
||||
public List<DataFlickerDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataFlickerDto> dataIDtoList) {
|
||||
List<RStatDataFlickerD> result = new ArrayList<>();
|
||||
dataIDtoList.forEach(item->{
|
||||
RStatDataFlickerD data = new RStatDataFlickerD();
|
||||
data.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
data.setPhasicType(item.getPhasicType());
|
||||
data.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, data);
|
||||
result.add(data);
|
||||
});
|
||||
dataFlicker.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataFlucRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataFlucRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataFluc;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlucDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataFlucD;
|
||||
import com.njcn.dataProcess.service.IDataFluc;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -26,8 +32,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("RelationDataFlucImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataFlucImpl implements IDataFluc {
|
||||
public class RelationDataFlucImpl extends MppServiceImpl<RStatDataFlucRelationMapper, RStatDataFlucD> implements IDataFluc {
|
||||
private final DataFlucRelationMapper dataFlucRelationMapper;
|
||||
|
||||
@Resource
|
||||
private IDataFluc dataFluc;
|
||||
@Override
|
||||
public void batchInsertion(List<DataFlucDTO> dataFlucDTOList) {
|
||||
int totalCount = dataFlucDTOList.size();
|
||||
@@ -53,5 +62,24 @@ public class RelationDataFlucImpl implements IDataFluc {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataFlucDto> dataFlucDtoList) {
|
||||
List<RStatDataFlucD> result = new ArrayList<>();
|
||||
dataFlucDtoList.forEach(item->{
|
||||
RStatDataFlucD data = new RStatDataFlucD();
|
||||
data.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
data.setPhasicType(item.getPhasicType());
|
||||
data.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, data);
|
||||
result.add(data);
|
||||
});
|
||||
dataFluc.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataHarmphasicIRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPhasicIRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataHarmphasicI;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicIDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicID;
|
||||
import com.njcn.dataProcess.service.IDataHarmphasicI;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -23,10 +32,13 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("RelationDataHarmphasicIImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataHarmphasicIImpl implements IDataHarmphasicI {
|
||||
public class RelationDataHarmphasicIImpl extends MppServiceImpl<RStatDataHarmPhasicIRelationMapper, RStatDataHarmPhasicID> implements IDataHarmphasicI {
|
||||
|
||||
private final DataHarmphasicIRelationMapper dataHarmphasicIRelationMapper;
|
||||
|
||||
@Resource
|
||||
private IDataHarmphasicI dataHarmphasicI;
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataHarmphasicIDTO> dataHarmphasicIDTOList) {
|
||||
int totalCount = dataHarmphasicIDTOList.size();
|
||||
@@ -54,4 +66,23 @@ public class RelationDataHarmphasicIImpl implements IDataHarmphasicI {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPhasicIDto> list) {
|
||||
List<RStatDataHarmPhasicID> result = new ArrayList<>();
|
||||
list.forEach(item->{
|
||||
RStatDataHarmPhasicID data = new RStatDataHarmPhasicID();
|
||||
data.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
data.setPhasicType(item.getPhasicType());
|
||||
data.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, data);
|
||||
result.add(data);
|
||||
});
|
||||
dataHarmphasicI.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataHarmphasicVRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPhasicVRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataHarmphasicV;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPhasicVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPhasicVD;
|
||||
import com.njcn.dataProcess.service.IDataHarmphasicV;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -25,8 +33,12 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("RelationDataHarmphasicVImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataHarmphasicVImpl implements IDataHarmphasicV {
|
||||
public class RelationDataHarmphasicVImpl extends MppServiceImpl<RStatDataHarmPhasicVRelationMapper, RStatDataHarmPhasicVD> implements IDataHarmphasicV {
|
||||
|
||||
private final DataHarmphasicVRelationMapper dataHarmphasicVRelationMapper;
|
||||
@Resource
|
||||
private IDataHarmphasicV dataHarmphasicV;
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataHarmphasicVDTO> dataHarmphasicVDTOList) {
|
||||
int totalCount = dataHarmphasicVDTOList.size();
|
||||
@@ -58,5 +70,24 @@ public class RelationDataHarmphasicVImpl implements IDataHarmphasicV {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPhasicVDto> list) {
|
||||
List<RStatDataHarmPhasicVD> result = new ArrayList<>();
|
||||
list.forEach(item->{
|
||||
RStatDataHarmPhasicVD data = new RStatDataHarmPhasicVD();
|
||||
data.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
data.setPhasicType(item.getPhasicType());
|
||||
data.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, data);
|
||||
result.add(data);
|
||||
});
|
||||
dataHarmphasicV.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataHarmpowerPRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPowerPRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataHarmpowerP;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPowerPDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerPD;
|
||||
import com.njcn.dataProcess.service.IDataHarmpowerP;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -26,9 +33,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("RelationDataHarmpowerPImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataHarmpowerPImpl implements IDataHarmpowerP {
|
||||
public class RelationDataHarmpowerPImpl extends MppServiceImpl<RStatDataHarmPowerPRelationMapper, RStatDataHarmPowerPD> implements IDataHarmpowerP {
|
||||
|
||||
private final DataHarmpowerPRelationMapper dataHarmpowerPRelationMapper;
|
||||
@Resource
|
||||
private IDataHarmpowerP dataHarmPowerP;
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataHarmpowerPDTO> dataHarmpowerPDTOList) {
|
||||
@@ -61,4 +70,23 @@ public class RelationDataHarmpowerPImpl implements IDataHarmpowerP {
|
||||
public List<DataPowerPDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPowerPDto> list) {
|
||||
List<RStatDataHarmPowerPD> result = new ArrayList<>();
|
||||
list.forEach(item->{
|
||||
RStatDataHarmPowerPD data = new RStatDataHarmPowerPD();
|
||||
data.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
data.setPhasicType(item.getPhasicType());
|
||||
data.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, data);
|
||||
result.add(data);
|
||||
});
|
||||
dataHarmPowerP.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerQDTO;
|
||||
import com.njcn.dataProcess.po.relation.DataHarmpowerQ;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataHarmpowerQRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmPowerQRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerQDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataHarmpowerQ;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmPowerQDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataHarmPowerQD;
|
||||
import com.njcn.dataProcess.service.IDataHarmpowerQ;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -24,8 +34,10 @@ import java.util.stream.Collectors;
|
||||
@Service("RelationDataHarmpowerQImpl")
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class RelationDataHarmpowerQImpl implements IDataHarmpowerQ {
|
||||
public class RelationDataHarmpowerQImpl extends MppServiceImpl<RStatDataHarmPowerQRelationMapper, RStatDataHarmPowerQD> implements IDataHarmpowerQ {
|
||||
private final DataHarmpowerQRelationMapper dataHarmpowerQRelationMapper;
|
||||
@Resource
|
||||
private IDataHarmpowerQ dataHarmpowerQ;
|
||||
@Override
|
||||
public void batchInsertion(List<DataHarmpowerQDTO> dataHarmpowerQDTOList) {
|
||||
int totalCount = dataHarmpowerQDTOList.size();
|
||||
@@ -56,4 +68,23 @@ public class RelationDataHarmpowerQImpl implements IDataHarmpowerQ {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataHarmPowerQDto> list) {
|
||||
List<RStatDataHarmPowerQD> result = new ArrayList<>();
|
||||
list.forEach(item->{
|
||||
RStatDataHarmPowerQD data = new RStatDataHarmPowerQD();
|
||||
data.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
data.setPhasicType(item.getPhasicType());
|
||||
data.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, data);
|
||||
result.add(data);
|
||||
});
|
||||
dataHarmpowerQ.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataIRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataIRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataI;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
||||
import com.njcn.dataProcess.service.IDataI;
|
||||
import com.njcn.dataProcess.util.BeanFeildUtils;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -27,9 +32,14 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("RelationDataIImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataIImpl implements IDataI {
|
||||
public class RelationDataIImpl extends MppServiceImpl<RStatDataIRelationMapper, RStatDataID> implements IDataI {
|
||||
@Resource
|
||||
private DataIRelationMapper dataIRelationMapper;
|
||||
|
||||
@Resource
|
||||
private IDataI iDataI;
|
||||
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataIDTO> dataIDTOList) {
|
||||
int totalCount = dataIDTOList.size();
|
||||
@@ -59,4 +69,23 @@ public class RelationDataIImpl implements IDataI {
|
||||
public List<DataIDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DataIDto> dataIDtoList) {
|
||||
List<RStatDataID> result = new ArrayList<>();
|
||||
dataIDtoList.forEach(item->{
|
||||
RStatDataID dataI = new RStatDataID();
|
||||
dataI.setTime(TimeUtils.LocalDataTimeToLocalDate2(item.getTime()));
|
||||
dataI.setPhasicType(item.getPhasicType());
|
||||
dataI.setQualityFlag(Integer.valueOf(item.getQualityFlag()));
|
||||
BeanUtils.copyProperties(item, dataI);
|
||||
result.add(dataI);
|
||||
});
|
||||
iDataI.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ public class RelationDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
||||
private DataVRelationMapper dataVRelationMapper;
|
||||
|
||||
@Resource
|
||||
@InsertBean
|
||||
private IDataV iDataV;
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user