|
@@ -115,10 +115,10 @@ func GetPrList(req *types.CoopHistoryReq) *PrListRes {
|
|
|
// firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 agency:招标代理机构 sup_sub: 上下级
|
|
|
// 1、同甲异业数据/ 3、招标代理机构渠道
|
|
|
// 中间人可介绍业主
|
|
|
+ var r3 []map[string]interface{}
|
|
|
+ r3 = FindMiddleman([]string{fmt.Sprintf("'%s'", pTmp.BuyerId)}, req.PositionId, r3)
|
|
|
+ prListRes.Size_4 = int64(len(r3))
|
|
|
if req.ChannelType == "0" || req.ChannelType == "4" {
|
|
|
- var r3 []map[string]interface{}
|
|
|
- r3 = FindMiddleman([]string{fmt.Sprintf("'%s'", pTmp.BuyerId)}, req.PositionId, r3)
|
|
|
- prListRes.Size_4 = int64(len(r3))
|
|
|
for _, m := range r3 {
|
|
|
tmp := ResultData{
|
|
|
SourceType: "middleman",
|
|
@@ -132,10 +132,10 @@ func GetPrList(req *types.CoopHistoryReq) *PrListRes {
|
|
|
}
|
|
|
}
|
|
|
// 关联单位
|
|
|
+ var r4 []map[string]interface{}
|
|
|
+ r4 = Findfirstparty([]string{fmt.Sprintf("'%s'", pTmp.BuyerId)}, r4)
|
|
|
+ prListRes.Size_2 = int64(len(r4))
|
|
|
if req.ChannelType == "0" || req.ChannelType == "2" {
|
|
|
- var r4 []map[string]interface{}
|
|
|
- r4 = Findfirstparty([]string{fmt.Sprintf("'%s'", pTmp.BuyerId)}, r4)
|
|
|
- prListRes.Size_2 = int64(len(r4))
|
|
|
for _, m := range r4 {
|
|
|
tmp := ResultData{
|
|
|
SourceType: "sup_sub",
|
|
@@ -148,10 +148,10 @@ func GetPrList(req *types.CoopHistoryReq) *PrListRes {
|
|
|
prListRes.Result = append(prListRes.Result, &tmp)
|
|
|
}
|
|
|
}
|
|
|
+ scopeClass := FindBusiness(req.EntId, req.EntUserId)
|
|
|
+ r1 := GetWinnerData(scopeClass, pTmp.BuyerId)
|
|
|
+ prListRes.Size_1 = int64(len(r1))
|
|
|
if req.ChannelType == "0" || req.ChannelType == "1" {
|
|
|
- scopeClass := FindBusiness(req.EntId, req.EntUserId)
|
|
|
- r1 := GetWinnerData(scopeClass, pTmp.BuyerId)
|
|
|
- prListRes.Size_1 = int64(len(r1))
|
|
|
for _, m := range r1 {
|
|
|
tmp := ResultData{
|
|
|
SourceType: "adiffb",
|
|
@@ -167,9 +167,9 @@ func GetPrList(req *types.CoopHistoryReq) *PrListRes {
|
|
|
prListRes.Result = append(prListRes.Result, &tmp)
|
|
|
}
|
|
|
}
|
|
|
+ r2 := GetAgencyData(pTmp.BuyerId)
|
|
|
+ prListRes.Size_3 = int64(len(r2))
|
|
|
if req.ChannelType == "0" || req.ChannelType == "3" {
|
|
|
- r2 := GetAgencyData(pTmp.BuyerId)
|
|
|
- prListRes.Size_3 = int64(len(r2))
|
|
|
for _, m := range r2 {
|
|
|
tmp := ResultData{
|
|
|
SourceType: "agency",
|