修改bug
This commit is contained in:
@@ -410,7 +410,7 @@ public interface LineMapper extends BaseMapper<Line> {
|
||||
"\t\tFROM\n",
|
||||
"\t\t\tpq_line a\n",
|
||||
"\t\tINNER JOIN pq_device b ON a.id = b.id\n",
|
||||
"where b.Run_Flag = 0 and a.Pid in",
|
||||
"where b.com_flag = 0 and a.Pid in",
|
||||
"<foreach item='item' index='index' collection='items' open='(' separator=',' close=')'>",
|
||||
"#{item}",
|
||||
"</foreach>",
|
||||
|
||||
@@ -712,10 +712,10 @@ public class GeneralDeviceService {
|
||||
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = this.getDeviceInfoAsDept(deviceInfoParam, Stream.of(0, 1).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||
|
||||
List<String> DeviceIds = deptDeviceInfos.stream().map(GeneralDeviceDTO::getSubIndexes).flatMap(Collection::stream).collect(Collectors.toList());
|
||||
Integer substationCount = DeviceIds.size();
|
||||
List<String> subIds = deptDeviceInfos.stream().map(GeneralDeviceDTO::getSubIndexes).flatMap(Collection::stream).collect(Collectors.toList());
|
||||
Integer substationCount = subIds.size();
|
||||
|
||||
Integer count = lineMapper.queryOnlineSubstaion(DeviceIds);
|
||||
Integer count = lineMapper.queryOnlineSubstaion(subIds);
|
||||
deptSubstationDetailVO.setSubstationCount(substationCount);
|
||||
deptSubstationDetailVO.setRunsubstationCount(count);
|
||||
BigDecimal rate = BigDecimal.valueOf(count).divide(BigDecimal.valueOf(substationCount), 4, BigDecimal.ROUND_HALF_UP);
|
||||
|
||||
Reference in New Issue
Block a user