| | |
| | | if vehicles != nil { |
| | | for _,veh := range vehicles { |
| | | if veh.PlateNo != "" { |
| | | ncStr := veh.PlateNo[1:] //把第一位汉字剔除掉 |
| | | r := []rune(veh.PlateNo) |
| | | ncStr := string(r[1:]) //把第一位汉字剔除掉 |
| | | myPlateNosMap[ncStr] = ncStr |
| | | } |
| | | //myPlateNosMap[veh.PlateNo] = veh.PlateNo |
| | |
| | | //2.汉字误识别的几率比较高 |
| | | func isMyPlateNo(plateNoM map[string]string, targetPlateNo string) bool { |
| | | if targetPlateNo != "" { |
| | | r := []rune(targetPlateNo) |
| | | nctPlateNo := string(r[1:]) |
| | | |
| | | var compArr []string |
| | | for ip,_ := range plateNoM { |
| | | compArr = append(compArr, ip) |
| | | } |
| | | fmt.Println("targetPlateNO:", targetPlateNo, "compArr:", compArr) |
| | | nctPlateNo := targetPlateNo[1:] |
| | | |
| | | if _,exist := plateNoM[nctPlateNo];exist { |
| | | return true |
| | | } else { |