|
@@ -303,16 +303,15 @@ public class IotOpeationFillController {
|
|
|
Timestamp endTime = Timestamp.valueOf(end);
|
|
|
|
|
|
|
|
|
- boolean exists = allDevice.stream()
|
|
|
- .anyMatch(yfDeviceDO -> yfDeviceDO.getSerialNumber().equals(vo.getDeviceCode()));
|
|
|
-
|
|
|
+ List<YfDeviceDO> existList = allDevice.stream().filter(e->e.getStatus()==3).collect(Collectors.toList());
|
|
|
+ boolean exists1 = existList.stream().anyMatch(yfDeviceDO->yfDeviceDO.getSerialNumber().equals(vo.getDeviceCode()));
|
|
|
|
|
|
IotDeviceRunLogDO logDO1 = new IotDeviceRunLogDO();
|
|
|
logDO1.setDeviceId(vo.getDeviceId());
|
|
|
LocalTime local = LocalTime.of(12, 0);
|
|
|
logDO1.setCreateTime(LocalDateTime.of(vo.getCreateTime(),local));
|
|
|
|
|
|
- if(exists){
|
|
|
+ if(exists1){
|
|
|
for (IotModelTemplateAttrsDO attrsDO:list) {
|
|
|
|
|
|
DeviceVO dv= new DeviceVO();
|