超高压数据中心代码提交

This commit is contained in:
2023-03-30 11:50:42 +08:00
parent 792dfed16e
commit 940e7f4c02
14 changed files with 79 additions and 74 deletions

View File

@@ -49,39 +49,7 @@ public class AnalyzeController extends BaseController {
private final IHarmonicService harmonicService;
/* @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/deptSubstationRelations")
@ApiOperation("污区图-部门变电站关系")
@ApiImplicitParam(name = "param", value = "实体参数", required = true)
public HttpResult<List<PollutionVO>> deptSubstationRelations(@RequestBody HarmonicPublicParam param) {
String methodDescribe = getMethodDescribe("deptSubstationRelations");
LogUtil.njcnDebug(log, "{},实体参数:{}", methodDescribe, param);
List<PollutionVO> list = pollutionService.getDeptSubstationRelations(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getSubstationInfoById")
@ApiOperation("污区图-根据部门获取变电站详情")
@ApiImplicitParam(name = "param", value = "部门参数", required = true)
public HttpResult<List<PollutionSubstationDTO>> getSubstationInfoById(@RequestBody HarmonicPublicParam param) {
String methodDescribe = getMethodDescribe("getSubstationInfoById");
LogUtil.njcnDebug(log, "{},部门参数:{}", methodDescribe, param);
List<PollutionSubstationDTO> list = pollutionService.getSubstationInfoById(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getLineInfoById")
@ApiOperation("污区图-根据变电站获取监测点详情")
@ApiImplicitParam(name = "param", value = "变电站参数", required = true)
public HttpResult<List<PollutionLineDTO>> getLineInfoById(@RequestBody HarmonicPublicParam param) {
String methodDescribe = getMethodDescribe("getLineInfoById");
LogUtil.njcnDebug(log, "{},变电站参数:{}", methodDescribe, param);
List<PollutionLineDTO> list = pollutionService.getLineInfoById(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getLineRank")
@ApiOperation("污区图-获取前十监测点排名")

View File

@@ -26,6 +26,7 @@ import java.util.List;
* @version 1.0.0
* @author: chenchao
* @date: 2022/04/21 09:05
* 对应菜单 谐波系统-区域-电能质量评估
*/
@Validated
@Slf4j

View File

@@ -119,16 +119,16 @@ public class ComAssessServiceImpl implements ComAssessService {
comAssessDTO.setFreqDev4(f4);
float f5 = new BigDecimal(pqsComAssesPOS.get(i).getFreqDev5()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setFreqDev5(f5);
float d1 = new BigDecimal(pqsComAssesPOS.get(i).getDataPST1()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPST1(d1);
float d2 = new BigDecimal(pqsComAssesPOS.get(i).getDataPST2()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPST2(d2);
float d3 = new BigDecimal(pqsComAssesPOS.get(i).getDataPST3()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPST3(d3);
float d4 = new BigDecimal(pqsComAssesPOS.get(i).getDataPST4()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPST4(d4);
float d5 = new BigDecimal(pqsComAssesPOS.get(i).getDataPST5()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPST5(d5);
float d1 = new BigDecimal(pqsComAssesPOS.get(i).getDataPlt1()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPlT1(d1);
float d2 = new BigDecimal(pqsComAssesPOS.get(i).getDataPlt2()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPlT2(d2);
float d3 = new BigDecimal(pqsComAssesPOS.get(i).getDataPlt3()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPlT3(d3);
float d4 = new BigDecimal(pqsComAssesPOS.get(i).getDataPlt4()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPlT4(d4);
float d5 = new BigDecimal(pqsComAssesPOS.get(i).getDataPlt5()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setDataPlT5(d5);
float vu1 = new BigDecimal(pqsComAssesPOS.get(i).getVUnbalance1()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();
comAssessDTO.setVUnbalance1(vu1);
float vu2 = new BigDecimal(pqsComAssesPOS.get(i).getVUnbalance2()).setScale(4, BigDecimal.ROUND_HALF_UP).floatValue();

View File

@@ -67,8 +67,7 @@ public class THDistortionServiceImpl implements THDistortionService {
thDistortionVO.setName(generalDeviceDTO.getName());
if (!CollectionUtils.isEmpty(generalDeviceDTO.getLineIndexes())){
List<String> lineIndexes = generalDeviceDTO.getLineIndexes();
List<THDistortionVO> monitorList = thDistortionMapper.getLineData(lineIndexes);
// setLineData(monitorList,thDistortionVO);
//查找畸变率
List<PublicDTO> condition = getCondition(lineIndexes, thDistortionParam.getSearchBeginTime(), thDistortionParam.getSearchEndTime());
thDistortionVO.setDistortion(condition.stream().mapToDouble(PublicDTO::getData).average().orElse(3.14159));