|
@@ -22,6 +22,7 @@ type Transaction struct {
|
|
|
Info_Id string `bson:"info_id"`
|
|
|
Info_Ids []string `bson:"info_ids"`
|
|
|
Information_Id string `bson:"information_id"`
|
|
|
+ BuyerClass string `bson:"buyerclass"`
|
|
|
Buyer string `bson:"buyer"`
|
|
|
Buyer_Id string `bson:"buyer_id"`
|
|
|
Winner []string `bson:"winner"`
|
|
@@ -83,6 +84,7 @@ func IncTransactionDataFromBid() {
|
|
|
"area": 1,
|
|
|
"city": 1,
|
|
|
"district": 1,
|
|
|
+ "buyerclass": 1,
|
|
|
//
|
|
|
"owner": 1,
|
|
|
"s_topscopeclass": 1,
|
|
@@ -160,6 +162,7 @@ func IncTransactionDataFromBid() {
|
|
|
func DealTransactionForBid(tmp map[string]interface{}, business_type string, project_bidstatus int) map[string]interface{} {
|
|
|
//基本信息封装
|
|
|
id := mongodb.BsonIdToSId(tmp["_id"])
|
|
|
+ buyerclass := gconv.String(tmp["buyerclass"])
|
|
|
buyer := gconv.String(tmp["buyer"])
|
|
|
if buyer == "" {
|
|
|
buyer = gconv.String(tmp["owner"])
|
|
@@ -186,11 +189,10 @@ func DealTransactionForBid(tmp map[string]interface{}, business_type string, pro
|
|
|
}
|
|
|
|
|
|
//TODO 情报库信息(待补充)
|
|
|
- information_id := ""
|
|
|
- starttime, endtime := int64(0), int64(0)
|
|
|
+ info := Infomation{}
|
|
|
//if project_bidstatus == 4 {//补充情报信息
|
|
|
// //bidId = "65fbf3f566cf0db42a2a99d2"
|
|
|
- // info := FindInfomationData(id) //情报信息查询
|
|
|
+ // info = FindInfomationData(id) //情报信息查询
|
|
|
// information_id = info.Id
|
|
|
// starttime = info.Starttime
|
|
|
// endtime = info.Endtime
|
|
@@ -201,9 +203,7 @@ func DealTransactionForBid(tmp map[string]interface{}, business_type string, pro
|
|
|
if winner != "" {
|
|
|
winners = strings.Split(winner, ",")
|
|
|
}
|
|
|
- buyer_id, agency_id := "", ""
|
|
|
- winner_ids := []string{}
|
|
|
- //buyer_id, agency_id, winner_ids := FindEntInfoData(id, buyer, agency, winners)
|
|
|
+ buyer_id, agency_id, winner_ids := FindEntInfoData(id, buyer, agency, winners)
|
|
|
//物业信息
|
|
|
t := &Transaction{
|
|
|
Project_Id: id,
|
|
@@ -215,7 +215,8 @@ func DealTransactionForBid(tmp map[string]interface{}, business_type string, pro
|
|
|
Project_Bidstatus: project_bidstatus,
|
|
|
Info_Id: id,
|
|
|
Info_Ids: []string{id},
|
|
|
- Information_Id: information_id,
|
|
|
+ Information_Id: info.Id,
|
|
|
+ BuyerClass: buyerclass,
|
|
|
Buyer: buyer,
|
|
|
Winner: winners,
|
|
|
Agency: agency,
|
|
@@ -230,8 +231,8 @@ func DealTransactionForBid(tmp map[string]interface{}, business_type string, pro
|
|
|
District: gconv.String(tmp["district"]),
|
|
|
ZbTime: gconv.Int64(tmp["publishtime"]),
|
|
|
JgTime: int64(0),
|
|
|
- StartTime: starttime,
|
|
|
- EndTime: endtime,
|
|
|
+ StartTime: info.Starttime,
|
|
|
+ EndTime: info.Endtime,
|
|
|
Create_Time: time.Now().Unix(),
|
|
|
Update_Time: time.Now().Unix(),
|
|
|
//
|
|
@@ -278,6 +279,7 @@ func IncTransactionDataFromPro() {
|
|
|
"zbtime": 1,
|
|
|
"jgtime": 1,
|
|
|
"bidstatus": 1,
|
|
|
+ "buyerclass": 1,
|
|
|
//
|
|
|
"firsttime": 1,
|
|
|
"pici": 1,
|
|
@@ -337,6 +339,7 @@ func IncTransactionDataFromPro() {
|
|
|
func DealTransactionForPro(data map[string]interface{}) map[string]interface{} {
|
|
|
//基本信息封装
|
|
|
id := mongodb.BsonIdToSId(data["_id"])
|
|
|
+ buyerclass := gconv.String(data["buyerclass"])
|
|
|
buyer := gconv.String(data["buyer"])
|
|
|
winner := gconv.String(data["s_winner"])
|
|
|
agency := gconv.String(data["agency"])
|
|
@@ -388,9 +391,7 @@ func DealTransactionForPro(data map[string]interface{}) map[string]interface{} {
|
|
|
if winner != "" {
|
|
|
winners = strings.Split(winner, ",")
|
|
|
}
|
|
|
- buyer_id, agency_id := "", ""
|
|
|
- winner_ids := []string{}
|
|
|
- //buyer_id, agency_id, winner_ids = FindEntInfoData(id, buyer, agency, winners)
|
|
|
+ buyer_id, agency_id, winner_ids := FindEntInfoData(id, buyer, agency, winners)
|
|
|
//物业信息
|
|
|
t := &Transaction{
|
|
|
Project_Id: id,
|
|
@@ -403,6 +404,7 @@ func DealTransactionForPro(data map[string]interface{}) map[string]interface{} {
|
|
|
Info_Id: gconv.String(data["sourceinfoid"]),
|
|
|
Info_Ids: ids,
|
|
|
Information_Id: info.Id,
|
|
|
+ BuyerClass: buyerclass,
|
|
|
Buyer: buyer,
|
|
|
Winner: winners,
|
|
|
Agency: agency,
|