Commit 47adbc91 authored by caotao's avatar caotao

1、科士达无效告警数据进行过滤

parent 5ed7a667
...@@ -41,6 +41,7 @@ import java.util.List; ...@@ -41,6 +41,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/** /**
* @author DELL * @author DELL
...@@ -494,7 +495,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -494,7 +495,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
} }
@Scheduled(cron = "${dataRequstScheduled.keshida}") // @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
public void collectorDetail() { public void collectorDetail() {
...@@ -1226,10 +1227,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1226,10 +1227,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
List<JpInverter> jpInverter1 = jpInverterMapper.selectList(new QueryWrapper<JpInverter>(). List<JpInverter> ksdInverterList = jpInverterMapper.selectList(new QueryWrapper<JpInverter>().
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())); eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()));
ksdInverterList =ksdInverterList.stream().filter(jpInverter -> !ObjectUtils.isEmpty(jpInverter.getCollectorSnCode())).collect(Collectors.toList());
Map<String,String> ksdInverterListMap = new HashMap<>();
ksdInverterList.forEach(jpInverter -> {
ksdInverterListMap.put(jpInverter.getCollectorId(),jpInverter.getCollectorSnCode());
});
// ksdInverterList.stream().filter(jpInverter -> !ObjectUtils.isEmpty(jpInverter.getCollectorSnCode())).collect(Collectors.toMap(JpInverter::getCollectorId,JpInverter::getCollectorSnCode));
HashMap<String, Object> requestInfo = new HashMap<>(1); HashMap<String, Object> requestInfo = new HashMap<>(1);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
...@@ -1251,15 +1257,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1251,15 +1257,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// Date startTimeL = sdf.parse(startTime); // Date startTimeL = sdf.parse(startTime);
// Date recoverTimeL = sdf.parse(recoverTime); // Date recoverTimeL = sdf.parse(recoverTime);
String snCode=null; String snCode=ksdInverterListMap.get(ksolarAlarmDto.getDeviceId());
if(ObjectUtils.isEmpty(snCode)){
if(jpInverter1!=null&&!jpInverter1.isEmpty()){ continue;
for (JpInverter jpInverter : jpInverter1) {
if(jpInverter.getCollectorId().equals(ksolarAlarmDto.getDeviceId())){
snCode=jpInverter.getCollectorSnCode();
break;
}
}
} }
List<HYGFJPInverterWarn> list= hygfjpInverterWarnMapper.selectList(new QueryWrapper<HYGFJPInverterWarn>() List<HYGFJPInverterWarn> list= hygfjpInverterWarnMapper.selectList(new QueryWrapper<HYGFJPInverterWarn>()
.eq("sn_code",snCode) .eq("sn_code",snCode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment