SceneParam.java 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package com.fdkankan.manage.vo.request;
  2. import com.fdkankan.manage.util.DateUtils;
  3. import com.fdkankan.manage.util.FiledUtil;
  4. import jodd.util.StringUtil;
  5. import lombok.Data;
  6. import java.util.ArrayList;
  7. import java.util.List;
  8. @Data
  9. public class SceneParam extends RequestBase {
  10. private String num;
  11. private String sceneName; //场景标题
  12. private String snCode; //sn码
  13. private String userName; //绑定账号
  14. private Integer type = 0; //0 看看,1看见,2深时
  15. private Integer companyId;
  16. private List<String> snCodes;
  17. private List<String> timeList;
  18. private String startTime;
  19. private String endTime;
  20. private String field;
  21. private String order;
  22. private List<Long> cameraIds;
  23. private List<Long> userIds;
  24. private List<Integer> shootCounts;
  25. private Integer shootCountMin;
  26. private Integer shootCountMax;
  27. private List<Integer> locations;
  28. private List<String> numList = new ArrayList<>();
  29. public String getStartTime() {
  30. if(timeList != null && timeList.size() >1){
  31. return DateUtils.getStartTime(timeList.get(0));
  32. }
  33. return DateUtils.getStartTime(startTime);
  34. }
  35. public String getEndTime() {
  36. if(timeList != null && timeList.size() >1){
  37. return DateUtils.getEndTime(timeList.get(1));
  38. }
  39. return DateUtils.getEndTime(endTime);
  40. }
  41. public String getField() {
  42. if(StringUtil.isNotBlank(field)){
  43. return FiledUtil.upperCharToUnderLine(field);
  44. }
  45. return "create_time";
  46. }
  47. public String getOrder() {
  48. if(StringUtil.isNotBlank(order) && order.contains("end")){
  49. return order.split("end")[0];
  50. }
  51. return "DESC";
  52. }
  53. public Integer getShootCountMin() {
  54. if(shootCounts != null && shootCounts.size() >1){
  55. return shootCounts.get(0);
  56. }
  57. return shootCountMin;
  58. }
  59. public Integer getShootCountMax() {
  60. if(shootCounts != null && shootCounts.size() >1){
  61. return shootCounts.get(1);
  62. }
  63. return shootCountMax;
  64. }
  65. }