| | |
| | | Source:false, |
| | | } |
| | | bytes := Push("tcp://192.168.1.182:40010",comArg,sock) |
| | | var m map[string]float32 |
| | | err1 := json.Unmarshal(bytes, &m) |
| | | var scResult protomsg.SdkCompareResult |
| | | err1 := proto.Unmarshal(bytes, &scResult) |
| | | if err1 != nil { |
| | | logger.Error("getBaseInfo解压错误", err1) |
| | | } |
| | | //logger.Info("----------------------------------------map是", m) |
| | | ids := []string{} |
| | | for key, _ := range m { |
| | | ids = append(ids, key) |
| | | var m map[string]*protomsg.SdkCompareEach |
| | | for _,key := range scResult.CompareResult { |
| | | ids = append(ids, key.Id) |
| | | m[key.Id] = key |
| | | } |
| | | logger.Info("------------------------------------------------------------------------------------------------------------------------") |
| | | //logger.Info("=====================人员id的集合为:",ids) |
| | |
| | | if err != nil || len(table) == 0 { |
| | | logger.Error("根据id查询底库信息出错!", err, "--返回值长度为:", len(table)) |
| | | } |
| | | logger.Debug("看看这个base的对比值是多少:", Decimal(m[baseinfo.Id] * 100)) |
| | | base := BaseInfo{TableId: baseinfo.TableId, TableName: table[0].TableName, BwType: table[0].BwType, CompareScore: Decimal(m[baseinfo.Id] * 100), PersonId: baseinfo.Id, PersonName: baseinfo.PersonName, PersonPicUrl: baseinfo.PersonPicUrl, PhoneNum: baseinfo.PhoneNum, Sex: baseinfo.Sex, IdCard: baseinfo.IdCard, MonitorLevel: baseinfo.MonitorLevel, Content: baseinfo.Reserved} |
| | | logger.Debug("看看这个base的对比值是多少:", Decimal(m[baseinfo.Id].CompareScore * 100)) |
| | | base := BaseInfo{TableId: baseinfo.TableId, TableName: table[0].TableName, BwType: table[0].BwType, CompareScore: Decimal(m[baseinfo.Id].CompareScore * 100), PersonId: baseinfo.Id, PersonName: baseinfo.PersonName, PersonPicUrl: baseinfo.PersonPicUrl, PhoneNum: baseinfo.PhoneNum, Sex: baseinfo.Sex, IdCard: baseinfo.IdCard, MonitorLevel: baseinfo.MonitorLevel, Content: baseinfo.Reserved} |
| | | //os.Exit(1) |
| | | arg.Liker = append(arg.Liker, &base) |
| | | } |