|
|
@ -291,11 +291,31 @@ public class SyncTrendsStatsService { |
|
|
if (resultDTO != null) { |
|
|
if (resultDTO != null) { |
|
|
AuroraTrendsStatsTotal auroraTrendsStatsTotal = new AuroraTrendsStatsTotal(); |
|
|
AuroraTrendsStatsTotal auroraTrendsStatsTotal = new AuroraTrendsStatsTotal(); |
|
|
auroraTrendsStatsTotal.setReceiverDeviceId(0L); |
|
|
auroraTrendsStatsTotal.setReceiverDeviceId(0L); |
|
|
auroraTrendsStatsTotal.setSenderDeviceId(resultDTO.getSenderDeviceIdDelta()); |
|
|
if (resultDTO.getRecieverDeviceIdDelta() != null){ |
|
|
auroraTrendsStatsTotal.setDispatch(resultDTO.getSenderDispatchDelta()); |
|
|
auroraTrendsStatsTotal.setSenderDeviceId(resultDTO.getSenderDeviceIdDelta()); |
|
|
auroraTrendsStatsTotal.setAlert(Long.valueOf(resultDTO.getSenderAlertDelta())); |
|
|
}else { |
|
|
auroraTrendsStatsTotal.setAlertCancel(Long.valueOf(resultDTO.getSenderAlertCancelDelta())); |
|
|
auroraTrendsStatsTotal.setSenderDeviceId(0L); |
|
|
auroraTrendsStatsTotal.setSenderBuilding(Long.valueOf(resultDTO.getBuildingIdCount())); |
|
|
} |
|
|
|
|
|
if (resultDTO.getSenderDispatchDelta() != null){ |
|
|
|
|
|
auroraTrendsStatsTotal.setDispatch(resultDTO.getSenderDispatchDelta()); |
|
|
|
|
|
}else { |
|
|
|
|
|
auroraTrendsStatsTotal.setDispatch(0L); |
|
|
|
|
|
} |
|
|
|
|
|
if (resultDTO.getSenderAlertDelta() != null){ |
|
|
|
|
|
auroraTrendsStatsTotal.setAlert(Long.valueOf(resultDTO.getSenderAlertDelta())); |
|
|
|
|
|
}else { |
|
|
|
|
|
auroraTrendsStatsTotal.setAlert(0L); |
|
|
|
|
|
} |
|
|
|
|
|
if (resultDTO.getSenderAlertCancelDelta() != null){ |
|
|
|
|
|
auroraTrendsStatsTotal.setAlertCancel(Long.valueOf(resultDTO.getSenderAlertCancelDelta())); |
|
|
|
|
|
}else{ |
|
|
|
|
|
auroraTrendsStatsTotal.setAlertCancel(0L); |
|
|
|
|
|
} |
|
|
|
|
|
if (resultDTO.getBuildingIdCount() != null){ |
|
|
|
|
|
auroraTrendsStatsTotal.setSenderBuilding(Long.valueOf(resultDTO.getBuildingIdCount())); |
|
|
|
|
|
}else{ |
|
|
|
|
|
auroraTrendsStatsTotal.setSenderBuilding(0L); |
|
|
|
|
|
} |
|
|
auroraTrendsStatsTotal.setCreatedDate(Date.from(yesterdayMidnight.toInstant())); |
|
|
auroraTrendsStatsTotal.setCreatedDate(Date.from(yesterdayMidnight.toInstant())); |
|
|
this.auroraTrendsStatsTotalMapper.insert(auroraTrendsStatsTotal); |
|
|
this.auroraTrendsStatsTotalMapper.insert(auroraTrendsStatsTotal); |
|
|
} |
|
|
} |
|
|
|