intelligentLighting.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package model
  2. import (
  3. "iot_manager_service/app/device/dao"
  4. "time"
  5. )
  6. const (
  7. RelationIdInvalid = "该记录未关联策略无法查看,请关联策略!"
  8. RelationTypeInvalid = "查询参数(关联类型)异常"
  9. RelationTypeLight = 1 //关联类型 灯控
  10. RelationTypeLampPoleGroup = 2 //关联类型 灯杆分组
  11. IsYear = 2 //全年设置2=是,1=否
  12. Sunshine = 2 //日出日落 设置 2=开启,1=不开启
  13. )
  14. type RspIntelligentLightDetail struct {
  15. LightControlList []dao.LightControl `json:"lightControlList"`
  16. LampPoleName string `json:"lampPoleName"`
  17. LightRelMap IntelligentLightSimple `json:"lightRelMap"`
  18. }
  19. type RspIntelligentLightDetailByGroup struct {
  20. LightControlList []dao.LightControl `json:"lightControlList"`
  21. LampPoleGroupName string `json:"lampPoleGroupName"`
  22. CountLampPole int `json:"countLampPole"`
  23. LightRelMap IntelligentLightSimple `json:"lightRelMap"`
  24. }
  25. type IntelligentLightSimple struct {
  26. TimeConditionList []TimeConditionSimple `json:"timeConditionList"` //时间条件列表
  27. LightName string `json:"lightName"` //灯控名称
  28. LightSn string `json:"lightSn"` //灯控SN
  29. EffectiveDate string `json:"effectiveDate"` //生效日期
  30. }
  31. type TimeConditionSimple struct {
  32. Luminance string `json:"luminance"`
  33. Times string `json:"times"`
  34. }
  35. type RspIntelligentLightListDetail struct {
  36. dao.IntelligentLight
  37. LightControlState string `json:"lightControlState"` //灯控状态
  38. RunState string `json:"runState"` //运行状态
  39. PublicName string `json:"publicName"` //设备名称(灯杆与灯杆分组公用)
  40. PublicId string `json:"publicId"` //设备Id(灯杆与灯杆分组公用ID)
  41. GroupId string `json:"groupId"` //灯杆分组ID
  42. LampPoleName string `json:"lampPoleName"` //灯杆名称
  43. LampPoleSn string `json:"lampPoleSn"` //灯杆编码
  44. Location string `json:"location"` //安装位置
  45. InstallTime string `json:"installTime"` //安装时间
  46. LampLat string `json:"lampLat"` //经度
  47. LampLng string `json:"lampLng"` //纬度
  48. LightName string `json:"lightName"` //策略名称
  49. LightSn string `json:"lightSn"` //策略编码
  50. DeviceSn string `json:"deviceSn"` //灯控设备编码
  51. StartTime time.Time `json:"startTime"` //生效日期-策略开始时间
  52. EndTime time.Time `json:"endTime"` //生效日期-策略结束时间
  53. ControlType int `json:"controlType"` //灯控类型
  54. IsAllYear int `json:"isAllYear"` //全年设置2=是,1=否
  55. IsAutomaticRenewal int `json:"isAutomaticRenewal"` //自动续期设置 2=是,1=否
  56. EffectiveDate int `json:"effectiveDate"` //生效日期
  57. Children []RspIntelligentLightListDetail `json:"children"` //灯控子集
  58. CombinationStrList []string `json:"combinationStrList"` //照明策略条件组合展示集合
  59. CombinationStr string `json:"combinationStr"` //详情照明策略组合展示
  60. IsShowOpts string `json:"isShowOpts"` //页面是否显示操作按钮
  61. HandSwitch int `json:"handSwitch"` //手动开关:1=开启,2,关闭
  62. }
  63. type RspIntelligentLightList struct {
  64. Records []RspIntelligentLightListDetail `json:"records"` //记录列表
  65. Current int `json:"current"` //当前分页
  66. Size int `json:"size"` //每页数量
  67. Pages int `json:"pages"` //总页数
  68. Total int `json:"total"`
  69. }