|
@@ -452,7 +452,7 @@ func Findfirstparty(buyerArr []string, returnData []map[string]interface{}) []ma
|
|
}
|
|
}
|
|
personMap := map[string]string{}
|
|
personMap := map[string]string{}
|
|
if len(entIdArr) > 0 {
|
|
if len(entIdArr) > 0 {
|
|
- personSql := fmt.Sprintf(`select id,name from ent_contact where id in (%s) ORDER by name`, strings.Join(entIdArr, ","))
|
|
|
|
|
|
+ personSql := fmt.Sprintf(`select id,name as personName from ent_contact where id in (%s) ORDER by name`, strings.Join(entIdArr, ","))
|
|
personArr := PersonFindConnectionsHandle(personSql)
|
|
personArr := PersonFindConnectionsHandle(personSql)
|
|
//联系人处理
|
|
//联系人处理
|
|
for _, v := range personArr {
|
|
for _, v := range personArr {
|
|
@@ -499,7 +499,7 @@ func Findfirstparty(buyerArr []string, returnData []map[string]interface{}) []ma
|
|
"a_id": v.Aid,
|
|
"a_id": v.Aid,
|
|
"sourceType": "firstparty",
|
|
"sourceType": "firstparty",
|
|
"relationship": "业主的上级机构",
|
|
"relationship": "业主的上级机构",
|
|
- "personName": gconv.String(personMap[v.Aid]),
|
|
|
|
|
|
+ "personName": gconv.String(personMap[v.Bid]),
|
|
})
|
|
})
|
|
}
|
|
}
|
|
if code == "0201" {
|
|
if code == "0201" {
|
|
@@ -510,7 +510,7 @@ func Findfirstparty(buyerArr []string, returnData []map[string]interface{}) []ma
|
|
"a_id": v.Aid,
|
|
"a_id": v.Aid,
|
|
"sourceType": "firstparty",
|
|
"sourceType": "firstparty",
|
|
"relationship": "业主的股东",
|
|
"relationship": "业主的股东",
|
|
- "personName": gconv.String(personMap[v.Aid]),
|
|
|
|
|
|
+ "personName": gconv.String(personMap[v.Bid]),
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1102,10 +1102,11 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
|
|
near, zbtime := LastTimeCoop(buyerId, common.ObjToString(m["name"]), "adiffb")
|
|
near, zbtime := LastTimeCoop(buyerId, common.ObjToString(m["name"]), "adiffb")
|
|
tmp := ResultData{
|
|
tmp := ResultData{
|
|
SourceType: "adiffb",
|
|
SourceType: "adiffb",
|
|
- BuyerId: common.ObjToString(m["nameId"]),
|
|
|
|
|
|
+ EntId: common.ObjToString(m["nameId"]),
|
|
EntName: common.ObjToString(m["name"]),
|
|
EntName: common.ObjToString(m["name"]),
|
|
ProjectNum: common.IntAll(m["coop_size"]),
|
|
ProjectNum: common.IntAll(m["coop_size"]),
|
|
TotalAmount: common.Float64All(m["coop_amount"]),
|
|
TotalAmount: common.Float64All(m["coop_amount"]),
|
|
|
|
+ BuyerId: buyerId,
|
|
RecentTime: zbtime,
|
|
RecentTime: zbtime,
|
|
NearlyYears: near,
|
|
NearlyYears: near,
|
|
}
|
|
}
|
|
@@ -1126,7 +1127,8 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
|
|
TotalAmount: common.Float64All(m["coop_amount"]),
|
|
TotalAmount: common.Float64All(m["coop_amount"]),
|
|
RecentTime: zbtime,
|
|
RecentTime: zbtime,
|
|
NearlyYears: near,
|
|
NearlyYears: near,
|
|
- BuyerId: common.ObjToString(m["nameId"]),
|
|
|
|
|
|
+ EntId: common.ObjToString(m["nameId"]),
|
|
|
|
+ BuyerId: buyerId,
|
|
}
|
|
}
|
|
if tmp.BuyerId == "" {
|
|
if tmp.BuyerId == "" {
|
|
continue
|
|
continue
|
|
@@ -1146,7 +1148,8 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
|
|
EntName: common.ObjToString(m["b_name"]),
|
|
EntName: common.ObjToString(m["b_name"]),
|
|
EntPerson: common.ObjToString(m["personName"]),
|
|
EntPerson: common.ObjToString(m["personName"]),
|
|
Relationship: "业主的关系人",
|
|
Relationship: "业主的关系人",
|
|
- BuyerId: common.ObjToString(m["b_id"]),
|
|
|
|
|
|
+ EntId: common.ObjToString(m["b_id"]),
|
|
|
|
+ BuyerId: buyerId,
|
|
}
|
|
}
|
|
if tmp.BuyerId == "" {
|
|
if tmp.BuyerId == "" {
|
|
continue
|
|
continue
|
|
@@ -1165,7 +1168,8 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
|
|
EntName: common.ObjToString(m["b_name"]),
|
|
EntName: common.ObjToString(m["b_name"]),
|
|
EntPerson: common.ObjToString(m["personName"]),
|
|
EntPerson: common.ObjToString(m["personName"]),
|
|
Relationship: common.ObjToString(m["relationship"]),
|
|
Relationship: common.ObjToString(m["relationship"]),
|
|
- BuyerId: common.ObjToString(m["b_id"]),
|
|
|
|
|
|
+ EntId: common.ObjToString(m["b_id"]),
|
|
|
|
+ BuyerId: buyerId,
|
|
}
|
|
}
|
|
if tmp.BuyerId == "" {
|
|
if tmp.BuyerId == "" {
|
|
continue
|
|
continue
|