|
|
|
@ -134,14 +134,29 @@ public class IotMachineEventGeneratorJob { |
|
|
|
@Override |
|
|
|
public boolean filter(MachineIotDataReceivedEvent value) { |
|
|
|
|
|
|
|
Long currCount = value.getCurrJobCount(); |
|
|
|
|
|
|
|
Integer dataSource = value.getDataSource(); |
|
|
|
Integer machineWorkingStat = value.getMachineWorkingStat(); |
|
|
|
boolean bool = false; |
|
|
|
if (currCount == null) { |
|
|
|
currCount = 0L; |
|
|
|
} |
|
|
|
if (machineWorkingStat != null) { |
|
|
|
bool = !(machineWorkingStat == 1 && currCount == 0); |
|
|
|
if(dataSource != null) { |
|
|
|
if(dataSource == 1) { |
|
|
|
// 树根 |
|
|
|
Long countOfThePeriod = value.getCountOfThePeriod(); |
|
|
|
if(countOfThePeriod == null) { |
|
|
|
countOfThePeriod = 0L; |
|
|
|
} |
|
|
|
bool = !(machineWorkingStat == 1 && countOfThePeriod == 0); |
|
|
|
} |
|
|
|
if(dataSource == 0) { |
|
|
|
// 机智云 |
|
|
|
Long currCount = value.getCurrJobCount(); |
|
|
|
if (currCount == null) { |
|
|
|
currCount = 0L; |
|
|
|
} |
|
|
|
bool = !(machineWorkingStat == 1 && currCount == 0); |
|
|
|
} |
|
|
|
}else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (bool && value.getMachinePwrStat() != null |
|
|
|
&& value.getMachineIotMac() != null |
|
|
|
|