|  |  | 
 |  |  | import lombok.*; | 
 |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author :WuZeYu | 
 |  |  |  * @Date :2024/7/22  20:01 | 
 |  |  | 
 |  |  |     @Schema(description = "取水口名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
 |  |  |     private String intakeName; | 
 |  |  |  | 
 |  |  |     @Schema(description = "取水口ID") | 
 |  |  |     private String intakeId; | 
 |  |  |  | 
 |  |  |     @Schema(description = "阀门状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)//(0打开、1关闭) | 
 |  |  |     private Byte valveState; | 
 |  |  |  | 
 |  |  |     @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
 |  |  |     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 
 |  |  |     private Date startDt; | 
 |  |  |     @DateTimeFormat(pattern = "yyyy-MM-dd") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd") | 
 |  |  |     private String startDt; | 
 |  |  |  | 
 |  |  |     @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
 |  |  |     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 
 |  |  |     private Date endDt; | 
 |  |  |     @DateTimeFormat(pattern = "yyyy-MM-dd") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd") | 
 |  |  |     private String endDt; | 
 |  |  |  | 
 |  |  |     @Schema(description = "报警状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)//(0正常、1报警) | 
 |  |  |     private Byte alarmState; | 
 |  |  |  | 
 |  |  |     public void completionTime(){ | 
 |  |  |         if(this.startDt != null && !this.startDt.trim().equals("")) { | 
 |  |  |             this.startDt = startDt + " 00:00:00"; | 
 |  |  |         } | 
 |  |  |         if(this.endDt != null && !this.endDt.trim().equals("")) { | 
 |  |  |             this.endDt = endDt + " 23:59:59"; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } |