wangshan vor 1 Jahr
Ursprung
Commit
180d405729

+ 8 - 8
jyBXCore/api/bxcore.api

@@ -46,13 +46,13 @@ type (
 		Buyer           string   `json:"buyer,optional"`          //采购单位
 		Winner          string   `json:"winner,optional"`         //中标企业
 		Agency          string   `json:"agency,optional"`         //代理机构
-		PropertyForm    string   `json:"propertyForm"`            //物业版本参数接收 start--//物业业态
-		ExpireTime      string   `json:"expireTime"`              //到期时间
-		SubInformation  string   `json:"subInformation"`          //业务类型
-		Period          string   `json:"period"`                  //合同周期
-		ChangeHand      int      `json:"changeHand"`              // 换手率
-		Scale           string   `json:"scale"`                   //物业版本参数接收 end--//价格区间
-		MobileTag       []string `json:"mobileTag"`               //融创 //P513中国移动定制招标采购搜索
+		PropertyForm    string   `json:"propertyForm,optional"`   //物业版本参数接收 start--//物业业态
+		ExpireTime      string   `json:"expireTime,optional"`     //到期时间
+		SubInformation  string   `json:"subInformation,optional"` //业务类型
+		Period          string   `json:"period,optional"`         //合同周期
+		ChangeHand      int      `json:"changeHand,optional"`     // 换手率
+		Scale           string   `json:"scale,optional"`          //物业版本参数接收 end--//价格区间
+		MobileTag       []string `json:"mobileTag,optional"`      //融创 //P513中国移动定制招标采购搜索
 	}
 	//
 	commonResp {
@@ -258,4 +258,4 @@ service bxcore-api {
 	post /jybx/core/property/searchCriteria () returns (commonResp)
 	@handler mobileHotWord
 	post /jybx/core/mobileHotWord (mobileHotWordReq) returns (commonResp)
-}
+}

+ 7 - 7
jyBXCore/api/internal/types/types.go

