Browse Source

更新

feature_hph_新增rabbitmq_sink
hupenghui@qniao.cn 3 years ago
parent
commit
f98e4b55b8
1 changed files with 9 additions and 4 deletions
  1. 13
      src/main/java/com/qniao/iot/IotMonitoringDataJob.java

13
src/main/java/com/qniao/iot/IotMonitoringDataJob.java

@ -208,9 +208,11 @@ public class IotMonitoringDataJob {
nowDeviceState.setTheDayDuration(lastedDeviceState.getTheDayDuration() + workingDuration);
nowDeviceState.setTheDayJobDuration(lastedDeviceState.getTheDayJobDuration() + workingDuration);
nowDeviceState.setJobDurationTotal(lastedDeviceState.getJobDurationTotal() + workingDuration);
// 确认下当天数量CurrJobCount是否会清零
nowDeviceState.setTheDayJobCount(receivedEvent.getCurrJobCount());
nowDeviceState.setJobTotal(receivedEvent.getAccJobCount());
Long lastJobTotal = lastedDeviceState.getJobTotal();
Long accJobCount = receivedEvent.getAccJobCount();
// 直接往上类
nowDeviceState.setTheDayJobCount(lastedDeviceState.getTheDayJobCount() + (accJobCount - lastJobTotal));
nowDeviceState.setJobTotal(accJobCount);
} else {
// 机智云
nowDeviceState.setTheDayDuration(lastedDeviceState.getTheDayDuration() + receivedEvent.getCurrJobDuration());
@ -236,7 +238,10 @@ public class IotMonitoringDataJob {
// 工作
if (dataSource == 1) {
// 树根今日当前数 + 这次信息点距离上次信息点生产的数量
nowDeviceState.setTheDayJobCount(receivedEvent.getCurrJobCount());
Long lastJobTotal = lastedDeviceState.getJobTotal();
Long accJobCount = receivedEvent.getAccJobCount();
// 直接往上类
nowDeviceState.setTheDayJobCount(lastedDeviceState.getTheDayJobCount() + (accJobCount - lastJobTotal));
nowDeviceState.setJobTotal(receivedEvent.getAccJobCount());
nowDeviceState.setTheDayJobDuration(lastedDeviceState.getTheDayJobDuration() + workingDuration);
nowDeviceState.setJobDurationTotal(lastedDeviceState.getJobDurationTotal() + workingDuration);

Loading…
Cancel
Save