Browse Source

更新

feature_hph_新增rabbitmq_sink
1049970895@qniao.cn 3 years ago
parent
commit
5e94538073
1 changed files with 10 additions and 4 deletions
  1. 14
      src/main/java/com/qniao/iot/gizwits/IotMonitoringDataJob.java

14
src/main/java/com/qniao/iot/gizwits/IotMonitoringDataJob.java

@ -214,10 +214,16 @@ public class IotMonitoringDataJob {
if (machineWorkingStat.equals(1)) { if (machineWorkingStat.equals(1)) {
// 工作中 // 工作中
Long workingDuration = reportTime - lastedDeviceState.getLastReportTime(); Long workingDuration = reportTime - lastedDeviceState.getLastReportTime();
nowDeviceState.setTheDayJobCount(lastedDeviceState.getTheDayJobDuration() + workingDuration);
//nowDeviceState.setTheDayJobCount(onData.getTheDayJobCount() + receivedEvent.getCurrJobCount());
nowDeviceState.setJobTotal(onData.getJobTotal() + receivedEvent.getCurrJobCount());
if(dataSource == 1) {
// 树根
nowDeviceState.setTheDayJobCount(onData.getTheDayJobCount() + receivedEvent.getCurrJobCount());
nowDeviceState.setJobTotal(onData.getJobTotal() + receivedEvent.getCurrJobCount());
}else {
// 机智云
Long workingJon = accJobCount - lastedDeviceState.getJobTotal();
nowDeviceState.setTheDayJobCount(lastedDeviceState.getTheDayJobCount() + workingJon);
nowDeviceState.setJobTotal(lastedDeviceState.getJobTotal() + receivedEvent.getCurrJobCount());
}
nowDeviceState.setCurrLocalDate(localDate); nowDeviceState.setCurrLocalDate(localDate);
nowDeviceState.setLastBootTime(onData.getLastBootTime()); nowDeviceState.setLastBootTime(onData.getLastBootTime());
if (lastWaitJobData != null) { if (lastWaitJobData != null) {

Loading…
Cancel
Save