ソースを参照

Merge remote-tracking branch 'origin/master'

WH01243 9 ヶ月 前
コミット
ac971ceeda

+ 42 - 26
api/internal/handler/routes.go

@@ -13,84 +13,100 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 	server.AddRoutes(
 		[]rest.Route{
 			{
+				// 情报详情
 				Method:  http.MethodPost,
-				Path:    "/networkManage/owner/list",
-				Handler: ownerListHandler(serverCtx),
+				Path:    "/networkManage/infomation/detail",
+				Handler: infoDetailHandler(serverCtx),
 			},
 			{
+				// 初始化设置查看
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/project/list",
-				Handler: projectListHandler(serverCtx),
+				Path:    "/networkManage/init/findInitInfo",
+				Handler: findInitInfoHandler(serverCtx),
 			},
 			{
+				// 初始化设置
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/pname/ass",
-				Handler: PrPnameAssHandler(serverCtx),
+				Path:    "/networkManage/init/updateInitInfo",
+				Handler: updateInitInfoHandler(serverCtx),
 			},
 			{
+				// 人脉库-添加/修改人脉
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/project/analyse",
-				Handler: CoopHistoryListHandler(serverCtx),
+				Path:    "/networkManage/network/addOrUpdate",
+				Handler: addOrUpdateHandler(serverCtx),
 			},
 			{
+				// 人脉库-全部人脉项目
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/addOrUpdate",
-				Handler: addOrUpdateHandler(serverCtx),
+				Path:    "/networkManage/network/allProject",
+				Handler: allProjectHandler(serverCtx),
 			},
 			{
+				// 人脉库-业主名称联想
 				Method:  http.MethodPost,
 				Path:    "/networkManage/network/associate",
 				Handler: associateHandler(serverCtx),
 			},
 			{
+				// 人脉库-列表
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/allProject",
-				Handler: allProjectHandler(serverCtx),
+				Path:    "/networkManage/network/networkList",
+				Handler: networkListHandler(serverCtx),
 			},
 			{
+				// 人脉可达商机列表
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/networkList",
-				Handler: networkListHandler(serverCtx),
+				Path:    "/networkManage/network/project/list",
+				Handler: projectListHandler(serverCtx),
 			},
 			{
+				// 可介绍业主合作次数
 				Method:  http.MethodPost,
-				Path:    "/networkManage/infomation/detail",
-				Handler: infoDetailHandler(serverCtx),
+				Path:    "/networkManage/owner/cooperate",
+				Handler: ownerCooperateHandler(serverCtx),
 			},
 			{
+				// 人脉可达潜客业主列表
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/project/history",
-				Handler: projectHistoryHandler(serverCtx),
+				Path:    "/networkManage/owner/list",
+				Handler: ownerListHandler(serverCtx),
 			},
 			{
+				// 可介绍业主路径
 				Method:  http.MethodPost,
 				Path:    "/networkManage/owner/route",
 				Handler: ownerRouteHandler(serverCtx),
 			},
 			{
+				// 公关渠道-标讯收藏项目找人脉
 				Method:  http.MethodPost,
-				Path:    "/networkManage/owner/cooperate",
-				Handler: ownerCooperateHandler(serverCtx),
+				Path:    "/networkManage/pr/collect/list",
+				Handler: PrCollectListHandler(serverCtx),
 			},
 			{
+				// 公关渠道-业主监控项目找人脉
 				Method:  http.MethodPost,
 				Path:    "/networkManage/pr/monitor/list",
 				Handler: PrMonitorListHandler(serverCtx),
 			},
 			{
+				// 项目公关渠道分析-项目名称联想
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/collect/list",
-				Handler: PrCollectListHandler(serverCtx),
+				Path:    "/networkManage/pr/pname/ass",
+				Handler: PrPnameAssHandler(serverCtx),
 			},
 			{
+				// 项目公关渠道分析-与业主合作历史
 				Method:  http.MethodPost,
-				Path:    "/networkManage/init/findInitInfo",
-				Handler: findInitInfoHandler(serverCtx),
+				Path:    "/networkManage/pr/project/analyse",
+				Handler: CoopHistoryListHandler(serverCtx),
 			},
 			{
+				// 人脉项目分析-业主合作历史
 				Method:  http.MethodPost,
-				Path:    "/networkManage/init/updateInitInfo",
-				Handler: updateInitInfoHandler(serverCtx),
+				Path:    "/networkManage/pr/project/history",
+				Handler: projectHistoryHandler(serverCtx),
 			},
 		},
 	)

