1.谐波溯源算法bug
This commit is contained in:
@@ -18,14 +18,17 @@
|
|||||||
b.logic_next nodeNext,
|
b.logic_next nodeNext,
|
||||||
d.Algo_Describe type
|
d.Algo_Describe type
|
||||||
FROM
|
FROM
|
||||||
|
pqs_tflgploy ploy,
|
||||||
pqs_tflgployass a,
|
pqs_tflgployass a,
|
||||||
pqs_tflgass b,
|
pqs_tflgass b,
|
||||||
pqs_transformer c,
|
pqs_transformer c,
|
||||||
sys_dict_data d
|
sys_dict_data d
|
||||||
WHERE
|
WHERE
|
||||||
a.tf_index = b.tf_index
|
ploy.TP_Index = a.TP_Index
|
||||||
|
and a.tf_index = b.tf_index
|
||||||
AND b.tf_index = c.tf_index
|
AND b.tf_index = c.tf_index
|
||||||
and c.Wiring = d.id
|
and c.Wiring = d.id
|
||||||
|
and ploy.Status = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -78,14 +78,6 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
|
|||||||
public void processEvents(LocalDateTime startTime, LocalDateTime endTime, String deptId) {
|
public void processEvents(LocalDateTime startTime, LocalDateTime endTime, String deptId) {
|
||||||
TimeInterval timeInterval = new TimeInterval();
|
TimeInterval timeInterval = new TimeInterval();
|
||||||
|
|
||||||
//获取节点和变压器配置信息
|
|
||||||
Map<String, Map<String, Integer>> nodeMap1 = getBeforeNodeInfo();
|
|
||||||
Set<Map.Entry<String, Map<String, Integer>>> nodeSort1 = nodeMap1.entrySet();
|
|
||||||
System.out.println(nodeSort1);
|
|
||||||
|
|
||||||
Map<String, EntityMtrans> entityMtransMap1 = getNodeInfo();
|
|
||||||
Set<Map.Entry<String, EntityMtrans>> setMtrans1 = entityMtransMap1.entrySet();
|
|
||||||
System.out.println(setMtrans1);
|
|
||||||
|
|
||||||
LocalDateTime date = LocalDateTime.now();
|
LocalDateTime date = LocalDateTime.now();
|
||||||
HandleEvent handleEvent = new HandleEvent();
|
HandleEvent handleEvent = new HandleEvent();
|
||||||
@@ -117,6 +109,7 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
|
|||||||
|
|
||||||
for (Map.Entry<String, Integer> mm : mapValue) {
|
for (Map.Entry<String, Integer> mm : mapValue) {
|
||||||
for (EntityGroupEvtData groupEvtData : baseList) {
|
for (EntityGroupEvtData groupEvtData : baseList) {
|
||||||
|
//矩阵只计算短路故障相关的事件,其他事件另行计算
|
||||||
if (groupEvtData.getNodePhysics().equals(mm.getKey()) && dictData.getId().equals(groupEvtData.getSagReason())) {
|
if (groupEvtData.getNodePhysics().equals(mm.getKey()) && dictData.getId().equals(groupEvtData.getSagReason())) {
|
||||||
groupEvtData.setNode(mm.getValue());
|
groupEvtData.setNode(mm.getValue());
|
||||||
list.add(groupEvtData);
|
list.add(groupEvtData);
|
||||||
|
|||||||
@@ -1498,6 +1498,10 @@ public class RespDataServiceImpl extends ServiceImpl<RespDataMapper, RespData> i
|
|||||||
param.setLineIds(userList);
|
param.setLineIds(userList);
|
||||||
List<DataHarmPowerP> dataHarmPList = historyHarmonicService.getHarmonicPData(param);
|
List<DataHarmPowerP> dataHarmPList = historyHarmonicService.getHarmonicPData(param);
|
||||||
Map<String, List<DataHarmPowerP>> collect = dataHarmPList.stream().collect(Collectors.groupingBy(DataHarmPowerP::getLineId));
|
Map<String, List<DataHarmPowerP>> collect = dataHarmPList.stream().collect(Collectors.groupingBy(DataHarmPowerP::getLineId));
|
||||||
|
Set<String> lineIds = collect.keySet();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<DataHarmPowerP> result = new ArrayList<>();
|
List<DataHarmPowerP> result = new ArrayList<>();
|
||||||
collect.forEach((k,v)->{
|
collect.forEach((k,v)->{
|
||||||
LineDetailDataVO lineDetailData = lineService.getLineDetailData(k);
|
LineDetailDataVO lineDetailData = lineService.getLineDetailData(k);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.njcn.product.terminal.mysqlTerminal.pojo.param.UserReportParam;
|
|||||||
import com.njcn.product.terminal.mysqlTerminal.pojo.po.Device;
|
import com.njcn.product.terminal.mysqlTerminal.pojo.po.Device;
|
||||||
import com.njcn.product.terminal.mysqlTerminal.pojo.po.Line;
|
import com.njcn.product.terminal.mysqlTerminal.pojo.po.Line;
|
||||||
import com.njcn.product.terminal.mysqlTerminal.pojo.po.LineDetail;
|
import com.njcn.product.terminal.mysqlTerminal.pojo.po.LineDetail;
|
||||||
|
import com.njcn.product.terminal.mysqlTerminal.pojo.po.UserReportPO;
|
||||||
import com.njcn.product.terminal.mysqlTerminal.pojo.vo.LineDataVO;
|
import com.njcn.product.terminal.mysqlTerminal.pojo.vo.LineDataVO;
|
||||||
import com.njcn.product.terminal.mysqlTerminal.pojo.vo.LineDetailDataVO;
|
import com.njcn.product.terminal.mysqlTerminal.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.product.terminal.mysqlTerminal.pojo.vo.TerminalTree;
|
import com.njcn.product.terminal.mysqlTerminal.pojo.vo.TerminalTree;
|
||||||
@@ -58,6 +59,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
private final LineDetailMapper lineDetailMapper;
|
private final LineDetailMapper lineDetailMapper;
|
||||||
private final AreaMapper areaMapper;
|
private final AreaMapper areaMapper;
|
||||||
private final VoltageMapper voltageMapper;
|
private final VoltageMapper voltageMapper;
|
||||||
|
private final UserReportPOMapper userReportPOMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LedgerTreeDTO> getTree() {
|
public List<LedgerTreeDTO> getTree() {
|
||||||
@@ -261,7 +263,10 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
lineDetailDataVO.setDevId(device.getId());
|
lineDetailDataVO.setDevId(device.getId());
|
||||||
lineDetailDataVO.setBusinessType(dictDataMapper.selectById(lineDetail.getBusinessType()).getName());
|
lineDetailDataVO.setBusinessType(dictDataMapper.selectById(lineDetail.getBusinessType()).getName());
|
||||||
lineDetailDataVO.setLoadType(dictDataMapper.selectById(lineDetail.getLoadType()).getName());
|
lineDetailDataVO.setLoadType(dictDataMapper.selectById(lineDetail.getLoadType()).getName());
|
||||||
lineDetailDataVO.setObjName(lineDetail.getObjName());
|
UserReportPO userReportPO = userReportPOMapper.selectById(lineDetail.getObjId());
|
||||||
|
if(Objects.nonNull(userReportPO)){
|
||||||
|
lineDetailDataVO.setObjName(userReportPO.getProjectName());
|
||||||
|
}
|
||||||
lineDetailDataVO.setId(lineDetail.getNum());
|
lineDetailDataVO.setId(lineDetail.getNum());
|
||||||
lineDetailDataVO.setPtType(TerminalUtils.ptType(lineDetail.getPtType()));
|
lineDetailDataVO.setPtType(TerminalUtils.ptType(lineDetail.getPtType()));
|
||||||
lineDetailDataVO.setPt(lineDetail.getPt1() + "/" + lineDetail.getPt2());
|
lineDetailDataVO.setPt(lineDetail.getPt1() + "/" + lineDetail.getPt2());
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ public class CsPagePO extends BaseEntity {
|
|||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static final String COL_ID = "id";
|
public static final String COL_ID = "id";
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ public class CsElementServiceImpl extends ServiceImpl<CsElementMapper, CsElement
|
|||||||
csElement.setPath(path);
|
csElement.setPath(path);
|
||||||
csElement.setStatus(1);
|
csElement.setStatus(1);
|
||||||
this.saveOrUpdate(csElement);
|
this.saveOrUpdate(csElement);
|
||||||
csElement.setPath(path);
|
|
||||||
return csElement;
|
return csElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
/**
|
/**
|
||||||
@@ -68,11 +70,14 @@ public class CsPagePOServiceImpl extends ServiceImpl<CsPagePOMapper, CsPagePO> i
|
|||||||
.lines()
|
.lines()
|
||||||
.collect(Collectors.joining("\n"));
|
.collect(Collectors.joining("\n"));
|
||||||
List<CsPagePO> csPagePOS = JSONUtil.toList(text, CsPagePO.class);
|
List<CsPagePO> csPagePOS = JSONUtil.toList(text, CsPagePO.class);
|
||||||
|
// 倒序排列
|
||||||
csPagePOS.forEach(temp->{
|
csPagePOS.forEach(temp->{
|
||||||
String s = fileStorageUtil.uploadStream(writeJsonStringToInputStream(temp.getPath()), OssPath.CONFIGURATIONPATH, OssPath.CONFIGURATIONNAME);
|
String s = fileStorageUtil.uploadStream(writeJsonStringToInputStream(temp.getPath()), OssPath.CONFIGURATIONPATH, OssPath.CONFIGURATIONNAME);
|
||||||
temp.setPid(pid);
|
temp.setPid(pid);
|
||||||
temp.setStatus("1");
|
temp.setStatus("1");
|
||||||
temp.setPath(s);
|
temp.setPath(s);
|
||||||
|
temp.setCreateTime(LocalDateTime.now());
|
||||||
|
temp.setUpdateTime(LocalDateTime.now());
|
||||||
this.save(temp);
|
this.save(temp);
|
||||||
});
|
});
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -109,8 +114,8 @@ public class CsPagePOServiceImpl extends ServiceImpl<CsPagePOMapper, CsPagePO> i
|
|||||||
QueryWrapper<CsPagePO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CsPagePO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq(StrUtil.isNotBlank (csPageParam.getPid()),CsPagePO.COL_PID,csPageParam.getPid()).
|
queryWrapper.eq(StrUtil.isNotBlank (csPageParam.getPid()),CsPagePO.COL_PID,csPageParam.getPid()).
|
||||||
like(StrUtil.isNotBlank (csPageParam.getSearchValue()),CsPagePO.COL_NAME,csPageParam.getSearchValue()).
|
like(StrUtil.isNotBlank (csPageParam.getSearchValue()),CsPagePO.COL_NAME,csPageParam.getSearchValue()).
|
||||||
eq ("status",1);
|
eq ("status",1).
|
||||||
// orderByAsc(CsPagePO.COL_KID)
|
orderByAsc("sort");
|
||||||
|
|
||||||
IPage<CsPagePO> pageData = this.page(new Page<>(csPageParam.getPageNum(), csPageParam.getPageSize()), queryWrapper);
|
IPage<CsPagePO> pageData = this.page(new Page<>(csPageParam.getPageNum(), csPageParam.getPageSize()), queryWrapper);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user