bug调整

This commit is contained in:
xy
2025-07-31 09:41:10 +08:00
parent 0bfea394b8
commit e336bc14b7
12 changed files with 97 additions and 49 deletions

View File

@@ -62,6 +62,10 @@ public class THDistortionVO implements Serializable {
*/
@ApiModelProperty("总畸变率")
private Double distortion = 3.14159;
@ApiModelProperty("排序")
private Integer sort;
/**
* 子集
*/

View File

@@ -37,7 +37,8 @@
Id,
Pid,
Pids,
Name
Name,
Sort
FROM
pq_line
WHERE
@@ -45,6 +46,7 @@
<foreach item="item" collection="list" separator="," open="(" close=")">
#{item}
</foreach>
order by Sort asc
</select>
</mapper>

View File

@@ -35,6 +35,7 @@
<foreach item="item" collection="list" separator="," open="(" close=")">
#{item}
</foreach>
order by sort asc
</select>

View File

@@ -40,10 +40,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -126,7 +123,13 @@ public class ComAssessServiceImpl extends ServiceImpl<RStatComassesDMapper, RSta
PollutionParamDTO paramDTO = new PollutionParamDTO();
paramDTO.setLineList(ids);
lineInfo = lineFeignClient.getLineInfo(paramDTO).getData();
Map<String, List<PollutionLineDTO>> map = lineInfo.stream().collect(Collectors.groupingBy(PollutionLineDTO::getSubstationId));
Map<String, List<PollutionLineDTO>> map = lineInfo.stream()
.sorted(Comparator.comparing(PollutionLineDTO::getSubstationSort))
.collect(Collectors.groupingBy(
PollutionLineDTO::getSubstationId,
LinkedHashMap::new,
Collectors.toList()
));
List<ComAssessDTO> childrenDTOS = new ArrayList<>();
map.forEach((sub,list) -> {
//获取变电站信息

View File

@@ -76,7 +76,8 @@ public class TerminalServiceImpl implements TerminalService {
public TerminalCensusVO getTerminalDataCensus(DeviceInfoParam.BusinessParam terminalCensusParam) {
TerminalCensusVO terminalCensusVO = new TerminalCensusVO();
terminalCensusParam.setServerName(generalInfo.getMicroServiceName());
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(terminalCensusParam).getData();
// List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(terminalCensusParam).getData();
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(new DeviceInfoParam(terminalCensusParam.getStatisticalType(), terminalCensusParam.getDeptIndex(), generalInfo.getMicroServiceName(), null, terminalCensusParam.getManufacturer(), null)).getData();
List<String> type = new ArrayList<>();
List<Double> single = new ArrayList<>();
List<Integer> runFlag = new ArrayList<>(),reaFlag = new ArrayList<>(),stopFlag = new ArrayList<>();