GonglvDto.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**
  2. *
  3. */
  4. package com.xcgl.dataview.entity;
  5. import java.io.Serializable;
  6. import java.util.Date;
  7. import java.util.Random;
  8. /**
  9. * @author xzx
  10. *
  11. */
  12. public class GonglvDto implements Serializable {
  13. /**
  14. * 设备id
  15. */
  16. private String id;
  17. /**
  18. * 设备code
  19. */
  20. private String code;
  21. /**
  22. * 设备name
  23. */
  24. private String name;
  25. /**
  26. * 功率值
  27. */
  28. private Double value;
  29. /**
  30. * 取值时间
  31. */
  32. private Date valueTime;
  33. public String getId() {
  34. return id;
  35. }
  36. public void setId(String id) {
  37. this.id = id;
  38. }
  39. public String getCode() {
  40. return code;
  41. }
  42. public void setCode(String code) {
  43. this.code = code;
  44. }
  45. public String getName() {
  46. return name;
  47. }
  48. public void setName(String name) {
  49. this.name = name;
  50. }
  51. public Double getValue() {
  52. return value;
  53. }
  54. public void setValue(Double value) {
  55. this.value = value;
  56. }
  57. public Date getValueTime() {
  58. return valueTime;
  59. }
  60. public void setValueTime(Date valueTime) {
  61. this.valueTime = valueTime;
  62. }
  63. public static GonglvDto getDemoInstance(String name) {
  64. GonglvDto dto = new GonglvDto();
  65. dto.setName(name);
  66. Random rand = new Random();
  67. dto.setValue(rand.nextInt(90)+10.0);
  68. return dto;
  69. }
  70. }