| | |
| | | |
| | | var resultArr []SpaceNo |
| | | for _,si := range spaceList { |
| | | if si.State == 1 { //有车 |
| | | if si.State == 1 &&si.PlateNo != "" && si.PlateNo != "无车牌" { //有车 |
| | | if isSuper { |
| | | resultArr = append(resultArr, si) |
| | | } else { |
| | |
| | | vipPlateNoArr := getVipPlateNoArr() |
| | | |
| | | for _,sp := range spaceList { |
| | | if sp.State == 1 { |
| | | if sp.State == 1 && sp.PlateNo != "" && sp.PlateNo != "无车牌"{ |
| | | su := SpaceUser{ |
| | | SpaceNo: sp.SpaceNo, |
| | | PlateNo: sp.PlateNo, |
| | |
| | | vehicles := sv.GetVehicleListByPerson(userId) |
| | | if vehicles != nil { |
| | | for _,veh := range vehicles { |
| | | if veh.PlateNo != "" { |
| | | if veh.PlateNo != ""{ |
| | | r := []rune(veh.PlateNo) |
| | | ncStr := string(r[1:]) //把第一位汉字剔除掉 |
| | | myPlateNosMap[ncStr] = ncStr |
| | |
| | | } else if s.PlateNos != "" { |
| | | pi.PlateNo = s.PlateNos |
| | | } |
| | | pi.IsMine = isMyPlateNo(myPlateNosMap, pi.PlateNo) |
| | | if v,ok := models.SpaceNo2Pos[s.SpaceNo];ok { |
| | | pi.PosNo = v |
| | | } |
| | | if isSpaceShow(vipPlateNoArr, pi.PlateNo) { |
| | | resultList = append(resultList, pi) |
| | | } else { |
| | | if pi.PlateNo == "无车牌" { |
| | | pi.State = 0 |
| | | pi.PlateNo = "" |
| | | resultList = append(resultList, pi) |
| | | } |
| | | } else { |
| | | pi.IsMine = isMyPlateNo(myPlateNosMap, pi.PlateNo) |
| | | if v,ok := models.SpaceNo2Pos[s.SpaceNo];ok { |
| | | pi.PosNo = v |
| | | } |
| | | if isSpaceShow(vipPlateNoArr, pi.PlateNo) { |
| | | resultList = append(resultList, pi) |
| | | } else { |
| | | pi.State = 0 |
| | | pi.PlateNo = "" |
| | | resultList = append(resultList, pi) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if len(resultList) == 0 { |
| | |
| | | func (sv *CarService) getHikPageResult(url string, reqBody map[string]interface{}) *vo.HikPageResult { |
| | | fmt.Println(url, reqBody) |
| | | result := sv.hikUtil.Post(url, reqBody) |
| | | if result.Code == reqUtil.HikResult_Success { |
| | | if result != nil && result.Code == reqUtil.HikResult_Success { |
| | | b, err := json.Marshal(result.Data) |
| | | if err == nil { |
| | | var pageResult vo.HikPageResult |
| | |
| | | } |
| | | |
| | | return nil |
| | | } |
| | | } |