| | |
| | | package service |
| | | |
| | | import ( |
| | | "car-service/models" |
| | | reqUtil "car-service/extend/util" |
| | | "car-service/models" |
| | | "encoding/json" |
| | | "fmt" |
| | | "github.com/astaxie/beego" |
| | | "strconv" |
| | | ) |
| | | type CarService struct { |
| | | hikUtil *reqUtil.HikHttpUtil |
| | |
| | | hikUtil: &reqUtil.HikHttpUtil{ |
| | | AppKey: hikAppKey, |
| | | AppSecret: hikAppSecret, |
| | | ReqHost: "https://172.16.35.50:1443", |
| | | ReqHost: beego.AppConfig.String("hikUrl"), |
| | | }, |
| | | } |
| | | } |
| | |
| | | func (sv *CarService) FindSpaceNo() models.PosResult { |
| | | resultList := make(models.PosResult,0) |
| | | for k,_ := range models.SpaceNo2Pos { |
| | | st := 0 |
| | | i, _ := strconv.Atoi(k) |
| | | if i >= 50 && i <=60 { |
| | | st = 1 |
| | | } |
| | | resultList = append(resultList, models.PosInfo { |
| | | SpaceNo: k, |
| | | PosNo: "", |
| | | State: 0, |
| | | State: st, |
| | | PlateNo: "", |
| | | }) |
| | | } |