@@ -39,13 +39,13 @@ type SearchReq struct {
 	Buyer           string   `json:"buyer,optional"`          //采购单位
 	Winner          string   `json:"winner,optional"`         //中标企业
 	Agency          string   `json:"agency,optional"`         //代理机构
-	PropertyForm    string   `json:"propertyForm"`            //物业版本参数接收 start--//物业业态
-	ExpireTime      string   `json:"expireTime"`              //到期时间
-	SubInformation  string   `json:"subInformation"`          //业务类型
-	Period          string   `json:"period"`                  //合同周期
-	ChangeHand      int      `json:"changeHand"`              // 换手率
-	Scale           string   `json:"scale"`                   //物业版本参数接收 end--//价格区间
-	MobileTag       []string `json:"mobileTag"`               //融创
+	PropertyForm    string   `json:"propertyForm,optional"`   //物业版本参数接收 start--//物业业态
+	ExpireTime      string   `json:"expireTime,optional"`     //到期时间
+	SubInformation  string   `json:"subInformation,optional"` //业务类型
+	Period          string   `json:"period,optional"`         //合同周期
+	ChangeHand      int      `json:"changeHand,optional"`     // 换手率
+	Scale           string   `json:"scale,optional"`          //物业版本参数接收 end--//价格区间
+	MobileTag       []string `json:"mobileTag,optional"`      //融创 //P513中国移动定制招标采购搜索
 }
 
 type CommonResp struct {

+ 7 - 0
jyBXCore/rpc/bxcore.proto

@@ -109,6 +109,13 @@ message  SearchList {
   PInfo  projectInfo = 31;//拟建项目信息
   string winner = 32;//中标企业
   bool filetext_search = 33;  // 检索信息只存在附件中
+  BI bi = 34;//BI
+}
+//物业专版 BI
+message BI {
+  string tagSubInformation =1;
+  repeated string tagTopInformation =2;
+  string propertyForm = 3;
 }
 //
 message WinnerInfo{

+ 1 - 0
jyBXCore/rpc/bxcore/bxcore.go

@@ -13,6 +13,7 @@ import (
 )
 
 type (
+	BI                       = bxcore.BI
 	BidTypeReq               = bxcore.BidTypeReq
 	DetailData               = bxcore.DetailData
 	DetailDataRes            = bxcore.DetailDataRes

+ 1 - 1
jyBXCore/rpc/service/search.go

@@ -90,7 +90,7 @@ func GetBidSearchData(in *bxcore.SearchReq, isCache bool) (count int64, list []*
 		}
 		if repl != nil && *repl != nil && len(*repl) > 0 {
 			//格式化查询结果
-			list = util.SearchListFormat(in.UserId, in.Industry, repl, strings.Contains(in.SelectType, "detail"))
+			list = util.SearchListFormat(in.UserId, in.SubInformation, in.PropertyForm, in.Industry, repl, strings.Contains(in.SelectType, "detail"), in.BidField)
 		} else {
 			log.Println("查询数据异常")
 		}

Datei-Diff unterdrückt, da er zu groß ist
+ 174 - 102
jyBXCore/rpc/type/bxcore/bxcore.pb.go


+ 59 - 2
jyBXCore/rpc/util/search.go

@@ -1,10 +1,11 @@
 package util
 
 import (
-	"fmt"
 	IC "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/init"
 	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/internal/config"
 	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/type/bxcore"
+	"fmt"
+	"github.com/gogf/gf/v2/util/gconv"
 	"regexp"
 	"strconv"
 	"strings"
@@ -185,7 +186,7 @@ func IndustryFormat(industry, subScopeClass string) (newIndustry string) {
 }
 
 // SearchListFormat  格式化数据
-func SearchListFormat(userid, industry string, repl *[]map[string]interface{}, b bool) (list []*bxcore.SearchList) {
+func SearchListFormat(userid, subInformation, propertyForm, industry string, repl *[]map[string]interface{}, b bool, bidField string) (list []*bxcore.SearchList) {
 	for _, v := range *repl {
 		var searchList = &bxcore.SearchList{}
 		//正文
@@ -263,6 +264,62 @@ func SearchListFormat(userid, industry string, repl *[]map[string]interface{}, b
 			searchList.ProjectInfo.ApproveNumber = MC.ObjToString((*pInfo)["approvenumber"])
 			searchList.ProjectInfo.ApproveTime = MC.ObjToString((*pInfo)["approvetime"])
 		}
+		if bidField == "BIProperty" {
+			searchList.FileExists = false
+			//物业数据处理
+			searchList.Bi.TagTopInformation = gconv.SliceStr(v["tag_topinformation"])
+			subinformationArr := gconv.SliceStr(v["tag_subinformation"])
+			if len(subinformationArr) > 0 {
+				if len(subInformation) > 0 {
+					fool := false
+					for _, s1 := range subinformationArr {
+						for _, s2 := range strings.Split(subInformation, ",") {
+							if s2 == s1 {
+								searchList.Bi.TagSubInformation = strings.Split(s1, "_")[1]
+								fool = true
+								break
+							}
+						}
+						if fool {
+							break
+						}
+					}
+				} else {
+					searchList.Bi.TagSubInformation = strings.Split(subinformationArr[0], "_")[1]
+				}
+			}
+			//是否有附件
+			tag := gconv.Map(v["tag_set"])
+			if tag != nil {
+				wuye := gconv.Map(tag["wuye"])
+				if tag != nil {
+					isFile := gconv.Int64(wuye["isfile"])
+					propertyFormStr := gconv.String(wuye["property_form"])
+					if isFile == 63 {
+						searchList.FileExists = true
+					}
+					if propertyFormStr != "" {
+						if propertyForm != "" {
+							fool := false
+							for _, s1 := range strings.Split(propertyFormStr, ",") {
+								for _, s2 := range strings.Split(propertyForm, ",") {
+									if s2 == s1 {
+										searchList.Bi.PropertyForm = s2
+										fool = true
+										break
+									}
+								}
+								if fool {
+									break
+								}
+							}
+						} else {
+							searchList.Bi.PropertyForm = strings.Split(propertyFormStr, ",")[0]
+						}
+					}
+				}
+			}
+		}
 		list = append(list, searchList)
 	}
 	return

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.