| | |
| | | func getSourceBaseInfo(source map[string]interface{}) (baseInfoJson string) { |
| | | sdkType := source["sdkType"].(string) |
| | | if sdkType == "人脸" { |
| | | likePer,baseName,personId,idCard,personPicUrl,gender,content :="","","","","","","" |
| | | if source["likePer"] !=nil { |
| | | likePer = source["likePer"].(string) |
| | | } |
| | | if source["BaseName"] !=nil { |
| | | baseName = source["BaseName"].(string) |
| | | } |
| | | if source["personId"] !=nil { |
| | | personId = source["personId"].(string) |
| | | } |
| | | if source["idcard"] !=nil { |
| | | idCard = source["idcard"].(string) |
| | | } |
| | | if source["personPicUrl"] !=nil { |
| | | personPicUrl = source["personPicUrl"].(string) |
| | | } |
| | | if source["Gender"] !=nil { |
| | | gender = source["Gender"].(string) |
| | | } |
| | | if source["content"] !=nil { |
| | | content = source["content"].(string) |
| | | } |
| | | var baseInfo = BaseInfo{ |
| | | TaskId:"",//2.0新字段 |
| | | TaskName:"",//2.0新字段 |
| | | LikePer:source["likePer"].(string), |
| | | LikePer:likePer, |
| | | TableId:"",//2.0新字段 |
| | | TableName:source["BaseName"].(string), |
| | | PersonId:source["personId"].(string), |
| | | PersonName:source["idcard"].(string),//人员姓名,从管理平台获取 |
| | | PersonPicUrl:source["personPicUrl"].(string), |
| | | Gender:source["Gender"].(string), |
| | | TableName:baseName, |
| | | PersonId:personId, |
| | | PersonName:idCard,//人员姓名,从管理平台获取 |
| | | PersonPicUrl:personPicUrl, |
| | | Gender:gender, |
| | | PhoneNum:"",//手机号,从管理平台获取 |
| | | IDCard:source["idcard"].(string), |
| | | IDCard:idCard, |
| | | MonitorLevel:"",//2.0新字段 |
| | | Content:source["content"].(string), |
| | | Content:content, |
| | | } |
| | | bytes, err := json.Marshal(baseInfo) |
| | | if err !=nil { |