intelligentLighting.go 4.4 KB

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