package com.xcgl.dataview.entity; import java.util.Date; import java.util.Random; public class WarningSumDto { private DeviceType deviceType; private int sum; private Date sumTime; public DeviceType getDeviceType() { return deviceType; } public void setDeviceType(DeviceType deviceType) { this.deviceType = deviceType; } public int getSum() { return sum; } public void setSum(int sum) { this.sum = sum; } public Date getSumTime() { return sumTime; } public void setSumTime(Date sumTime) { this.sumTime = sumTime; } public static WarningSumDto getDemoInstance(DeviceType deviceType) { WarningSumDto dto = new WarningSumDto(); dto.setDeviceType(deviceType); Random rand = new Random(); dto.setSum(rand.nextInt(9) + 1); return dto; } }