fuliqi
2024-09-20 118be4ee52ea71cfc3d8ab702bc1702aa4286335
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
package com.ycl.platform.domain.form;
 
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.util.CollectionUtils;
 
import java.util.List;
 
@Data
public class VideoExportForm {
    @NotBlank(message = "月份不能为空")
    private String month;
    @NotEmpty(message = "部门不能为空")
    private List<Integer> deptIds;
    // 0/1/2/3 省厅、重点点位、重点指挥图像、部级
    private List<Integer> tags;
 
    //设备类型 1/2/3 视频、车辆、人脸
    private Integer cameraFunType;
    private Boolean provinceTag;
    private Boolean importantTag;
    private Boolean importantCommandImageTag;
    private Boolean deptTag;
 
    //装配tag查询条件
    public static void convertTags(VideoExportForm form){
        List<Integer> tags = form.getTags();
        if(!CollectionUtils.isEmpty(tags)){
            if(tags.contains(0)){
                form.setProvinceTag(true);
            }
            if(tags.contains(1)){
                form.setImportantTag(true);
            }
            if(tags.contains(2)){
                form.setImportantCommandImageTag(true);
            }
            if(tags.contains(3)){
                form.setDeptTag(true);
            }
        }
    }
}