| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- package com.fdkankan.manage.vo.request;
- import com.fdkankan.manage.util.DateUtils;
- import com.fdkankan.manage.util.FiledUtil;
- import jodd.util.StringUtil;
- import lombok.Data;
- import java.util.ArrayList;
- import java.util.List;
- @Data
- public class SceneParam extends RequestBase {
- private String num;
- private String sceneName; //场景标题
- private String snCode; //sn码
- private String userName; //绑定账号
- private Integer type = 0; //0 看看,1看见,2深时
- private Integer companyId;
- private List<String> snCodes;
- private List<String> timeList;
- private String startTime;
- private String endTime;
- private String field;
- private String order;
- private List<Long> cameraIds;
- private List<Long> userIds;
- private List<Integer> shootCounts;
- private Integer shootCountMin;
- private Integer shootCountMax;
- private List<Integer> locations;
- private List<String> numList = new ArrayList<>();
- public String getStartTime() {
- if(timeList != null && timeList.size() >1){
- return DateUtils.getStartTime(timeList.get(0));
- }
- return DateUtils.getStartTime(startTime);
- }
- public String getEndTime() {
- if(timeList != null && timeList.size() >1){
- return DateUtils.getEndTime(timeList.get(1));
- }
- return DateUtils.getEndTime(endTime);
- }
- public String getField() {
- if(StringUtil.isNotBlank(field)){
- return FiledUtil.upperCharToUnderLine(field);
- }
- return "create_time";
- }
- public String getOrder() {
- if(StringUtil.isNotBlank(order) && order.contains("end")){
- return order.split("end")[0];
- }
- return "DESC";
- }
- public Integer getShootCountMin() {
- if(shootCounts != null && shootCounts.size() >1){
- return shootCounts.get(0);
- }
- return shootCountMin;
- }
- public Integer getShootCountMax() {
- if(shootCounts != null && shootCounts.size() >1){
- return shootCounts.get(1);
- }
- return shootCountMax;
- }
- }
|