|
@@ -48,16 +48,14 @@ type OwnerService struct {
|
|
}
|
|
}
|
|
|
|
|
|
type BuyerProject struct {
|
|
type BuyerProject struct {
|
|
- BuyerId string
|
|
|
|
- BuyerName string
|
|
|
|
- Project ProjectEntity
|
|
|
|
- IsMonitor bool
|
|
|
|
- IsCreateCustomer bool
|
|
|
|
- IsIgnore bool
|
|
|
|
- Area string
|
|
|
|
- Zbtime int64
|
|
|
|
- BuyerType string
|
|
|
|
- CId string
|
|
|
|
|
|
+ BuyerId string
|
|
|
|
+ BuyerName string
|
|
|
|
+ Project ProjectEntity
|
|
|
|
+ IsMonitor bool
|
|
|
|
+ Area string
|
|
|
|
+ Zbtime int64
|
|
|
|
+ BuyerType string
|
|
|
|
+ CId string
|
|
}
|
|
}
|
|
type ProjectEntity struct {
|
|
type ProjectEntity struct {
|
|
Number int64
|
|
Number int64
|
|
@@ -111,8 +109,9 @@ func (t *OwnerService) OwnerlList() map[string]interface{} {
|
|
}
|
|
}
|
|
//项目数量处理
|
|
//项目数量处理
|
|
projectMap, _, dataMap = ProjectHandle(buyerArr, t.EntAccountId, t.SearchEntName, t.Area, businessStr, dataMap)
|
|
projectMap, _, dataMap = ProjectHandle(buyerArr, t.EntAccountId, t.SearchEntName, t.Area, businessStr, dataMap)
|
|
|
|
+ } else {
|
|
|
|
+ return map[string]interface{}{}
|
|
}
|
|
}
|
|
-
|
|
|
|
endTime := time.Now().Unix()
|
|
endTime := time.Now().Unix()
|
|
fmt.Println("用时时间:", endTime-startTime)
|
|
fmt.Println("用时时间:", endTime-startTime)
|
|
if len(*dataMap) == 0 {
|
|
if len(*dataMap) == 0 {
|
|
@@ -151,7 +150,6 @@ func (t *OwnerService) OwnerlList() map[string]interface{} {
|
|
if value.BuyerId != "" {
|
|
if value.BuyerId != "" {
|
|
buyerIdArr = append(buyerIdArr, fmt.Sprintf("'%s'", value.BuyerId))
|
|
buyerIdArr = append(buyerIdArr, fmt.Sprintf("'%s'", value.BuyerId))
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
//可介绍业主人脉处理
|
|
//可介绍业主人脉处理
|
|
a3 := time.Now().Unix()
|
|
a3 := time.Now().Unix()
|
|
@@ -648,45 +646,6 @@ func FindStatus(positionId int64) (map[string]bool, map[string]bool, map[string]
|
|
return untreatedMap, ignoredMap, createdMap
|
|
return untreatedMap, ignoredMap, createdMap
|
|
}
|
|
}
|
|
|
|
|
|
-// 处理状态初始化
|
|
|
|
-func ProcessingStatusInit(positionId int64, dataMap *map[string]map[string]interface{}, processingStatus string) {
|
|
|
|
- //收录数据处理
|
|
|
|
- untreatedMap, ignoredMap, createdMap := FindStatus(positionId)
|
|
|
|
- newMap := &map[string]map[string]interface{}{}
|
|
|
|
- //所有采购单位和处理状态对比
|
|
|
|
- for buyerId, value := range *dataMap {
|
|
|
|
- if _, ok := ignoredMap[buyerId]; ok {
|
|
|
|
- value["isIgnore"] = true
|
|
|
|
- }
|
|
|
|
- if _, ok := createdMap[buyerId]; ok {
|
|
|
|
- value["isCreateCustomer"] = true
|
|
|
|
- }
|
|
|
|
- for _, v := range strings.Split(processingStatus, ",") {
|
|
|
|
- switch v {
|
|
|
|
- case "1":
|
|
|
|
- if _, ok := untreatedMap[buyerId]; !ok {
|
|
|
|
- (*newMap)[buyerId] = value
|
|
|
|
- }
|
|
|
|
- case "2":
|
|
|
|
- if _, ok := ignoredMap[buyerId]; ok {
|
|
|
|
- (*newMap)[buyerId] = value
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- case "3":
|
|
|
|
- if _, ok := createdMap[buyerId]; ok {
|
|
|
|
- (*newMap)[buyerId] = value
|
|
|
|
- }
|
|
|
|
- case "全部", "":
|
|
|
|
- (*newMap)[buyerId] = value
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- if newMap != nil {
|
|
|
|
- *dataMap = *newMap
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// 采购单位查询
|
|
// 采购单位查询
|
|
func BuyerList(partyA, supplier, heterotophy, intermediary, agency string, positionId int64) *map[string]map[string]interface{} {
|
|
func BuyerList(partyA, supplier, heterotophy, intermediary, agency string, positionId int64) *map[string]map[string]interface{} {
|
|
dataMap := &map[string]map[string]interface{}{}
|
|
dataMap := &map[string]map[string]interface{}{}
|
|
@@ -758,7 +717,7 @@ func BuyerList(partyA, supplier, heterotophy, intermediary, agency string, posit
|
|
return dataMap
|
|
return dataMap
|
|
}
|
|
}
|
|
|
|
|
|
-// 项目数量查询
|
|
|
|
|
|
+// 项目数量查
|
|
func ProjectHandle(buyerArr []string, entAccountId int64, entName, area, businessStr string, dataMap *map[string]map[string]interface{}) (*map[string]map[string]interface{}, *map[string]map[string]interface{}, *map[string]map[string]interface{}) {
|
|
func ProjectHandle(buyerArr []string, entAccountId int64, entName, area, businessStr string, dataMap *map[string]map[string]interface{}) (*map[string]map[string]interface{}, *map[string]map[string]interface{}, *map[string]map[string]interface{}) {
|
|
projectMap := &map[string]map[string]interface{}{}
|
|
projectMap := &map[string]map[string]interface{}{}
|
|
returnMap := &map[string]map[string]interface{}{}
|
|
returnMap := &map[string]map[string]interface{}{}
|