|
@@ -292,12 +292,14 @@ func comHisMegerNewData(name, datatype string, ps []map[string]interface{}) map[
|
|
|
data := map[string]interface{}{
|
|
|
"history_name": "",
|
|
|
"credit_no": "",
|
|
|
+ "company_email": "",
|
|
|
"area_code": qu.ObjToString(tmp["area_code"]),
|
|
|
"province": qu.ObjToString(tmp["province"]),
|
|
|
"city": "",
|
|
|
"district": "",
|
|
|
"company_type": qu.ObjToString(tmp["company_type"]),
|
|
|
"legal_person": qu.ObjToString(tmp["legal_person"]),
|
|
|
+ "company_phone": "",
|
|
|
"company_address": qu.ObjToString(tmp["company_address"]),
|
|
|
"business_scope": qu.ObjToString(tmp["business_scope"]),
|
|
|
"wechat_accounts": []interface{}{},
|
|
@@ -324,21 +326,31 @@ func comHisMegerNewData(name, datatype string, ps []map[string]interface{}) map[
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //网址
|
|
|
+ //从年报中取网址、邮箱、打电话
|
|
|
annual_reports := tmp["annual_reports"]
|
|
|
if annual_reports != nil {
|
|
|
report_websitesArr := []string{}
|
|
|
- if anreports, ok := annual_reports.([]interface{}); ok {
|
|
|
- for _, report_websites := range anreports {
|
|
|
- if websites, ok := report_websites.([]interface{}); ok {
|
|
|
- for _, website := range websites {
|
|
|
- if rv, ok := website.(map[string]interface{}); ok {
|
|
|
- web := qu.ObjToString(rv["website_url"])
|
|
|
- if web != "" {
|
|
|
- report_websitesArr = append(report_websitesArr, web)
|
|
|
+ if anreports, ok := annual_reports.(primitive.A); ok {
|
|
|
+ for _, anreportmp := range anreports {
|
|
|
+ if anreport, ok := anreportmp.(map[string]interface{}); ok {
|
|
|
+ if websites, ok := anreport["report_websites"].(primitive.A); ok {
|
|
|
+ for _, website := range websites {
|
|
|
+ if rv, ok := website.(map[string]interface{}); ok {
|
|
|
+ web := qu.ObjToString(rv["website_url"])
|
|
|
+ if web != "" {
|
|
|
+ report_websitesArr = append(report_websitesArr, web)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ company_email := qu.ObjToString(anreport["company_email"])
|
|
|
+ if company_email != "" {
|
|
|
+ data["company_email"] = company_email
|
|
|
+ }
|
|
|
+ company_phone := qu.ObjToString(anreport["company_phone"])
|
|
|
+ if company_phone != "" {
|
|
|
+ data["company_phone"] = company_phone
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|