| | |
| | | func NewCarService() *CarService { |
| | | return &CarService{ |
| | | hikUtil: &reqUtil.HikHttpUtil{ |
| | | AppKey: hikAppKey, |
| | | AppSecret: hikAppSecret, |
| | | AppKey: beego.AppConfig.String("hikAppKey"), |
| | | AppSecret: beego.AppConfig.String("hikAppSecret"), |
| | | ReqHost: beego.AppConfig.String("hikUrl"), |
| | | }, |
| | | } |
| | |
| | | UpdateTime string `json:"updateTime"` |
| | | } |
| | | |
| | | var ( |
| | | hikAppKey = "27107808" |
| | | hikAppSecret = "BEQiCoBTYcJX2d4KzbVK" |
| | | ) |
| | | |
| | | |
| | | //获取海康停车库列表 |
| | | func (sv *CarService) getHikParkList() []ParkInfo { |
| | |
| | | ParkSysCode string `json:"parkSyscode"` //停车库唯一标识码 |
| | | ParkName string `json:"parkName"` //停车库名称 |
| | | ParentParkSyscode string `json:"parentParkSyscode"` //父停车库唯一标识 |
| | | TotalPlace int `json:"totalPlace"` //停车库车位总数 |
| | | TotalPermPlace int `json:"totalPermPlace"` //停车库固定车位总数 |
| | | TotalReservePlace int `json:"totalReservePlace"` //停车位预约车位总数 |
| | | LeftPlace int `json:"leftPlace"` //停车库车位剩余数 |
| | | LeftPermPlace int `json:"leftPermPlace"` //停车库固定车位剩余数 |
| | | LeftReservePlace int `json:"leftReservePlace"` //停车库预约车位剩余数 |
| | | TotalPlace int `json:"totalPlace"` //停车库车位总数 |
| | | TotalPermPlace int `json:"totalPermPlace"` //停车库固定车位总数 |
| | | TotalReservePlace int `json:"totalReservePlace"` //停车位预约车位总数 |
| | | LeftPlace int `json:"leftPlace"` //停车库车位剩余数 |
| | | LeftPermPlace int `json:"leftPermPlace"` //停车库固定车位剩余数 |
| | | LeftReservePlace int `json:"leftReservePlace"` //停车库预约车位剩余数 |
| | | } |
| | | |
| | | func (sv *CarService) getRemainSpaceNum(parkIndexCode string) []RemainSpaceResult { |