|
@@ -1,10 +1,11 @@
|
|
package util
|
|
package util
|
|
|
|
|
|
import (
|
|
import (
|
|
- "fmt"
|
|
|
|
IC "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/init"
|
|
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/internal/config"
|
|
"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/type/bxcore"
|
|
"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/type/bxcore"
|
|
|
|
+ "fmt"
|
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
"regexp"
|
|
"regexp"
|
|
"strconv"
|
|
"strconv"
|
|
"strings"
|
|
"strings"
|
|
@@ -185,7 +186,7 @@ func IndustryFormat(industry, subScopeClass string) (newIndustry string) {
|
|
}
|
|
}
|
|
|
|
|
|
// SearchListFormat 格式化数据
|
|
// 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 {
|
|
for _, v := range *repl {
|
|
var searchList = &bxcore.SearchList{}
|
|
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.ApproveNumber = MC.ObjToString((*pInfo)["approvenumber"])
|
|
searchList.ProjectInfo.ApproveTime = MC.ObjToString((*pInfo)["approvetime"])
|
|
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)
|
|
list = append(list, searchList)
|
|
}
|
|
}
|
|
return
|
|
return
|