cjl
2023-11-08 0e4aa8d08a3bf8e8683d05081baefdbf96ce080f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.moral.api.pojo.form.uav;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.moral.util.DateUtils;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.ObjectUtils;
 
import java.util.Date;
import java.util.List;
 
/**
 * @ClassName queryTimeSlotForm
 * @Description TODO
 * @Author 陈凯裕
 * @Date 2021/9/8 14:17
 * @Version TODO
 **/
@Data
public class UAVQueryTimeSlotForm {
 
    /*
    * 组织id
    * */
    private Integer organizationId;
 
    /*
    * 日期
    * */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date date;
 
    /*
    * 开始时间
    * */
    private Date startDate;
 
    /*
    * 结束时间
    * */
    private Date endDate;
 
 
    public boolean valid() {
        if (
                ObjectUtils.isEmpty(organizationId)&&
                        ObjectUtils.isEmpty(date)
                )
            return false;
        //将日期转换为开始结束时间
        startDate = DateUtils.getDailyStartTime(date);
        endDate = DateUtils.getDailyEndTime(date);
        return true;
    }
}