+ 2 - 1
api/internal/service/CoopHistoryService.go

@@ -76,7 +76,8 @@ type Cooperate struct {
 
 func GetPrList(req *types.CoopHistoryReq) (result []*ResultData, size_1, size_2, size_3, size_4 int64) {
 	pTmp := ProjectTmp{}
-	err := T.ClickhouseConn.QueryRow(context.TODO(), sql_2_0, req.Pid).ScanStruct(&pTmp)
+	pid := encrypt.CommonDecodeArticle("content", req.Pid)
+	err := T.ClickhouseConn.QueryRow(context.TODO(), sql_2_0, pid).ScanStruct(&pTmp)
 	if err != nil {
 		return nil, 0, 0, 0, 0
 	}

+ 142 - 148
api/internal/service/network.go

@@ -573,7 +573,7 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 	if in.Current_page <= 0 {
 		in.Current_page = 1
 	}
-	dbPaging := in.Buyercount_start == 0 && in.Buyercount_end == 0 && in.Monitor == 0 && in.Monitorcount_start == 0 && in.Monitorcount_end == 0 && in.Project_matchme == 0 && in.Order_amount == 0
+	dbPaging := in.Buyercount_start == 0 && in.Buyercount_end == 0 && in.Monitor == 0 && in.Monitorcount_start == 0 && in.Monitorcount_end == 0 && in.Order_amount == 0
 	sqlAppendArgs := []interface{}{}
 	sqlAppend1 := ""
 	if dbPaging && in.Type != "" {
@@ -637,169 +637,163 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 	list := []*map[string]interface{}{}
 	isTjProject := true
 	businessType := []string{}
-	if in.Project_matchme == 1 {
-		businessType = strings.Split(FindBusiness(in.EntId, in.MgoUserId), ",")
-		if len(businessType) == 0 {
-			isTjProject = false
-		}
+	businessType = strings.Split(FindBusiness(in.EntId, in.MgoUserId), ",")
+	if len(businessType) == 0 {
+		isTjProject = false
 	}
-	if isTjProject {
-		entMonitor := NetworkCom.EntMonitor(in.UserId)
-		aio := n.AllIntroduceOwner(sqlAppend1, sqlAppend2, args, isTjProject, businessType, entMonitor)
-		for _, v := range aio.Networks {
-			itype := ""
-			buyer_count, project_count, expect_amount, monitor_count := int64(0), int64(0), float64(0), int64(0)
-			export_id := []string{}
-			jump_type, jump_id := "", ""
-			switch v.Itype {
-			case 1:
-				itype = "甲方"
-				jump_type = "firstparty"
-				for _, vv := range aio.FirstpartyNetwork[v.Company_id] {
-					if jump_id != "" {
-						jump_id += ","
+	entMonitor := NetworkCom.EntMonitor(in.UserId)
+	aio := n.AllIntroduceOwner(sqlAppend1, sqlAppend2, args, isTjProject, businessType, entMonitor)
+	for _, v := range aio.Networks {
+		itype := ""
+		buyer_count, project_count, expect_amount, monitor_count := int64(0), int64(0), float64(0), int64(0)
+		export_id := []string{}
+		jump_type, jump_id := "", ""
+		switch v.Itype {
+		case 1:
+			itype = "甲方"
+			jump_type = "firstparty"
+			for _, vv := range aio.FirstpartyNetwork[v.Company_id] {
+				if jump_id != "" {
+					jump_id += ","
+				}
+				jump_id += vv.CompanyId
+			}
+			if aio.Firstparty[v.Company_id] != nil {
+				buyer_count = aio.Firstparty[v.Company_id].BuyerCount
+				project_count = aio.Firstparty[v.Company_id].ProjectCount
+				expect_amount = aio.Firstparty[v.Company_id].ProjectAmount
+				monitor_count = aio.Firstparty[v.Company_id].MonitorCount
+				export_id = aio.Firstparty[v.Company_id].ExportId
+			}
+		case 2:
+			itype = "供应商"
+			jump_type = "supplier"
+			jump_id = v.Company_id
+			if aio.Supplier[v.Company_id] != nil {
+				buyer_count = aio.Supplier[v.Company_id].BuyerCount
+				project_count = aio.Supplier[v.Company_id].ProjectCount
+				expect_amount = aio.Supplier[v.Company_id].ProjectAmount
+				monitor_count = aio.Supplier[v.Company_id].MonitorCount
+				export_id = aio.Supplier[v.Company_id].ExportId
+			}
+		case 3:
+			itype = "同甲异业渠道"
+			jump_type = "adiffb"
+			jump_id = v.Company_id
+			if aio.Adiffb[v.Company_id] != nil {
+				buyer_count = aio.Adiffb[v.Company_id].BuyerCount
+				project_count = aio.Adiffb[v.Company_id].ProjectCount
+				expect_amount = aio.Adiffb[v.Company_id].ProjectAmount
+				monitor_count = aio.Adiffb[v.Company_id].MonitorCount
+				export_id = aio.Adiffb[v.Company_id].ExportId
+			}
+		case 4:
+			itype = "中间人"
+			jump_type = "middleman"
+			jump_id = fmt.Sprint(v.Id)
+			buyer_count = v.Buyer_count
+			if v.Relate_buyer_name != "" {
+				for _, v := range strings.Split(v.Relate_buyer_name, ",") {
+					if v == "" {
+						continue
+					}
+					if entMonitor[v] {
+						monitor_count++
 					}
-					jump_id += vv.CompanyId
 				}
-				if aio.Firstparty[v.Company_id] != nil {
-					buyer_count = aio.Firstparty[v.Company_id].BuyerCount
-					project_count = aio.Firstparty[v.Company_id].ProjectCount
-					expect_amount = aio.Firstparty[v.Company_id].ProjectAmount
-					monitor_count = aio.Firstparty[v.Company_id].MonitorCount
-					export_id = aio.Firstparty[v.Company_id].ExportId
+			}
+			if v.Relate_project_id != "" {
+				export_id = strings.Split(v.Relate_project_id, ",")
+				for _, v := range export_id {
+					if aio.Middleman[v] != nil {
+						project_count++
+						expect_amount += aio.Middleman[v].ProjectAmount
+					}
 				}
+			}
+		case 5:
+			itype = "招标代理机构"
+			jump_type = "agency"
+			jump_id = v.Company_id
+			if aio.Agency[v.Company_id] != nil {
+				buyer_count = aio.Agency[v.Company_id].BuyerCount
+				project_count = aio.Agency[v.Company_id].ProjectCount
+				expect_amount = aio.Agency[v.Company_id].ProjectAmount
+				monitor_count = aio.Agency[v.Company_id].MonitorCount
+				export_id = aio.Agency[v.Company_id].ExportId
+			}
+		}
+		if buyer_count < in.Buyercount_start {
+			continue
+		} else if in.Buyercount_end > 0 && buyer_count > in.Buyercount_end {
+			continue
+		} else if in.Monitor == 1 && monitor_count <= 0 {
+			continue
+		} else if in.Monitor == -1 && monitor_count > 0 {
+			continue
+		} else if monitor_count < in.Monitorcount_start {
+			continue
+		} else if in.Monitorcount_end > 0 && monitor_count > in.Monitorcount_end {
+			continue
+		}
+		if !dbPaging {
+			switch v.Itype {
+			case 1:
+				firstparty_count++
 			case 2:
-				itype = "供应商"
-				jump_type = "supplier"
-				jump_id = v.Company_id
-				if aio.Supplier[v.Company_id] != nil {
-					buyer_count = aio.Supplier[v.Company_id].BuyerCount
-					project_count = aio.Supplier[v.Company_id].ProjectCount
-					expect_amount = aio.Supplier[v.Company_id].ProjectAmount
-					monitor_count = aio.Supplier[v.Company_id].MonitorCount
-					export_id = aio.Supplier[v.Company_id].ExportId
-				}
+				supplier_count++
 			case 3:
-				itype = "同甲异业渠道"
-				jump_type = "adiffb"
-				jump_id = v.Company_id
-				if aio.Adiffb[v.Company_id] != nil {
-					buyer_count = aio.Adiffb[v.Company_id].BuyerCount
-					project_count = aio.Adiffb[v.Company_id].ProjectCount
-					expect_amount = aio.Adiffb[v.Company_id].ProjectAmount
-					monitor_count = aio.Adiffb[v.Company_id].MonitorCount
-					export_id = aio.Adiffb[v.Company_id].ExportId
-				}
+				adiffb_count++
 			case 4:
-				itype = "中间人"
-				jump_type = "middleman"
-				jump_id = fmt.Sprint(v.Id)
-				buyer_count = v.Buyer_count
-				if v.Relate_buyer_name != "" {
-					for _, v := range strings.Split(v.Relate_buyer_name, ",") {
-						if v == "" {
-							continue
-						}
-						if entMonitor[v] {
-							monitor_count++
-						}
-					}
-				}
-				if v.Relate_project_id != "" {
-					export_id = strings.Split(v.Relate_project_id, ",")
-					for _, v := range export_id {
-						if aio.Middleman[v] != nil {
-							project_count++
-							expect_amount += aio.Middleman[v].ProjectAmount
-						}
-					}
-				}
+				middleman_count++
 			case 5:
-				itype = "招标代理机构"
-				jump_type = "agency"
-				jump_id = v.Company_id
-				if aio.Agency[v.Company_id] != nil {
-					buyer_count = aio.Agency[v.Company_id].BuyerCount
-					project_count = aio.Agency[v.Company_id].ProjectCount
-					expect_amount = aio.Agency[v.Company_id].ProjectAmount
-					monitor_count = aio.Agency[v.Company_id].MonitorCount
-					export_id = aio.Agency[v.Company_id].ExportId
-				}
+				agency_count++
 			}
-			if buyer_count < in.Buyercount_start {
-				continue
-			} else if in.Buyercount_end > 0 && buyer_count > in.Buyercount_end {
-				continue
-			} else if in.Monitor == 1 && monitor_count <= 0 {
-				continue
-			} else if in.Monitor == -1 && monitor_count > 0 {
-				continue
-			} else if monitor_count < in.Monitorcount_start {
-				continue
-			} else if in.Monitorcount_end > 0 && monitor_count > in.Monitorcount_end {
-				continue
-			} else if in.Project_matchme == 1 && project_count == 0 {
+			if in.Type != "" && n.TypeStrConvert(in.Type) != v.Itype {
 				continue
 			}
-			if !dbPaging {
-				switch v.Itype {
-				case 1:
-					firstparty_count++
-				case 2:
-					supplier_count++
-				case 3:
-					adiffb_count++
-				case 4:
-					middleman_count++
-				case 5:
-					agency_count++
-				}
-				if in.Type != "" && n.TypeStrConvert(in.Type) != v.Itype {
+		}
+		export_url := ""
+		if len(export_id) > 0 {
+			exportIdRepeat := map[string]bool{}
+			exportId := ""
+			for _, v := range export_id {
+				if exportIdRepeat[v] {
 					continue
 				}
-			}
-			export_url := ""
-			if len(export_id) > 0 {
-				exportIdRepeat := map[string]bool{}
-				exportId := ""
-				for _, v := range export_id {
-					if exportIdRepeat[v] {
-						continue
-					}
-					exportIdRepeat[v] = true
-					if exportId != "" {
-						exportId += ","
-					}
-					exportId += v
+				exportIdRepeat[v] = true
+				if exportId != "" {
+					exportId += ","
 				}
-				md5Id := GetMd5String(exportId)
-				redis.Put("newother", fmt.Sprintf("network_export_%s", md5Id), exportId, 259200)
-				export_url = "/subscribepay/network/projectExport?export_id=" + md5Id
-			}
-			url := ""
-			if v.Qyxy_id != "" && (jump_type == "supplier" || jump_type == "adiffb") {
-				url = "/swordfish/page_big_pc/ent_portrait/" + encrypt.EncodeArticleId2ByCheck(v.Qyxy_id)
-			} else if jump_type == "firstparty" && v.Company_name != "" {
-				url = "/swordfish/page_big_pc/unit_portrayal/" + v.Company_name
+				exportId += v
 			}
-			list = append(list, &map[string]interface{}{
-				"company_id":    v.Company_id,
-				"company_name":  v.Company_name,
-				"type":          itype,
-				"jump_type":     jump_type,
-				"jump_id":       jump_id,
-				"person":        v.Person,
-				"phone":         v.Phone,
-				"buyer_count":   buyer_count,
-				"monitor_count": monitor_count,
-				"expect_amount": RetainDecimal(expect_amount/10000, 2),
-				"project_count": project_count,
-				"create_time":   v.Create_time,
-				"export_url":    export_url,
-				"url":           url,
-				"id":            v.Id,
-			})
+			md5Id := GetMd5String(exportId)
+			redis.Put("newother", fmt.Sprintf("network_export_%s", md5Id), exportId, 259200)
+			export_url = "/subscribepay/network/projectExport?export_id=" + md5Id
 		}
+		url := ""
+		if v.Qyxy_id != "" && (jump_type == "supplier" || jump_type == "adiffb") {
+			url = "/swordfish/page_big_pc/ent_portrait/" + encrypt.EncodeArticleId2ByCheck(v.Qyxy_id)
+		} else if jump_type == "firstparty" && v.Company_name != "" {
+			url = "/swordfish/page_big_pc/unit_portrayal/" + v.Company_name
+		}
+		list = append(list, &map[string]interface{}{
+			"company_id":    v.Company_id,
+			"company_name":  v.Company_name,
+			"type":          itype,
+			"jump_type":     jump_type,
+			"jump_id":       jump_id,
+			"person":        v.Person,
+			"phone":         v.Phone,
+			"buyer_count":   buyer_count,
+			"monitor_count": monitor_count,
+			"expect_amount": RetainDecimal(expect_amount/10000, 2),
+			"project_count": project_count,
+			"create_time":   v.Create_time,
+			"export_url":    export_url,
+			"url":           url,
+			"id":            v.Id,
+		})
 	}
 	csList := &ComSortList{
 		SortKeys: []*ComSortKey{

+ 2 - 2
api/internal/service/network_test.go

@@ -11,7 +11,7 @@ import (
 	"bp.jydev.jianyu360.cn/CRM/networkManage/api/internal/types"
 )
 
-//go test -test.run=TestAddCustomService -fs=../../etc/crmapplication.yaml -lf=../../etc/logs.yaml -df=../../etc/db.yaml -pf=../../etc/push.yaml
+//go test -test.run=TestNetWorkList -fs=../../etc/networkmanage.yaml -lf=../../etc/logs.yaml -df=../../etc/db.yaml
 
 func TestAddOrUpdate(t *testing.T) {
 	InitConf()
@@ -90,7 +90,7 @@ func TestNetWorkList(t *testing.T) {
 		// Monitorcount_start: 1,
 		// Monitorcount_end:   1,
 		//Monitor: 1,
-		//Project_matchme: 1,
+		Project_matchme: 1,
 		//Starttime: "2024-04-23",
 		//Endtime:   "2024-04-23",
 		//Type: "middleman",

+ 112 - 112
api/internal/types/types.go

@@ -1,71 +1,6 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type Reply struct {
-	Error_code int64       `json:"error_code"`
-	Error_msg  string      `json:"error_msg"`
-	Data       interface{} `json:"data"`
-}
-
-type OwnerListReq struct {
-	PartyA           string `json:"partyA,optional"`           //甲方
-	Supplier         string `json:"supplier,optional"`         //供应商
-	Heterotophy      string `json:"heterotophy,optional"`      //同甲异业
-	Intermediary     string `json:"intermediary,optional"`     //中间人
-	Agency           string `json:"agency,optional"`           //代理机构
-	SearchEntName    string `json:"searchEntName,optional"`    //搜索企业名称
-	SourceType       string `json:"sourceType,optional"`       //搜索类型 1 只看转介绍成功率高2只看已监控的
-	ProcessingStatus string `json:"processingStatus,optional"` //处理状态1未处理2已忽略3已建客户
-	Area             string `json:"area,optional"`             //项目地区
-	PositionId       int64  `header:"positionId,optional"`
-	PageSize         int64  `json:"pageSize,optional"`
-	PageIndex        int64  `json:"pageIndex,optional"`
-	ProjectType      string `json:"projectType,optional"`
-	EntAccountId     int64  `header:"entAccountId"`
-	EntId            int64  `header:"entId,optional"`
-	MgoUserId        string `header:"mgoUserId,optional"` //原userId
-}
-
-type ProjectListReq struct {
-	UserId       string `header:"userId,optional"`
-	PositionId   int64  `header:"positionId,optional"`
-	EntId        string `header:"entId,optional"`
-	EntUserId    string `header:"entUserId,optional"`
-	DeptId       string `header:"deptId,optional"`     //部门id
-	PartyA       string `json:"partyA,optional"`       //甲方
-	Supplier     string `json:"supplier,optional"`     //供应商
-	Heterotophy  string `json:"heterotophy,optional"`  //同甲异业
-	Intermediary string `json:"intermediary,optional"` //中间人
-	Agency       string `json:"agency,optional"`       //代理机构
-	PageNum      int    `json:"pageNum"`
-	PageSize     int    `json:"pageSize"`
-	BusinessType string `json:"businessType"`
-	SaleStatus   string `json:"saleStatus"`
-	ProjectName  string `json:"projectName,optional"`
-	StartTime    int64  `json:"startTime,optional"`
-	EntTime      int64  `json:"entTime,optional"`
-	Area         string `json:"area,optional"`
-	City         string `json:"city,optional"`
-	District     string `json:"district,optional"`
-	PropertyForm string `json:"propertyForm,optional"`
-	SubClass     string `json:"subClass,optional"`
-	Amount       string `json:"amount,optional"`
-}
-
-type PnameAssReq struct {
-	ProjectName string `json:"projectName"`
-}
-
-type CoopHistoryReq struct {
-	EntAccountId int64  `header:"entAccountId,optional"` //企业账户id
-	PositionId   int64  `header:"positionId,optional"`
-	EntId        string `header:"entId,optional"`
-	EntUserId    string `header:"entUserId,optional"`
-	DeptId       string `header:"deptId,optional"` //部门id
-	Pid          string `json:"projectId"`
-	ChannelType  string `json:"channelType"`
-}
-
 type AddOrUpdateReq struct {
 	PositionId              int64  `header:"positionId"`
 	EntUserId               int64  `header:"entUserId,optional"`
@@ -85,6 +20,16 @@ type AddOrUpdateReq struct {
 	Type                    string `json:"type"`
 }
 
+type AllprojectReq struct {
+	EntId        int64  `header:"entId"`
+	MgoUserId    string `header:"mgoUserId"`
+	EntAccountId int64  `header:"entAccountId"`
+	PositionId   int64  `header:"positionId"`
+	Name         string `json:"name,optional"`
+	Type         string `json:"type,optional"`
+	Id           string `json:"id,optional"`
+}
+
 type AssociateReq struct {
 	EntId        int64  `header:"entId"`
 	MgoUserId    string `header:"mgoUserId"`
@@ -94,14 +39,38 @@ type AssociateReq struct {
 	Type         string `json:"type"`
 }
 
-type AllprojectReq struct {
-	EntId        int64  `header:"entId"`
-	MgoUserId    string `header:"mgoUserId"`
-	EntAccountId int64  `header:"entAccountId"`
-	PositionId   int64  `header:"positionId"`
-	Name         string `json:"name,optional"`
-	Type         string `json:"type,optional"`
-	Id           string `json:"id,optional"`
+type CoopHistoryReq struct {
+	EntAccountId int64  `header:"entAccountId,optional"` //企业账户id
+	PositionId   int64  `header:"positionId,optional"`
+	EntId        string `header:"entId,optional"`
+	EntUserId    string `header:"entUserId,optional"`
+	DeptId       string `header:"deptId,optional"` //部门id
+	Pid          string `json:"projectId"`
+	ChannelType  string `json:"channelType"`
+}
+
+type CooperateOwnerListReq struct {
+	BuyerId       string `json:"buyerId,optional"`
+	BuyerName     string `json:"buyerName,optional"`
+	WinnerId      string `json:"winnerId,optional"`
+	WinnerName    string `json:"winnerName,optional"`
+	CooperateType string `json:"cooperateType,optional"`
+	PositionId    int64  `header:"positionId,optional"`
+}
+
+type FindInitInfoReq struct {
+	EntId        int64  `header:"entId,optional"`
+	MgoUserId    string `header:"mgoUserId,optional"` //原userId
+	PositionType int64  `header:"positionType,optional"`
+	NewUserId    int64  `header:"newUserId"`
+	AccountId    int64  `header:"accountId,optional"`
+	PositionId   int64  `header:"positionId,optional"`
+	EntUserId    int64  `header:"entUserId,optional"`
+	EntRole      int64  `header:"entRole,optional"`
+}
+
+type InfoDetailReq struct {
+	InfoId string `json:"infoId"`
 }
 
 type NetWorkListReq struct {
@@ -125,8 +94,44 @@ type NetWorkListReq struct {
 	Monitorcount_end   int64  `json:"monitorcount_end,optional"`
 }
 
-type InfoDetailReq struct {
-	InfoId string `json:"infoId"`
+type OwnerListReq struct {
+	PartyA           string `json:"partyA,optional"`           //甲方
+	Supplier         string `json:"supplier,optional"`         //供应商
+	Heterotophy      string `json:"heterotophy,optional"`      //同甲异业
+	Intermediary     string `json:"intermediary,optional"`     //中间人
+	Agency           string `json:"agency,optional"`           //代理机构
+	SearchEntName    string `json:"searchEntName,optional"`    //搜索企业名称
+	SourceType       string `json:"sourceType,optional"`       //搜索类型 1 只看转介绍成功率高2只看已监控的
+	ProcessingStatus string `json:"processingStatus,optional"` //处理状态1未处理2已忽略3已建客户
+	Area             string `json:"area,optional"`             //项目地区
+	PositionId       int64  `header:"positionId,optional"`
+	PageSize         int64  `json:"pageSize,optional"`
+	PageIndex        int64  `json:"pageIndex,optional"`
+	ProjectType      string `json:"projectType,optional"`
+	EntAccountId     int64  `header:"entAccountId"`
+	EntId            int64  `header:"entId,optional"`
+	MgoUserId        string `header:"mgoUserId,optional"` //原userId
+}
+
+type PnameAssReq struct {
+	ProjectName string `json:"projectName"`
+}
+
+type PrCollectListReq struct {
+	UserId     string `header:"userId,optional"`
+	MgoUserId  string `header:"mgoUserId,optional"`
+	PositionId int64  `header:"positionId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	PageSize   int    `json:"pageSize"`
+	PageNum    int    `json:"pageNum"`
+}
+
+type PrMonitorListReq struct {
+	MgoUserId  string `header:"mgoUserId,optional"`
+	PositionId int64  `header:"positionId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	PageSize   int    `json:"pageSize"`
+	PageNum    int    `json:"pageNum"`
 }
 
 type PrjectHistoryReq struct {
@@ -135,21 +140,44 @@ type PrjectHistoryReq struct {
 	WinnerId string `json:"winnerId"`
 }
 
+type ProjectListReq struct {
+	UserId       string `header:"userId,optional"`
+	PositionId   int64  `header:"positionId,optional"`
+	EntId        string `header:"entId,optional"`
+	EntUserId    string `header:"entUserId,optional"`
+	DeptId       string `header:"deptId,optional"`     //部门id
+	PartyA       string `json:"partyA,optional"`       //甲方
+	Supplier     string `json:"supplier,optional"`     //供应商
+	Heterotophy  string `json:"heterotophy,optional"`  //同甲异业
+	Intermediary string `json:"intermediary,optional"` //中间人
+	Agency       string `json:"agency,optional"`       //代理机构
+	PageNum      int    `json:"pageNum"`
+	PageSize     int    `json:"pageSize"`
+	BusinessType string `json:"businessType"`
+	SaleStatus   string `json:"saleStatus"`
+	ProjectName  string `json:"projectName,optional"`
+	StartTime    int64  `json:"startTime,optional"`
+	EntTime      int64  `json:"entTime,optional"`
+	Area         string `json:"area,optional"`
+	City         string `json:"city,optional"`
+	District     string `json:"district,optional"`
+	PropertyForm string `json:"propertyForm,optional"`
+	SubClass     string `json:"subClass,optional"`
+	Amount       string `json:"amount,optional"`
+}
+
+type Reply struct {
+	Error_code int64       `json:"error_code"`
+	Error_msg  string      `json:"error_msg"`
+	Data       interface{} `json:"data"`
+}
+
 type RouteOwnerListReq struct {
 	BuyerId    string `json:"buyerId,optional"`
 	BuyerName  string `json:"buyerName,optional"`
 	PositionId int64  `header:"positionId,optional"`
 }
 
-type CooperateOwnerListReq struct {
-	BuyerId       string `json:"buyerId,optional"`
-	BuyerName     string `json:"buyerName,optional"`
-	WinnerId      string `json:"winnerId,optional"`
-	WinnerName    string `json:"winnerName,optional"`
-	CooperateType string `json:"cooperateType,optional"`
-	PositionId    int64  `header:"positionId,optional"`
-}
-
 type UpdateInitInfoReq struct {
 	Business     string `json:"business,optional"`
 	Company      string `json:"company,optional"`
@@ -164,31 +192,3 @@ type UpdateInitInfoReq struct {
 	EntName      string `header:"entName,optional"`
 	EntDeptId    int64  `header:"entDeptId,optional"`
 }
-
-type FindInitInfoReq struct {
-	EntId        int64  `header:"entId,optional"`
-	MgoUserId    string `header:"mgoUserId,optional"` //原userId
-	PositionType int64  `header:"positionType,optional"`
-	NewUserId    int64  `header:"newUserId"`
-	AccountId    int64  `header:"accountId,optional"`
-	PositionId   int64  `header:"positionId,optional"`
-	EntUserId    int64  `header:"entUserId,optional"`
-	EntRole      int64  `header:"entRole,optional"`
-}
-
-type PrMonitorListReq struct {
-	MgoUserId  string `header:"mgoUserId,optional"`
-	PositionId int64  `header:"positionId,optional"`
-	EntId      int64  `header:"entId,optional"`
-	PageSize   int    `json:"pageSize"`
-	PageNum    int    `json:"pageNum"`
-}
-
-type PrCollectListReq struct {
-	UserId     string `header:"userId,optional"`
-	MgoUserId  string `header:"mgoUserId,optional"`
-	PositionId int64  `header:"positionId,optional"`
-	EntId      int64  `header:"entId,optional"`
-	PageSize   int    `json:"pageSize"`
-	PageNum    int    `json:"pageNum"`
-}

+ 15 - 14
api/networkmanage.api

@@ -7,15 +7,15 @@ type (
 		Data       interface{} `json:"data"`
 	}
 	OwnerListReq {
-		PartyA           string `json:"partyA,optional"`           //甲方
-		Supplier         string `json:"supplier,optional"`         //供应商
-		Heterotophy      string `json:"heterotophy,optional"`      //同甲异业
-		Intermediary     string `json:"intermediary,optional"`     //中间人
-		Agency           string `json:"agency,optional"`           //代理机构
-		SearchEntName    string `json:"searchEntName,optional"`    //搜索企业名称
-		SourceType       string `json:"sourceType,optional"`       //搜索类型 1 只看转介绍成功率高2只看已监控的
+		PartyA           string `json:"partyA,optional"` //甲方
+		Supplier         string `json:"supplier,optional"` //供应商
+		Heterotophy      string `json:"heterotophy,optional"` //同甲异业
+		Intermediary     string `json:"intermediary,optional"` //中间人
+		Agency           string `json:"agency,optional"` //代理机构
+		SearchEntName    string `json:"searchEntName,optional"` //搜索企业名称
+		SourceType       string `json:"sourceType,optional"` //搜索类型 1 只看转介绍成功率高2只看已监控的
 		ProcessingStatus string `json:"processingStatus,optional"` //处理状态1未处理2已忽略3已建客户
-		Area             string `json:"area,optional"`             //项目地区
+		Area             string `json:"area,optional"` //项目地区
 		PositionId       int64  `header:"positionId,optional"`
 		PageSize         int64  `json:"pageSize,optional"`
 		PageIndex        int64  `json:"pageIndex,optional"`
@@ -29,12 +29,12 @@ type (
 		PositionId   int64  `header:"positionId,optional"`
 		EntId        string `header:"entId,optional"`
 		EntUserId    string `header:"entUserId,optional"`
-		DeptId       string `header:"deptId,optional"`     //部门id
-		PartyA       string `json:"partyA,optional"`       //甲方
-		Supplier     string `json:"supplier,optional"`     //供应商
-		Heterotophy  string `json:"heterotophy,optional"`  //同甲异业
+		DeptId       string `header:"deptId,optional"` //部门id
+		PartyA       string `json:"partyA,optional"` //甲方
+		Supplier     string `json:"supplier,optional"` //供应商
+		Heterotophy  string `json:"heterotophy,optional"` //同甲异业
 		Intermediary string `json:"intermediary,optional"` //中间人
-		Agency       string `json:"agency,optional"`       //代理机构
+		Agency       string `json:"agency,optional"` //代理机构
 		PageNum      int    `json:"pageNum"`
 		PageSize     int    `json:"pageSize"`
 		BusinessType string `json:"businessType"`
@@ -242,4 +242,5 @@ service networkManage {
 	@doc "初始化设置"
 	@handler updateInitInfo
 	post /networkManage/init/updateInitInfo (UpdateInitInfoReq) returns (Reply)
-}
+}
+