Browse Source

更新

master
1049970895@qniao.cn 3 years ago
parent
commit
cb406ac4cb
1 changed files with 5 additions and 5 deletions
  1. 10
      iot-machine-state-event-generator-job/src/main/java/com/qniao/iot/machine/event/generator/job/IotMachineEventGeneratorJob.java

10
iot-machine-state-event-generator-job/src/main/java/com/qniao/iot/machine/event/generator/job/IotMachineEventGeneratorJob.java

@ -132,7 +132,7 @@ public class IotMachineEventGeneratorJob {
boolean bool = true; boolean bool = true;
if (DataSource.TACT_CLOUD.equals(dataSource)) { if (DataSource.TACT_CLOUD.equals(dataSource)) {
// 机智云树根的校验不了 // 机智云树根的校验不了
Long currCount = value.getCurrCount();
Long currCount = value.getCurrJobCount();
Integer machineWorkingStat = value.getMachineWorkingStat(); Integer machineWorkingStat = value.getMachineWorkingStat();
bool = !(machineWorkingStat == 2 && currCount == 0); bool = !(machineWorkingStat == 2 && currCount == 0);
} }
@ -207,9 +207,9 @@ public class IotMachineEventGeneratorJob {
Integer dataSource = event.getDataSource(); Integer dataSource = event.getDataSource();
if(dataSource == 1) { if(dataSource == 1) {
// 树根的需要计算 // 树根的需要计算
event.setCurrCount(accCount - lastAccJobCount);
event.setCurrJobCount(accCount - lastAccJobCount);
// 单位是秒 // 单位是秒
event.setCurrDuration((reportTime - lastReportTime) / 3600);
event.setCurrJobDuration((reportTime - lastReportTime) / 3600);
} }
} }
} }
@ -490,8 +490,8 @@ public class IotMachineEventGeneratorJob {
Long machineIotMac = event.getMachineIotMac(); Long machineIotMac = event.getMachineIotMac();
Integer dataSource = event.getDataSource(); Integer dataSource = event.getDataSource();
Long machineId = deviceState.getMachineId(); Long machineId = deviceState.getMachineId();
Long currCount = event.getCurrCount();
Long currDuration = event.getCurrDuration();
Long currCount = event.getCurrJobCount();
Long currDuration = event.getCurrJobDuration();
Long accJobCount = event.getAccJobCount(); Long accJobCount = event.getAccJobCount();
Long reportTime = event.getReportTime(); Long reportTime = event.getReportTime();
Integer lastWorkingStat = lastDataReceivedEvent.getMachineWorkingStat(); Integer lastWorkingStat = lastDataReceivedEvent.getMachineWorkingStat();

Loading…
Cancel
Save