|
@@ -26,7 +26,7 @@ func main() {
|
|
|
//HisTransactionDataFromProject() //历史项目数据(projectset_20230904)TODO 待补充业态、情报信息、法人信息
|
|
|
//临时处理(信息补充)
|
|
|
//HisTransactionDataAddInformation() //历史信息补充法人库信息,项目信息补充业态property_form
|
|
|
- //IncTransactionDataMgoToCkh() //数据迁移
|
|
|
+ //IncTransactionDataMgoToCkhAndEs() //数据迁移
|
|
|
ch := make(chan bool)
|
|
|
<-ch
|
|
|
}
|
|
@@ -38,7 +38,7 @@ func tmp() {
|
|
|
wg := &sync.WaitGroup{}
|
|
|
lock := &sync.Mutex{}
|
|
|
query := map[string]interface{}{
|
|
|
- //"zbtime": 0,
|
|
|
+ "business_type": "新增项目",
|
|
|
}
|
|
|
it := sess.DB(MgoPro.DbName).C("projectset_wy").Find(&query).Iter()
|
|
|
n := 0
|
|
@@ -51,12 +51,16 @@ func tmp() {
|
|
|
<-ch
|
|
|
wg.Done()
|
|
|
}()
|
|
|
- info_id := gconv.String(tmp["info_id"])
|
|
|
update := []map[string]interface{}{
|
|
|
{"_id": tmp["_id"]},
|
|
|
}
|
|
|
- set := map[string]interface{}{
|
|
|
- "info_ids": []string{info_id},
|
|
|
+ set := map[string]interface{}{}
|
|
|
+ info_id := gconv.String(tmp["info_id"])
|
|
|
+ data, _ := MgoB.FindById("bidding", info_id, map[string]interface{}{"owner": 1})
|
|
|
+ if gconv.String(tmp["buyer"]) == "" {
|
|
|
+ set["buyer"] = gconv.String((*data)["owner"])
|
|
|
+ } else {
|
|
|
+ return
|
|
|
}
|
|
|
update = append(update, map[string]interface{}{"$set": set})
|
|
|
lock.Lock()
|