ShiftPersonnel.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. package com.lqkj.info.entity;
  2. import java.time.LocalTime;
  3. import java.time.format.DateTimeFormatter;
  4. import com.fasterxml.jackson.annotation.JsonFormat;
  5. import org.apache.commons.lang3.builder.ToStringBuilder;
  6. import org.apache.commons.lang3.builder.ToStringStyle;
  7. import com.lqkj.common.annotation.Excel;
  8. import com.lqkj.common.core.model.BaseEntity;
  9. import org.springframework.data.annotation.Transient;
  10. /**
  11. * 轮班人员信息对象 shift_personnel
  12. *
  13. * @author lqkj
  14. * @date 2024-12-23
  15. */
  16. public class ShiftPersonnel extends BaseEntity
  17. {
  18. private static final long serialVersionUID = 1L;
  19. /** 轮班人员id */
  20. private Integer personnelId;
  21. /** 停车场id */
  22. @Excel(name = "停车场id")
  23. private Integer parkingId;
  24. /** 轮班人员名字 */
  25. @Excel(name = "轮班人员名字")
  26. private String personnelName;
  27. /** 值班开始时间 */
  28. @JsonFormat(pattern = "HH:mm:ss")
  29. @Excel(name = "值班开始时间", width = 30, dateFormat = "HH:mm:ss")
  30. private LocalTime startTime;
  31. /** 值班结束时间 */
  32. @JsonFormat(pattern = "HH:mm:ss")
  33. @Excel(name = "值班结束时间", width = 30, dateFormat = "HH:mm:ss")
  34. private LocalTime endTime;
  35. /** 备注 */
  36. private String memo;
  37. @Transient
  38. private LocalTime workTime;
  39. public void setPersonnelId(Integer personnelId)
  40. {
  41. this.personnelId = personnelId;
  42. }
  43. public Integer getPersonnelId()
  44. {
  45. return personnelId;
  46. }
  47. public void setParkingId(Integer parkingId)
  48. {
  49. this.parkingId = parkingId;
  50. }
  51. public Integer getParkingId()
  52. {
  53. return parkingId;
  54. }
  55. public void setPersonnelName(String personnelName)
  56. {
  57. this.personnelName = personnelName;
  58. }
  59. public String getPersonnelName()
  60. {
  61. return personnelName;
  62. }
  63. public void setStartTime(LocalTime startTime)
  64. {
  65. this.startTime = startTime;
  66. }
  67. public LocalTime getStartTime()
  68. {
  69. return startTime;
  70. }
  71. public void setEndTime(LocalTime endTime)
  72. {
  73. this.endTime = endTime;
  74. }
  75. public LocalTime getEndTime()
  76. {
  77. return endTime;
  78. }
  79. public void setMemo(String memo)
  80. {
  81. this.memo = memo;
  82. }
  83. public String getMemo()
  84. {
  85. return memo;
  86. }
  87. public LocalTime getWorkTime() {
  88. return workTime;
  89. }
  90. public void setWorkTime(String workTime) {
  91. this.workTime = LocalTime.parse(workTime, DateTimeFormatter.ofPattern("HH:mm:ss"));;
  92. }
  93. @Override
  94. public String toString() {
  95. return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
  96. .append("personnelId", getPersonnelId())
  97. .append("parkingId", getParkingId())
  98. .append("personnelName", getPersonnelName())
  99. .append("startTime", getStartTime())
  100. .append("endTime", getEndTime())
  101. .append("memo", getMemo())
  102. .toString();
  103. }
  104. }