|
@@ -3,6 +3,7 @@ package main
|
|
|
import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
+ "regexp"
|
|
|
"strings"
|
|
|
"sync"
|
|
|
"time"
|
|
@@ -47,6 +48,8 @@ type Transaction struct {
|
|
|
// From string `bson:"from"`
|
|
|
}
|
|
|
|
|
|
+var regLetter = regexp.MustCompile("[a-z]*")
|
|
|
+
|
|
|
func IncTransactionDataFromBidAndPro() {
|
|
|
// IncTransactionDataFromBid() //bidding
|
|
|
IncTransactionDataFromPro() //project
|
|
@@ -365,9 +368,17 @@ func DealTransactionForPro(data map[string]interface{}) map[string]interface{} {
|
|
|
ids := gconv.Strings(data["ids"])
|
|
|
// info := FindInfomationData(ids...) //情报信息查询
|
|
|
topscopeclass := []string{}
|
|
|
- s_topscopeclass := gconv.String(data["s_topscopeclass"])
|
|
|
- if s_topscopeclass != "" {
|
|
|
- topscopeclass = strings.Split(s_topscopeclass, ",")
|
|
|
+ // s_topscopeclass := gconv.String(data["s_topscopeclass"])
|
|
|
+ // if s_topscopeclass != "" {
|
|
|
+ // topscopeclass = strings.Split(s_topscopeclass, ",")
|
|
|
+ // }
|
|
|
+ if data["topscopeclass"] != nil {
|
|
|
+ if topscopeclasss, ok := data["topscopeclass"].([]interface{}); ok {
|
|
|
+ for _, v := range topscopeclasss {
|
|
|
+ tclass := regLetter.ReplaceAllString(gconv.String(v), "") // 去除字母
|
|
|
+ topscopeclass = append(topscopeclass, tclass)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
//查询法人信息
|
|
|
winners := []string{}
|
|
@@ -389,7 +400,7 @@ func DealTransactionForPro(data map[string]interface{}) map[string]interface{} {
|
|
|
// Information_Id: info.Id,
|
|
|
BuyerClass: buyerclass,
|
|
|
Buyer: buyer,
|
|
|
- Topscopeclass: data["s_topscopeclass"],
|
|
|
+ Topscopeclass: topscopeclass,
|
|
|
Winner: winners,
|
|
|
Agency: agency,
|
|
|
Buyer_Id: buyer_id,
|